/* Loaded only on WooCommerce screens (shop, category, product, cart, checkout, account). */

.woocommerce-account .woocommerce, .wc-block-cart, .wc-block-checkout { max-width: 100%; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.woocommerce-MyAccount-navigation a { display: inline-block; padding: 0.6rem 1rem; min-height: 44px; border: 1px solid var(--gt-line); border-radius: 999px; text-decoration: none; color: var(--gt-charcoal); }
.woocommerce-MyAccount-navigation .is-active a { background: var(--gt-charcoal); color: var(--gt-ivory); border-color: var(--gt-charcoal); }
.woocommerce table.shop_table { width: 100%; border-collapse: collapse; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { padding: 0.75rem; border-bottom: 1px solid var(--gt-line); text-align: left; }
.woocommerce-order-details, .woocommerce-customer-details { margin-top: 2rem; }

/* Variation chips (Choose Your Fit / colour / size) */
.wc-block-product-filter-chips .wc-block-product-filter-chips__item { min-height: 44px; min-width: 44px; border-radius: 6px; }
.wc-block-product-filter-chips .wc-block-product-filter-chips__item[aria-checked="true"] { background: var(--gt-charcoal); color: var(--gt-ivory); border-color: var(--gt-charcoal); }

.woocommerce-tabs, .wp-block-woocommerce-product-details { margin-top: 2.5rem; }
.wc-block-components-button:not(.is-link) { background: var(--gt-gold); color: var(--gt-ink); font-weight: 700; border-radius: var(--wp--custom--radius, 6px); }
.wc-block-components-button:not(.is-link):hover { background: var(--gt-gold-light); }

/* Empty cart + WooCommerce product grids: same card language as the storefront, left-aligned */
.wp-block-woocommerce-empty-cart-block { text-align: left; }
.wp-block-woocommerce-empty-cart-block > .wc-block-cart__empty-cart__title, .wp-block-woocommerce-empty-cart-block > h2 { text-align: center; }
.wp-block-woocommerce-empty-cart-block h2:not(.wc-block-cart__empty-cart__title) { font-size: var(--wp--preset--font-size--x-large, 1.6rem); margin-top: 2.5rem; text-align: left !important; }
.wc-block-grid__products { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .wc-block-grid__products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; } }
.wc-block-grid__product { width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; text-align: left !important; }
.wc-block-grid__product-image img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.wc-block-grid__product-title { display: block; margin-top: 0.6rem; font-size: 0.95rem; font-weight: 600; text-decoration: none; }
.wc-block-grid__product .wc-block-grid__product-link { text-decoration: none; color: var(--gt-charcoal); }
.wc-block-grid__product-price { font-size: 0.9rem; }
.wc-block-grid__product .wp-block-button { margin-top: 0.5rem; text-align: left; }

/* Order confirmation: account prompt in brand colours */
.wc-block-order-confirmation-create-account { background: var(--gt-cream) !important; border: 1px solid var(--gt-line); border-radius: 12px; }

/* Accessibility (WCAG 2.2 target size): WooCommerce's show/hide password toggle is 22px */
.woocommerce form .password-input { position: relative; display: block; }
.woocommerce form .show-password-input { min-width: 44px; min-height: 44px; top: 0; right: 0; }

/* Accessibility: disabled "Add to cart" (options not chosen yet) keeps readable contrast; checkbox targets are at least 24px */
button.single_add_to_cart_button.disabled, button.single_add_to_cart_button.wc-variation-selection-needed { opacity: 1 !important; background: #e9dfcf !important; color: #5c4b3b !important; cursor: not-allowed; box-shadow: none; transform: none; }
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] { min-width: 24px; min-height: 24px; }

/* Reflow at 320px: the cart line-items table must not be wider than its container */
.wc-block-cart-items { width: 100% !important; max-width: 100%; table-layout: fixed; }
.wc-block-cart-items td, .wc-block-cart-items th { min-width: 0; overflow-wrap: anywhere; }

/* My Account: a tidy side menu on desktop, a swipeable row on phones; consistent headings */
.woocommerce-account .woocommerce { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 3rem; }
@media (min-width: 900px) { .woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation) { grid-template-columns: 220px minmax(0, 1fr); align-items: start; } }
.woocommerce-MyAccount-navigation ul { flex-direction: column; flex-wrap: nowrap; gap: 0.35rem; margin: 0; }
.woocommerce-MyAccount-navigation a { display: flex; align-items: center; border-radius: 10px; width: 100%; }
@media (max-width: 899px) {
	.woocommerce-MyAccount-navigation ul { flex-direction: row; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: thin; }
	.woocommerce-MyAccount-navigation a { width: auto; white-space: nowrap; }
}
.woocommerce-MyAccount-content h2, .woocommerce-MyAccount-content h3, .woocommerce-order-details__title, .woocommerce-column__title, .woocommerce-order-updates__title, .woocommerce-Address-title h2, .woocommerce-customer-details h2 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; margin: 1.75rem 0 0.75rem; }
.woocommerce-MyAccount-content > p:first-child { margin-top: 0; }
.woocommerce-MyAccount-content .woocommerce-info { margin-bottom: 1.25rem; }

/* Orders table on phones: WooCommerce hides the order-number cell; show it as the card heading */
@media (max-width: 768px) {
	.woocommerce-orders-table__row th.woocommerce-orders-table__cell-order-number { display: block !important; font-weight: 700; background: var(--gt-cream); padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--gt-line); }
	.woocommerce-orders-table__row th.woocommerce-orders-table__cell-order-number::before { content: "Order "; font-weight: 400; }
	.woocommerce-orders-table__row th.woocommerce-orders-table__cell-order-number a { text-decoration: none; }
}
@media (min-width: 900px) {
	.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation) > .woocommerce-notices-wrapper { grid-column: 1 / -1; grid-row: 1; }
	.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation) > .woocommerce-MyAccount-navigation { grid-column: 1; grid-row: 2; }
	.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation) > .woocommerce-MyAccount-content { grid-column: 2; grid-row: 2; width: 100%; float: none; }
	.woocommerce-account .woocommerce-MyAccount-navigation { width: 100%; float: none; }
}
.woocommerce-MyAccount-navigation li { margin: 0 !important; padding: 0; }
.woocommerce-account .woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-account .woocommerce { row-gap: 0; }
.woocommerce-account .woocommerce-MyAccount-content h2, .woocommerce-customer-details h2, .woocommerce-column--billing-address h2, .woocommerce-column--shipping-address h2, .woocommerce-columns--addresses h2 { font-size: 1.35rem !important; font-weight: 700 !important; line-height: 1.25 !important; }
