/*
 * PrimeDrip — WooCommerce page-specific structural styles.
 *
 * Only loaded on WooCommerce pages (see primedrip_scripts() in functions.php,
 * gated behind class_exists('WooCommerce') && (is_woocommerce() || is_cart()
 * || is_checkout() || is_account_page())). Contains ONLY rules that don't
 * already exist in assets/css/primedrip.css — the structural glue needed to
 * make WooCommerce's default markup (tables, notices, quantity inputs,
 * pagination, payment method lists, my-account nav) fit the existing design
 * system. Reuses tokens.css custom properties throughout; does not redefine
 * anything already styled by primedrip.css (e.g. .product-card,
 * .breadcrumb, .order-summary, .order-totals, .order-line, .checkout-grid,
 * .checkout-form-title, .checkout-trust-strip, .success-*, .coa-*, .tab-*,
 * .clinical-*, .product-detail-*, .btn-gold, .btn-secondary, .btn-primary,
 * .qty-btn/.qty-display, .cart-remove, .cart-trust-strip are all already
 * defined there and simply reused by the woocommerce/ templates).
 */

/* ─── SHOP TOOLBAR (result count + ordering dropdown) ──────────── */
.shop-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 28px;
}
.woocommerce-result-count {
	font-family: var(--font-display);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-dim);
	margin: 0;
}
.woocommerce-ordering {
	margin: 0;
}
.woocommerce-ordering select {
	background: var(--bg-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-family: var(--font-display);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 8px 14px;
	cursor: pointer;
}
.woocommerce-ordering select:focus {
	outline: none;
	border-color: var(--gold);
}

/* ─── SHOP GRID <ul> RESET ───────────────────────────────────────
   WooCommerce's loop wraps each content-product.php card in an <li>
   inside a <ul class="products">; primedrip.css's .products-grid rules
   already target this as a flex/grid container, so we only need to
   reset default list/box styling that would otherwise leak through. */
ul.products {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}
ul.products li.product {
	list-style: none;
}
@media (max-width: 900px) {
	ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	ul.products { grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* Add-to-cart button injected into content-product.php via
   woocommerce_after_shop_loop_item (woocommerce_template_loop_add_to_cart) —
   reuse .add-to-cart-btn's look without duplicating its declaration block. */
ul.products li.product a.add_to_cart_button,
ul.products li.product a.added_to_cart {
	display: block;
	width: 100%;
	margin-top: 10px;
	background: var(--gold);
	color: #000;
	border: 2px solid var(--gold);
	font-family: var(--font-display);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	padding: 12px;
	border-radius: var(--radius-sm);
	transition: all 0.2s;
}
ul.products li.product a.add_to_cart_button:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
}

/* ─── WOOCOMMERCE NOTICES (out-of-stock, error, success banners) ── */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.woocommerce-noticelist {
	list-style: none;
	background: var(--bg-2);
	border: 1px solid var(--gold-border);
	border-left: 3px solid var(--gold);
	border-radius: var(--radius-sm);
	padding: 14px 18px;
	margin: 0 0 24px;
	font-size: 13px;
	color: var(--text-muted);
}
.woocommerce-error {
	border-color: rgba(224,90,90,0.4);
	border-left-color: #e05a5a;
}
.woocommerce-message a.button,
.woocommerce-error a.button {
	display: inline-block;
	margin-top: 8px;
	color: var(--gold);
	text-decoration: underline;
}

/* ─── QUANTITY INPUT (woocommerce_quantity_input) ───────────────
   WooCommerce renders <div class="quantity"><input class="qty">, distinct
   from the reference design's custom .qty-controls +/- button pair used on
   the single product template. Style the raw <input> minimally so it fits
   the dark theme wherever it appears unmodified (cart table, variations). */
.quantity .qty {
	width: 64px;
	background: var(--bg-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-family: var(--font-display);
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	padding: 8px 6px;
}
.quantity .qty:focus {
	outline: none;
	border-color: var(--gold);
}

/* ─── CART / CHECKOUT TABLES ─────────────────────────────────────
   Real <table> markup used by woocommerce/cart/cart.php and the checkout
   review-order table — primedrip.css has no table rules at all (the
   reference design's cart was a JS drawer, not a table), so this covers the
   base table chrome the theme needs. */
.shop_table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 24px;
}
.shop_table thead th {
	text-align: left;
	font-family: var(--font-display);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--text-dim);
	padding: 12px 10px;
	border-bottom: 1px solid var(--border-light);
}
.shop_table tbody td {
	padding: 16px 10px;
	border-bottom: 1px solid var(--border);
	font-size: 13px;
	color: var(--text-muted);
	vertical-align: middle;
}
.shop_table td.product-thumbnail img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
}
.shop_table td.product-name a {
	color: var(--white);
	font-weight: 600;
	text-decoration: none;
}
.shop_table td.product-name a:hover { color: var(--gold); }
.shop_table td.actions {
	padding-top: 20px;
}
.shop_table .coupon {
	display: flex;
	gap: 8px;
	align-items: center;
}
.shop_table .coupon .input-text {
	background: var(--bg-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text);
	padding: 10px 14px;
	font-size: 13px;
}
.shop_table .coupon .input-text:focus {
	outline: none;
	border-color: var(--gold);
}
.shop_table button[name="update_cart"] {
	margin-left: auto;
}

