/*
 * Northumberland Logs – WooCommerce styling on top of Kadence.
 * Product cards, category archive header, help strip, single product touches.
 */

/* ==========================================================================
   Category archive header (Kadence archive title, "normal" layout)
   ========================================================================== */

.tax-product_cat .content-area,
.post-type-archive-product .content-area {
	margin-top: 40px;
	margin-bottom: var(--nl-section-y, 80px);
}

.woocommerce .entry-header.product-archive-title {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0 0 32px;
	padding: 0;
	text-align: left;
}

.woocommerce .entry-header.product-archive-title .kadence-breadcrumbs {
	margin: 0;
	font-size: 14px;
	color: var(--nl-muted);
}

.woocommerce .entry-header.product-archive-title .kadence-breadcrumbs a {
	color: var(--nl-burgundy);
	text-decoration: none;
}

.woocommerce .entry-header.product-archive-title .kadence-breadcrumbs a:hover {
	text-decoration: underline;
}

.woocommerce .entry-header.product-archive-title h1 {
	margin: 0;
	font-family: var(--nl-font);
	font-weight: 900;
	font-size: clamp(38px, 4.6vw, 56px);
	line-height: 1.05;
	letter-spacing: -0.02em;
	color: var(--nl-burgundy);
	text-wrap: balance;
}

.woocommerce .entry-header.product-archive-title .archive-description {
	max-width: 640px;
	font-size: 18px;
	line-height: 1.55;
	color: var(--nl-grey);
}

.woocommerce .entry-header.product-archive-title .archive-description p {
	margin: 0 0 0.6em;
}

.woocommerce .entry-header.product-archive-title .archive-description p:last-child {
	margin-bottom: 0;
}

/* Toolbar (results count / ordering) is switched off in the Kadence settings;
   if it is turned back on, keep it tidy. */
.woocommerce .kadence-shop-top-row {
	margin-bottom: 20px;
}

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

body.nl-theme ul.products.product-archive.grid-cols,
body.nl-theme .woocommerce ul.products.product-archive.grid-cols {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
}

body.nl-theme ul.products.product-archive.grid-cols::before,
body.nl-theme ul.products.product-archive.grid-cols::after {
	content: none;
}

/* ==========================================================================
   Product card
   ========================================================================== */

body.nl-theme ul.products li.product {
	position: relative;
	display: flex;
	flex-direction: column;
	width: auto;
	margin: 0;
	padding: 0;
	float: none;
	background: var(--nl-white);
	border: 1px solid var(--nl-line-strong);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: none;
	text-align: left;
	transition: box-shadow 0.2s;
}

body.nl-theme ul.products li.product:hover,
body.nl-theme ul.products li.product:focus-within {
	box-shadow: var(--nl-shadow);
}

body.nl-theme ul.products li.product .woocommerce-loop-image-link {
	position: relative;
	display: block;
	margin: 0;
	background: var(--nl-sand);
}

body.nl-theme ul.products li.product .woocommerce-loop-image-link img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	margin: 0;
	border-radius: 0;
}

/* Badge ("Best seller", "Premium"…) from the product's Card badge field. */
body.nl-theme ul.products li.product .nl-card-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	line-height: 1.2;
	background: var(--nl-burgundy);
	color: #fff;
	padding: 5px 9px;
	border-radius: 4px;
}

body.nl-theme ul.products li.product .onsale,
body.nl-theme.woocommerce span.onsale {
	position: absolute;
	top: 14px;
	right: 14px;
	left: auto;
	z-index: 2;
	min-height: 0;
	min-width: 0;
	margin: 0;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	line-height: 1.2;
	background: var(--nl-green);
	color: #fff;
	padding: 5px 9px;
	border-radius: 4px;
}

body.nl-theme ul.products li.product .product-details {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 20px 20px 22px;
	background: transparent;
	text-align: left;
}

body.nl-theme ul.products li.product .woocommerce-loop-product__title {
	margin: 0;
	padding: 0;
	font-family: var(--nl-font);
	font-weight: 900;
	font-size: 19px;
	line-height: 1.25;
	color: var(--nl-ink);
}

body.nl-theme ul.products li.product .woocommerce-loop-product__title a {
	color: inherit;
	text-decoration: none;
}

body.nl-theme ul.products li.product .woocommerce-loop-product__title a:hover {
	color: var(--nl-burgundy);
}

body.nl-theme ul.products li.product .nl-loop-excerpt {
	flex: 1;
	font-size: 15px;
	line-height: 1.5;
	color: var(--nl-grey);
	text-wrap: pretty;
}

body.nl-theme ul.products li.product .nl-loop-excerpt p {
	margin: 0;
}

body.nl-theme ul.products li.product .nl-loop-excerpt p + p {
	margin-top: 0.5em;
}

/* Kadence's own excerpt (list view) is replaced by .nl-loop-excerpt. */
body.nl-theme ul.products li.product .product-excerpt {
	display: none;
}

