:root {
    --primary: #2563eb; --secondary: #0f172a; --accent: #f97316; --bg: #f8fafc;
    --surface: #fff; --muted: #526079; --border: #dce4ef; --radius: 12px;
    --soft: color-mix(in srgb, var(--primary) 8%, white);
    --action: color-mix(in srgb, var(--primary) 78%, #0f172a);
    --header: color-mix(in srgb, var(--secondary) 45%, #0c1426);
    --shadow: 0 12px 32px #15284512;
    --gutter: clamp(14px, 3vw, 36px);
    --product-title-size: 16px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--secondary); font: 1rem/1.5 system-ui, sans-serif; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button:not(:disabled) { cursor: pointer; }
button:disabled { cursor: not-allowed; }
img { display: block; max-inline-size: 100%; }
h1, h2, h3, p { overflow-wrap: anywhere; }
main { min-height: 35vh; }
.container { width: min(1280px, 100% - var(--gutter) * 2); margin-inline: auto; }
:focus-visible { outline: 3px solid #3b82f6; outline-offset: 3px; }
.store-icon { flex: 0 0 auto; width: 1.25em; height: 1.25em; vertical-align: middle; }
.skip-link { position: fixed; inset: 8px auto auto 8px; z-index: 1200; padding: 10px 16px; background: white; border-radius: 8px; }
.skip-link:not(:focus) { clip-path: inset(50%); }

.utility-bar { background: var(--header); color: #e5edf9; font-size: .81rem; }
.utility-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; min-height: 34px; padding-block: 5px; }
.utility-row a { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: white; }
.announcement { overflow-wrap: anywhere; }
.store-header { position: sticky; top: 0; z-index: 100; background: var(--surface); box-shadow: 0 3px 13px #1528450c; }
.header-main { display: grid; grid-template-columns: minmax(140px, .65fr) minmax(0, 2fr) auto; align-items: center; gap: clamp(12px, 3vw, 38px); padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; min-width: 0; text-decoration: none; font-size: clamp(1rem, 2vw, 1.42rem); line-height: 1.1; font-weight: 850; letter-spacing: -.03em; overflow-wrap: anywhere; }
.brand-mark { flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; width: 42px; height: 42px; color: white; background: var(--header); }
.search-box { position: relative; min-width: 0; }
.search-box form { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); padding: 4px 4px 4px 13px; }
.search-box form:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px var(--soft); }
.search-box form > .store-icon { color: var(--muted); }
.search-box input { flex: 1; min-width: 0; min-height: 40px; border: 0; background: transparent; padding: 0; color: var(--secondary); }
.search-box input:focus { outline: none; }
.search-box button { border: 0; background: var(--action); color: white; border-radius: max(4px, calc(var(--radius) - 3px)); padding: 0 17px; min-height: 40px; font-weight: 750; }
.search-suggestions { position: absolute; z-index: 2; top: calc(100% + 7px); inset-inline: 0; padding: 5px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.search-suggestions a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 10px; border-radius: 7px; text-decoration: none; }
.search-suggestions a span { overflow-wrap: anywhere; }
.search-suggestions a strong { white-space: nowrap; }
.search-suggestions a:hover, .search-suggestions a:focus-visible { background: var(--soft); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius); padding: 0 11px; min-height: 44px; text-decoration: none; font-size: .9rem; font-weight: 700; white-space: nowrap; }
.header-action:hover, .cart-action { background: var(--soft); color: var(--action); }
.cart-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding-inline: 4px; border-radius: 999px; background: var(--header); color: white; font-size: .69rem; font-weight: 800; }
.cart-badge:empty { display: none; }
.store-nav { box-shadow: inset 0 1px var(--border); }
.nav-row { display: flex; gap: clamp(16px, 3vw, 36px); align-items: center; overflow-x: auto; padding-block: 5px; scrollbar-width: thin; }
.nav-row a { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; white-space: nowrap; text-decoration: none; font-size: .89rem; font-weight: 700; }
.nav-row a:hover, .nav-row a[aria-current] { color: var(--action); text-decoration: underline; text-underline-offset: 5px; }
.nav-row .nav-catalog { background: var(--soft); color: var(--action); border-radius: 8px; padding-inline: 12px; }

