:root {
    /* Brand Colors matching index.html */
    --blaze-orange: #DB5313;
    --sunshine-yellow: #FDB73E;
    --teal-green: #4E7F23;
    --sapphire-blue: #1E4D14;
    --cream-bg: #FFF9F3;
    --pure-white: #FFFFFF;
    --text-main: #3A2410;
    --text-sub: #6E5440;
    
    --font-display: 'Syne', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
}

/* Responsive spacing for smaller viewports */
@media (max-width: 768px) {
    :root {
        --space-md: 1.5rem;
        --space-lg: 2.5rem;
        --space-xl: 4rem;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--cream-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* 10% OPACITY DOODLE OVERLAY */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* Prevent horizontal scrollbars on mobile */
    height: 100%;
    background-image: url('../assets/doodle-bg.jpg'); /* Relative path from css/ folder */
    background-repeat: repeat;
    background-size: 450px auto;
    opacity: 0.10;
    pointer-events: none;
    z-index: 1;
}

header, main, footer {
    position: relative;
    z-index: 2;
}

/* Header matching index.html */
header {
    padding: 0.8rem 6%;
    background: rgba(255, 249, 243, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--blaze-orange);
}

.btn-cart {
    background-color: var(--sapphire-blue);
    color: var(--pure-white);
    padding: 0.6rem 1.4rem;
    border-radius: 100px;
    font-weight: 800;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 6px 18px rgba(30, 77, 20, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-cart:hover {
    background-color: var(--blaze-orange);
    box-shadow: 0 8px 22px rgba(219, 83, 19, 0.25);
    transform: translateY(-1px);
}

/* Product Detail Container */
.product-detail-container {
    max-width: 1200px;
    margin: 3rem auto var(--space-xl);
    padding: 0 6%;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-sub);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--blaze-orange);
}

/* Detail Grid Layout */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Left Column: Visual Showcase */
.product-gallery {
    position: relative;
    background: var(--pure-white);
    border-radius: 36px;
    padding: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 15px 45px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
}

.gallery-blob {
    position: absolute;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(253, 183, 62, 0.25) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 1;
}

.product-main-image {
    width: 90%;
    height: 90%;
    object-fit: contain;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-gallery:hover .product-main-image {
    transform: scale(1.05) rotate(1deg);
}

.gallery-badge {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 3;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    display: none;
}

/* Right Column: Info and Buying */
.product-info-panel {
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--teal-green);
    margin-bottom: 0.8rem;
}

.product-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    color: var(--text-main);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.product-description {
    font-size: 1.05rem;
    color: var(--text-sub);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Highlights Badges */
.product-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.highlight-pill {
    background: rgba(78, 127, 35, 0.08);
    color: var(--teal-green);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Weight Selector styles */
.selection-title {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-sub);
    margin-bottom: 0.8rem;
}

.weight-selector-grid {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.weight-pill {
    background: var(--pure-white);
    border: 2px solid rgba(0,0,0,0.06);
    padding: 0.8rem 1.6rem;
    border-radius: 16px;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-grow: 1;
    text-align: center;
}

.weight-pill:hover {
    border-color: var(--blaze-orange);
    color: var(--blaze-orange);
}

.weight-pill.active {
    border-color: var(--blaze-orange);
    background-color: var(--blaze-orange);
    color: var(--pure-white);
    box-shadow: 0 6px 15px rgba(219, 83, 19, 0.2);
}

/* Buying Panel Details */
.buying-action-panel {
    background: var(--pure-white);
    border-radius: 28px;
    padding: 1.8rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.price-qty-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-box {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-sub);
    text-transform: uppercase;
}

.price-value {
    font-family: var(--font-body);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--blaze-orange);
}

/* Qty controls */
.qty-controls {
    display: flex;
    align-items: center;
    background: var(--cream-bg);
    border-radius: 100px;
    padding: 4px 10px;
    border: 1px solid rgba(0,0,0,0.05);
}

.btn-qty-adj {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: color 0.2s ease;
}

.btn-qty-adj:hover {
    color: var(--blaze-orange);
}

.qty-input {
    width: 40px;
    text-align: center;
    font-weight: 800;
    font-size: 1.05rem;
    border: none;
    background: none;
    pointer-events: none;
}

/* CTA buttons inside buying panel */
.cta-buttons-container {
    display: flex;
    gap: 1rem;
}

/* Unified Button Design System */
.btn-add-cart-detail,
.btn-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--sapphire-blue);
    color: var(--pure-white);
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.95rem;
    padding: 0.75rem 1.8rem;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 6px 16px rgba(30, 77, 20, 0.2);
    text-decoration: none;
    height: 48px;
    min-width: 150px;
    box-sizing: border-box;
    white-space: nowrap;
}

