/* ══════════════════════════════════════════
   TECHGADGET — Global Stylesheet v2
   Light editorial theme — ink on paper
   ══════════════════════════════════════════ */

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

:root {
    --bg:        #f5f3ee;
    --surface:   #ffffff;
    --surface2:  #f0ede6;
    --ink:       #111118;
    --ink2:      #3d3d4a;
    --muted:     #8a8a9a;
    --border:    rgba(17,17,24,0.1);
    --border2:   rgba(17,17,24,0.18);
    --accent:    #0f4fff;
    --accent-bg: rgba(15,79,255,0.07);
    --accent2:   #ff3d2e;
    --accent3:   #00c875;
    --accent4:   #8b5cf6;
    --font-head: 'Bebas Neue', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius:    4px;
    --radius-lg: 10px;
    --green: #00c875;
    --red:   #ff3d2e;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* NAV */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(245,243,238,0.93);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.main-nav {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
}

.main-nav::before {
    content: "⬡ TECHGADGET";
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-right: auto;
    padding: 1.1rem 0;
    white-space: nowrap;
}

.main-nav a {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    padding: 1.4rem 1rem;
    position: relative;
    transition: color 0.2s;
    white-space: nowrap;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 1rem; right: 1rem;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav a.active { color: var(--accent); }
.main-nav a.active::after { transform: scaleX(1); }

main { padding-top: 60px; }

/* BUTTONS */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--ink);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--ink2);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    border: 1.5px solid var(--border2);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

.btn-small {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    border: 1.5px solid var(--border2);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    cursor: pointer;
    background: transparent;
}
.btn-small:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.btn-danger {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: var(--red);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1.5px solid rgba(255,61,46,0.3);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}
.btn-danger:hover { background: var(--red); color: #fff; }

/* SECTION CHROME */
.page-section { padding: 5rem 2rem; }
.page-section.alt { background: var(--surface); }

.inner { max-width: 1280px; margin: 0 auto; }
.inner-md { max-width: 960px; margin: 0 auto; }
.inner-sm { max-width: 640px; margin: 0 auto; }

.section-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: block;
}

.section-title {
    font-family: var(--font-head);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1;
    color: var(--ink);
    letter-spacing: 0.02em;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

/* PAGE HERO */
.page-hero {
    padding: 7rem 2rem 4rem;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.page-hero::after {
    content: attr(data-letter);
    position: absolute;
    right: -0.05em;
    bottom: -0.2em;
    font-family: var(--font-head);
    font-size: 22rem;
    line-height: 1;
    color: rgba(17,17,24,0.04);
    pointer-events: none;
    user-select: none;
}

.page-hero .inner { position: relative; z-index: 2; }

.page-hero h1 {
    font-family: var(--font-head);
    font-size: clamp(3.5rem, 9vw, 8rem);
    line-height: 0.95;
    letter-spacing: 0.01em;
    color: var(--ink);
}

.page-hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.page-hero p {
    max-width: 520px;
    margin-top: 1.25rem;
    font-size: 1rem;
    font-weight: 300;
    color: var(--ink2);
    line-height: 1.7;
}

/* BADGE */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-bg);
    border: 1px solid rgba(15,79,255,0.25);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}
.badge::before { content: "▶"; font-size: 0.5rem; }

/* CARDS */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 32px rgba(15,79,255,0.12);
}

.card-img { aspect-ratio: 4/3; overflow: hidden; background: var(--surface2); }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.card:hover img { transform: scale(1.04); }

.card-body { padding: 1.1rem; display: flex; flex-direction: column; flex: 1; gap: 0.5rem; }
.card h3 { font-family: var(--font-head); font-size: 1.35rem; color: var(--ink); letter-spacing: 0.03em; line-height: 1.1; }
.card .price { font-family: var(--font-mono); font-size: 0.9rem; color: var(--accent); font-weight: 700; padding-top: 0.5rem; border-top: 1px solid var(--border); margin-top: auto; }

.brand-mark {
    width: min(100%, 160px);
    min-height: 72px;
    margin: 0 auto 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border2);
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--surface), var(--surface2));
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

/* CATEGORY HEADING */
.cat-heading {
    font-family: var(--font-head);
    font-size: 2rem;
    letter-spacing: 0.04em;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--ink);
}

