/* ================================================
   STTYTT — Product Page
   Identity: Maroon × Gold, Circuit Trace
   Organized, professional, fully responsive build
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@600;700;800&family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap');

/* ============ 1. TOKENS ============ */
:root{
    --maroon:#3D0000;
    --maroon-2:#6B0000;
    --maroon-3:#1F0000;
    --bg:#FAF3E0;
    --ink:#2A0E0E;
    --muted:#7A6A5D;
    --gold:#D4AF37;
    --gold-dark:#C7960A;
    --gold-light:#F5DEB3;
    --gold-tint:#FBF0D9;
    --border:#E6D9BE;
    --white:#FFFFFF;

    --radius-sm:8px;
    --radius-md:12px;
    --radius-lg:18px;
    --radius-xl:22px;

    --shadow-sm:0 4px 14px rgba(31,0,0,.06);
    --shadow-md:0 6px 20px rgba(31,0,0,.07);
    --shadow-lg:0 18px 36px rgba(212,175,55,.25);

    --container:1280px;
    --gutter:6vw;
}

@media(min-width:1600px){
    :root{ --gutter:calc((100vw - 1280px)/2 + 40px); }
}

/* ============ 2. RESET ============ */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'DM Sans', sans-serif;
}

html{
    scroll-behavior:smooth;
}

body{
    background:var(--bg);
    color:var(--ink);
    padding-top:74px;
    -webkit-font-smoothing:antialiased;
    overflow-x:hidden;
}

img{
    max-width:100%;
    display:block;
}

button, input, select{
    font:inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible{
    outline:2px solid var(--gold-dark);
    outline-offset:2px;
}

/* ============ 3. NAVBAR ============ */
.navbar{
    width:100%;
    padding:14px var(--gutter);
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:linear-gradient(120deg, var(--maroon-3) 0%, var(--maroon-2) 55%, var(--maroon) 100%);
    backdrop-filter:blur(14px);
    position:fixed;
    top:0;
    left:0;
    z-index:1000;
    border-bottom:1px solid var(--border);
}

.logo{
    display:flex;
    align-items:center;
    gap:12px;
    text-decoration:none;
    font-family:'Big Shoulders Display', sans-serif;
    font-size:26px;
    font-weight:700;
    color:var(--gold-light);
    letter-spacing:.5px;
}

.logo img{
    width:100px;
    height:54px;
    object-fit:contain;
}

.nav-links{
    display:flex;
    gap:30px;
    list-style:none;
}

.nav-links a{
    text-decoration:none;
    color:#F5DEB3;
    font-weight:500;
    font-size:15px;
    transition:color .25s ease;
    position:relative;
}

.nav-links a::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-4px;
    width:0;
    height:2px;
    background:var(--gold-dark);
    transition:width .3s ease;
}

.nav-links a:hover{ color:var(--bg); }
.nav-links a:hover::after{ width:100%; }

.nav-icons{
    display:flex;
    align-items:center;
}

#menu-icon{
    display:none;
    font-size:1.7rem;
    color:var(--bg);
    cursor:pointer;
    transition:color .2s ease;
}

#menu-icon:hover{ color:var(--gold); }

