:root {
    --primary: #1f4fd1;
    --on-primary: #ffffff;
    --text: #1b1f24;
    --muted: #5f6670;
    --border: #e1e4e8;
    --surface: #ffffff;
    --surface-muted: #f3f4f6;
    --background: #f7f7f8;
    --danger: #b3261e;
    --success: #1e7a35;
    --warning: #8a5a00;
    --radius: 8px;
    --radius-large: 12px;
    --width: 1180px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --heading-font: var(--font);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--background);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--heading-font); line-height: 1.25; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin: 0 0 .75rem; }
h2 { font-size: 1.25rem; }
address { font-style: normal; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.container { max-width: var(--width); margin: 0 auto; padding: 0 1rem; }
.page { padding-top: 1.5rem; padding-bottom: 3.5rem; min-height: 60vh; }
.section { margin-top: 3rem; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.section-header h2 { margin: 0; }
.section-link { font-weight: 500; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.block { display: block; }
.lead { font-size: 1.1rem; color: var(--muted); }
.icon { flex: none; vertical-align: middle; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: .5rem; z-index: 100; padding: .5rem 1rem; background: var(--surface); border-radius: var(--radius); }
.skip-link:focus { left: .5rem; }
.js .js-hidden { display: none; }

.announcement { background: var(--primary); color: var(--on-primary); text-align: center; padding: .45rem 1rem; font-size: .9rem; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 1rem 1.5rem; padding-top: .9rem; padding-bottom: .9rem; flex-wrap: wrap; }
.brand { font-size: 1.35rem; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { max-height: 44px; width: auto; }
.search-form { flex: 1; display: flex; min-width: 220px; max-width: 560px; }
.search-form input { flex: 1; border-radius: var(--radius) 0 0 var(--radius); border-right: 0; }
.search-form button { border-radius: 0 var(--radius) var(--radius) 0; padding: .55rem .9rem; display: inline-flex; align-items: center; gap: .4rem; }
.search-form-large { max-width: 640px; margin: 1rem 0; }
.header-links { display: flex; gap: 1.25rem; align-items: center; margin-left: auto; }
.header-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--text); font-weight: 500; }
.header-link:hover { color: var(--primary); text-decoration: none; }
.cart-count { display: inline-block; min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: .75rem; line-height: 1.4rem; text-align: center; font-weight: 600; }

.main-nav { border-top: 1px solid var(--border); }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > .container > ul { display: flex; gap: .25rem 1.5rem; flex-wrap: wrap; }
.main-nav > .container > ul > li { position: relative; }
.main-nav > .container > ul > li > a { display: block; padding: .7rem 0; color: var(--text); font-weight: 500; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--primary); text-decoration: none; }
.main-nav > .container > ul > li > a[aria-current] { border-bottom-color: var(--primary); }
.sub-nav { display: none; position: absolute; top: 100%; left: -1rem; z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .4rem 0; min-width: 220px; box-shadow: 0 8px 24px rgba(15, 20, 30, .08); }
.sub-nav a { display: block; padding: .4rem 1rem; color: var(--text); }
.main-nav li:hover > .sub-nav, .main-nav li:focus-within > .sub-nav { display: block; }

/* Forms and buttons */
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search], input[type=url], select, textarea {
    width: 100%; padding: .6rem .75rem; border: 1px solid #c9ced6; border-radius: var(--radius); background: #fff; color: var(--text); min-height: 44px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 30%, transparent); outline-offset: 0; border-color: var(--primary); }
button, .button {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .6rem 1.25rem;
    border: 1px solid var(--primary); border-radius: var(--radius); background: var(--primary); color: var(--on-primary);
    cursor: pointer; font-weight: 600; text-align: center; line-height: 1.2;
}
button:hover, .button:hover { filter: brightness(.93); text-decoration: none; }
.button-secondary { background: var(--surface); color: var(--text); border-color: #c9ced6; }
.button-secondary:hover { filter: none; background: var(--surface-muted); }
.button-large { min-height: 50px; padding: .75rem 1.75rem; font-size: 1.05rem; }
.button-block { display: flex; width: 100%; margin-top: 1rem; }
.button-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.link-button { background: none; border: 0; padding: 0; min-height: 0; color: var(--primary); font-weight: 400; cursor: pointer; }
.link-button:hover { text-decoration: underline; filter: none; }
.link-danger { color: var(--danger); }
.icon-button { background: none; border: 0; min-height: 40px; min-width: 40px; padding: .5rem; color: var(--muted); border-radius: var(--radius); }
.icon-button:hover { background: var(--surface-muted); color: var(--danger); filter: none; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.field-error { color: var(--danger); font-size: .875rem; margin-top: .3rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
.checkbox { display: flex; gap: .6rem; align-items: flex-start; margin: .75rem 0; cursor: pointer; }
.checkbox input { margin-top: .3rem; accent-color: var(--primary); }
.inline-form { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }

.quantity { display: inline-flex; align-items: stretch; border: 1px solid #c9ced6; border-radius: var(--radius); background: #fff; overflow: hidden; }
.quantity input { width: 4rem; border: 0; text-align: center; border-radius: 0; -moz-appearance: textfield; }
.quantity input::-webkit-inner-spin-button, .quantity input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.quantity input:focus { outline: none; }
.quantity:focus-within { border-color: var(--primary); }
.quantity-step { min-height: 44px; min-width: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--text); font-size: 1.2rem; font-weight: 400; }
.quantity-step:hover { background: var(--surface-muted); filter: none; }

.notice { padding: .85rem 1rem; border-radius: var(--radius); background: #eef2ff; border: 1px solid #d5dcf7; margin-bottom: 1rem; }
.notice-success { background: #eaf6ec; border-color: #c7e6cc; color: var(--success); }
.notice-error { background: #fdeceb; border-color: #f4c7c3; color: var(--danger); }
.notice ul { margin: 0; padding-left: 1.2rem; }

/* Home */
.hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-large); padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; text-align: center; }
.hero h1 { font-size: clamp(1.8rem, 1.3rem + 2.4vw, 2.8rem); margin: 0 0 .5rem; }
.hero p { color: var(--muted); font-size: 1.1rem; margin: 0 0 1.5rem; }
.category-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.category-list a { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-weight: 600; }
.category-list a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

/* Listings */
.breadcrumbs { font-size: .875rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: .25rem; color: #b0b5bc; }
.breadcrumbs a { color: var(--muted); }
.listing-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.listing-header h1 { margin-bottom: .25rem; }
.listing-header p { margin: 0; }
.sort-form { display: flex; gap: .5rem; align-items: center; }
.sort-form label { font-size: .875rem; color: var(--muted); white-space: nowrap; }
.sort-form select { width: auto; }
.filters { margin-bottom: 1.25rem; border: 1px solid var(--border, #e3e6ea); border-radius: var(--radius); background: #fff; }
.filters-toggle { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; cursor: pointer; font-weight: 600; list-style: none; }
.filters-toggle::-webkit-details-marker { display: none; }
.filters-count { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: 999px; background: var(--primary); color: #fff; font-size: .75rem; }
.filters-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 1rem 1.5rem; padding: 0 1rem 1rem; }
.filter-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.filter-group legend { padding: 0; margin-bottom: .4rem; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.price-range { display: flex; align-items: center; gap: .4rem; }
.price-range input { width: 100%; min-width: 0; }
.checkbox-label, .filter-option { display: flex; align-items: center; gap: .45rem; margin-top: .5rem; font-size: .9rem; cursor: pointer; }
.checkbox-label input, .filter-option input { accent-color: var(--primary); }
.filter-options { display: flex; flex-direction: column; max-height: 12rem; overflow-y: auto; }
.filter-option { margin-top: .3rem; }
.swatch { width: 1rem; height: 1rem; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); flex: none; }
.filters-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 1rem; }
.subcategories { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem 1.25rem; }
.product-card { display: flex; flex-direction: column; }
.product-card-image { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: var(--surface-muted); border: 1px solid var(--border); }
.product-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover .product-card-image img { transform: scale(1.03); }
.product-card-title { font-size: 1rem; font-weight: 600; margin: .75rem 0 .2rem; }
.product-card-title a { color: var(--text); }
.placeholder-image { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 120px; background: var(--surface-muted); color: #b0b5bc; }
.placeholder-image.large { aspect-ratio: 1; border-radius: var(--radius-large); border: 1px solid var(--border); }
.tag { display: inline-block; padding: .2rem .65rem; border-radius: 999px; background: var(--surface-muted); color: var(--text); font-size: .8rem; margin: 0 .25rem .25rem 0; border: 1px solid var(--border); }
a.tag:hover { border-color: var(--primary); text-decoration: none; }
.tag-sale, .tag-soldout { position: absolute; top: .6rem; left: .6rem; border: 0; font-weight: 600; }
.tag-sale { background: var(--danger); color: #fff; }
.tag-soldout { background: var(--text); color: #fff; }
.price { margin: .15rem 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; }
.price-current { font-weight: 700; }
.price-sale { color: var(--danger); }
.price-old { color: var(--muted); font-size: .9em; }

.empty-state { text-align: center; padding: 3rem 1.5rem; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius-large); }
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--surface-muted); color: var(--muted); margin-bottom: .75rem; }
.empty-title { font-weight: 600; font-size: 1.1rem; margin: 0 0 .25rem; }
.empty-state .button { margin-top: 1rem; }

/* Product */
.product-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.gallery-main { display: block; border-radius: var(--radius-large); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.gallery-main img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.gallery-thumbs { list-style: none; margin: .75rem 0 0; padding: 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.gallery-thumbs a { display: block; width: 72px; height: 72px; border-radius: var(--radius); overflow: hidden; border: 2px solid transparent; opacity: .75; }
.gallery-thumbs a[aria-current], .gallery-thumbs a:hover { border-color: var(--primary); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-summary h1 { margin-bottom: .5rem; }
.product-summary .price { font-size: 1.5rem; margin-bottom: .5rem; }
.stock { display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; font-weight: 600; margin: 0 0 1rem; }
.stock-in { color: var(--success); }
.stock-out { color: var(--danger); }
.stock-low { color: var(--warning); }
.stock-backorder { color: var(--warning); }
.sale-ends { color: var(--danger); margin: -.5rem 0 1rem; }
.details-table { max-width: 760px; }
.details-table th { width: 35%; text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--muted); font-weight: 500; background: var(--surface-muted); }
.prose h2, .prose h3, .prose h4 { margin: 1.5em 0 .5em; }
.prose img { border-radius: var(--radius); margin: 1rem 0; }
.prose table { margin: 1rem 0; }
.prose blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--border); color: var(--muted); }
.category-intro { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 1.5rem; }
.category-image { width: 220px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); flex: none; }
.category-intro .lead { margin: 0; }
.add-to-cart { display: flex; gap: 1rem; align-items: flex-end; margin: 1.5rem 0; flex-wrap: wrap; padding: 1.25rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.quantity-field label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .35rem; }
.add-to-cart .button { flex: 1; min-width: 200px; }
.product-meta { margin: 0 0 1rem; font-size: .9rem; }
.product-meta div { display: flex; gap: .5rem; padding: .2rem 0; }
.product-meta dt { color: var(--muted); }
.product-meta dd { margin: 0; }
.product-description { max-width: 760px; }
.prose { line-height: 1.7; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
th, td { padding: .8rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.status { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface-muted); }
.status-success { background: #eaf6ec; color: var(--success); }
.status-warning { background: #fdf3e1; color: var(--warning); }
.status-danger { background: #fdeceb; color: var(--danger); }
.status-info { background: #eef2ff; color: var(--primary); }

/* Cart */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start; }
.cart-items { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-large); }
.cart-item { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto auto auto; gap: 1rem; align-items: center; padding: 1rem; border-bottom: 1px solid var(--border); }
.cart-item:last-child { border-bottom: 0; }
.cart-item-image { width: 80px; height: 80px; border-radius: var(--radius); overflow: hidden; background: var(--surface-muted); }
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.cart-item-name { color: var(--text); font-weight: 600; }
.cart-item-quantity { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.cart-item-quantity .link-button { font-size: .8rem; }
.cart-item-total { min-width: 6rem; text-align: right; font-variant-numeric: tabular-nums; }
.cart-summary { position: sticky; top: 1rem; }
.continue-link { display: block; text-align: center; margin-top: .9rem; font-size: .9rem; }

/* Panels and checkout */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-large); padding: 1.25rem 1.4rem; margin-bottom: 1rem; }
.panel h2 { margin-top: 0; font-size: 1.1rem; }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.checkout-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.checkout-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: .5rem; font-size: .875rem; color: var(--muted); counter-reset: step; }
.checkout-steps li { display: flex; align-items: center; gap: .4rem; counter-increment: step; }
.checkout-steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 1px solid var(--border); font-size: .75rem; }
.checkout-steps li + li::after { order: -1; content: ""; width: 1.5rem; height: 1px; background: var(--border); }
.checkout-steps [aria-current] { color: var(--text); font-weight: 600; }
.checkout-steps [aria-current]::before { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.checkout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.checkout-summary { position: sticky; top: 1rem; }
.option { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .5rem; cursor: pointer; }
.option:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.option input { margin-top: .3rem; accent-color: var(--primary); }
.option span { flex: 1; }
.summary-items { list-style: none; padding: 0; margin: 0 0 1rem; }
.summary-items li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.summary-product { display: flex; align-items: center; gap: .75rem; }
.summary-product img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: .4rem 0; margin: 0; }
.totals dd { margin: 0; padding-left: 1rem; text-align: right; font-variant-numeric: tabular-nums; }
.totals .grand { font-weight: 700; font-size: 1.15rem; padding-top: .5rem; border-top: 1px solid var(--border); margin-top: .25rem; }
.order-complete { text-align: center; }
.order-complete .summary-items, .order-complete .totals { text-align: left; }
.order-complete .button-row { justify-content: center; }
.success-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: #eaf6ec; color: var(--success); }

/* Account */
.account { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2rem; align-items: start; }
.account-nav { display: flex; flex-direction: column; gap: .15rem; }
.account-nav-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 .5rem; font-weight: 600; }
.account-nav a, .account-nav button { padding: .55rem .8rem; border-radius: var(--radius); text-align: left; color: var(--text); }
.account-nav a:hover { background: var(--surface); text-decoration: none; }
.account-nav a.active { background: var(--surface); border: 1px solid var(--border); font-weight: 600; }
.account-nav button { color: var(--muted); }
.account-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1.5rem 0 2rem; }
.account-card { display: flex; flex-direction: column; gap: .35rem; color: var(--text); margin: 0; }
.account-card:hover { border-color: var(--primary); text-decoration: none; }
.account-card .icon { color: var(--primary); margin-bottom: .25rem; }
.address-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.address-card address { margin: .5rem 0 1rem; }
.back-link { margin: 0 0 .5rem; font-size: .9rem; }

/* Pagination */
.pagination { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: 2rem; justify-content: center; }
.pagination a, .pagination span { min-width: 2.5rem; padding: .45rem .8rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: center; }
.pagination .current { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pagination .disabled { color: var(--muted); }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 2.5rem 0 1.25rem; margin-top: 2rem; }
.footer-row { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
.footer-brand { font-size: 1.1rem; }
.footer-about p { color: var(--muted); }
.footer-heading { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 .75rem; font-weight: 600; }
.footer-links, .social { list-style: none; padding: 0; margin: 0; }
.footer-links li, .social li { margin-bottom: .45rem; }
.footer-links a { color: var(--text); }
.social { display: flex; gap: 1rem; margin-top: .75rem; }
.language-switcher { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
.language-switcher-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.language-switcher select { width: auto; min-width: 0; padding: .35rem 1.8rem .35rem .6rem; font-size: .9rem; }
.js .language-switcher-submit { display: none; }
.language-switcher-submit { padding: .35rem .7rem; font-size: .85rem; }
.copyright { color: var(--muted); font-size: .85rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }

[dir=rtl] .tag-sale, [dir=rtl] .tag-soldout { left: auto; right: .6rem; }
[dir=rtl] .totals dd, [dir=rtl] .cart-item-total, [dir=rtl] .numeric { text-align: left; }
[dir=rtl] .header-links { margin-left: 0; margin-right: auto; }
[dir=rtl] .search-form input { border-radius: 0 var(--radius) var(--radius) 0; border-right: 1px solid #c9ced6; border-left: 0; }
[dir=rtl] .search-form button { border-radius: var(--radius) 0 0 var(--radius); }

@media (max-width: 900px) {
    .product-detail, .checkout, .account, .cart-layout { grid-template-columns: minmax(0, 1fr); }
    .checkout-summary, .cart-summary { position: static; }
    .footer-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-about { grid-column: 1 / -1; }
    .account-nav { flex-direction: row; flex-wrap: wrap; gap: .25rem; }
    .account-nav-title { width: 100%; }
}

@media (max-width: 640px) {
    .header-row { gap: .75rem; }
    .brand { font-size: 1.15rem; }
    .header-links { gap: .9rem; }
    .header-link > span:not(.cart-count) { display: none; }
    .search-form { order: 3; flex-basis: 100%; max-width: none; }
    .search-label { display: none; }
    .main-nav > .container > ul { flex-wrap: nowrap; overflow-x: auto; gap: 1.25rem; scrollbar-width: none; }
    .main-nav > .container > ul > li > a { white-space: nowrap; }
    .main-nav .sub-nav { display: none !important; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem .75rem; }
    .product-card-title { font-size: .95rem; }
    .cart-item { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "image info remove" "image quantity total"; gap: .5rem .75rem; }
    .cart-item-image { grid-area: image; width: 64px; height: 64px; }
    .cart-item-info { grid-area: info; }
    .cart-item-quantity { grid-area: quantity; flex-direction: row; justify-self: start; }
    .cart-item-total { grid-area: total; min-width: 0; }
    .cart-item-remove { grid-area: remove; justify-self: end; }
    .checkout-steps li:not([aria-current]) { display: none; }
    .order-table thead { display: none; }
    .order-table, .order-table tbody, .order-table tr, .order-table td { display: block; width: 100%; }
    .order-table tr { padding: .6rem .8rem; border-bottom: 1px solid var(--border); }
    .order-table td { border: 0; padding: .2rem 0; display: flex; justify-content: space-between; }
    .order-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .875rem; }
    .footer-row { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
    .category-intro { flex-direction: column; }
    .category-image { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}

/* Variants */
.variant-picker { flex-basis: 100%; display: grid; gap: 1rem; }
.variant-attribute { border: 0; margin: 0; padding: 0; min-width: 0; }
.variant-attribute legend { font-size: .9rem; font-weight: 600; margin-bottom: .45rem; padding: 0; }
.variant-chosen { font-weight: 400; color: var(--muted); }
.variant-attribute select { max-width: 320px; }
.variant-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.variant-option { position: relative; cursor: pointer; }
.variant-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.variant-option > span:not(.visually-hidden) { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 40px; padding: .35rem .8rem; border: 1px solid #c9ced6; border-radius: var(--radius); background: #fff; font-size: .9rem; }
.variant-option input:checked + span { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.variant-option input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.variant-option.is-unavailable > span:not(.visually-hidden) { opacity: .45; text-decoration: line-through; }
.variant-color .variant-option > .variant-swatch { min-width: 0; min-height: 0; width: 34px; height: 34px; padding: 0; border-radius: 50%; background: var(--swatch); border: 2px solid #fff; box-shadow: 0 0 0 1px #c9ced6; }
.variant-color .variant-option input:checked + .variant-swatch { box-shadow: 0 0 0 2px var(--text); }
.variant-color .variant-option.is-unavailable > .variant-swatch { opacity: .35; text-decoration: none; }
.variant-message { color: var(--danger); margin: 0; }
.price-from { font-weight: 700; }
.cart-item-variant { color: var(--muted); font-size: .85rem; }
.coupons { display: grid; gap: .6rem; margin-bottom: 1rem; }
.coupon-form { display: flex; gap: .5rem; }
.coupon-form input { flex: 1; min-width: 0; text-transform: uppercase; }
.coupon-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.coupon-chip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem .75rem; padding: .45rem .7rem; border: 1px dashed #c9ced6; border-radius: var(--radius); background: var(--surface-muted); }
.coupon-code { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; letter-spacing: .04em; }
.coupon-chip.is-invalid { border-color: var(--danger); }
.coupon-error { flex-basis: 100%; color: var(--danger); font-size: .85rem; }
.totals .discount-line { color: var(--success); }
.option-text { display: grid; gap: .1rem; }
.option-meta { color: var(--muted); font-size: .85rem; }
.badge-test { display: inline-block; margin-left: .4rem; padding: 0 .4rem; border-radius: 3px; background: #fdf3e1; color: var(--warning); font-size: .75rem; font-weight: 600; }
.order-updates { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.order-updates p { margin: .2rem 0 0; }
.verify-notice .inline-form { display: inline-flex; }