/* TICKER */
.ticker-wrap { background: var(--ink); overflow: hidden; padding: 0.65rem 0; }
.ticker-track { display: flex; gap: 4rem; animation: ticker 28s linear infinite; white-space: nowrap; }
.ticker-track span { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: #fff; flex-shrink: 0; }
.ticker-track span::before { content: "✦  "; color: #4a9fff; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* FORMS */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.25rem; }
.form-group label { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink2); font-weight: 700; }
.form-group input, .form-group textarea, .form-group select { background: var(--bg); border: 1.5px solid var(--border2); border-radius: var(--radius); color: var(--ink); font-family: var(--font-body); font-size: 0.95rem; padding: 0.75rem 1rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s; width: 100%; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15,79,255,0.1); }
.form-group textarea { resize: vertical; min-height: 120px; }

/* TABLE */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0.75rem 1rem; border-bottom: 2px solid var(--border2); background: var(--surface2); }
.data-table td { padding: 1rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; vertical-align: middle; color: var(--ink); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface2); }

/* FOOTER */
footer { background: var(--ink); padding: 2.5rem 2rem; }
footer .foot-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
footer .foot-logo { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.15em; color: #4a9fff; }
footer p { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.08em; color: rgba(255,255,255,0.4); }

/* ANIMATIONS */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.fade-up   { animation: fadeUp 0.55s ease both; }
.fade-up-2 { animation: fadeUp 0.55s 0.1s ease both; }
.fade-up-3 { animation: fadeUp 0.55s 0.2s ease both; }

/* DETAIL PAGES */
.detail-container { max-width: 1280px; margin: 0 auto; padding: 4rem 2rem 6rem; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.detail-image-gallery { position: sticky; top: 80px; }
.primary-photo-box { aspect-ratio: 1/1; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 0.75rem; }
.primary-photo-box img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.primary-photo-box:hover img { transform: scale(1.03); }
.thumbnail-row { display: flex; gap: 0.6rem; }
.thumbnail-row img { width: calc(33.333% - 0.4rem); aspect-ratio: 1/1; object-fit: cover; border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: border-color 0.2s; opacity: 0.6; background: var(--surface2); }
.thumbnail-row img:hover, .thumbnail-row img.thumb-active { border-color: var(--accent); opacity: 1; }

.detail-info h1 { font-family: var(--font-head); font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1; letter-spacing: 0.02em; color: var(--ink); margin-bottom: 0.5rem; }
.brand-line { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.5rem; }
.brand-line .in-stock { color: var(--green); border: 1px solid rgba(0,200,117,0.35); background: rgba(0,200,117,0.08); padding: 0.15rem 0.5rem; border-radius: var(--radius); }
.price-tag { display: block; font-family: var(--font-mono); font-size: 2.2rem; font-weight: 700; color: var(--accent); letter-spacing: 0.02em; margin-bottom: 1.75rem; padding-bottom: 1.5rem; border-bottom: 1.5px solid var(--border2); }
.action-buttons { display: flex; align-items: center; gap: 1rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.add-wishlist-link { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-decoration: none; display: flex; align-items: center; gap: 0.4rem; transition: color 0.2s; }
.add-wishlist-link::before { content: "♡"; font-size: 1rem; }
.add-wishlist-link:hover { color: var(--accent2); }
.add-wishlist-link:hover::before { content: "♥"; }

.spec-section-label { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem; display: block; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 2.5rem; }
.spec-table tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
.spec-table tr:last-child { border-bottom: none; }
.spec-table tr:hover { background: var(--surface2); }
.spec-label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 0.8rem 1rem 0.8rem 0; width: 40%; vertical-align: top; }
.spec-value { font-size: 0.9rem; color: var(--ink); padding: 0.8rem 0; line-height: 1.5; font-weight: 500; }

.product-review-single { border-top: 1.5px solid var(--border2); padding-top: 2rem; margin-top: 2rem; }
.product-review-single h3 { font-family: var(--font-head); font-size: 1.5rem; letter-spacing: 0.04em; color: var(--ink); margin-bottom: 1.25rem; }
.review-quote { background: var(--surface2); border: 1.5px solid var(--border); border-left: 4px solid var(--accent); border-radius: 0 var(--radius-lg) var(--radius-lg) 0; padding: 1.5rem 1.5rem 1.25rem; }
.review-quote p { font-style: italic; font-weight: 300; font-size: 0.95rem; color: var(--ink2); line-height: 1.75; margin-bottom: 1rem; }
.review-cite { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }

.breadcrumb { max-width: 1280px; margin: 0 auto; padding: 1.5rem 2rem 0; display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--border2); }

/* RESPONSIVE */
@media (max-width: 900px) { .detail-container { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1.5rem 4rem; } .detail-image-gallery { position: static; } }
@media (max-width: 768px) { .main-nav::before { display: none; } .main-nav { justify-content: center; flex-wrap: wrap; } .main-nav a { padding: 0.9rem 0.65rem; font-size: 0.6rem; } .card-grid { grid-template-columns: 1fr 1fr; } .page-hero { padding: 6rem 1.5rem 3rem; } .page-hero::after { display: none; } }
@media (max-width: 480px) { .card-grid { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════
   RESPONSIVE WEB DESIGN — MEDIA QUERIES
   Tutorial 4 | INF3014F
   
   Breakpoints:
     Desktop  : > 1024px  (default styles above)
     Tablet   : 601px – 1024px
     Mobile   : ≤ 600px
   ══════════════════════════════════════════ */

/* ──────────────────────────────────────────
   TABLET  (601px – 1024px)
   - Two-column grids collapse to two columns
   - Navigation wraps and centres
   - Hero font sizes scale down
   - Detail pages: single column
   ────────────────────────────────────────── */
@media only screen and (max-width: 1024px) {

    /* Navigation: hide logo wordmark, centre links */
    .main-nav::before { display: none; }
    .main-nav {
        justify-content: center;
        flex-wrap: wrap;
        padding: 0 1rem;
    }
    .main-nav a {
        padding: 0.9rem 0.75rem;
        font-size: 0.65rem;
    }

    /* Hero: tighten up padding and font */
    .hero-banger { padding: 7rem 1.5rem 4rem; }
    .hero-stats { gap: 2rem; }

    /* Page heroes */
    .page-hero { padding: 6rem 1.5rem 3rem; }
    .page-hero::after { font-size: 14rem; }

    /* Sections: reduce side padding */
    .page-section { padding: 4rem 1.5rem; }

    /* Detail page: single column on tablet */
    .detail-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 2.5rem 1.5rem 5rem;
    }
    .detail-image-gallery { position: static; }

    /* Card grid: two columns */
    .card-grid { grid-template-columns: repeat(2, 1fr); }

    /* Inner containers: full width with padding */
    .inner, .inner-md { padding: 0 1.5rem; }
}

/* ──────────────────────────────────────────
   MOBILE  (≤ 600px)
   - Single column layout throughout
   - Full-width buttons and inputs
   - Hamburger-style nav (wrapping links)
   - Stack all multi-column layouts
   - Larger tap targets for touch
   ────────────────────────────────────────── */
@media only screen and (max-width: 600px) {

    /* Base: tighter body padding */
    body { font-size: 15px; }

    /* Navigation: compact, centred, wrapping */
    .main-nav {
        justify-content: center;
        flex-wrap: wrap;
        padding: 0.25rem 0.5rem;
        gap: 0;
    }
    .main-nav a {
        padding: 0.75rem 0.6rem;
        font-size: 0.58rem;
        letter-spacing: 0.08em;
    }

    /* Hero: mobile-first generous touch */
    .hero-banger {
        padding: 6rem 1.25rem 3.5rem;
        min-height: auto;
    }
    .hero-content h1 {
        font-size: clamp(3.5rem, 18vw, 6rem);
        line-height: 0.9;
    }
    .hero-sub { font-size: 0.95rem; }
    .hero-btns {
        flex-direction: column;
        align-items: flex-start;
    }
    .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
    .stat-num { font-size: 2.2rem; }

    /* Page hero: compact */
    .page-hero {
        padding: 5.5rem 1.25rem 2.5rem;
    }
    .page-hero h1 {
        font-size: clamp(2.8rem, 14vw, 5rem);
    }
    .page-hero::after { display: none; } /* hide decorative letter on mobile */

    /* Sections */
    .page-section { padding: 3rem 1.25rem; }

    /* Inner containers: full width */
    .inner, .inner-md, .inner-sm { padding: 0 1.25rem; }

    /* Section headers: stack vertically */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .section-title { font-size: 2rem; }

    /* Cards: single column */
    .card-grid { grid-template-columns: 1fr; gap: 1rem; }

    /* Category headings */
    .cat-heading { font-size: 1.5rem; }

    /* Buttons: full width on mobile */
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 0.9rem 1rem;
    }
    .btn-small { padding: 0.5rem 1rem; font-size: 0.68rem; }

    /* Forms: full width, larger tap targets */
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.9rem 1rem;
        font-size: 1rem;      /* prevents iOS zoom on focus */
    }

    /* Data table: allow horizontal scroll on mobile */
    .data-table { font-size: 0.82rem; }
    .data-table th,
    .data-table td { padding: 0.65rem 0.75rem; }

    /* Detail page: tighter mobile layout */
    .detail-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem 1.25rem 4rem;
    }
    .detail-image-gallery { position: static; }
    .thumbnail-row img { opacity: 1; }
    .detail-info h1 { font-size: 2.2rem; }
    .price-tag { font-size: 1.6rem; }
    .action-buttons { flex-direction: column; gap: 0.75rem; }
    .action-buttons .btn-primary { width: 100%; justify-content: center; }
    .spec-label { font-size: 0.6rem; }

    /* Breadcrumb: wrap gracefully */
    .breadcrumb { flex-wrap: wrap; padding: 1rem 1.25rem 0; }

    /* Footer: stack */
    footer .foot-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

    /* Ticker: still readable */
    .ticker-track span { font-size: 0.62rem; letter-spacing: 0.1em; }
}

