* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--color-text);
    background: var(--color-background);
    font: 14px/1.45 var(--font-sans);
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

button, input, select { font: inherit; }

button { cursor: pointer; }

.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.store-wrap {
    width: min(1220px, calc(100% - 40px));
    margin: 0 auto;
}

.store-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 5;
}

.header-bar {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    min-height: 78px;
}

.brand {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.brand img,
.brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 12px;
}

.brand img { object-fit: contain; }

.brand-mark {
    display: grid;
    place-items: center;
    background: var(--store-primary);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.brand strong {
    display: block;
    color: var(--store-primary);
    font-size: 22px;
    line-height: 1.1;
    font-weight: 700;
}

.brand small {
    display: block;
    max-width: 180px;
    margin-top: 2px;
    color: #9aa1ab;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-search {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 46px;
    padding: 0 16px 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.header-search:focus-within {
    border-color: var(--color-primary);
    box-shadow: var(--focus-ring);
}

.header-search button {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #a3aab4;
}

.header-search svg { width: 18px; height: 18px; }

.header-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    padding: 0 10px;
    background: transparent;
    color: var(--ink);
    font-size: 14px;
}

.header-search input::placeholder { color: #b4bac2; }

.header-tools { display: flex; align-items: center; gap: 2px; }

.icon-button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--store-primary);
    transition: background var(--transition), color var(--transition);
}

.icon-button:hover {
    background: var(--color-surface-soft);
}

.icon-button svg { width: 22px; height: 22px; }

