/* ==========================================================================
   SHOES HUB — WOOCOMMERCE STYLES
   --------------------------------------------------------------------------
   Loaded only on WooCommerce pages (shop, category, product, cart,
   checkout, account). Product loop and card styles live in
   product-loop.css, shared with the homepage showcase rows.

   This is the Phase 1 structural base. Phase 2 replaces Woo's default
   templates where the markup must change; these rules then get tightened
   against our own markup.
   ========================================================================== */

/* ---------- Shared page shell ------------------------------------------- */

.woocommerce .woocommerce-breadcrumb {
	margin-bottom: var(--space-4);
	color: var(--color-text-muted);
	font-size: var(--text-sm);
}

.woocommerce .woocommerce-breadcrumb a {
	color: inherit;
}

.woocommerce .woocommerce-breadcrumb a:hover {
	color: var(--color-accent-text);
}

.woocommerce .woocommerce-result-count {
	margin: 0;
	color: var(--color-text-muted);
	font-size: var(--text-sm);
}

.woocommerce .woocommerce-ordering {
	margin: 0;
}

.woocommerce .woocommerce-ordering select {
	min-height: var(--tap);
	font-size: var(--text-sm);
}

.woocommerce-products-header {
	margin-bottom: var(--space-4);
}

.woocommerce-products-header__title {
	margin-bottom: var(--space-2);
}

.woocommerce .term-description {
	max-width: 68ch;
	color: var(--color-text-muted);
	font-size: var(--text-sm);
}

.woocommerce-notices-wrapper:empty {
	display: none;
}

/* ---------- Single product --------------------------------------------- */

.woocommerce div.product div.images,
.woocommerce div.product div.summary {
	margin-bottom: var(--space-5);
}

.woocommerce div.product div.images img {
	border-radius: var(--radius-md);
	background: var(--color-bg-soft);
}

.woocommerce div.product .product_title {
	margin-bottom: var(--space-2);
	font-size: clamp(var(--text-xl), 5vw, var(--text-3xl));
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
	margin-bottom: var(--space-3);
	color: var(--color-text);
	font-size: var(--text-xl);
	font-weight: var(--font-weight-bold);
}

.woocommerce div.product p.price del {
	color: var(--color-text-subtle);
	font-weight: var(--font-weight-normal);
	opacity: 1;
}

.woocommerce div.product p.price ins,
.woocommerce div.product span.price ins {
	text-decoration: none;
}

.woocommerce div.product .woocommerce-product-details__short-description {
	color: var(--color-text-muted);
	font-size: var(--text-sm);
}

.woocommerce div.product form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2);
	margin-bottom: var(--space-4);
	padding-block: var(--space-4);
	border-block: 1px solid var(--color-border);
}

.woocommerce div.product form.cart div.quantity {
	margin: 0;
}

.woocommerce div.product form.cart .button {
	flex: 1 1 100%;
	min-height: 52px;
	padding-inline: var(--space-5);
	border-radius: var(--radius-btn);
	background: var(--color-primary);
	color: var(--color-on-primary);
	font-size: var(--text-base);
	font-weight: var(--font-weight-semibold);
}

.woocommerce div.product form.cart .button:hover {
	background: var(--color-primary-hover);
}

.woocommerce .quantity input.qty {
	width: 64px;
	min-height: 48px;
	text-align: center;
}

/* Quantity stepper built by assets/js/product.js (progressive enhancement). */
.woocommerce .quantity.qty-stepper {
	display: inline-flex;
	align-items: center;
	overflow: hidden;
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-pill);
	background: var(--color-surface);
}

.woocommerce .qty-btn {
	display: grid;
	place-items: center;
	width: 40px;
	min-height: 48px;
	color: var(--color-text);
}

.woocommerce .qty-btn:hover {
	background: var(--color-bg-soft);
}

.woocommerce .qty-stepper input.qty {
	width: 52px;
	min-height: 46px;
	border: 0;
	background: transparent;
	padding: 0;
	-moz-appearance: textfield;
	appearance: textfield;
}

.woocommerce .qty-stepper input.qty::-webkit-outer-spin-button,
.woocommerce .qty-stepper input.qty::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.woocommerce div.product .product_meta {
	font-size: var(--text-sm);
	color: var(--color-text-muted);
}

.woocommerce div.product .product_meta > span {
	display: block;
	margin-bottom: var(--space-1);
}

/* Tabs → simple stacked panels until Phase 2 rebuilds them. */
.woocommerce div.product .woocommerce-tabs {
	margin-top: var(--space-6);
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-1);
	margin: 0 0 var(--space-4);
	padding: 0;
	border-bottom: 1px solid var(--color-border);
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before,
.woocommerce div.product .woocommerce-tabs ul.tabs::after {
	display: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
	display: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
	display: inline-flex;
	align-items: center;
	min-height: var(--tap);
	padding: 0 var(--space-3);
	font-size: var(--text-sm);
	font-weight: var(--font-weight-medium);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
	color: var(--color-accent-text);
	font-weight: var(--font-weight-semibold);
	box-shadow: inset 0 -2px 0 var(--color-accent-text);
}