/* ══════════════════════════════════════════
   RESPONSIVE LAYOUT HELPER CLASSES
   Replaces inline grid styles so media 
   queries can properly override them
   ══════════════════════════════════════════ */

/* Two equal columns → stack on mobile */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Two columns unequal (content + sidebar) → stack on mobile */
.grid-main-side {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
    max-width: 1100px;
}

/* Contact page: info + form */
.grid-contact {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 3rem;
    align-items: start;
    max-width: 1100px;
}

/* Three equal columns → 2 col tablet → 1 col mobile */
.grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 860px;
    margin: 0 auto;
}

/* Four equal columns → 2 col tablet → 1 col mobile */
.grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* Brands guarantee strip: text + checklist */
.grid-brands-guarantee {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* Form row: two inputs side by side */
.grid-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ── TABLET  (≤ 1024px) ── */
@media only screen and (max-width: 1024px) {
    .grid-contact        { grid-template-columns: 1fr; }
    .grid-main-side      { grid-template-columns: 1fr; }
    .grid-brands-guarantee { grid-template-columns: 1fr; }
    .grid-3col           { grid-template-columns: 1fr 1fr; }
}

/* ── MOBILE  (≤ 600px) ── */
@media only screen and (max-width: 600px) {
    .grid-2col           { grid-template-columns: 1fr; gap: 1.5rem; }
    .grid-main-side      { grid-template-columns: 1fr; }
    .grid-contact        { grid-template-columns: 1fr; gap: 1.5rem; }
    .grid-3col           { grid-template-columns: 1fr; }
    .grid-4col           { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .grid-brands-guarantee { grid-template-columns: 1fr; gap: 1.5rem; }
    .grid-form-row       { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════
   CART TABLE — RESPONSIVE
   On desktop: full table with all columns
   On mobile: horizontal scroll wrapper so
   content never overflows the viewport
   ══════════════════════════════════════════ */

/* Scroll wrapper — clips overflow cleanly */
.table-scroll-wrap {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow-x: auto;          /* horizontal scroll on small screens */
    -webkit-overflow-scrolling: touch;
}

/* Prevent table from compressing below readable width */
.table-scroll-wrap .data-table {
    min-width: 480px;
}

/* ── MOBILE (≤ 600px): hide less critical columns ── */
@media only screen and (max-width: 600px) {

    /* Hide Unit Price column on mobile — Subtotal is enough */
    .table-scroll-wrap .data-table th:nth-child(3),
    .table-scroll-wrap .data-table td:nth-child(3) {
        display: none;
    }

    /* Reduce min-width now that we have fewer columns */
    .table-scroll-wrap .data-table {
        min-width: 320px;
    }

    /* Tighter cell padding on mobile */
    .table-scroll-wrap .data-table th,
    .table-scroll-wrap .data-table td {
        padding: 0.75rem 0.6rem;
        font-size: 0.82rem;
    }

    /* Product thumbnail: smaller on mobile */
    .table-scroll-wrap .data-table td div[style*="width:48px"] {
        width: 36px;
        height: 36px;
    }
}

/* ══════════════════════════════════════════
   NAV HEIGHT FIX — MOBILE
   The fixed nav wraps onto 2 rows on mobile
   making it ~110px tall instead of 60px.
   Increase main padding-top to compensate
   so content is never hidden behind the nav.
   ══════════════════════════════════════════ */

@media only screen and (max-width: 1024px) {
    /* Nav wraps to 2 lines on tablet */
    main { padding-top: 110px; }

    /* Breadcrumb needs extra breathing room too */
    .breadcrumb { padding-top: 1rem; }
}

@media only screen and (max-width: 600px) {
    /* Nav wraps even more on small mobile */
    main { padding-top: 120px; }

    /* Tighten nav link padding so it takes less height */
    .main-nav a {
        padding: 0.6rem 0.55rem;
        font-size: 0.56rem;
        letter-spacing: 0.07em;
    }

    /* With tighter links, reduce padding-top slightly */
    main { padding-top: 100px; }
}
