/**
 * More From This Collection — single product page section styles.
 *
 * Also provides base styles for the single-collection.php archive page
 * (.al-collection-products grid).
 *
 * Design tokens consumed (defined in annalee-dolls theme base.css / primitives.css):
 *   --color-primary-500   bright red  (#c81e11)
 *   --color-primary-600   medium red  (#aa1a10)
 *   --color-primary-700   dark red    (#8c1711)
 *   --black               charcoal    (#303133)
 *   --white               white       (#fff)
 *   --gray-light          border      (#dadada)
 *   --gray-xlight         surface     (#f8f8f8)
 *   --border-radius-image image radius (10px)
 *   --border-radius       control radius (3px)
 *   --space-*             spacing scale
 *   --gutter-width        outer page gutter
 *   --max-width-wide      1200px
 *
 * @package Annalee_Collections
 */

/* =========================================================
   Section wrapper
   ========================================================= */

/* Section renders inside .summary column — no max-width or gutter padding needed. */
.al-more-from-collection {
	padding-block: var(--space-large, 1.5rem) 0;
	width: 100%;
}

/* =========================================================
   Section header: heading left + view-all right
   ========================================================= */

.al-more-from-collection__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-normal, 1rem);
	margin-bottom: var(--space-large, 1.5rem);
}

.al-more-from-collection__heading {
	font: var(--label-large);
	font-weight: var(--typeface-weight-body-bold);
	color: var(--black, #303133);
	margin: 0;
}

.al-more-from-collection__view-all {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--color-primary-600, #aa1a10);
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
}

.al-more-from-collection__view-all:hover,
.al-more-from-collection__view-all:focus {
	text-decoration: underline;
}

/* =========================================================
   Product grid
   ========================================================= */

.al-more-from-collection__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-large, 1.5rem);
}

