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

:root {
    --red: #E8192C;
    --red-dark: #C0111F;
    --black: #1a1a1a;
    --gray: #6b7280;
    --gray-light: #f3f4f6;
    --border: #e5e7eb;
    --white: #ffffff;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--black);
    background: var(--white);
    overflow-x: hidden;
}

body.catalog-page {
    font-family: 'Jost', system-ui, sans-serif;
    background: #eeeef1;
}

/* ── NAV (shared with landing) ── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    height: 64px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo img { height: 32px; width: auto; }

.catalog-page nav {
    gap: 24px;
    height: auto;
    min-height: 64px;
    padding: 12px 5%;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}
.nav-links a {
    text-decoration: none;
    color: var(--gray);
    font-size: .875rem;
    font-weight: 500;
    transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--red); }

.nav-cta {
    background: var(--red);
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600 !important;
    transition: background .2s !important;
}
.nav-cta:hover { background: var(--red-dark) !important; }

.nav-want {
    border: 1.5px solid var(--red);
    color: var(--red) !important;
    padding: 7px 16px;
    border-radius: 8px;
    font-weight: 600 !important;
    transition: background .2s, color .2s !important;
}
.nav-want:hover {
    background: var(--red) !important;
    color: var(--white) !important;
}

/* ── NAV SEARCH + META (catalog page) ── */
.catalog-page .nav-search {
    flex: 1;
    max-width: 480px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px 14px;
    transition: border-color .2s;
}
.catalog-page .nav-search:focus-within { border-color: var(--red); }
.catalog-page .nav-search svg { flex: none; color: #86868f; }
.catalog-page .nav-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: .88rem;
    color: var(--black);
}

.nav-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: .82rem;
    color: var(--gray);
    white-space: nowrap;
}

.nav-cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    background: var(--red);
    color: var(--white) !important;
    text-decoration: none !important;
    font-size: .84rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background .2s;
}
.nav-cart-btn:hover { background: var(--red-dark); }
.nav-cart-btn-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--black);
    color: var(--white);
    font-size: .62rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* ── CATALOG HERO ── */
.catalog-hero {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 40px 5%;
    position: relative;
    overflow: hidden;
}
.catalog-hero::before {
    content: '';
    position: absolute;
    top: -200px; right: 60px;
    width: 380px; height: 380px;
    border: 1.5px solid #ffd3dc;
    border-radius: 50%;
    pointer-events: none;
}

.catalog-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.catalog-hero-text { display: flex; flex-direction: column; gap: 8px; max-width: 520px; min-width: 0; }
.catalog-hero-label {
    font-size: .8rem;
    font-weight: 500;
    color: var(--red);
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.catalog-hero-text h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 600;
    color: var(--black);
    letter-spacing: -.5px;
    margin: 0;
}
.catalog-hero-text p {
    font-size: .95rem;
    color: var(--gray);
}

.catalog-hero-tiles {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.hero-tile {
    width: 150px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--gray-light);
    border: 1px solid var(--border);
    text-decoration: none !important;
    transition: border-color .2s;
}
.hero-tile:hover { border-color: var(--red); }
.hero-tile-label { font-size: .92rem; font-weight: 500; color: var(--black); }
.hero-tile-sub { font-size: .8rem; color: var(--gray); }
.hero-tile.active {
    background: var(--black);
    border-color: var(--black);
}
.hero-tile.active .hero-tile-label { color: var(--white); }
.hero-tile.active .hero-tile-sub { color: rgba(255,255,255,.65); }
.hero-tile-reset .hero-tile-label { color: var(--red); }

/* ── SECTION COMMON ── */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
}

.section-label-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.section-label-tag::before {
    content: '';
    width: 20px; height: 2px;
    background: var(--red);
    border-radius: 2px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -.4px;
}

.section-see-all {
    text-decoration: none;
    font-size: .84rem;
    font-weight: 600;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: color .2s;
    flex-shrink: 0;
}
.section-see-all:hover { color: var(--red); }

/* ── PRODUCT CARD ── */
.product-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    border-color: var(--red);
    box-shadow: 0 8px 32px rgba(232,25,44,.08);
    transform: translateY(-3px);
}

.product-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.product-card-media { position: relative; }

.product-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--gray-light);
    display: block;
}

.product-card-img-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 2.5rem;
}

.product-card-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-card-media .product-card-category {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: .7rem;
    font-weight: 600;
    color: var(--gray);
    background: rgba(255,255,255,.94);
    padding: 4px 9px;
    border-radius: 7px;
    text-transform: none;
    letter-spacing: normal;
}

