/**
 * stenley.ge — WooCommerce overrides (base: stenley.css)
 */

:root {
	--stenley-radius-pill: 999px;
}

/* Shop page shell */
.stenley-shop-wrap {
	max-width: var(--stenley-max, 1200px);
	margin: 0 auto;
	padding: 0 var(--stenley-space);
}

.stenley-shop-hero {
	padding: calc(var(--stenley-space) * 1.25) 0 var(--stenley-space);
	text-align: left;
}

.stenley-shop-hero__eyebrow {
	font-size: 0.85rem;
	color: var(--stenley-muted);
	margin-bottom: 0.5rem;
}

.stenley-shop-hero .page-title {
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	font-weight: 600;
	margin: 0;
}

.woocommerce .woocommerce-breadcrumb {
	display: none;
}

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
	font-size: 0.85rem;
	color: var(--stenley-muted);
}

/* Shop grid */
.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--stenley-space);
	margin: 0;
	padding: 0;
}

@media (min-width: 768px) {
	.woocommerce ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.woocommerce ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.woocommerce ul.products li.product {
	width: 100% !important;
	margin: 0 !important;
	padding: 0;
	border: 0;
	box-shadow: none;
	background: transparent;
	text-align: left;
}

.woocommerce ul.products li.product a img {
	border-radius: 12px;
	background: var(--stenley-surface, #f7f7f7);
	margin-bottom: 1rem;
	aspect-ratio: 1;
	object-fit: contain;
	padding: 1rem;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 1rem;
	font-weight: 500;
	padding: 0;
	margin: 0 0 0.35rem;
}

.woocommerce ul.products li.product .price {
	color: var(--stenley-text);
	font-size: 0.95rem;
	margin-bottom: 0.75rem;
}

.stenley-card-color {
	font-size: 0.85rem;
	color: var(--stenley-muted);
	margin: 0 0 0.5rem;
}

.stenley-quick-view {
	display: inline-block;
	width: 100%;
	text-align: center;
	background: transparent !important;
	color: var(--stenley-text) !important;
	border: 1px solid var(--stenley-border) !important;
	border-radius: 8px !important;
	padding: 0.7rem 1rem !important;
	font-weight: 500 !important;
	box-shadow: none !important;
}

.stenley-quick-view:hover {
	background: #f5f5f5 !important;
}

/* Single product — hide default WC variation UI (custom swatches in template) */
.stenley-variation-form table.variations,
.stenley-variation-form .reset_variations,
.stenley-variation-form .woo-variation-swatches,
.stenley-variation-form .wvs-archive-variation-wrapper,
.stenley-variation-form .woocommerce-variation-price,
.stenley-variation-form .woocommerce-variation-availability,
.stenley-variation-form .quantity {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.stenley-variation-form {
	position: relative;
}

.stenley-variation-form .variations_form {
	margin: 0;
}

.stenley-variation-form .woocommerce-variation-add-to-cart {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.stenley-wishlist-btn,
.stenley-stock-badge {
	display: none !important;
}

.stenley-color-error {
	color: #b42318;
	font-size: 0.85rem;
	margin-bottom: 0.75rem;
}

/* WooCommerce notices */
.stenley-site .woocommerce-message,
.stenley-site .woocommerce-info,
.stenley-site .woocommerce-error {
	max-width: var(--stenley-max, 1200px);
	margin: 1rem auto;
	padding: 0.85rem 1rem;
	border-radius: 10px;
	border: 1px solid var(--stenley-border);
	background: var(--stenley-surface, #f7f7f7);
	font-size: 0.9rem;
	list-style: none;
}

.stenley-site .woocommerce-error {
	border-color: #f5c2c0;
	background: #fff5f5;
	color: #b42318;
}

/* Hide plugin swatch UI — custom swatches only */
.stenley-variation-form .woo-variation-swatches,
.stenley-variation-form .wvs-archive-variation-wrapper,
.stenley-variation-form .variable-items-wrapper {
	display: none !important;
}

/* Cart / checkout — minimal */
.stenley-site.woocommerce-cart .site-main,
.stenley-site.woocommerce-checkout .site-main {
	max-width: 900px;
	margin: 0 auto;
	padding: calc(var(--stenley-space) * 1.5) var(--stenley-space);
}

.stenley-site.woocommerce-cart .entry-content,
.stenley-site.woocommerce-checkout .entry-content {
	max-width: 900px;
	margin: 0 auto;
}

.stenley-site.woocommerce-checkout .woocommerce-billing-fields h3,
.stenley-site.woocommerce-checkout .woocommerce-shipping-fields h3,
.stenley-site.woocommerce-checkout #order_review_heading {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 1rem;
}

.stenley-site.woocommerce-checkout .form-row label {
	font-size: 0.9rem;
	font-weight: 500;
}

.stenley-site.woocommerce-checkout.stenley-checkout-ge #billing_country_field,
.stenley-site.woocommerce-checkout.stenley-checkout-ge #shipping_country_field {
	display: none;
}

.stenley-site.woocommerce-checkout.stenley-checkout-ge .woocommerce-billing-fields__field-wrapper {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.25rem 1rem;
}

@media (min-width: 640px) {
	.stenley-site.woocommerce-checkout.stenley-checkout-ge #billing_first_name_field,
	.stenley-site.woocommerce-checkout.stenley-checkout-ge #billing_last_name_field,
	.stenley-site.woocommerce-checkout.stenley-checkout-ge #shipping_first_name_field,
	.stenley-site.woocommerce-checkout.stenley-checkout-ge #shipping_last_name_field {
		grid-column: span 1;
	}

	.stenley-site.woocommerce-checkout.stenley-checkout-ge .woocommerce-billing-fields__field-wrapper,
	.stenley-site.woocommerce-checkout.stenley-checkout-ge .woocommerce-shipping-fields__field-wrapper {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.stenley-site.woocommerce-checkout.stenley-checkout-ge #billing_phone_field,
	.stenley-site.woocommerce-checkout.stenley-checkout-ge #billing_email_field,
	.stenley-site.woocommerce-checkout.stenley-checkout-ge #billing_state_field,
	.stenley-site.woocommerce-checkout.stenley-checkout-ge #billing_city_field,
	.stenley-site.woocommerce-checkout.stenley-checkout-ge #billing_address_1_field,
	.stenley-site.woocommerce-checkout.stenley-checkout-ge #billing_address_2_field,
	.stenley-site.woocommerce-checkout.stenley-checkout-ge #billing_postcode_field,
	.stenley-site.woocommerce-checkout.stenley-checkout-ge #order_comments_field {
		grid-column: 1 / -1;
	}
}

.stenley-site.woocommerce-checkout.stenley-checkout-ge .woocommerce-shipping-fields {
	margin-top: 1rem;
}

.stenley-site.woocommerce-checkout.stenley-checkout-ge #payment .payment_methods {
	margin-bottom: 1rem;
}

.stenley-site.woocommerce-checkout .woocommerce-error,
.stenley-site.woocommerce-checkout .woocommerce-info,
.stenley-site.woocommerce-checkout .woocommerce-message {
	border-radius: 10px;
	font-size: 0.9rem;
}

.stenley-site.woocommerce-checkout .woocommerce-error {
	border-color: #f5c2c0;
	background: #fff5f5;
	color: #b42318;
}

.stenley-site.woocommerce-cart table.shop_table,
.stenley-site.woocommerce-checkout table.shop_table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.95rem;
}