.category-bar { background: #fff; }

.category-scroll {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #d0d0d0 transparent;
}

.category-scroll::-webkit-scrollbar { height: 8px; }
.category-scroll::-webkit-scrollbar-thumb { background: #d5d5d5; border-radius: 99px; }

.category-scroll a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    height: 48px;
    border-bottom: 2px solid transparent;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.category-scroll a svg { width: 18px; height: 18px; }

.category-scroll a[aria-current="page"] {
    color: var(--store-primary);
    border-bottom-color: var(--store-primary);
    font-weight: 600;
}

.store-main { padding: 18px 0 8px; }

.hero {
    overflow: hidden;
    min-height: 176px;
    margin: 0 0 26px;
    border-radius: 18px;
    background: var(--store-primary);
}

.hero img {
    width: 100%;
    height: 176px;
    object-fit: cover;
}

.hero-fallback {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 176px;
    padding: 28px 40px;
    color: #fff;
}

.hero-fallback h1 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 700;
}

.hero-fallback p {
    margin: 0;
    max-width: 560px;
    color: rgba(255, 255, 255, .92);
    font-size: 15px;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 262px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.filters-panel {
    display: grid;
    gap: 4px;
    padding: 16px 16px 18px;
    border: 1px solid #ececec;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.filters-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.filters-head h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.filters-head h2 svg { color: #4b5563; }

.clear-filters {
    margin-left: auto;
    color: var(--store-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.filters-head button {
    display: none;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-weight: 600;
}

.filters-panel details { border-top: 1px solid #f1f1f1; }

.filters-panel summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 8px;
    font-size: 14px;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.filters-panel summary::-webkit-details-marker { display: none; }

.filters-panel summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-top: -3px;
    border-right: 2px solid #6b7280;
    border-bottom: 2px solid #6b7280;
    transform: rotate(45deg);
}

.filters-panel details[open] summary::after {
    margin-top: 3px;
    transform: rotate(-135deg);
}

.filter-options { display: grid; gap: 2px; padding-bottom: 8px; }

.filter-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
}

.filter-option input {
    position: absolute;
    width: 16px;
    height: 16px;
    margin: 0;
    opacity: 0;
}

.tick {
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    border: 1.5px solid #cfd3d8;
    border-radius: 4px;
    background: #fff;
}

.filter-option input:checked + .tick {
    border-color: var(--store-primary);
    background: var(--store-primary);
}

.filter-option input:checked + .tick::after {
    content: "";
    width: 8px;
    height: 4px;
    margin-top: -2px;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    transform: rotate(-45deg);
}

.filter-option input:focus-visible + .tick {
    outline: 2px solid var(--store-primary);
    outline-offset: 2px;
}

.filter-option-round .tick { border-radius: 50%; }

.filter-option-round input:checked + .tick {
    background: #fff;
    box-shadow: inset 0 0 0 4px var(--store-primary);
}

.filter-option-round input:checked + .tick::after { content: none; }

.price-range {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 10px;
}

.price-field {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 8px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #9aa1ab;
    font-size: 13px;
    font-weight: 500;
}

.price-field input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    padding: 0;
    background: transparent;
    color: var(--ink);
    font-size: 13px;
}

.price-field input::placeholder { color: #c5cad1; }

.price-until { flex: 0 0 auto; color: #9aa1ab; font-size: 13px; }

.filters-apply {
    height: 46px;
    margin-top: 8px;
    border: 0;
    border-radius: 12px;
    background: var(--store-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.filters-backdrop { display: none; }

.listing-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin: 2px 0 14px;
}

.listing-head h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
}

.listing-head p,
.sku,
.stock,
.empty {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.filter-toggle { display: none; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px 12px 14px;
    border: 1px solid #ececec;
    border-radius: 16px;
    background: var(--card);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.product-media {
    display: grid;
    place-items: center;
    aspect-ratio: 1.05;
    overflow: hidden;
    border-radius: 12px;
    background: var(--soft);
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 22px;
}

.product-card.is-off .product-media img {
    filter: grayscale(1);
    opacity: .72;
}

.photo-fallback {
    display: grid;
    justify-items: center;
    gap: 6px;
    color: #b7bec7;
    font-size: 13px;
}

.photo-fallback.large { min-height: 280px; }

.badge-row {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    max-width: calc(100% - 20px);
}

.badge { white-space: nowrap; }

.badge-row-inline {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 0 12px;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 7px;
    background: var(--store-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.badge-off { background: #1f2933; }

.product-copy { padding: 12px 4px 0; }

.product-copy h3 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    min-height: 2.6em;
    color: #24303a;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-copy h3 a,
.product-brand a { color: inherit; text-decoration: none; }

.product-brand {
    margin: 3px 0 0;
    color: #9aa1ab;
    font-size: 13px;
}

.product-price {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
    margin: 10px 0 0;
}

.product-price strong {
    color: var(--store-primary);
    font-size: 20px;
    line-height: 1.1;
    font-weight: 700;
}

.product-price s {
    color: #b0b6be;
    font-size: 13px;
}

.pager { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.pager a,
.pager strong {
    min-width: 36px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-align: center;
    text-decoration: none;
}

.pager strong {
    border-color: var(--store-primary);
    color: var(--store-primary);
}

.pdp {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 32px;
    width: min(1220px, calc(100% - 40px));
    margin: 0 auto;
}

.pdp-main {
    display: grid;
    place-items: center;
    min-height: 320px;
    overflow: hidden;
    border: 1px solid #ececec;
    border-radius: 16px;
    background: var(--soft);
}

.pdp-main img { width: 100%; max-height: 520px; object-fit: contain; padding: 16px; }

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.thumbs button {
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.thumbs img { width: 72px; height: 72px; object-fit: cover; }

.pdp-info h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.15; }

.pdp-price strong { font-size: 28px; }

.cart-action,
.filters-apply {
    border: 0;
    background: var(--store-primary);
    color: #fff;
    font-weight: 700;
}

.cart-action {
    min-height: 46px;
    margin-top: 8px;
    padding: 12px 18px;
    border-radius: 12px;
}

.description { margin-top: 16px; }

.block {
    width: min(1220px, calc(100% - 40px));
    margin: 28px auto 0;
}

.block h2 { margin: 0 0 12px; font-size: 22px; }

.store-footer {
    margin-top: 36px;
    padding: 22px 0;
    border-top: 1px solid #eee;
    background: #fff;
    color: #9aa1ab;
    font-size: 13px;
}

.footer-line {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 16px;
}

.footer-line p { margin: 0; }

.store-footer a { color: #6b7280; text-decoration: none; }

@media (min-width: 980px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

@media (min-width: 1200px) {
    .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .pdp { grid-template-columns: 1fr; }
    .header-bar { grid-template-columns: minmax(160px, 200px) minmax(0, 1fr) auto; gap: 16px; }
}

@media (max-width: 767px) {
    .store-wrap { width: min(1220px, calc(100% - 24px)); }

    .header-bar {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        gap: 8px 12px;
        min-height: 0;
        padding: 10px 0;
    }

    .brand { grid-column: 1; grid-row: 1; }
    .header-tools { grid-column: 2; grid-row: 1; }
    .header-search { grid-column: 1 / -1; grid-row: 2; }

    .brand small { display: none; }

    .hero,
    .hero img,
    .hero-fallback { min-height: 132px; height: auto; }

    .hero-fallback { padding: 20px; }
    .hero-fallback h1 { font-size: 26px; }

    .filter-toggle {
        display: inline-flex;
        align-items: center;
        min-height: 38px;
        padding: 8px 14px;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        background: #fff;
        color: var(--store-primary);
        font-weight: 700;
    }

    .catalog-layout { display: block; }

    .filters-panel {
        position: fixed;
        z-index: 30;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(320px, 88vw);
        overflow: auto;
        border-radius: 0 16px 16px 0;
        transform: translateX(-105%);
        transition: transform .2s ease;
    }

    .filters-head button { display: inline-flex; }

    body.filters-open .filters-panel { transform: none; }

    body.filters-open .filters-backdrop {
        display: block;
        position: fixed;
        z-index: 20;
        inset: 0;
        background: rgba(0, 0, 0, .45);
    }

    body.filters-open { overflow: hidden; }

    .product-price strong { font-size: 17px; }
}

@media (max-width: 700px) {
    .pdp-info h1 { font-size: 24px; }
}

a.icon-button { position: relative; text-decoration: none; }

.cart-count {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 16px;
    padding: 0 4px;
    border-radius: 99px;
    background: var(--store-primary);
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
}

.add-form { margin-top: 10px; }

.add-form button,
.qty-form button,
.cart-actions button,
.checkout-form button {
    border: 0;
    background: var(--store-primary);
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 700;
}

.cart-page { width: min(1220px, calc(100% - 40px)); margin: 0 auto; }

.cart-page h1 { margin: 0 0 16px; font-size: 28px; }

.alert { color: #9a3412; }

.cart-list { display: grid; gap: 12px; }

.cart-item {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) auto auto auto auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.cart-item:hover {
    border-color: color-mix(in srgb, var(--color-primary) 28%, var(--color-border));
}

.cart-item h2 { margin: 0; font-size: 16px; }

.cart-item h2 a { color: inherit; text-decoration: none; }

.qty-form { display: flex; gap: 8px; align-items: center; }

.qty-form input,
.checkout-form input,
.add-form input[type="number"] {
    width: 72px;
    padding: 8px;
    border: 1px solid #d4d4d4;
    border-radius: 8px;
}

.cart-total { font-size: 18px; }

.cart-actions,
.checkout-grid { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

.checkout-grid { align-items: start; }

.checkout-form,
.checkout-summary {
    display: grid;
    gap: 12px;
    flex: 1;
    min-width: min(100%, 280px);
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.checkout-form label { display: grid; gap: 6px; font-weight: 600; }

.checkout-form input { width: 100%; }

a.cart-action { display: inline-block; text-decoration: none; }

.pay-box { display: grid; gap: 12px; margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }

.pay-box label { display: flex; gap: 8px; align-items: center; }

.pay-qr { width: 220px; height: auto; }

.status-timeline { display: grid; gap: 8px; margin: 16px 0; padding-left: 18px; }

.status-timeline li { display: flex; gap: 12px; }

@media (max-width: 767px) {
    .cart-item { grid-template-columns: 1fr; }
}