/* ---------- Notices ----------------------------------------------------- */

/*
 * Notices follow the theme's voice: square corners, a token surface and the
 * state carried by the left border colour. Short status lines (message/info)
 * are uppercase semibold; error lists stay sentence case because checkout
 * validation text is long and must stay easy to scan.
 */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	margin-bottom: var(--space-4);
	padding: var(--space-3) var(--space-4);
	border: 1px solid var(--color-border);
	border-left: 4px solid var(--color-text);
	border-radius: 0;
	background: var(--color-bg-mist);
	color: var(--color-text);
	font-size: var(--text-sm);
	line-height: var(--leading-snug);
	list-style: none;
}

.woocommerce-message,
.woocommerce-info {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2) var(--space-3);
	font-weight: var(--font-weight-semibold);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
}

.woocommerce-error {
	font-weight: var(--font-weight-normal);
}

.woocommerce-error li {
	margin: 0;
}

.woocommerce-error li + li {
	margin-top: var(--space-1);
}

/* Links inside a notice keep the notice's type and the accent colour, with
   no resting underline; hover/focus brings it back as the affordance. */
.woocommerce-message a:not(.button),
.woocommerce-info a:not(.button),
.woocommerce-error a:not(.button) {
	color: var(--color-accent-text);
	text-decoration: none;
}

.woocommerce-message a:not(.button):hover,
.woocommerce-message a:not(.button):focus-visible,
.woocommerce-info a:not(.button):hover,
.woocommerce-info a:not(.button):focus-visible,
.woocommerce-error a:not(.button):hover,
.woocommerce-error a:not(.button):focus-visible {
	color: var(--color-accent-text-hover);
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

/*
 * The cart's Undo link is "Undo" + a question mark. The underline belongs to
 * the word only, so the mark is excluded from the decoration.
 */
.woocommerce-message a.restore-item,
.woocommerce-message a.restore-item:hover,
.woocommerce-message a.restore-item:focus-visible {
	text-decoration: none;
}

.woocommerce-message a.restore-item:hover .notice-undo,
.woocommerce-message a.restore-item:focus-visible .notice-undo {
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

/* WooCommerce's icon-font glyph is absolutely positioned and lands on top of
   the text at this box size; the coloured left border already carries the
   state. Hiding it also fixes notices on checkout and My Account. */
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	display: none;
}

/* The brand's dark blue carries the success/status state; the palette's green
   is not used anywhere else on the storefront. */
.woocommerce-message {
	border-left-color: var(--color-secondary);
}

.woocommerce-info {
	border-left-color: var(--color-accent-text);
}

.woocommerce-error {
	border-left-color: var(--color-error);
}

.woocommerce-error li {
	margin: 0;
}

/* WooCommerce's own `.woocommerce a.button` rule is more specific, so the
   notice buttons need the extra step to pick up the theme's navy fill. */
.woocommerce .woocommerce-message .button,
.woocommerce .woocommerce-info .button {
	float: none;
	margin-left: auto;
	min-height: var(--tap);
	padding-inline: var(--space-4);
	border: 1px solid var(--color-secondary);
	border-radius: var(--radius-btn);
	background: var(--color-secondary);
	color: var(--color-on-secondary);
	font-size: var(--text-xs);
	font-weight: var(--font-weight-semibold);
	letter-spacing: var(--tracking-caps);
	line-height: 1;
	text-transform: uppercase;
}

.woocommerce .woocommerce-message .button:hover,
.woocommerce .woocommerce-info .button:hover {
	border-color: var(--color-secondary-hover);
	background: var(--color-secondary-hover);
	color: var(--color-on-secondary);
}

/* cart.js focuses a notice so screen readers announce it; the control ring
   on a non-interactive container only reads as a double border. */
.woocommerce-message:focus,
.woocommerce-message:focus-visible,
.woocommerce-info:focus,
.woocommerce-info:focus-visible,
.woocommerce-error:focus,
.woocommerce-error:focus-visible {
	outline: none;
}

/* ---------- Cart -------------------------------------------------------- */

/*
 * Generic WooCommerce table, remove-link and checkout-button styling. The
 * cart page itself is rebuilt in assets/css/cart.css (loaded after this file,
 * cart only) and overrides these rules there; checkout and My Account keep
 * using them for their order-review and orders tables.
 */

.woocommerce table.shop_table {
	width: 100%;
	margin-bottom: var(--space-5);
	border: 1px solid var(--color-border);
	border-collapse: collapse;
	border-radius: var(--radius-sm);
	font-size: var(--text-sm);
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: var(--space-3);
	border-bottom: 1px solid var(--color-border);
	text-align: left;
	vertical-align: middle;
}

.woocommerce table.shop_table th {
	font-size: var(--text-xs);
	font-weight: var(--font-weight-semibold);
	letter-spacing: var(--tracking-wide);
	text-transform: uppercase;
	color: var(--color-text-muted);
}

.woocommerce table.shop_table td.product-name a {
	font-weight: var(--font-weight-medium);
}

.woocommerce table.cart img {
	width: 64px;
	border-radius: var(--radius-xs);
}

.woocommerce a.remove {
	display: inline-grid;
	place-items: center;
	width: var(--tap);
	height: var(--tap);
	border-radius: var(--radius-pill);
	color: var(--color-text-subtle) !important;
	font-size: var(--text-lg);
	line-height: 1;
}

.woocommerce a.remove:hover {
	background: var(--color-bg-soft);
	color: var(--color-accent-text) !important;
}

.woocommerce .cart-collaterals .cart_totals h2 {
	font-size: var(--text-xl);
}

.woocommerce .cart_totals table.shop_table {
	border: 0;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	border-radius: var(--radius-btn);
	background: var(--color-primary);
	color: var(--color-on-primary);
	font-size: var(--text-base);
	font-weight: var(--font-weight-semibold);
}

.woocommerce .wc-proceed-to-checkout a.checkout-button:hover {
	background: var(--color-primary-hover);
}

/* ---------- Forms shared by cart / checkout / account ------------------- */

.woocommerce form .form-row {
	margin-bottom: var(--space-3);
	padding: 0;
}

.woocommerce form .form-row label {
	margin-bottom: var(--space-1);
	font-size: var(--text-sm);
	font-weight: var(--font-weight-medium);
}

.woocommerce form .form-row .required {
	color: var(--color-error);
	text-decoration: none;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	min-height: 48px;
	padding: var(--space-2) var(--space-3);
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-sm);
	background: var(--color-surface);
	font-size: var(--text-base);
}