/* ─── CART PAGE two-column layout ────────────────────────────────
   woocommerce/cart/cart.php's .cart-page-grid — mirrors .checkout-grid's
   proportions (already defined in primedrip.css) since the reference design
   has no standalone cart-page equivalent to copy exactly. */
.cart-page-grid {
	display: grid;
	grid-template-columns: 1fr 380px;
	gap: 56px;
	align-items: start;
}
@media (max-width: 900px) {
	.cart-page-grid { grid-template-columns: 1fr; }
}
.cart-page-table-wrap { min-width: 0; }
.cart-page-table-wrap .shop_table { overflow-x: auto; display: block; }
.cart-page-table-wrap .shop_table thead,
.cart-page-table-wrap .shop_table tbody { display: table; width: 100%; table-layout: fixed; }
@media (max-width: 700px) {
	.cart-page-table-wrap .shop_table thead { display: none; }
	.cart-page-table-wrap .shop_table,
	.cart-page-table-wrap .shop_table tbody,
	.cart-page-table-wrap .shop_table tr,
	.cart-page-table-wrap .shop_table td { display: block; width: 100%; }
	.cart-page-table-wrap .shop_table tr {
		border-bottom: 1px solid var(--border-light);
		padding: 12px 0;
		margin-bottom: 12px;
	}
	.cart-page-table-wrap .shop_table td {
		border-bottom: none;
		padding: 4px 0;
	}
	.cart-page-table-wrap .shop_table td[data-title]::before {
		content: attr(data-title) ": ";
		font-family: var(--font-display);
		font-size: 9px;
		font-weight: 700;
		letter-spacing: 0.14em;
		text-transform: uppercase;
		color: var(--text-dim);
		display: block;
		margin-bottom: 2px;
	}
}

/* ─── CHECKOUT FORM COLUMN ────────────────────────────────────────
   .checkout-grid itself (2-col grid) is already defined in primedrip.css;
   this just gives the left form column its own class hook (the reference
   design's checkout-grid first child had no dedicated class, only relied on
   :first-child, which doesn't work now that we have two explicitly-classed
   grid children — .checkout-form-col and .order-summary). */
.checkout-form-col { min-width: 0; }
.form-section-gap { margin-top: 28px; }

/* WooCommerce's own field wrapper classes need to fall in line with the
   reference design's .form-row/.form-group grid — woocommerce_form_field()
   outputs <p class="form-row form-row-wide|form-row-first|form-row-last">
   rather than the reference's hand-written .form-row/.form-group pairs. */
.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper,
.woocommerce-additional-fields__field-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
.woocommerce-billing-fields__field-wrapper .form-row-wide,
.woocommerce-shipping-fields__field-wrapper .form-row-wide,
.woocommerce-additional-fields__field-wrapper .form-row-wide {
	grid-column: 1 / -1;
}
@media (max-width: 700px) {
	.woocommerce-billing-fields__field-wrapper,
	.woocommerce-shipping-fields__field-wrapper,
	.woocommerce-additional-fields__field-wrapper {
		grid-template-columns: 1fr;
	}
}
.form-row label {
	display: block;
	font-family: var(--font-display);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--text-muted);
	margin-bottom: 7px;
}
.form-row .required {
	color: var(--gold);
	text-decoration: none;
}
.form-row input.input-text,
.form-row textarea,
.form-row select {
	width: 100%;
	background: var(--bg-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 14px;
	padding: 11px 14px;
}
.form-row input.input-text:focus,
.form-row textarea:focus,
.form-row select:focus {
	outline: none;
	border-color: var(--gold);
}
.select2-container .select2-selection--single {
	background: var(--bg-2) !important;
	border: 1px solid var(--border) !important;
	border-radius: var(--radius-sm) !important;
	height: 44px !important;
}
.select2-container .select2-selection__rendered {
	color: var(--text) !important;
	line-height: 44px !important;
}

/* ─── PAYMENT METHOD LIST (checkout/payment.php) ────────────────
   Real gateways (Stripe/PayPal/etc.) render into this list once connected;
   style the container so it's not raw browser <ul> styling in the meantime. */
.wc_payment_methods {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	overflow: hidden;
}
.wc_payment_methods .wc_payment_method {
	padding: 14px 16px;
	border-bottom: 1px solid var(--border);
	font-size: 13px;
	color: var(--text-muted);
}
.wc_payment_methods .wc_payment_method:last-child { border-bottom: none; }
.wc_payment_methods label { color: var(--white); font-weight: 600; cursor: pointer; }
.wc_payment_methods .payment_box {
	margin-top: 10px;
	padding: 12px;
	background: var(--bg-2);
	border-radius: var(--radius-sm);
	font-size: 12px;
	color: var(--text-dim);
}
.woocommerce-terms-and-conditions-wrapper {
	margin: 16px 0;
	font-size: 12px;
	color: var(--text-muted);
}
.woocommerce-terms-and-conditions-wrapper a { color: var(--gold); }

/* ─── PAGINATION ─────────────────────────────────────────────────── */
.woocommerce-pagination {
	margin-top: 40px;
}
.woocommerce-pagination ul.page-numbers {
	list-style: none;
	display: flex;
	gap: 8px;
	justify-content: center;
	padding: 0;
	margin: 0;
}
.woocommerce-pagination .page-numbers li { display: block; }
.woocommerce-pagination .page-numbers a,
.woocommerce-pagination .page-numbers span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	font-family: var(--font-display);
	font-size: 12px;
	font-weight: 600;
	color: var(--text-muted);
	text-decoration: none;
	transition: all 0.2s;
}
.woocommerce-pagination .page-numbers a:hover,
.woocommerce-pagination .page-numbers .current {
	background: var(--gold);
	border-color: var(--gold);
	color: #000;
}