/* ============ 4. HERO ============ */
.hero{
    width:100%;
    padding:96px var(--gutter) 84px;
    text-align:center;
    background:
        repeating-linear-gradient(90deg, transparent, transparent 78px, rgba(212,175,55,.10) 78px, rgba(212,175,55,.10) 80px),
        repeating-linear-gradient(0deg, transparent, transparent 78px, rgba(212,175,55,.08) 78px, rgba(212,175,55,.08) 80px),
        radial-gradient(circle at 80% 20%, rgba(212,175,55,.22), transparent 45%),
        linear-gradient(120deg,#8c3030, var(--maroon) 100%);
    color:var(--white);
    position:relative;
    overflow:hidden;
}

.hero h1{
    font-family:'Big Shoulders Display', sans-serif;
    font-size:clamp(28px, 4.6vw, 62px);
    font-weight:800;
    letter-spacing:.5px;
    text-transform:uppercase;
    margin-bottom:16px;
    line-height:1.08;
}

.hero p{
    font-size:clamp(13.5px, 1.6vw, 17px);
    color:#D9C9AE;
    max-width:560px;
    margin:0 auto;
}

/* ============ 5. FILTER SECTION ============ */
.filters-section{
    width:100%;
    max-width:var(--container);
    margin:0 auto;
    padding:32px var(--gutter);
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    flex-wrap:wrap;
}

.search-box{ flex:1; min-width:220px; }

.search-box input{
    width:100%;
    padding:15px 18px;
    border:1px solid var(--border);
    border-radius:var(--radius-md);
    font-size:15px;
    background:var(--white);
    box-shadow:var(--shadow-sm);
    transition:border-color .2s ease;
}

.search-box input:focus{
    outline:none;
    border-color:var(--gold-dark);
}

.filter-group{
    display:flex;
    gap:14px;
    flex-wrap:wrap;
}

.filter-group select{
    padding:14px 16px;
    border:1px solid var(--border);
    border-radius:var(--radius-md);
    background:var(--white);
    box-shadow:var(--shadow-sm);
    font-size:14.5px;
    color:var(--ink);
    cursor:pointer;
}

/* ============ 6. PRODUCTS GRID ============ */
.products-section{
    width:100%;
    max-width:var(--container);
    margin:0 auto;
    padding:10px var(--gutter) 80px;
}

.products-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:28px;
}

.product-card{
    background:var(--white);
    border-radius:var(--radius-lg);
    overflow:hidden;
    border:1px solid var(--border);
    box-shadow:var(--shadow-md);
    transition:transform .3s ease, box-shadow .3s ease;
    display:flex;
    flex-direction:column;
}

.product-card:hover{
    transform:translateY(-6px);
    box-shadow:var(--shadow-lg);
}

.product-image{
    width:100%;
    aspect-ratio:4/3;
    overflow:hidden;
    background:var(--bg);
}

.product-image img{
    width:100%;
    height:100%;
    object-fit:contain;
    background:var(--white);
}

.product-content{
    padding:22px;
    display:flex;
    flex-direction:column;
    flex:1;
}

.product-category{
    display:inline-flex;
    align-items:center;
    gap:6px;
    background:var(--gold-tint);
    color:var(--gold-dark);
    padding:6px 14px;
    border-radius:50px;
    font-size:12px;
    font-weight:600;
    letter-spacing:.3px;
    text-transform:uppercase;
    margin-bottom:14px;
    width:max-content;
}

.product-title{
    font-family:'Big Shoulders Display', sans-serif;
    font-size:24px;
    font-weight:700;
    letter-spacing:.2px;
    margin-bottom:8px;
    color:var(--maroon-2);
}

.product-description{
    color:var(--muted);
    line-height:1.65;
    font-size:14px;
    margin-bottom:16px;
    display:-webkit-box;

    -webkit-box-orient:vertical;
    overflow:hidden;
}

.features{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-bottom:18px;
}

.feature-tag{
    background:var(--bg);
    border:1px solid var(--border);
    padding:7px 12px;
    border-radius:var(--radius-sm);
    font-size:12px;
    color:var(--ink);
    display:flex;
    align-items:center;
    gap:6px;
}

.feature-tag::before{
    content:"";
    width:5px;
    height:5px;
    border-radius:50%;
    background:var(--gold-dark);
    flex-shrink:0;
}

.product-footer{
    margin-top:auto;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    padding-top:16px;
    border-top:1px dashed var(--border);
}

.product-price{
    font-family:'JetBrains Mono', monospace;
    font-size:21px;
    font-weight:600;
    color:var(--maroon-2);
    white-space:nowrap;
}

.view-btn{
    padding:12px 22px;
    border:none;
    background:var(--maroon-2);
    color:var(--white);
    border-radius:var(--radius-sm);
    cursor:pointer;
    font-size:14px;
    font-weight:600;
    transition:background .25s ease, color .25s ease;
    white-space:nowrap;
}

.view-btn:hover{
    background:var(--gold);
    color:var(--maroon-3);
}