.stenley-site.woocommerce-cart table.shop_table th,
.stenley-site.woocommerce-cart table.shop_table td,
.stenley-site.woocommerce-checkout table.shop_table th,
.stenley-site.woocommerce-checkout table.shop_table td {
	border-bottom: 1px solid var(--stenley-border);
	padding: 0.85rem 0.5rem;
}

.stenley-site.woocommerce-cart .wc-proceed-to-checkout a,
.stenley-site.woocommerce-checkout #place_order,
.stenley-site.woocommerce-cart .wp-block-button__link,
.stenley-site.woocommerce-checkout .wp-block-button__link {
	display: block;
	width: 100%;
	text-align: center;
	padding: 1rem 1.25rem;
	border-radius: 10px;
	background: var(--stenley-text) !important;
	color: #fff !important;
	font-weight: 600;
	text-decoration: none !important;
}

/* WC Blocks cart/checkout fallback styling */
.stenley-site.woocommerce-cart .wp-block-woocommerce-cart,
.stenley-site.woocommerce-checkout .wp-block-woocommerce-checkout {
	font-family: var(--stenley-font);
}

.stenley-site.woocommerce-cart .wc-block-cart,
.stenley-site.woocommerce-checkout .wc-block-checkout {
	color: var(--stenley-text);
}

