/* ============================================================
   WooCommerce mapping
   ------------------------------------------------------------
   app.css carries the design system. This file only maps
   WooCommerce's own class names onto it. Keep it small: if a
   rule here is doing layout work, it belongs in app.css.
   ============================================================ */

/* Woo wraps the summary in .entry-summary; our .pdp-info owns the layout. */
.pdp-info.entry-summary { display: flex; flex-direction: column; }

/* Price markup */
.woocommerce-Price-amount { font-family: var(--font-num); }
.price del { color: var(--muted); font-weight: 400; margin-right: 6px; }
.price ins { text-decoration: none; }
/* This used to be `.card-price del { display: none }`, commented
   "keep cards to one number", and it was correct for as long as the
   20% was a coupon somebody had to type: a struck price beside a
   figure the cart would not charge is a lie about the price.

   Auto-apply made the premise false. The cart now charges the lower
   number for everyone, so the higher one is a description rather
   than a claim, and hiding it is what would be misleading. The rule
   is deleted rather than overridden because the policy behind it is
   gone, not merely outvoted. See halotir_promo_price(). */
.card-price ins { text-decoration: none; }

/* Quantity input inside our pill stepper */
.qty .quantity { display: contents; }
.qty input.qty,
.qty input[type="number"] {
	/* 16px is a hard floor, not a style choice. iOS Safari zooms the whole
	 * viewport when a field under 16px takes focus and never zooms back
	 * out, which strands the buyer mid-page. This was 0.95rem (15.2px) and
	 * did exactly that on every product page. woo.css loads after app.css,
	 * so the shared floor in css/parts/10-tokens.css cannot reach it: the
	 * value has to be right here. */
	width: 44px; border: none; background: transparent; text-align: center;
	font-family: var(--font-num); font-size: 16px; color: var(--ink);
	-moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty label.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Stock line */
.stock { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.stock.out-of-stock { color: #b91c1c; }

/* Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
	background: var(--accent-tint);
	border: 1px solid var(--accent-line);
	border-radius: var(--radius-sm);
	color: #6b4708;
	padding: 14px 16px;
	margin: 16px auto;
	max-width: 1440px;
	font-size: 0.9rem;
}
.woocommerce-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.woocommerce-message .button,
.woocommerce-info .button { float: right; }

/* Buttons: Woo emits .button in many places */
.woocommerce .button,
.woocommerce-page .button,
button.button, a.button, input.button {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 12px 26px;
	font-family: var(--font); font-size: 0.95rem; font-weight: 500;
	background: var(--ink); color: #fff;
	border: 1px solid transparent; border-radius: 999px;
	cursor: pointer; text-decoration: none;
	transition: background .18s;
}
.woocommerce .button:hover, button.button:hover, a.button:hover { background: #000; color: #fff; }
.button.alt { background: var(--ink); }

/* Cart and checkout tables */
.woocommerce table.shop_table {
	width: 100%; border-collapse: collapse; border: none; font-size: 0.92rem;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	text-align: left; padding: 14px 8px; border: none; border-bottom: 1px solid var(--line);
}
.woocommerce table.shop_table th { font-weight: 500; color: var(--muted); font-size: 0.85rem; }
.woocommerce table.shop_table .product-thumbnail img { width: 72px; border-radius: var(--radius-sm); }
.cart_totals h2, .woocommerce-checkout h3 { font-size: 1.15rem; margin-bottom: 12px; }
.cart_totals { background: var(--panel-2); border-radius: var(--radius); padding: 22px; }
.cart-collaterals { margin-top: 28px; }

/* Coupon / referral code field: visible, but not shouting at people
   who arrived without one. */
.woocommerce-cart .coupon { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.woocommerce-cart .coupon input[type="text"] {
	flex: 1; min-width: 180px; min-height: 48px; padding: 12px 18px;
	font-family: var(--font); font-size: 16px;
	border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg);
}
/* The coupon toggle used to be stripped to bare text here. css/parts/
 * 50-cart.css now styles it and the login toggle as one matching
 * bordered row, so this override is gone rather than left to win the
 * specificity fight it kept winning: it is a two-class selector, so it
 * outranked the base padding no matter which stylesheet loaded last. */

/* Checkout form fields */
.woocommerce form .form-row { display: flex; flex-direction: column; margin-bottom: 14px; padding: 0; }
.woocommerce form .form-row label { font-size: 0.88rem; font-weight: 500; margin-bottom: 6px; }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.select2-container .select2-selection--single {
	width: 100%; min-height: 48px; padding: 12px 14px;
	font-family: var(--font); font-size: 16px; color: var(--ink);
	background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row select:focus { outline: none; border-color: var(--ink); }
.woocommerce form .form-row.attest { flex-direction: row; align-items: flex-start; gap: 12px; }
.required { color: #b91c1c; }

/* Order review */
.woocommerce-checkout-review-order-table tfoot th { font-weight: 500; }
.woocommerce-checkout #payment { background: var(--panel-2); border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.woocommerce-checkout #payment ul.payment_methods { list-style: none; padding: 0; margin-bottom: 14px; }
.woocommerce-checkout #payment div.form-row { padding: 0; }
#place_order { width: 100%; }

/* My account */
.woocommerce-MyAccount-navigation ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.woocommerce-MyAccount-navigation a {
	display: inline-flex; align-items: center; min-height: 40px; padding: 8px 18px;
	border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); font-size: 0.9rem;
}
.woocommerce-MyAccount-navigation .is-active a { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Woo gallery on the PDP */
.pdp-media .woocommerce-product-gallery { width: 100%; }
.pdp-media .woocommerce-product-gallery img { border-radius: var(--radius-sm); }
.pdp-media .flex-control-thumbs { display: flex; gap: 8px; list-style: none; margin-top: 12px; padding: 0; }
.pdp-media .flex-control-thumbs li { width: 64px; }

/* Related products heading spacing */
.related.products { padding: 40px 24px 56px; max-width: 1440px; margin: 0 auto; }
.related.products > h2 { font-size: 1.6rem; margin-bottom: 20px; }

/* Blocks checkout: keep our type and controls if the store stays on blocks */
.wc-block-components-title { font-family: var(--font); }
.wc-block-components-button {
	border-radius: 999px !important; min-height: 48px;
	background: var(--ink) !important; color: #fff !important;
	font-family: var(--font) !important; font-weight: 500 !important;
}
.wc-block-components-text-input input { border-radius: var(--radius-sm) !important; font-size: 16px !important; }
