/*
 * AK Producer component styles.
 *
 * The plugin owns the internal presentation of its components. Divi/the theme
 * owns page sections, row widths, outer spacing and overall page composition.
 */
.ak-producer-featured,
.ak-product-producer,
.ak-producers-list {
	box-sizing: border-box;
}

/* Keep P&L plugin heading scale consistent rather than inheriting oversized
 * theme defaults. Each heading also has its own targetable component class. */
.ak-single-producer__title {
	font-size: 3rem;
}

.ak-producer-story__title,
.ak-producer-card__title {
	font-size: 1.4rem;
}

.ak-producer-story {
	display: grid;
	grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
	overflow: hidden;
	border-radius: 16px;
}

/* Homepage treatment from the supplied redesign reference. */
.ak-producer-featured .ak-producer-story {
	background: #f4ede0;
	border: 1px solid rgba(22, 50, 87, .1);
}

/* Product treatment from the supplied Farmer Story reference. */
.ak-product-producer .ak-producer-story {
	background: #163257;
	color: #f4ede0;
}

/* Blends may reference several Producers. Keep the simple story-card treatment
 * and stack cards vertically rather than introducing tabs/carousels prematurely. */
.ak-product-producer__stories {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.ak-producer-story__media {
	min-height: 400px;
	overflow: hidden;
}

.ak-producer-story__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* WooCommerce declares .woocommerce img { height:auto }. This more-specific
 * component selector intentionally restores the full-height artwork treatment
 * only for the homepage featured Producer, without resorting to !important. */
.woocommerce .ak-producer-featured .ak-producer-story__image,
.woocommerce-page .ak-producer-featured .ak-producer-story__image,
.woocommerce .ak-product-producer .ak-producer-story__image,
.woocommerce-page .ak-product-producer .ak-producer-story__image {
	height: 100%;
}

.ak-producer-story__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 1rem;
	padding: 1.5rem;
}

.ak-producer-story__eyebrow {
	margin: 0;
	text-transform: uppercase;
	letter-spacing: .12em;
	font-size: .75rem;
	font-weight: 700;
}

.ak-producer-story__title,
.ak-producer-story__location,
.ak-producer-story__quote,
.ak-producer-story__excerpt,
.ak-producer-story__cta {
	margin-top: 0;
	margin-bottom: 0;
}

.ak-producer-featured .ak-producer-story__location {
	color: #4a4a4a;
}

.ak-producer-story__quote {
	padding-left: 1.125rem;
	border-left: 2px solid #c9a05c;
	font-style: italic;
	line-height: 1.6;
	color: inherit;
}

.ak-producer-story__quote p { margin: 0; }
.ak-producer-story__quote cite {
	display: block;
	margin-top: .75rem;
	font-style: normal;
}

