/* ------------------------------------------------------------------
 * Products page styles (Tebex Twig template)
 *
 * Extracted from the design export and re-pointed at real local
 * assets. Barlow / Barlow Condensed are pulled from Google Fonts.
 * Every UUID-style url(...) reference in the original design has
 * been mapped to a file under /assets/ or replaced with a
 * /assets/... path that exists in this repo.
 * ------------------------------------------------------------------ */

@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=Barlow+Condensed:wght@700;900&display=swap");

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

html, body {
    background: rgb(15, 18, 27);
    color: #fff;
    font-family: "Barlow", sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Navbar is rendered by the shared partial _navbar.twig and styled
 * by /navbar.css (the same stylesheet the homepage uses), so nothing
 * page-specific lives here for the navbar. */

/* ──────────── HERO ──────────── */
/* Same shape as the homepage hero (single full-bleed background image
 * at 0.5 opacity + character art on the right, ~100vh tall). Only the
 * text content (headline, search, tags) is page-specific. */
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 140px clamp(20px, 6vw, 95px) 60px;
}
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}
.hero-visual {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 55%;
    pointer-events: none;
    z-index: 1;
}
.hero-visual__character {
    width: 100%;
    height: auto;
    object-fit: contain;
    margin-top: -60px;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: radial-gradient(rgb(250, 64, 57) 0%, rgba(148, 38, 34, 0) 100%);
    border-radius: 4px;
    padding: 10px 12px;
}
.hero-badge img { width: auto; height: 24px; max-width: 48px; object-fit: contain; }
.hero-badge span {
    font-family: "Barlow", sans-serif; font-weight: 600; font-size: 18px;
    color: rgba(0, 0, 0, 0.75);
}
.hero-title { display: flex; flex-direction: column; gap: 0; }
.hero-title-our {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 900;
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.1;
    color: #fff; letter-spacing: 0.01em;
}
.hero-title-scripts {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 900;
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1;
    color: rgb(250, 64, 57); letter-spacing: 0.01em;
}
.hero-subtitle {
    font-family: "Barlow", sans-serif;
    font-size: clamp(16px, 1.6vw, 22px);
    color: rgba(255, 255, 255, 0.45); line-height: 1.4;
    max-width: 627px;
}
.hero-search {
    width: 100%;
    max-width: 749px;
    height: 56px;
    border-radius: 8px;
    background: rgba(115, 115, 115, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 0 8px 0 17.5px;
}
.hero-search input {
    flex: 1; background: transparent; border: none; outline: none;
    font-family: "Barlow", sans-serif; font-size: 20px;
    color: rgba(255, 255, 255, 0.95);
}
.hero-search input::placeholder { color: rgba(255, 255, 255, 0.35); }
.hero-search-btn {
    width: 40px; height: 40px; border-radius: 4px; flex-shrink: 0;
    background: radial-gradient(rgb(250, 64, 57) 0%, rgba(148, 38, 34, 0) 100%);
    display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer; color: #0f121b;
}
.hero-search-btn svg { width: 18px; height: 18px; }
.hero-tags { display: flex; flex-direction: row; gap: 16px; align-items: center; flex-wrap: wrap; }
.tag-qbcore {
    display: flex; align-items: center; gap: 8px;
    background: radial-gradient(rgb(250, 64, 57) 0%, rgb(148, 38, 34) 100%);
    border-radius: 150px; padding: 12px 16px;
    font-family: "Barlow", sans-serif; font-weight: 600; font-size: 18px;
    color: #fff; white-space: nowrap; height: 48px;
}
.tag-qbcore img { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; }
.tag-esx {
    display: flex; align-items: center; gap: 8px;
    border: 2px solid rgba(198, 212, 255, 0.25);
    border-radius: 150px; padding: 10px 16px;
    font-family: "Barlow", sans-serif; font-weight: 600; font-size: 18px;
    color: rgb(250, 64, 57); white-space: nowrap; height: 48px;
    background: transparent;
}
.tag-esx img { width: 28px; height: 28px; object-fit: contain; opacity: 0.85; }

/* ──────────── BASKET SIDEBAR ────────────
 * Slide-in cart panel, toggled by the navbar cart button via toggleBasket().
 * Visual design follows the Figma export the user supplied:
 *  - translucent dark glass card (15,18,27 @ 55%) with backdrop blur
 *  - 2px white-5% outline, offset inward
 * Basket sidebar styles live in basket.css (loaded globally from
 * layout.html so the navbar's cart pill works on every page).
 * ───────────────────────────────────────── */

/* ──────────── PRODUCTS SECTION ──────────── */
.products-section {
    /* z-index above the footer's overlap zone (footer.css gives the
     * footer a 260px negative margin-top so its city image fades into
     * the page above; without our own positive z-index here, that
     * overlap paints over the product cards on short category pages). */
    position: relative;
    z-index: 1;
    /* clamp floors land at narrow viewports — keep them tight so
     * the body's announce-bar offset doesn't stack into a giant
     * gap above the heading on mobile. Desktop max stays 100px. */
    padding: clamp(60px, 6vw, 100px) clamp(16px, 6vw, 96px) 0;
    background: rgb(15, 18, 27);
}
.products-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 32px 0 20px;
    flex-wrap: wrap; gap: 24px;
}
.products-header-left { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
.products-header-bar {
    display: flex; flex-direction: column; gap: 4px; justify-content: center;
}
.products-header-bar span {
    display: block; height: 20px; width: 25px;
    background: rgb(250, 64, 57); border-radius: 2px;
}
.products-header-text h2 {
    font-family: "GTA Art Deco", sans-serif; font-weight: 600;
    font-size: clamp(28px, 4vw, 48px);
    color: #fff; line-height: 1;
}
.products-header-text p {
    font-family: "GTA Art Deco", sans-serif;
    font-size: clamp(14px, 1.6vw, 20px);
    color: rgba(255, 255, 255, 0.45); margin-top: 1px;
}
/* Search bar — sits directly under the products header.
 * Visual values mirror the design export: 56px tall pill with a 40px
 * red-glow icon button on the right, GTA Art Deco placeholder text. */
.products-search {
    width: 100%;
    height: 56px;
    padding: 0 8px 0 17.5px;
    background: rgba(115, 115, 115, 0.05);
    border-radius: 8px;
    outline: 1px solid rgba(255, 255, 255, 0.05);
    outline-offset: -1px;
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}
.products-search__input {
    flex: 1; min-width: 0;
    height: 100%; padding: 0;
    background: transparent; border: 0; outline: 0;
    color: #fff;
    font-family: "GTA Art Deco", sans-serif; font-weight: 400; font-size: 20px;
    line-height: 1;
}
.products-search__input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}
/* hide the default clear "x" that Chrome / Edge add for type="search" */
.products-search__input::-webkit-search-cancel-button,
.products-search__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.products-search__btn {
    flex-shrink: 0;
    width: 40px; height: 40px; padding: 12px;
    border: 0; border-radius: 4px;
    background: radial-gradient(ellipse 158.75% 158.75% at 50% 50%, #FA4039 0%, rgba(148, 38, 34, 0) 100%);
    display: flex; justify-content: center; align-items: center; gap: 10px;
    color: rgba(0, 0, 0, 0.75);
    cursor: pointer;
    transition: filter 0.18s ease, transform 0.18s ease;
}
.products-search__btn:hover { filter: brightness(1.15); }
.products-search__btn:active { transform: scale(0.96); }
.products-search__icon { width: 18px; height: 18px; display: block; }

/* ──────────── PRODUCT GRID ──────────── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 80px;
}
.products-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 48px 20px;
    text-align: center;
    font-family: "GTA Art Deco", sans-serif;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.45);
}

/* Card chrome (.product-card, .card-*, toss animations, ghost) lives
 * in /cards.css — loaded by both index.html and category.html so the
 * featured carousel and the category grid render identical cards.
 * Keep card-only rules out of this file; products.css's hero / global
 * resets bleed onto the homepage if it gets imported there.
 *
 * Footer rules live in /footer.css (shared with the home page via
 * _footer.twig). */

/* ──────────── RESPONSIVE ──────────── */
/* Hero, headings and section padding are fluid via clamp(); these
 * breakpoints only reflow the product grid and basket sidebar.
 * Footer responsive rules live in /footer.css. */
@media (max-width: 1280px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-visual { width: 50%; opacity: 0.6; }
}
@media (max-width: 980px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-visual { display: none; }
    .hero-content { max-width: none; }
}
@media (max-width: 640px) {
    .products-grid { grid-template-columns: 1fr; }
    .hero-tags { gap: 12px; }
    .tag-qbcore, .tag-esx { font-size: 16px; height: 44px; }
    /* Body already pushes everything below the announcement bar;
     * this only needs to clear the mobile navbar itself. */
    .hero { padding-top: 70px; }
}