.woocommerce form .form-row.woocommerce-invalid input.input-text,
.woocommerce form .form-row.woocommerce-invalid select {
	border-color: var(--color-error);
}

.woocommerce form .form-row.woocommerce-validated input.input-text {
	border-color: var(--color-success);
}

.woocommerce form.checkout {
	display: block;
}

.woocommerce #order_review_heading {
	margin-top: var(--space-6);
}

.woocommerce-checkout #payment {
	border-radius: var(--radius-md);
	background: var(--color-bg-soft);
}

.woocommerce-checkout #payment ul.payment_methods {
	border-bottom: 1px solid var(--color-border);
}

.woocommerce-checkout #payment div.payment_box {
	background: var(--color-surface);
	border-radius: var(--radius-sm);
	font-size: var(--text-sm);
}

.woocommerce-checkout #payment div.payment_box::before {
	display: none;
}

.woocommerce #payment #place_order {
	min-height: 52px;
	border-radius: var(--radius-btn);
	background: var(--color-primary);
	color: var(--color-on-primary);
	font-size: var(--text-base);
	font-weight: var(--font-weight-semibold);
}

/* ---------- Account ----------------------------------------------------- */

.woocommerce-account .woocommerce-MyAccount-navigation ul {
	display: grid;
	gap: var(--space-1);
	margin-bottom: var(--space-5);
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
	display: flex;
	align-items: center;
	min-height: var(--tap);
	padding-inline: var(--space-3);
	border-radius: var(--radius-sm);
	font-size: var(--text-sm);
	font-weight: var(--font-weight-medium);
}

.woocommerce-account .woocommerce-MyAccount-navigation a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
	background: var(--color-bg-soft);
	color: var(--color-accent-text);
}

.woocommerce-account .woocommerce-MyAccount-content {
	font-size: var(--text-sm);
}

@media (min-width: 768px) {
	.woocommerce-account .woocommerce-MyAccount-navigation {
		float: left;
		width: 220px;
		margin-right: var(--space-5);
	}

	.woocommerce-account .woocommerce-MyAccount-content {
		float: right;
		width: calc(100% - 220px - var(--space-5));
	}
}

/* ---------- Misc -------------------------------------------------------- */

.woocommerce .price_slider_wrapper .ui-slider {
	border-radius: var(--radius-pill);
}

.woocommerce.single-product .pswp {
	z-index: var(--z-skip);
}

.woocommerce mark {
	background: var(--color-bg-soft);
	color: inherit;
	padding: 0 2px;
}

.woocommerce .woocommerce-pagination ul.page-numbers {
	border: 0;
}

.woocommerce .woocommerce-pagination ul.page-numbers li {
	border: 0;
	margin: 0;
}

.woocommerce .woocommerce-pagination ul.page-numbers li .page-numbers {
	border: 1px solid var(--color-border);
}

.woocommerce .woocommerce-pagination ul.page-numbers li .page-numbers.current {
	border-color: var(--color-text);
	background: var(--color-secondary);
	color: var(--color-on-secondary);
}
