:root {
    --bg: #dce2eb;
    --panel: rgba(255, 255, 255, 0.8);
    --text: #0c0f17;
    --muted: #5c6070;
    --accent: #4f8bff;
    --border: rgba(255, 255, 255, 0.55);
    --shadow: 0 28px 64px rgba(8, 12, 26, 0.16);
    --radius: 20px;
    font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 25% 20%, #f7f9ff 0, #e3e8f2 45%, #d8deea 100%);
    color: var(--text);
    position: relative;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

.orb {
    position: absolute;
    filter: blur(90px);
    opacity: 0.35;
    z-index: 0;
}
.orb.blue { background: linear-gradient(120deg, #5aa9ff, #0071e3); width: 420px; height: 420px; top: -80px; right: -120px; }
.orb.purple { background: linear-gradient(150deg, #9f8bf2, #c7d1ff); width: 340px; height: 340px; bottom: 60px; left: -120px; }
.orb.gray { background: radial-gradient(circle, #dfe5f2, #f5f7fb); width: 260px; height: 260px; top: 220px; left: 55%; transform: translateX(-50%); }

.topbar {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 18px 32px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
    max-width: 1400px;
    margin: 0 auto;
}
.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.1px;
}
.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.search {
    position: relative;
}
.search input {
    border: 1px solid #dfe4ee;
    border-radius: 12px;
    padding: 12px 36px 12px 14px;
    min-width: 0;
    background: rgba(255,255,255,0.9);
    font-size: 14px;
    width: 100%;
}
.icon-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1f2633, #111520);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}
.pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34c759;
}

.page {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    padding: 14px 32px 40px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.mobile-filter-bar {
    display: none;
    margin: 8px 12px 0;
    background: linear-gradient(135deg, #3b4250, #2a303b);
    color: #fff;
    text-align: center;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(0,0,0,0.14);
    border: 1px solid rgba(255,255,255,0.08);
}
.mobile-filter-bar:active,
.mobile-filter-bar:focus {
    background: linear-gradient(135deg, #3b4250, #2a303b);
    color: #fff;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    backdrop-filter: blur(18px);
    width: 100%;
}
.glass {
    background: linear-gradient(145deg, rgba(255,255,255,0.82), rgba(244,247,255,0.8));
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 30px 64px rgba(10, 15, 28, 0.16);
}

.filters-panel { position: relative; }
.mobile-toggle {
    display: none;
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(135deg, #3b4250, #2a303b);
    color: #fff;
    font-weight: 700;
    margin-bottom: 10px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.14);
}
.mobile-toggle:active,
.mobile-toggle:focus {
    background: linear-gradient(135deg, #3b4250, #2a303b);
    color: #fff;
    outline: none;
}
.filters {
    display: grid;
    gap: 16px;
}
.filter-card {
    display: grid;
    gap: 16px;
}
.filter-title {
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.filter-title .muted { font-weight: 500; }
.filter-group label {
    display: block;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 6px;
}
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chip {
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #e1e5ef;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f7f9fd;
    font-weight: 600;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: #1f222b; color: #fff; border-color: #1f222b; box-shadow: 0 12px 26px rgba(0,0,0,0.18); }

.brand-list {
    display: grid;
    gap: 8px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 6px;
}
.brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid #e5e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(145deg, rgba(255,255,255,0.85), rgba(248,251,255,0.9));
}
.brand:hover { border-color: var(--accent); box-shadow: 0 12px 30px rgba(0,0,0,0.08); transform: translateY(-1px); }
.brand.active { background: #e8f1ff; border-color: #d6e6ff; color: var(--accent); }

.inputs-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
input[type="number"] {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #e1e5ef;
    padding: 12px 12px;
    font-size: 14px;
    background: rgba(255,255,255,0.9);
}

button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #303645, #1e2432);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    letter-spacing: 0.1px;
    min-width: 110px;
}
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(0,0,0,0.18); background: linear-gradient(135deg, #475068, #2b3140); }

.hero {
    display: grid;
    gap: 6px;
    padding: 6px 4px 6px;
}
.hero h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.2px;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
.gallery .thumb.big {
    height: 420px;
}
.gallery .thumbs {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    width: 100%;
}
.thumb.small {
    height: 90px;
    width: 100%;
}
.nav-arrow { display: none; }
.gallery.slider {
    position: relative;
}
.thumbs .thumb.small.active {
    border: 2px solid var(--accent);
}
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.lb-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 18px;
    cursor: pointer;
    color: #fff;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.lb-close:hover {
    background: rgba(0,0,0,0.55);
    box-shadow: 0 16px 34px rgba(0,0,0,0.3);
}
.lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 22px;
    cursor: pointer;
    color: #fff;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    backdrop-filter: blur(10px);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.lb-arrow:hover {
    background: rgba(0,0,0,0.55);
    box-shadow: 0 16px 36px rgba(0,0,0,0.32);
}
.lb-arrow.prev { left: 20px; }
.lb-arrow.next { right: 20px; }

@media (max-width: 720px) {
    .lb-arrow { display: none; }
}
.product-meta h1 {
    margin: 6px 0;
    font-size: 28px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin: 10px 0 8px;
    gap: 12px;
}
.section-head h3 {
    margin: 0;
    font-size: 20px;
}

.catalog {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
    gap: 20px;
    align-items: start;
    width: 100%;
    justify-content: start;
}
.card {
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(229,231,239,0.8);
    border-radius: var(--radius);
    box-shadow: 0 24px 50px rgba(0,0,0,0.08);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    min-height: 520px;
    height: auto;
    width: 100%;
    overflow: hidden;
    max-width: 320px;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 30px 60px rgba(0,0,0,0.12); }
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand-tag {
    font-weight: 800;
    font-size: 14px;
}
.article {
    font-size: 12px;
    color: var(--muted);
}
.thumb {
    background: linear-gradient(135deg, #f2f5fb, #e9eef9);
    border-radius: 16px;
    overflow: hidden;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex-shrink: 0;
    cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.title { font-weight: 800; font-size: 17px; letter-spacing: -0.1px; }
.muted { color: var(--muted); font-size: 14px; word-break: break-word; }
.price { font-size: 20px; font-weight: 800; letter-spacing: -0.2px; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f4f6fb;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    border: 1px solid rgba(0,0,0,0.03);
}
.size-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.size-chip {
    padding: 6px 10px;
    border-radius: 10px;
    background: #eef1f7;
    font-weight: 600;
    border: 1px solid #e1e5ef;
}
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    margin-top: auto;
}
.actions { display: flex; gap: 8px; align-items: center; }
.btn.ghost {
    background: #f1f3f8;
    color: #0f1012;
    border: 1px solid #e1e5ef;
}
.btn.arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding: 10px 12px;
}
.btn, button {
    white-space: nowrap;
}
.meta { display: grid; gap: 4px; }

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e4e8f1, transparent);
}

@media (max-width: 1080px) {
    .page { grid-template-columns: 1fr; padding: 12px; gap: 12px; max-width: 100%; }
    .topbar { padding: 12px 14px 8px; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 100%; margin: 0; }
    .top-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
    .search { flex: 1 1 100%; }
    .search input { width: 100%; min-width: 0; }
}
@media (max-width: 720px) {
    .orb { display: none; }
    .mobile-filter-bar { display: block; }
    .mobile-toggle { display: inline-flex; justify-content: center; }
    .filters-panel.collapsed .filter-card { display: none; }
    .filters-panel.collapsed { padding: 10px 14px; }
    .filters-panel { width: 100%; }
    .filters-panel .filter-card { width: 100%; }
    .filters-panel .filters { width: 100%; }
    .page { padding: 10px; max-width: 100%; margin: 0; }
    .card-footer { flex-direction: column; align-items: flex-start; }
    .inputs-inline { grid-template-columns: 1fr; }
    .hero { padding: 4px 0 10px; }
    .hero h1 { font-size: 24px; line-height: 1.2; }
    .hero .muted { font-size: 13px; }
    .hero-pills { flex-direction: column; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
    .product-detail { grid-template-columns: 1fr; }
    .gallery .thumb.big { height: 240px; }
    .filter-card { position: relative; }
    .filters { gap: 12px; }
    .catalog { grid-template-columns: repeat(2, minmax(160px, 1fr)); gap: 10px; }
    .panel { padding: 12px; width: 100%; }
    .topbar { position: sticky; top: 0; background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); }
    .logo { font-size: 20px; }
    .thumb { height: 150px; }
    .card { padding: 12px; min-height: 0; max-width: none; }
    .card-footer { gap: 8px; }
    .card-footer > div { width: 100%; }
    .card-footer .actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
    .card-footer .actions .btn { flex: 1; min-width: 0; text-align: center; }
    .price { font-size: 18px; }
    .title { font-size: 16px; }
    .card .chips { display: none; }
    .card .size-row .badge { display: none; }
    .card .size-chip { padding: 6px 8px; }
    .card .size-row { gap: 6px; flex-wrap: wrap; }
}

@media (min-width: 1200px) {
    .catalog {
        grid-template-columns: repeat(3, minmax(280px, 1fr));
        justify-content: center;
    }
}