.ak-product-producer .ak-producer-story__eyebrow { color: #c9a05c; }
.ak-product-producer .ak-producer-story__title { color: #a02b43; }
.ak-product-producer .ak-producer-story__cta a {
	color: #c9a05c;
	font-weight: 700;
}

/* Product characteristics are deliberately a horizontal badge component.
 * These classes match the markup emitted by render_coffee_attributes(). */
.ak-product-attributes {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
	margin: 2.25rem 0 0;
}

.ak-product-attributes__item {
	padding: 1.5rem;
	border-radius: 10px;
	background: #c9a05c;
}

.ak-product-attributes dt {
	color: #163257;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
}

.ak-product-attributes dd {
	margin: .5rem 0 0;
	color: #163257;
	font-size: 1.5rem;
	font-weight: 700;
}

.ak-producers-list {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.ak-producer-card {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 14px;
}

/* P&L listing cards use the AK Events spacing/radius vocabulary. The anchor is
 * the grid so the complete card is a native click target without JavaScript. */
.ak-producer-card__link {
	display: grid;
	grid-template-columns: minmax(180px, 32%) minmax(0, 1fr);
	gap: 28px;
	align-items: center;
	padding: 24px 28px;
	color: inherit;
	text-decoration: none;
}

.ak-producer-card__link:hover,
.ak-producer-card__link:focus {
	color: inherit;
	text-decoration: none;
}

/* Listing images stay left aligned and retain their intrinsic aspect ratio.
 * A height ceiling copes gracefully with square/portrait uploads: whitespace is
 * preferable to enlarging, distorting or arbitrarily cropping editorial images. */
.ak-producer-card__media {
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
}

.ak-producer-card__image {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 240px;
	border-radius: 16px;
}

.ak-producer-card__content { display: block; padding: 0; }
.ak-producer-card__title { margin: 0; }
.ak-producer-card__location {
	display: block;
	margin: .5rem 0 0;
	color: #4a4a4a;
}
.ak-producer-card__excerpt { display: block; margin-top: 1rem; }
.ak-producer-card__excerpt > :last-child { margin-bottom: 0; }
.ak-producer-card__cta {
	display: block;
	margin-top: 1rem;
	font-weight: 700;
	color: #a02b43;
}

.ak-coffee-buy-now {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin: 2rem 0;
}
.ak-coffee-buy-now__button {
	display: inline-block;
	padding: .75rem 1.25rem;
	border-radius: 6px;
	background: #a02b43;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}
.ak-coffee-buy-now__item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: .5rem;
}
.ak-coffee-buy-now__product {
	color: #163257;
	font-weight: 700;
}
.ak-coffee-buy-now__button:hover,
.ak-coffee-buy-now__button:focus {
	color: #fff;
	text-decoration: underline;
}

/* Single Producer story ending. Kept as a contained component so Divi still
 * owns the page structure and surrounding spacing. */
.ak-producer-details {
	margin: 2rem 0;
	padding: clamp(1.75rem, 4vw, 3rem);
	border-radius: 14px;
	background: #163257;
	color: #f4ede0;
}

.ak-producer-details__eyebrow,
.ak-producer-details__location,
.ak-producer-details__quote { margin-top: 0; }

.ak-producer-details__eyebrow {
	margin-bottom: 1rem;
	color: #c9a05c;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.ak-producer-details__location {
	margin-bottom: .5rem;
	font-size: 1.05rem;
	font-weight: 600;
}

.ak-producer-details__quote {
	margin-bottom: 0;
	padding-left: 1.25rem;
	border-left: 2px solid #c9a05c;
	font-size: 1.15rem;
	font-style: italic;
	line-height: 1.6;
}

.ak-producer-details__quote p { margin: 0; }
.ak-producer-details__attribution {
	display: block;
	margin-top: .75rem;
	color: rgba(244, 237, 224, .75);
	font-size: .9rem;
	font-style: normal;
}

/* Canonical single Producer component for Divi Theme Builder. The title comes
 * first; the image is then constrained without being stretched or cropped. */
.ak-single-producer__header { margin-bottom: 2rem; }
.ak-single-producer__eyebrow {
	margin: 0 0 .75rem;
	color: #a02b43;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.ak-single-producer__title { margin-top: 0; }

/* Only a substantive quote earns a two-column single-Producer intro. This keeps
 * optional metadata from creating an empty-looking column while allowing image
 * and story details to share space when the content supports it. */
.ak-single-producer__intro {
	display: grid;
	grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
	gap: 2rem;
	align-items: start;
	margin-bottom: 2rem;
}
.ak-single-producer__intro .ak-single-producer__media,
.ak-single-producer__intro .ak-producer-details {
	margin: 0;
}
.ak-single-producer__media {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	overflow: visible;
	margin-bottom: 2rem;
}
.ak-single-producer__image {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 400px;
	border-radius: 16px;
}
.ak-single-producer__body { margin-bottom: 0; }

@media (max-width: 767px) {
	.ak-producer-story { grid-template-columns: 1fr; }
	.ak-producer-story__media { min-height: 280px; }
	.ak-product-attributes { grid-template-columns: 1fr; }
	.ak-producer-card__link { grid-template-columns: 1fr; }
	.ak-single-producer__intro { grid-template-columns: 1fr; }
	.ak-single-producer__title { font-size: 3rem; }
}
