*, *::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;
}

/* ── 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; }

.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;
}

/* ── PAGE HEADER ── */
.page-header {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a0507 100%);
    padding: 52px 5%;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(232,25,44,.15) 0%, transparent 65%);
    pointer-events: none;
}

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

.page-header h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 900;
    color: var(--white);
    letter-spacing: -.5px;
}
.page-header p {
    font-size: .9rem;
    color: rgba(255,255,255,.45);
    margin-top: 4px;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,.08);
    border: 1.5px solid rgba(255,255,255,.12);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color .2s;
    min-width: 320px;
}
.header-search:focus-within {
    border-color: var(--red);
    background: rgba(255,255,255,.1);
}
.header-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 11px 16px;
    font-family: 'Inter', sans-serif;
    font-size: .88rem;
    color: var(--white);
}
.header-search input::placeholder { color: rgba(255,255,255,.35); }
.header-search button {
    background: var(--red);
    border: none;
    padding: 11px 16px;
    cursor: pointer;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.header-search button:hover { background: var(--red-dark); }

/* ── SECTION COMMON ── */
.catalog-section {
    padding: 56px 5%;
}
.catalog-section + .catalog-section {
    padding-top: 0;
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.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); }

/* ── HORIZONTAL SCROLL STRIP ── */
.product-strip {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.product-strip::-webkit-scrollbar { display: none; }

.product-strip .product-card {
    flex: 0 0 220px;
    scroll-snap-align: start;
}

/* ── 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-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;
}

.product-card-category {
    font-size: .7rem;
    font-weight: 600;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}

.product-card-name {
    font-size: .9rem;
    font-weight: 700;
    color: var(--black);
    line-height: 1.35;
    margin-bottom: 10px;
    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;
    margin-bottom: 8px;
}

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

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.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: 0 5% 80px;
}
.catalog-body-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: start;
}

/* ── DIVIDER ── */
.catalog-divider {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 5%;
    display: flex;
    align-items: center;
    gap: 16px;
}
.catalog-divider-line { flex: 1; height: 1px; background: var(--border); }
.catalog-divider-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

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

.sidebar-section { margin-bottom: 28px; }
.sidebar-section:last-child { margin-bottom: 0; }

.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;
    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.active {
    background: rgba(232,25,44,.08);
    color: var(--red);
    font-weight: 600;
}

.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.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-select {
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: .84rem;
    color: var(--black);
    background: var(--white);
    outline: none;
    cursor: pointer;
    transition: border-color .2s;
}
.sort-select:focus { border-color: var(--red); }

.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;
}

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

/* ── 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 12px 12px;
}

.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: 8px;
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: .8rem;
    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); }

/* ── 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);
    }
}
@media (max-width: 640px) {
    nav { padding: 0 4%; }
    .nav-links { display: none; }
    .page-header { padding: 40px 4%; }
    .catalog-section { padding: 40px 4%; }
    .catalog-body { padding: 0 4% 60px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .page-header-inner { flex-direction: column; align-items: flex-start; }
    .header-search { min-width: 100%; }
}
@media (max-width: 400px) {
    .product-grid { grid-template-columns: 1fr; }
}