.stenley-site.woocommerce-cart .wc-block-components-product-name,
.stenley-site.woocommerce-checkout .wc-block-components-product-name {
	color: var(--stenley-text);
	text-decoration: none;
}

.stenley-site.woocommerce-cart table.shop_table .product-thumbnail img,
.stenley-site.woocommerce-cart .wc-block-cart-item__image img {
	border-radius: 8px;
	background: var(--stenley-surface);
}

/* Static pages (delivery, about) */
.stenley-page-wrap {
	max-width: 720px;
	margin: 0 auto;
	padding: calc(var(--stenley-space) * 2) var(--stenley-space);
}

/* Shop sidebar filters */
.stenley-shop-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--stenley-space);
}

@media (min-width: 768px) {
	.stenley-shop-layout {
		grid-template-columns: 220px 1fr;
	}
}

.stenley-filters {
	border: 1px solid var(--stenley-border);
	border-radius: 12px;
	padding: 1.25rem;
}

.stenley-filters h3 {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 0 0 1rem;
}

/* Cart / checkout */
.woocommerce-cart .cart-collaterals,
.woocommerce-checkout {
	max-width: 900px;
	margin: 0 auto;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	border-radius: 8px;
	border-color: var(--stenley-border);
}

/* My Account */
.woocommerce-account .woocommerce {
	max-width: 960px;
	margin: 0 auto;
	padding: 0 var(--stenley-space, 1rem) 2rem;
}