.product-card-name {
    font-size: .9rem;
    font-weight: 700;
    color: var(--black);
    line-height: 1.35;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.product-card-variant {
    font-size: .7rem;
    font-weight: 500;
    color: var(--gray);
    background: #f3f4f6;
    border-radius: 4px;
    padding: 2px 6px;
}

.product-card-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--black);
}
.product-card-price span {
    font-size: .75rem;
    font-weight: 500;
    color: var(--gray);
    margin-left: 2px;
}
.product-card-price.no-price {
    font-size: .78rem;
    font-weight: 500;
    color: var(--gray);
}

/* ── CATALOG BODY ── */
.catalog-body {
    padding: 32px 5% 80px;
}
.catalog-body-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: start;
}
.catalog-body-inner > * { min-width: 0; }

/* ── SIDEBAR ── */
.sidebar {
    position: sticky;
    top: 80px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}
.catalog-page .sidebar { top: 100px; }

.sidebar-section { margin-bottom: 20px; }
.sidebar-section:last-child { margin-bottom: 0; }
.sidebar-divider { height: 1px; background: var(--border); margin-bottom: 20px; }

.sidebar-title {
    font-size: .8rem;
    font-weight: 700;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 14px;
}

.category-list { list-style: none; }
.category-list li + li { margin-top: 2px; }

.category-radio { display: none; }

.category-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .84rem;
    color: var(--gray);
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, color .15s;
    user-select: none;
}
.category-radio-label:hover { background: var(--gray-light); color: var(--black); }
.category-radio-label .cat-dot {
    width: 15px; height: 15px;
    flex: none;
    border-radius: 5px;
    border: 1.5px solid var(--border);
    background: var(--white);
    transition: background .15s, border-color .15s;
}
.category-radio-label .cat-label { flex: 1; }
.category-radio-label .cat-count { font-size: .78rem; color: #a0a0aa; }
.category-radio-label.active {
    color: var(--red);
    font-weight: 600;
}
.category-radio-label.active .cat-dot {
    background: var(--red);
    border-color: var(--red);
}

.category-list li.category-extra { display: none; }
.category-list.expanded li.category-extra { display: block; }

.category-toggle {
    width: 100%;
    margin-top: 4px;
    padding: 7px 10px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    color: var(--red);
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: background .15s;
}
.category-toggle:hover { background: var(--gray-light); }

.check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .84rem;
    color: var(--black);
    cursor: pointer;
    user-select: none;
    margin-top: 10px;
}
.check-label:first-of-type { margin-top: 0; }
.check-input { display: none; }
.check-box {
    width: 15px; height: 15px;
    flex: none;
    border-radius: 5px;
    border: 1.5px solid var(--border);
    background: var(--white);
    transition: background .15s, border-color .15s;
}
.check-input:checked + .check-box {
    background: var(--red);
    border-color: var(--red);
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}
.price-sep { color: #a0a0aa; flex: none; }

.price-input {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: .84rem;
    color: var(--black);
    outline: none;
    transition: border-color .2s;
}
.price-input:focus { border-color: var(--red); }
.price-input::placeholder { color: #9ca3af; }

.sidebar-btn {
    width: 100%;
    padding: 9px;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.sidebar-btn:hover { background: var(--red-dark); }

.sidebar-reset {
    display: block;
    text-align: center;
    margin-top: 8px;
    text-decoration: none;
    font-size: .78rem;
    color: var(--gray);
    transition: color .2s;
}
.sidebar-reset:hover { color: var(--red); }

/* ── CATALOG MAIN ── */
.catalog-main {}

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.catalog-count {
    font-size: .84rem;
    color: var(--gray);
}
.catalog-count strong { color: var(--black); }

.sort-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.sort-pill {
    height: 36px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--gray);
    background: var(--white);
    border: 1px solid var(--border);
    text-decoration: none !important;
    transition: border-color .2s, background .2s, color .2s;
}
.sort-pill:hover { border-color: var(--red); color: var(--red); }
.sort-pill.active {
    background: var(--black);
    border-color: var(--black);
    color: var(--white) !important;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── EMPTY STATE ── */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 0;
}
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.empty-state-desc { font-size: .88rem; color: var(--gray); }

/* ── PAGINATION ── */
.pagination-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    font-size: .84rem;
    font-weight: 600;
    color: var(--gray);
    background: var(--white);
    transition: border-color .2s, color .2s, background .2s;
}
.page-link:hover { border-color: var(--red); color: var(--red); }
.page-link.active {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}
.page-link.disabled {
    opacity: .4;
    pointer-events: none;
}

/* ── MOBILE PAGINATION ── */
.mobile-pagination {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
}
.btn-load-more {
    width: 100%;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    text-decoration: none !important;
    font-size: .9rem;
    font-weight: 500;
    color: var(--black) !important;
    transition: border-color .2s;
}
.btn-load-more:hover { border-color: #b8b8c2; }
.mobile-pagination-text { font-size: .78rem; color: #a0a0aa; }

/* ── MOBILE CATEGORY CHIPS ── */
.mobile-chips {
    display: none;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 16px;
    scrollbar-width: none;
}
.mobile-chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none;
    white-space: nowrap;
    font-size: .8rem;
    font-weight: 500;
    padding: 8px 13px;
    border-radius: 11px;
    text-decoration: none !important;
    color: var(--gray) !important;
    background: var(--white);
    border: 1px solid var(--border);
}
.chip.active {
    color: var(--white) !important;
    background: var(--black);
    border-color: var(--black);
}

/* ── MOBILE STICKY CART BAR ── */
.mobile-cart-bar {
    display: none;
    position: sticky;
    bottom: 0;
    z-index: 50;
    align-items: center;
    gap: 12px;
    background: var(--black);
    padding: 13px 5% 17px;
}
.mobile-cart-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mobile-cart-label { font-size: .74rem; color: rgba(255,255,255,.7); }
.mobile-cart-total { font-size: 1.05rem; font-weight: 600; color: var(--white); letter-spacing: -.3px; }
.mobile-cart-btn {
    height: 44px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    border-radius: 12px;
    background: var(--red);
    color: var(--white) !important;
    text-decoration: none !important;
    font-size: .88rem;
    font-weight: 600;
}

/* ── FOOTER ── */
footer {
    background: #0d0d0d;
    color: #6b7280;
    text-align: center;
    padding: 28px 5%;
    font-size: .82rem;
}
footer strong { color: var(--white); }

footer.catalog-footer {
    display: flex;
    align-items: center;
    gap: 24px;
    text-align: left;
    padding: 32px 5%;
    flex-wrap: wrap;
    color: rgba(255,255,255,.6);
}
.catalog-footer-logo { height: 24px; width: auto; }
.catalog-footer-spacer { flex: 1; }

/* ── NAV CART ICON ── */
.nav-cart {
    position: relative;
    display: flex;
    align-items: center;
    color: var(--gray);
    text-decoration: none;
    transition: color .2s;
    padding: 4px 2px;
}
.nav-cart:hover,
.nav-cart.active { color: var(--red); }

.nav-cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--red);
    color: var(--white);
    font-size: .62rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* ── ADD TO CART BUTTON (product card) ── */
.product-card-cart-form {
    padding: 0 16px 16px;
}

.btn-add-cart {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
}
.btn-add-cart:hover { background: var(--red-dark); }
.btn-add-cart:active { transform: scale(.97); }

/* ── QUANTITY STEPPER (product card) ── */
.product-card-stepper {
    margin: 0 16px 16px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--black);
    border-radius: 10px;
    padding: 0 4px;
}
.product-card-stepper form { display: contents; }
.stepper-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--white);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    transition: background .15s;
}
.stepper-btn:hover { background: rgba(255,255,255,.12); }
.stepper-qty {
    font-size: .88rem;
    font-weight: 600;
    color: var(--white);
}