.share-btn{
    background:#fff;
    color:var(--maroon);
    border:2px solid var(--gold);
    padding:14px 28px;
    border-radius:var(--radius-md);
    font-size:15px;
    font-weight:600;
    cursor:pointer;
    transition:.25s;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
}

.share-btn:hover{
    background:var(--gold);
    color:#fff;
}

/* ============ 7. MODAL ============ */
.product-modal{
    position:fixed;
    inset:0;
    background:rgba(31,0,0,.78);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:2000;
    padding:20px;
}

.modal-content{
    width:95%;
    max-width:1100px;
    max-height:92vh;
    overflow-y:auto;
    overflow-x:hidden;
    background:var(--white);
    border-radius:var(--radius-xl);
    padding:36px;
    position:relative;
}

.close-btn{
    position:absolute;
    top:22px;
    right:22px;
    font-size:22px;
    cursor:pointer;
    z-index:100;
    color:var(--muted);
    transition:color .2s ease;
    line-height:1;
}

.close-btn:hover{ color:var(--gold-dark); }

/* ============ 8. PRODUCT DETAILS ============ */
.product-details-page{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:44px;
    align-items:start;
}

.details-left{ width:100%; }

.main-image{
    width:100%;
    aspect-ratio:1/1;
    background:var(--bg);
    border-radius:var(--radius-lg);
    overflow:hidden;
}

.main-image img{
    width:100%;
    height:100%;
    object-fit:contain;
    background:var(--white);
}

.thumbnail-row{
    display:flex;
    gap:12px;
    margin-top:16px;
}

.thumbnail-row img{
    width:76px;
    height:76px;
    object-fit:contain;
    background:var(--white);
    border-radius:var(--radius-sm);
    cursor:pointer;
    border:2px solid var(--border);
    transition:.2s;
    flex-shrink:0;
}

.thumbnail-row img:hover{
    border-color:var(--gold-dark);
    transform:scale(1.05);
}