.woocommerce-account .u-columns {
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 768px) {
	.woocommerce-account .u-columns.col2-set,
	.woocommerce-account .woocommerce-MyAccount-navigation + .woocommerce-MyAccount-content {
		grid-template-columns: 220px 1fr;
		align-items: start;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation {
		position: sticky;
		top: 1rem;
	}
}

.woocommerce-MyAccount-navigation ul {
	list-style: none;
	padding: 0;
	margin: 0;
	border: 1px solid var(--stenley-border);
	border-radius: 12px;
	overflow: hidden;
	background: var(--stenley-surface, #fff);
}

.woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 0.85rem 1rem;
	border-bottom: 1px solid var(--stenley-border);
	text-decoration: none;
}

.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation li a:hover {
	background: var(--stenley-bg, #f9fafb);
}

.woocommerce-MyAccount-navigation li:last-child a {
	border-bottom: 0;
}

.stenley-account-tracking-prompt {
	margin: 1rem 0 0;
	text-align: center;
	font-size: 0.95rem;
}

.stenley-account-tracking-link {
	font-weight: 500;
}

.stenley-order-tracking-page {
	max-width: 640px;
	margin: 0 auto;
}

.stenley-order-timeline {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.5rem;
	margin: 0 0 1.5rem;
	padding: 0;
}

.stenley-order-timeline__step {
	position: relative;
	text-align: center;
	font-size: 0.8rem;
	color: var(--stenley-muted, #6b7280);
}

.stenley-order-timeline__dot {
	display: block;
	width: 0.75rem;
	height: 0.75rem;
	margin: 0 auto 0.5rem;
	border-radius: 50%;
	background: var(--stenley-border, #e5e7eb);
}

.stenley-order-timeline__step.is-done .stenley-order-timeline__dot,
.stenley-order-timeline__step.is-active .stenley-order-timeline__dot {
	background: var(--stenley-text, #111827);
}

.stenley-order-timeline__step.is-active .stenley-order-timeline__label {
	font-weight: 600;
	color: var(--stenley-text, #111827);
}

.stenley-order-timeline--terminal {
	margin: 0 0 1.5rem;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	background: #fef3f2;
	color: #b42318;
	font-weight: 500;
}

.stenley-order-timeline__status {
	margin: 0;
}

/* Color validation */
.stenley-color-error {
	color: #b42318;
	font-size: 0.9rem;
	margin: 0 0 1rem;
	padding: 0.65rem 0.85rem;
	background: #fef3f2;
	border-radius: 8px;
}

/* Stock badge */
.stenley-stock-badge {
	font-size: 0.9rem;
	margin: 0 0 1rem;
	font-weight: 500;
}

.stenley-stock-badge.is-in {
	color: #027a48;
}

.stenley-stock-badge.is-out {
	color: #b42318;
}

.variable-item.stenley-oos,
.woo-variation-swatches .variable-item.stenley-oos {
	opacity: 0.35;
	position: relative;
}

.variable-item.stenley-oos::after {
	content: "✕";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	color: #b42318;
}

/* Sticky mobile ATC */
.stenley-sticky-atc {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 1rem;
	background: rgba(255, 255, 255, 0.96);
	border-top: 1px solid var(--stenley-border);
	backdrop-filter: blur(8px);
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.stenley-sticky-atc__info {
	display: grid;
	gap: 0.15rem;
	min-width: 0;
}

.stenley-sticky-atc__title {
	font-size: 0.85rem;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.stenley-sticky-atc__price {
	font-size: 0.95rem;
	font-weight: 600;
}

.stenley-sticky-atc__btn {
	width: auto !important;
	min-width: 8rem;
	padding: 0.75rem 1.25rem !important;
	margin: 0 !important;
}

@media (min-width: 768px) {
	.stenley-sticky-atc {
		display: none !important;
	}
}

/* Wishlist */
.stenley-wishlist-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: 0.5rem;
	padding: 0.5rem 0;
	border: 0;
	background: transparent;
	color: var(--stenley-muted);
	font-size: 0.9rem;
	cursor: pointer;
}

.stenley-wishlist-btn.is-active {
	color: var(--stenley-text);
}

.stenley-wishlist-count {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	min-width: 1.25rem;
	height: 1.25rem;
	padding: 0 0.35rem;
	border-radius: 999px;
	background: var(--stenley-accent);
	color: #fff;
	font-size: 0.7rem;
	line-height: 1.25rem;
	text-align: center;
}

/* Shop color grid */
.stenley-color-grid {
	margin-bottom: 1.5rem;
}

.stenley-color-grid__title {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 0 0 0.75rem;
}

.stenley-color-grid__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.35rem;
}

.stenley-color-grid__item {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.35rem 0.5rem;
	border-radius: 8px;
	text-decoration: none;
	color: var(--stenley-text);
	font-size: 0.85rem;
}

.stenley-color-grid__item:hover,
.stenley-color-grid__item.is-active {
	background: #f5f5f5;
}

.stenley-color-grid__item.is-oos {
	opacity: 0.5;
}

.stenley-color-grid__dot {
	width: 18px;
	height: 18px;
	border-radius: 999px;
	background: var(--swatch-color, #ccc);
	border: 1px solid rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
}

.stenley-color-grid__clear {
	display: inline-block;
	margin-top: 0.75rem;
	font-size: 0.8rem;
	color: var(--stenley-muted);
}

/* Review photos */
.stenley-review-photo-wrap {
	margin-top: 0.75rem;
}

.stenley-review-photo {
	border-radius: 10px;
	max-width: 200px;
	height: auto;
}

.comment-form-stenley-photo input[type="file"] {
	font-size: 0.9rem;
}

/* Thank-you WhatsApp */
.stenley-thankyou-whatsapp .button {
	margin-top: 1rem;
}