/* ─── MY ACCOUNT ─────────────────────────────────────────────────── */
.my-account-grid {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 48px;
	align-items: start;
	padding-bottom: 80px;
}
@media (max-width: 800px) {
	.my-account-grid { grid-template-columns: 1fr; }
}
.woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	overflow: hidden;
}
.woocommerce-MyAccount-navigation li {
	border-bottom: 1px solid var(--border);
}
.woocommerce-MyAccount-navigation li:last-child { border-bottom: none; }
.woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 13px 18px;
	font-family: var(--font-display);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-muted);
	text-decoration: none;
	transition: all 0.2s;
	background: var(--bg-1);
}
.woocommerce-MyAccount-navigation li a:hover,
.woocommerce-MyAccount-navigation li.is-active a {
	background: var(--gold-dim);
	color: var(--gold);
}
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a {
	color: rgba(255,255,255,0.5);
}
.dashboard-welcome-panel {
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-lg);
	padding: 24px 28px;
	backdrop-filter: blur(var(--glass-blur));
	-webkit-backdrop-filter: blur(var(--glass-blur));
	box-shadow: var(--glow-shadow-sm);
}
.dashboard-welcome-panel p { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin: 0 0 12px; }
.dashboard-welcome-panel p:last-child { margin-bottom: 0; }
.dashboard-welcome-panel a { color: var(--gold); }
.woocommerce-MyAccount-content .shop_table th,
.woocommerce-MyAccount-content .shop_table td {
	font-size: 13px;
}
.woocommerce-MyAccount-content mark.order-status {
	background: var(--gold-dim);
	border: 1px solid var(--gold-border);
	color: var(--gold);
	font-family: var(--font-display);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 3px 10px;
	border-radius: 100px;
}
.woocommerce-MyAccount-content .button,
.woocommerce-MyAccount-content a.button {
	display: inline-block;
	background: var(--gold);
	color: #000;
	font-family: var(--font-display);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	padding: 10px 18px;
	border-radius: var(--radius-sm);
	text-decoration: none;
	transition: all 0.2s;
}
.woocommerce-MyAccount-content .button:hover { filter: brightness(1.08); }
.woocommerce-MyAccount-content fieldset {
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 18px;
	margin-bottom: 20px;
}
.woocommerce-MyAccount-content legend {
	font-family: var(--font-display);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gold);
	padding: 0 8px;
}

/* ─── SINGLE PRODUCT: gallery / stock / SKU / meta line ─────────── */
.woocommerce-product-gallery__wrapper { border-radius: var(--radius-sm); overflow: hidden; }
.stock {
	display: inline-block;
	font-family: var(--font-display);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 12px;
}
.stock.in-stock { color: #4ecb71; }
.stock.out-of-stock { color: #e05a5a; }
.product_meta {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--border);
	font-size: 12px;
	color: var(--text-dim);
}
.product_meta .sku_wrapper,
.product_meta .posted_in,
.product_meta .tagged_as {
	display: block;
	margin-bottom: 4px;
}
.product_meta a { color: var(--gold); text-decoration: none; }

/* single_add_to_cart_button reuses the reference .btn-gold look, since the
   simple.php add-to-cart override doesn't apply the class directly (kept
   WooCommerce's own template unmodified there — see woocommerce/single-product
   folder, which does not include an add-to-cart override for this reason). */
.single_add_to_cart_button {
	display: block;
	width: 100%;
	background:
		linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.55) 50%, transparent 65%) no-repeat,
		var(--gold);
	background-size: 220% 100%, 100% 100%;
	background-position: 150% 0, 0 0;
	color: #000;
	font-family: var(--font-display);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	border: 2px solid var(--gold);
	padding: 14px 24px;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: background-position 0.7s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s;
	margin-top: 10px;
}
.single_add_to_cart_button:hover {
	background-position: -150% 0, 0 0;
	box-shadow: 0 4px 20px rgba(212,165,154,0.4);
}
form.cart .quantity { margin-bottom: 12px; display: inline-block; }