.storefront-home { padding-top: clamp(14px, 3vw, 28px); }
.hero { display: grid; grid-template-columns: 1.03fr 1fr; min-height: clamp(300px, 34vw, 420px); background: var(--hero-bg, #e8effd); color: var(--hero-text, var(--header)); border-radius: clamp(16px, 2.5vw, 30px); overflow: hidden; }
.hero-content { display: flex; flex-direction: column; justify-content: center; align-items: start; padding: clamp(24px, 5.2vw, 74px); min-width: 0; }
.hero h1 { margin: 0; font-size: clamp(2.3rem, 5.1vw, 4.7rem); line-height: 1.015; letter-spacing: -.055em; text-wrap: balance; }
.hero p { margin: 18px 0 0; max-width: 36ch; font-size: clamp(.95rem, 1.55vw, 1.16rem); }
.hero .btn { margin-top: 23px; }
.hero-visual { display: grid; place-items: center; min-width: 0; padding: clamp(10px, 2.2vw, 32px); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.hero-photo { width: 100%; height: 100%; max-height: 400px; object-fit: contain; border-radius: 18px; }
.hero-collage { position: relative; display: grid; align-items: center; justify-items: center; width: min(100%, 465px); aspect-ratio: 1.65; isolation: isolate; }
.hero-collage::before { content: ""; position: absolute; inset: 0 12%; border: 1px solid #ffffff87; border-radius: 50%; background: #ffffff3d; z-index: -1; }
.hero-collage img { position: absolute; width: 35%; height: auto; border: clamp(4px, 1vw, 10px) solid #fff; border-radius: 18%; box-shadow: 0 12px 26px #20375c2c; }
.hero-collage img:nth-child(1) { left: 6%; top: 20%; transform: rotate(-12deg); }
.hero-collage img:nth-child(2) { width: 43%; z-index: 1; transform: rotate(-3deg); }
.hero-collage img:nth-child(3) { right: 7%; bottom: 12%; transform: rotate(12deg); }
.section { padding-block: clamp(19px, 3vw, 34px); }
.section-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 2.05rem); line-height: 1.16; letter-spacing: -.037em; }
.section-head p { margin: 5px 0 0; color: var(--muted); }
.section-head p:empty { display: none; }
.section-link { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; font-weight: 750; color: var(--action); text-decoration: none; }
.section-link:hover { text-decoration: underline; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.category-card { display: flex; align-items: center; gap: 11px; justify-content: space-between; min-width: 0; min-height: 76px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); text-decoration: none; line-height: 1.25; }
.category-card strong { flex: 1; overflow-wrap: anywhere; }
.category-card > .store-icon { color: var(--muted); width: 14px; }
.category-thumb { flex: 0 0 auto; display: grid; place-items: center; width: clamp(32px, 5vw, 54px); aspect-ratio: 1; overflow: hidden; background: var(--soft); color: var(--action); border-radius: 10px; }
.category-thumb img { width: 100%; height: 100%; object-fit: cover; }
.category-card:hover, .product-card:focus-within { border-color: var(--primary); }
.flash-wrap { padding: clamp(14px, 3vw, 29px); border: 1px solid #edddcd; border-radius: 22px; background: #fdf1e7; }
.flash-heading { display: flex; gap: 9px; align-items: center; }
.flash-heading .store-icon { color: color-mix(in srgb, var(--accent) 45%, #6e2c08); }
.countdown { display: flex; flex-wrap: wrap; gap: 5px; font-variant-numeric: tabular-nums; }
.countdown span { min-width: 39px; padding: 5px 8px; background: var(--header); color: white; border-radius: 7px; text-align: center; font-size: .82rem; font-weight: 750; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.feature { padding: 19px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }
.feature > .store-icon { width: 24px; height: 24px; color: var(--action); margin-bottom: 7px; }
.feature h3 { margin: 0; }
.feature p { color: var(--muted); margin: 5px 0 0; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 2vw, 19px); }
.product-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; transition: border-color .16s, box-shadow .16s; }
.product-card:hover { border-color: color-mix(in srgb, var(--primary) 55%, white); box-shadow: var(--shadow); }
.product-image { position: relative; display: block; aspect-ratio: 1.23; background: #f1f4f8; }
.product-image:focus-visible { outline-offset: -4px; }
.product-image img { width: 100%; height: 100%; object-fit: contain; }
.discount-pill { position: absolute; inset: 9px auto auto 9px; border-radius: 7px; background: #fff0e2; color: #8b3412; padding: 4px 7px; font-size: .75rem; font-weight: 800; }
.product-body { display: flex; flex: 1; flex-direction: column; padding: clamp(9px, 1.5vw, 16px); }
.product-title { font-size: var(--product-title-size); font-weight: 760; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.product-title:hover { text-decoration: underline; }
.price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin: 8px 0 12px; font-variant-numeric: tabular-nums; }
.price { font-size: clamp(1.03rem, 2vw, 1.38rem); font-weight: 850; color: var(--action); }
.old-price { text-decoration: line-through; color: var(--muted); font-size: .79rem; }
.product-actions { margin-top: auto; }
.product-actions .btn { width: 100%; }
.product-actions .btn-primary:not(:disabled) { background: var(--soft); color: var(--action); border-color: var(--soft); }
.product-actions .btn-primary:hover:not(:disabled) { border-color: var(--action); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 13px; border: 1px solid transparent; border-radius: var(--radius); text-decoration: none; font-weight: 750; line-height: 1.22; text-align: center; }
.btn-primary { background: var(--action); color: white; }
.btn-primary:hover:not(:disabled), .search-box button:hover { background: var(--header); }
.btn-outline { background: var(--surface); color: var(--action); border-color: var(--border); }
.btn-outline:hover { border-color: var(--action); }
.btn:disabled { background: #eef1f5; color: #526079; border-color: #eef1f5; }
.eyebrow { color: var(--muted); font-size: .82rem; font-weight: 750; letter-spacing: .04em; }
.catalog-layout { display: grid; grid-template-columns: minmax(155px, 215px) minmax(0, 1fr); gap: 23px; padding-block: 26px; }
.catalog-layout .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.filter-card, .card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.filter-card { padding: 15px; height: max-content; position: sticky; top: 138px; }
.filter-card h3 { margin: 0 0 8px; }
.filter-list a { display: block; padding: 9px 10px; border-radius: 7px; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.filter-list a.active, .filter-list a:hover { color: var(--action); background: var(--soft); }
.filter-list a.active { font-weight: 750; }
.catalog-toolbar { display: flex; justify-content: space-between; align-items: end; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.catalog-toolbar h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.04em; }
.form-control, .form-select { width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 11px; background: var(--surface); color: var(--secondary); }
.form-label { display: block; margin-bottom: 5px; font-weight: 750; font-size: .86rem; }
.form-group { margin-bottom: 14px; }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 24px 0; }
.pagination a { min-width: 40px; min-height: 40px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; text-decoration: none; }
.pagination a.active { background: var(--action); color: white; border-color: var(--action); }
.product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 5vw, 54px); padding-block: 28px; }
.gallery-main { aspect-ratio: 1; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 8px; padding: 4px; margin: 8px -4px 0; overflow-x: auto; }
.thumb { flex: 0 0 70px; height: 70px; padding: 0; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--surface); }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb[aria-pressed="true"] { border-color: var(--action); }
.product-info h1 { margin: 7px 0 11px; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -.04em; }
.stock { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; background: #e6f5ea; color: #166534; font-size: .8rem; font-weight: 750; }
.stock-unavailable { background: #f0f2f6; color: var(--muted); }
.product-description { color: var(--muted); }
.detail-price { font-size: clamp(1.55rem, 3vw, 2.2rem); }
.detail-note { margin-top: 16px; padding: 16px; color: var(--muted); }
.detail-note strong, .detail-note h3 { color: var(--secondary); }
.detail-note p:last-child { margin-bottom: 0; }
.detail-purchase { display: grid; grid-template-columns: minmax(80px, 105px) minmax(0, 1fr); gap: 10px; align-items: end; margin-top: 18px; }
.cart-page, .checkout-layout { padding-block: 28px; }
.cart-layout, .checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(275px, 340px); gap: 20px; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 11px; border-bottom: 1px solid var(--border); text-align: left; }
.cart-product { display: flex; align-items: center; gap: 10px; }
.cart-product img { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; background: #f1f4f8; }
.summary-card, .checkout-form { padding: clamp(14px, 3vw, 24px); }
.summary-card { height: max-content; position: sticky; top: 138px; }
.summary-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; color: var(--muted); }
.summary-total { margin-top: 7px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 1.2rem; font-weight: 850; color: var(--secondary); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-grid .full { grid-column: 1 / -1; }
.alert { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 15px; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-info { background: #dbeafe; color: #1e40af; }
.empty-state { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: clamp(22px, 5vw, 52px) 14px; }
.empty-state h2 { margin: 0; }
.empty-state p { color: var(--muted); }
.tracking-card, .account-card { max-width: 760px; margin: 25px auto; padding: clamp(14px, 4vw, 28px); }
.timeline { border-left: 2px solid var(--border); margin-left: 10px; padding-left: 20px; }
.timeline-item { position: relative; padding-bottom: 16px; }
.timeline-item::before { content: ""; position: absolute; left: -26px; top: 6px; width: 10px; height: 10px; background: var(--action); border-radius: 50%; }
.validation-summary-valid { display: none !important; }

.footer { background: var(--header); color: #d6e1f2; margin-top: 37px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 18px 25px; padding-block: 36px; }
.footer h2, .footer h3 { color: white; margin: 0 0 8px; }
.footer h2 { font-size: 1.3rem; }
.footer h3 { font-size: 1rem; }
.footer p { margin: 0; max-width: 40ch; }
.footer a { display: block; width: fit-content; margin-bottom: 6px; text-decoration: none; overflow-wrap: anywhere; }
.footer a:hover { text-decoration: underline; }
.copyright { border-top: 1px solid #ffffff2b; display: flex; flex-wrap: wrap; gap: 5px 17px; padding-block: 13px; font-size: .81rem; }
.copyright a { margin: 0; }
.copyright span:last-child { margin-left: auto; }
.mobile-nav { display: none; }

@media (max-width: 900px) {
    .header-main { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding-block: 8px; }
    .search-box { grid-column: 1 / -1; grid-row: 2; }
    .catalog-layout { grid-template-columns: minmax(0, 1fr); gap: 15px; }
    .filter-card, .summary-card { position: static; }
    .filter-list { display: flex; flex-wrap: wrap; gap: 3px; }
    .cart-layout, .checkout-layout { grid-template-columns: minmax(0, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .utility-row { min-height: 30px; font-size: .72rem; }
    .utility-row a { display: none; }
    .brand-mark { width: 34px; height: 34px; border-radius: 8px; }
    .header-action .label { display: none; }
    .header-action { min-width: 44px; padding-inline: 7px; }
    .search-box form { gap: 6px; padding-left: 9px; }
    .nav-row { gap: 17px; }
    .nav-row a { min-height: 36px; }
    .hero { grid-template-columns: minmax(0, 1fr); }
    .hero-content { padding: 23px; }
    .hero-content h1 { font-size: clamp(2rem, 8.6vw, 3rem); }
    .hero p { margin-top: 9px; }
    .hero .btn { margin-top: 14px; }
    .hero-visual { padding: 5px 14px; }
    .hero-photo { max-height: 175px; }
    .hero-collage { width: min(76%, 235px); }
    .category-grid, .product-grid, .catalog-layout .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category-card { min-height: 65px; gap: 6px; padding: 7px; font-size: .87rem; }
    .category-card > .store-icon { display: none; }
    .product-title { font-size: min(var(--product-title-size), 1rem); }
    .product-actions .btn { padding-inline: 3px; font-size: .84rem; }
    .features, .product-detail, .form-grid { grid-template-columns: minmax(0, 1fr); }
    .cart-table thead { display: none; }
    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; }
    .cart-table tr { padding: 10px; border-bottom: 1px solid var(--border); }
    .cart-table td { border: 0; padding: 4px; }
    .footer { padding-bottom: calc(57px + env(safe-area-inset-bottom)); }
    .mobile-nav { position: fixed; inset: auto 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); z-index: 110; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
    .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; text-decoration: none; color: var(--muted); font-size: .72rem; text-align: center; }
    .mobile-nav a .store-icon { width: 19px; height: 19px; }
    .mobile-nav a[aria-current] { background: var(--soft); color: var(--action); font-weight: 800; }
    .mobile-cart { position: relative; }
    .mobile-cart .cart-badge { position: absolute; top: -4px; left: 13px; height: 15px; min-width: 15px; font-size: .61rem; }
    .mobile-cart .cart-badge:empty { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .product-card { transition: none; }
}