body.nl-theme ul.products li.product .star-rating {
	margin: 0;
	font-size: 13px;
	color: var(--global-palette15, #641626);
}

body.nl-theme ul.products li.product .price {
	display: block;
	margin: 0;
	padding-top: 4px;
	font-size: 22px;
	font-weight: 900;
	line-height: 1.2;
	color: var(--nl-burgundy);
}

body.nl-theme ul.products li.product .price del {
	font-size: 15px;
	font-weight: 400;
	color: var(--nl-muted);
	opacity: 1;
	margin-right: 6px;
}

body.nl-theme ul.products li.product .price ins {
	text-decoration: none;
	background: none;
}

body.nl-theme ul.products li.product .price .woocommerce-price-suffix {
	font-size: 13px;
	font-weight: 400;
	color: var(--nl-muted);
}

/* Full-width pill "BUY NOW" button. */
body.nl-theme ul.products li.product .product-action-wrap {
	margin-top: auto;
	padding: 4px 0 0;
	position: static;
	opacity: 1;
	transform: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

body.nl-theme ul.products li.product .product-action-wrap .button,
body.nl-theme ul.products li.product a.button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin: 0;
	padding: 14px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--nl-burgundy);
	color: #fff;
	font-family: var(--nl-font);
	font-size: 15px;
	font-weight: 900;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	box-shadow: none;
	transition: background-color 0.15s;
}

body.nl-theme ul.products li.product .product-action-wrap .button:hover,
body.nl-theme ul.products li.product .product-action-wrap .button:focus-visible,
body.nl-theme ul.products li.product a.button:hover {
	background: var(--nl-burgundy-dark);
	color: #fff;
}

/* Kadence shows its own spinner / tick inside the button while adding to basket. */
body.nl-theme ul.products li.product .button.loading {
	opacity: 0.8;
}

/* After an AJAX add, Kadence collapses the button and shows "View basket". */
body.nl-theme ul.products li.product a.added_to_cart {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin: 0;
	padding: 12.5px 18px;
	border: 1.5px solid var(--nl-burgundy);
	border-radius: 999px;
	background: transparent;
	color: var(--nl-burgundy);
	font-size: 15px;
	font-weight: 900;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.2;
	text-decoration: none;
}

body.nl-theme ul.products li.product a.added_to_cart:hover {
	background: var(--nl-sand);
	color: var(--nl-burgundy-dark);
}

/* Category tiles (if a category shows sub-categories). */
body.nl-theme ul.products li.product-category {
	border: 1px solid var(--nl-line-strong);
	border-radius: 14px;
	overflow: hidden;
	background: var(--nl-white);
}

body.nl-theme ul.products li.product-category .woocommerce-loop-category__title {
	font-weight: 900;
	font-size: 19px;
	color: var(--nl-burgundy);
	padding: 16px 20px 20px;
	margin: 0;
}

body.nl-theme ul.products li.product-category .woocommerce-loop-category__title .count {
	background: none;
	color: var(--nl-muted);
	font-weight: 400;
}

/* ==========================================================================
   Help strip under category grids ("Not sure which bag?")
   ========================================================================== */

.nl-strip.nl-strip--help {
	margin-top: 32px;
	border-radius: 14px;
	padding: 20px 24px;
}

.nl-strip--help .nl-strip__phone {
	font-size: 20px;
	font-weight: 900;
	color: var(--nl-burgundy);
	text-decoration: none;
	white-space: nowrap;
}

.nl-strip--help .nl-strip__phone:hover {
	color: var(--nl-burgundy-dark);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

body.nl-theme .woocommerce-pagination {
	margin-top: 32px;
}

body.nl-theme .woocommerce-pagination .page-numbers li .page-numbers {
	border-radius: 999px;
	min-width: 42px;
	color: var(--nl-burgundy);
	border-color: var(--nl-line-strong);
}

body.nl-theme .woocommerce-pagination .page-numbers li .page-numbers.current {
	background: var(--nl-burgundy);
	border-color: var(--nl-burgundy);
	color: #fff;
}

/* ==========================================================================
   Single product
   ========================================================================== */

.single-product div.product .summary .price {
	font-size: 28px;
	font-weight: 900;
	color: var(--nl-burgundy);
}

.single-product div.product .summary .product_title {
	font-weight: 900;
	letter-spacing: -0.01em;
}

.single-product div.product .single_add_to_cart_button {
	border-radius: 999px;
	font-weight: 900;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.single-product div.product .woocommerce-product-details__short-description {
	color: var(--nl-grey);
	font-size: 17px;
}

/* ==========================================================================
   Shop hub (Shop page showing its block content)
   ========================================================================== */

.nl-shop-hub-page .content-area {
	margin-top: 0;
	margin-bottom: 0;
}

.nl-shop-hub-page .entry-content-wrap {
	padding: 0;
}

.nl-shop-hub-page article.nl-shop-hub {
	box-shadow: none;
	background: transparent;
}