.details-right{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.detail-category{
    background:var(--gold-tint);
    color:var(--gold-dark);
    padding:7px 14px;
    border-radius:50px;
    width:max-content;
    font-size:13px;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.3px;
}

.detail-title{
    font-family:'Big Shoulders Display', sans-serif;
    font-size:clamp(24px, 3vw, 40px);
    font-weight:700;
    color:var(--maroon-2);
    letter-spacing:.2px;
    line-height:1.1;
}

.rating{ color:#2E7D32; font-size:16px; }

.detail-price{
    font-family:'JetBrains Mono', monospace;
    font-size:clamp(22px, 2.6vw, 32px);
    font-weight:600;
    color:var(--maroon-2);
    display:flex;
    align-items:center;
    gap:10px;
}

.detail-price::before{
    content:"";
    width:9px;
    height:9px;
    border-radius:50%;
    background:var(--gold-dark);
    box-shadow:0 0 0 4px rgba(212,175,55,.22);
    animation:pulse 1.8s ease-in-out infinite;
    flex-shrink:0;
}

@keyframes pulse{
    0%,100%{ box-shadow:0 0 0 4px rgba(212,175,55,.22); }
    50%{ box-shadow:0 0 0 7px rgba(212,175,55,.12); }
}

.detail-description{
    color:var(--muted);
    line-height:1.75;
    font-size:14.5px;
}

.detail-features{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.detail-features span{
    background:var(--bg);
    border:1px solid var(--border);
    padding:9px 15px;
    border-radius:var(--radius-sm);
    font-size:13px;
    display:inline-flex;
    align-items:center;
    gap:6px;
}

.detail-features span::before{
    content:"";
    width:5px;
    height:5px;
    border-radius:50%;
    background:var(--gold-dark);
}

/* ============ 9. QUANTITY ============ */
.quantity-box{
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:6px;
}

.quantity-box button{
    width:42px;
    height:42px;
    border:none;
    background:var(--maroon-2);
    color:var(--white);
    border-radius:var(--radius-sm);
    cursor:pointer;
    font-size:18px;
    transition:background .2s ease;
}

.quantity-box button:hover{ background:var(--gold-dark); }

.quantity-box input{
    width:60px;
    height:42px;
    text-align:center;
    border:1px solid var(--border);
    border-radius:var(--radius-sm);
    font-size:16px;
    font-family:'JetBrains Mono', monospace;
    font-weight:600;
}

/* ============ 10. ACTION BUTTONS ============ */
.detail-buttons{
    display:flex;
    gap:14px;
    margin-top:10px;
    flex-wrap:wrap;
}

.buy-btn{
    padding:15px 30px;
    background:linear-gradient(135deg, var(--gold-dark), var(--gold));
    color:var(--maroon-3);
    border:none;
    border-radius:var(--radius-md);
    cursor:pointer;
    font-size:15px;
    font-weight:600;
    transition:background .3s ease, transform .15s ease;
}

.buy-btn:hover{
    background:linear-gradient(135deg, var(--gold), var(--gold-light));
    transform:translateY(-1px);
}

.cart-btn{
    padding:15px 30px;
    background:var(--maroon-2);
    color:var(--white);
    border:none;
    border-radius:var(--radius-md);
    cursor:pointer;
    font-size:15px;
    font-weight:600;
    transition:background .3s ease, transform .15s ease, color .3s ease;
}

.cart-btn:hover{
    background:var(--gold);
    color:var(--maroon);
    transform:translateY(-1px);
}

/* ============ 11. EXTRA DESCRIPTION ============ */
.product-extra{
    margin-top:44px;
    padding-top:26px;
    border-top:1px solid var(--border);
}

.product-extra h2{
    margin-bottom:12px;
    font-family:'Big Shoulders Display', sans-serif;
    font-size:24px;
    font-weight:700;
    color:var(--maroon-2);
}

.product-extra p{
    color:var(--muted);
    line-height:1.85;
    font-size:14.5px;
}

/* ============ 12. SCROLLBAR ============ */
.modal-content::-webkit-scrollbar{ width:8px; }
.modal-content::-webkit-scrollbar-thumb{
    background:var(--gold-light);
    border-radius:20px;
}

/* ================================================
   13. RESPONSIVE
   Grid never collapses to one column — cards shrink
   instead so small screens show more at once.
   ================================================ */

/* ---- Laptops / small desktops ---- */
@media(max-width:1180px){
    .products-grid{
        grid-template-columns:repeat(3,1fr);
    }
}

/* ---- Tablets ---- */
@media(max-width:900px){
    body{ padding-top:66px; }

    .product-details-page{
        grid-template-columns:1fr;
        gap:32px;
    }

    .main-image{ aspect-ratio:16/10; }

    .detail-buttons{ flex-direction:column; }
    .detail-buttons button{ width:100%; }

    .quantity-box{ justify-content:flex-start; }

    .modal-content{ padding:26px; }

    .products-grid{
        grid-template-columns:repeat(2,1fr);
        gap:18px;
    }

    .product-content{ padding:16px; }
    .product-title{ font-size:20px; }
}

/* ---- Phones (large) — hamburger takes over ---- */
@media(max-width:768px){
    .navbar{ padding:12px 5%; }

    .logo img{ width:84px; height:44px; }

    #menu-icon{ display:block; }

    .nav-links{
        position:absolute;
        top:100%;
        left:0;
        width:100%;
        flex-direction:column;
        gap:0;
        background:linear-gradient(120deg, var(--maroon-3) 0%, var(--maroon-2) 55%, var(--maroon) 100%);
        box-shadow:0 12px 24px rgba(31,0,0,.15);
        max-height:0;
        overflow:hidden;
        transition:max-height .35s ease;
    }

    .nav-links.active{ max-height:320px; }

    .nav-links li{ width:100%; text-align:center; }

    .nav-links a{
        display:block;
        padding:16px 0;
        border-bottom:1px solid rgba(230,217,190,.2);
    }

    .nav-links a::after{ display:none; }

    .hero{ padding:52px 5% 42px; }

    .filters-section{
        flex-direction:column;
        align-items:stretch;
        padding:20px 5%;
        gap:12px;
    }

    .filter-group{
        flex-direction:column;
        gap:10px;
    }

    .search-box input,
    .filter-group select{ width:100%; }

    .products-section{ padding:6px 4% 44px; }

    .products-grid{
        grid-template-columns:repeat(2,1fr);
        gap:12px;
    }

    .product-card{ border-radius:var(--radius-md); }
    .product-content{ padding:12px; }

    .product-category{
        font-size:10px;
        padding:4px 10px;
        margin-bottom:8px;
    }

    .product-title{ font-size:15.5px; margin-bottom:5px; }

    .product-description{
        font-size:11.5px;
        margin-bottom:10px;

    }

    .features{ gap:5px; margin-bottom:10px; }

    .feature-tag{ font-size:9.5px; padding:4px 8px; }
    .feature-tag:nth-child(n+3){ display:none; }

    .product-footer{
        flex-direction:column;
        align-items:stretch;
        gap:8px;
        padding-top:10px;
    }

    .product-price{ font-size:16px; text-align:center; }

    .view-btn{
        width:100%;
        padding:9px 0;
        font-size:12.5px;
    }

    .product-modal{ padding: 28px 0 0 ; align-items:flex-end; }

    .modal-content{
        width:100%;
        max-width:100%;
        max-height:88vh;
        padding:20px;
        border-radius:22px 22px 0 0;
    }

    .close-btn{ top:14px; right:16px; font-size:20px; }

    .main-image{ aspect-ratio:4/3; border-radius:var(--radius-md); }

    .thumbnail-row{
        overflow-x:auto;
        padding-bottom:4px;
        -webkit-overflow-scrolling:touch;
    }

    .thumbnail-row img{ width:64px; height:64px; }

    .detail-description{ font-size:13.5px; }
    .detail-features span{ font-size:12px; padding:7px 12px; }

    .product-extra{ margin-top:32px; padding-top:20px; }
    .product-extra h2{ font-size:20px; }
    .product-extra p{ font-size:13.5px; }
}

/* ---- Small phones — still 2 columns, ultra-compact ---- */
@media(max-width:480px){
    .logo img{ width:74px; height:38px; }
    #menu-icon{ font-size:1.5rem; }

    .hero{ padding:44px 4% 34px; }

    .products-section{ padding:4px 3% 40px; }
    .products-grid{ gap:9px; }

    .product-card{ border-radius:10px; }
    .product-content{ padding:9px; }

    .product-category{ font-size:9px; padding:3px 8px; margin-bottom:6px; }
    .product-title{ font-size:13.5px; margin-bottom:4px; }
    .product-description{ font-size:10.5px; margin-bottom:7px; }

    .features{ margin-bottom:7px; }
    .feature-tag{ font-size:8.5px; padding:3px 7px; }
    .feature-tag:nth-child(n+2){ display:none; }

    .product-price{ font-size:13.5px; }
    .view-btn{ padding:8px 0; font-size:11px; }

    .modal-content{ padding:14px; }

    .detail-title{ font-size:21px; }
    .detail-price{ font-size:19px; }
    .detail-category,
    .detail-features span{ font-size:11.5px; }

    .quantity-box button{ width:38px; height:38px; font-size:16px; }
    .quantity-box input{ width:54px; height:38px; font-size:14px; }

    .buy-btn, .cart-btn{ padding:13px 22px; font-size:13.5px; }

    .thumbnail-row img{ width:56px; height:56px; }

.close-btn{
    position:absolute;
    top:14px;
    right:14px;
    font-size:22px;
    color:var(--maroon);
    background:#fff;
    width:38px;
    height:38px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 4px 12px rgba(0,0,0,.2);
    z-index:9999;
}
}

/* ---- Very small phones — hold the 2-column grid ---- */
@media(max-width:340px){
    .products-grid{ gap:7px; }
    .product-image{ aspect-ratio:1/1; }
    .product-title{ font-size:12.5px; }
    .product-price{ font-size:12.5px; }
}

/* ---- Motion & accessibility ---- */
@media (prefers-reduced-motion:reduce){
    .detail-price::before{ animation:none; }
    .product-card,
    .view-btn,
    .buy-btn,
    .cart-btn,
    .nav-links{ transition:none; }
}