.btn-add-cart-detail:hover,
.btn-home:hover {
    background-color: var(--blaze-orange);
    color: var(--pure-white);
    box-shadow: 0 8px 22px rgba(219, 83, 19, 0.3);
    transform: translateY(-2px);
}

.btn-add-cart-detail {
    flex: 1;
}

.btn-buy-whatsapp-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #25d366;
    color: var(--pure-white);
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.95rem;
    padding: 0.75rem 1.8rem;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.25);
    text-decoration: none;
    height: 48px;
    min-width: 150px;
    box-sizing: border-box;
    white-space: nowrap;
    flex: 1.2;
}

.btn-buy-whatsapp-detail:hover {
    background-color: #20ba5a;
    box-shadow: 0 8px 22px rgba(32, 186, 90, 0.35);
    transform: translateY(-2px);
}

.btn-add-cart-detail:active, .btn-buy-whatsapp-detail:active {
    transform: translateY(0);
}

/* Error/Not Found State */
.not-found-panel {
    text-align: center;
    padding: 6rem 2rem;
    background: var(--pure-white);
    border-radius: 36px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    max-width: 600px;
    margin: 4rem auto;
    border: 1px solid rgba(0,0,0,0.04);
    display: none;
}

.not-found-panel h2 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--blaze-orange);
    margin-bottom: 1rem;
}

/* Related Products Section */
.related-section {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.related-title {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 2rem;
}

.related-card {
    background: var(--pure-white);
    border-radius: 28px;
    padding: 1.2rem;
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.related-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

.related-img-box {
    background: var(--cream-bg);
    border-radius: 20px;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 1rem;
}

.related-img-box img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.related-card:hover .related-img-box img {
    transform: scale(1.05);
}

.related-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.related-card-price {
    font-weight: 800;
    color: var(--blaze-orange);
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: var(--cream-bg);
    padding: var(--space-xxl) 6% var(--space-lg);
    border-top: 1px solid rgba(0,0,0,0.05);
    margin-top: auto;
}

.footer-layout {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-brand .logo { margin-bottom: var(--space-md); }
.footer-brand p { color: var(--text-sub); font-size: 0.95rem; line-height: 1.6; }

.footer-col h5 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-main);
    margin-bottom: var(--space-md);
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.8rem; }
.footer-col a { text-decoration: none; color: var(--text-sub); font-size: 0.95rem; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--blaze-orange); }

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(0,0,0,0.06);
    font-size: 0.85rem;
    color: var(--text-sub);
    font-weight: 600;
}

@media (max-width: 1024px) {
    .footer-layout { grid-template-columns: 1fr 1fr; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 480px) {
    .footer-layout { grid-template-columns: 1fr; }
}

/* Mobile Menu Toggle Button and Actions container */
.btn-mobile-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.btn-mobile-menu:hover {
    color: var(--blaze-orange);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Responsive styling */
@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .product-gallery {
        aspect-ratio: 4 / 3;
    }
    
    /* Mobile Navigation Hamburger Drawer */
    .btn-mobile-menu {
        display: inline-flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        background-color: var(--pure-white);
        box-shadow: -10px 0 35px rgba(58, 36, 16, 0.15);
        flex-direction: column;
        padding: 6rem 2rem 2rem;
        gap: 1.5rem;
        z-index: 9999;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        border-left: 1px solid rgba(0,0,0,0.05);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.1rem;
        display: block;
        width: 100%;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(0,0,0,0.04);
    }
}

@media (max-width: 576px) {
    .buying-action-panel {
        padding: 1.2rem;
    }
    .price-qty-row {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    .qty-controls {
        width: 100%;
        justify-content: space-between;
    }
    .cta-buttons-container {
        flex-direction: column;
        gap: 0.8rem;
    }
    .btn-add-cart-detail, .btn-buy-whatsapp-detail {
        width: 100%;
        flex: none;
    }
    .weight-selector-grid {
        flex-wrap: wrap;
        gap: 0.6rem;
    }
    .weight-pill {
        padding: 0.6rem 1rem;
    }
}