/* ── ADD TO CART BUTTON (product page) ── */
.product-add-cart-form {
    margin-top: 24px;
}

.btn-add-cart-lg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: 10px;
    padding: 14px 32px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s;
}
.btn-add-cart-lg:hover { background: var(--red-dark); }
.btn-add-cart-lg:active { transform: scale(.98); }

.cart-added-notice {
    margin-top: 12px;
    font-size: .85rem;
    color: #16a34a;
    font-weight: 500;
}
.cart-added-notice a {
    color: var(--red);
    text-decoration: underline;
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
    .catalog-body-inner {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .catalog-page .nav-meta { display: none; }
}
@media (max-width: 768px) {
    .catalog-page .sidebar { display: none; }
    .catalog-page .mobile-chips { display: flex; }
    .catalog-page .pagination-wrap { display: none; }
    .catalog-page .mobile-pagination { display: flex; }
    .catalog-page .mobile-cart-bar { display: flex; }
    .catalog-hero-tiles { display: none; }
}
@media (max-width: 640px) {
    nav { padding: 0 4%; }
    .nav-links { display: none; }
    .catalog-page nav { flex-wrap: wrap; padding: 12px 4%; }
    .catalog-page .nav-search { order: 3; max-width: 100%; flex-basis: 100%; }
    .catalog-hero { padding: 28px 4% 24px; }
    .catalog-hero-inner { align-items: flex-start; }
    .catalog-body { padding: 20px 4% 60px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    footer.catalog-footer { padding: 24px 4%; gap: 8px; }
    .catalog-footer-spacer { display: none; flex-basis: 100%; }
}
@media (max-width: 360px) {
    .product-grid { grid-template-columns: 1fr; }
}