@media (max-width: 768px) {

	.al-more-from-collection__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {

	.al-more-from-collection__grid {
		grid-template-columns: 1fr;
	}
}

/* =========================================================
   Individual product card
   ========================================================= */

.al-more-from-collection__item {
	display: flex;
	flex-direction: column;
	background-color: var(--white, #fff);
	border: 1px solid var(--gray-light, #dadada);
	border-radius: var(--border-radius-image, 10px);
	overflow: hidden;
}

/* Image */

.al-more-from-collection__image-link {
	display: block;
	line-height: 0;
}

.al-more-from-collection__image {
	width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

/* Product info */

.al-more-from-collection__info {
	padding: var(--space-normal, 1rem) var(--space-normal, 1rem) 0;
	flex: 1;
}

.al-more-from-collection__name {
	font-size: 1rem;
	font-weight: 700;
	color: var(--black, #303133);
	margin: 0 0 var(--space-xxsmall, 0.25rem);
	line-height: 1.35;
}

.al-more-from-collection__name a {
	color: inherit;
	text-decoration: none;
}

.al-more-from-collection__name a:hover,
.al-more-from-collection__name a:focus {
	text-decoration: underline;
}

.al-more-from-collection__sku {
	font-size: 0.8125rem;
	color: var(--gray, #bfc1c3);
	margin: 0 0 var(--space-xxsmall, 0.25rem);
}

.al-more-from-collection__price {
	font-weight: 700;
	margin: 0 0 var(--space-xsmall, 0.5rem);
}

.al-more-from-collection__price .woocommerce-Price-amount {
	color: var(--black, #303133);
}

.al-more-from-collection__price del {
	font-weight: 400;
	color: var(--gray, #bfc1c3);
}

/* Actions row */

.al-more-from-collection__actions {
	padding: var(--space-small, 0.75rem) var(--space-normal, 1rem) var(--space-normal, 1rem);
	display: flex;
	flex-direction: column;
	gap: var(--space-xsmall, 0.5rem);
	align-items: flex-start;
}

/* Add to Cart button — overrides WooCommerce default */

.al-more-from-collection__actions .button.add_to_cart_button,
.al-more-from-collection__actions .button.product_type_simple {
	background-color: var(--color-primary-700, #8c1711);
	color: var(--white, #fff);
	border: none;
	border-radius: 2em;
	padding: 0.45em 1.4em;
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: none;
	cursor: pointer;
	line-height: 1.5;
	display: inline-block;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.al-more-from-collection__actions .button.add_to_cart_button:hover,
.al-more-from-collection__actions .button.add_to_cart_button:focus,
.al-more-from-collection__actions .button.product_type_simple:hover,
.al-more-from-collection__actions .button.product_type_simple:focus {
	background-color: var(--color-primary-600, #aa1a10);
	color: var(--white, #fff);
}

/* See Details link */

.al-more-from-collection__details-link {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--color-primary-600, #aa1a10);
	text-decoration: none;
}

.al-more-from-collection__details-link:hover,
.al-more-from-collection__details-link:focus {
	text-decoration: underline;
}

/* (no footer — View All link is in the section header) */

/* =========================================================
   Single Collection page (.al-collection-products)
   Mirrors the card grid layout above; used in single-collection.php
   ========================================================= */

.al-collection-products {
	padding-block: var(--space-xxlarge, 4rem);
}

.al-collection-products__inner {
	max-width: var(--max-width-wide, 1200px);
	margin-inline: auto;
	padding-inline: var(--gutter-width, 5vw);
}

.al-collection-products__empty {
	color: var(--gray, #bfc1c3);
	font-style: italic;
}

.al-collection-products__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--space-large, 1.5rem);
}

@media (max-width: 1024px) {

	.al-collection-products__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {

	.al-collection-products__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {

	.al-collection-products__grid {
		grid-template-columns: 1fr;
	}
}

.al-collection-products__item {
	display: flex;
	flex-direction: column;
	background-color: var(--white, #fff);
	border: 1px solid var(--gray-light, #dadada);
	border-radius: var(--border-radius-image, 10px);
	overflow: hidden;
}

.al-collection-products__item--archived {
	opacity: 0.55;
}

.al-collection-products__image-link,
.al-collection-products__image-wrap {
	display: block;
	line-height: 0;
}

.al-collection-products__image {
	width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.al-collection-products__info {
	padding: var(--space-normal, 1rem) var(--space-normal, 1rem) 0;
	flex: 1;
}

.al-collection-products__name {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--black, #303133);
	margin: 0 0 var(--space-xxsmall, 0.25rem);
	line-height: 1.35;
}

.al-collection-products__name a {
	color: inherit;
	text-decoration: none;
}

.al-collection-products__name a:hover,
.al-collection-products__name a:focus {
	text-decoration: underline;
}

.al-collection-products__sku {
	font-size: 0.8125rem;
	color: var(--gray, #bfc1c3);
	margin: 0 0 var(--space-xxsmall, 0.25rem);
}

.al-collection-products__price {
	font-weight: 700;
	margin: 0 0 var(--space-xsmall, 0.5rem);
}

.al-collection-products__price .woocommerce-Price-amount {
	color: var(--black, #303133);
}

.al-collection-products__price del {
	font-weight: 400;
	color: var(--gray, #bfc1c3);
}

.al-collection-products__actions {
	padding: var(--space-small, 0.75rem) var(--space-normal, 1rem) var(--space-normal, 1rem);
	display: flex;
	flex-direction: column;
	gap: var(--space-xsmall, 0.5rem);
	align-items: flex-start;
}

.al-collection-products__actions .button.add_to_cart_button,
.al-collection-products__actions .button.product_type_simple {
	background-color: var(--color-primary-700, #8c1711);
	color: var(--white, #fff);
	border: none;
	border-radius: 2em;
	padding: 0.45em 1.4em;
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: none;
	cursor: pointer;
	line-height: 1.5;
	display: inline-block;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.al-collection-products__actions .button.add_to_cart_button:hover,
.al-collection-products__actions .button.add_to_cart_button:focus,
.al-collection-products__actions .button.product_type_simple:hover,
.al-collection-products__actions .button.product_type_simple:focus {
	background-color: var(--color-primary-600, #aa1a10);
	color: var(--white, #fff);
}

.al-collection-products__out-of-stock {
	font-size: 0.875rem;
	color: var(--gray, #bfc1c3);
	font-style: italic;
}

.al-collection-products__details-link {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--color-primary-600, #aa1a10);
	text-decoration: none;
}

.al-collection-products__details-link:hover,
.al-collection-products__details-link:focus {
	text-decoration: underline;
}
