/*
Theme Name: Source Premium B2B
Theme URI: http://yourdomain.com
Author: Source Team
Description: Modern GSAP E-Commerce Theme with WooCommerce Support.
Version: 1.0.0
Text Domain: source-theme
*/

:root {
    --bg-color: #ffffff;
    --text-main: #0a0a0a;
    --text-muted: #737373;
    --accent: #111111;
    --light-gray: #f5f5f5;
    --border: #e5e5e5;
    --radius-lg: 24px;
    --radius-md: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg-color); color: var(--text-main); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- MARQUEE --- */
.marquee { background: var(--accent); color: white; padding: 10px 0; overflow: hidden; white-space: nowrap; font-size: 0.85rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }
.marquee-content { display: inline-block; animation: scroll 20s linear infinite; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.marquee span { margin-right: 50px; }

/* --- HEADER & NAVIGATION --- */
header { position: sticky; top: 0; z-index: 1000; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); transition: all 0.3s; }
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 15px 5%; max-width: 1600px; margin: 0 auto; }
.logo { font-size: 24px; font-weight: 800; letter-spacing: -1px; }

/* Desktop Menu Layout */
.nav-wrapper { display: flex; align-items: center; gap: 40px; }
.main-nav { display: flex; flex-direction: row; align-items: center; gap: 35px; list-style: none; margin: 0; padding: 0; }
.main-nav li { margin: 0; padding: 0; position: relative; }
.main-nav li a { font-weight: 500; font-size: 0.95rem; color: var(--text-main); transition: 0.3s; }
.main-nav li a:hover { color: var(--text-muted); }

/* Hamburger Menu Icon (Hidden on Desktop) */
.menu-toggle { display: none; flex-direction: column; cursor: pointer; gap: 5px; z-index: 1001; }
.menu-toggle .bar { width: 25px; height: 3px; background: var(--text-main); transition: 0.3s; }

.btn-black { background: var(--accent); color: white; padding: 12px 28px; border-radius: 50px; font-weight: 600; font-size: 0.9rem; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border: none; cursor: pointer; }
.btn-black:hover { background: #333; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.custom-logo-link img { max-height: 40px; width: auto; object-fit: contain; }

/* --- HERO SLIDER --- */
.hero { position: relative; height: 85vh; width: 100%; overflow: hidden; display: flex; align-items: center; padding: 0 5%; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 120%; object-fit: cover; z-index: 0; transform: translateY(-10%); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.2) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 700px; }
.reveal-wrap { overflow: hidden; display: inline-block; }
.hero-tag { display: inline-block; padding: 8px 16px; background: var(--accent); color: white; border-radius: 30px; font-size: 0.85rem; font-weight: 600; margin-bottom: 20px; letter-spacing: 1px; text-transform: uppercase; }
.hero h1 { font-size: 5rem; font-weight: 800; line-height: 1; margin-bottom: 20px; letter-spacing: -2px; }
.hero p { font-size: 1.2rem; color: var(--text-main); margin-bottom: 40px; max-width: 500px; font-weight: 400; line-height: 1.6; }

/* --- SECTIONS & BENTO GRID --- */
.section { padding: 100px 5%; max-width: 1600px; margin: 0 auto; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 60px; }
.section-header h2 { font-size: 3rem; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.bento-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 300px); gap: 20px; }
.bento-item { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--light-gray); cursor: pointer; }
.bento-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.bento-item:hover img { transform: scale(1.08); }
.bento-content { position: absolute; bottom: 0; left: 0; padding: 30px; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); color: white; }
.bento-content h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 5px; }
.bento-large { grid-column: span 2; grid-row: span 2; }
.bento-wide { grid-column: span 2; }

/* --- B2B PERKS --- */
.perks-section { background: var(--accent); color: white; border-radius: var(--radius-lg); margin: 0 5%; padding: 80px 5%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.perk-card h3 { font-size: 1.5rem; margin-bottom: 15px; font-weight: 700; letter-spacing: -0.5px; }
.perk-card p { color: #a3a3a3; line-height: 1.6; }
.perk-icon { font-size: 2.5rem; margin-bottom: 20px; display: block; }

/* --- WOOCOMMERCE PRODUCT GRID --- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 20px; }
.product-card { cursor: pointer; }
.product-image { position: relative; border-radius: var(--radius-md); overflow: hidden; background: var(--light-gray); aspect-ratio: 4/5; margin-bottom: 20px; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; mix-blend-mode: multiply; }
.quick-add { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(30px); opacity: 0; width: 90%; background: rgba(255,255,255,0.95); backdrop-filter: blur(5px); color: black; border: none; padding: 15px; text-align:center; border-radius: 50px; font-weight: 600; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.product-card:hover .quick-add { transform: translateX(-50%) translateY(0); opacity: 1; }
.quick-add:hover { background: var(--accent); color: white; }
.product-card:hover .product-image img { transform: scale(1.05); }
.product-info h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 5px; }
.product-info p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 8px; }
.product-price { font-weight: 700; font-size: 1.1rem; }

/* --- FOOTER & CTA --- */
.cta-banner { margin: 100px 5% 50px; border-radius: var(--radius-lg); background: var(--light-gray); padding: 100px 5%; text-align: center; border: 1px solid var(--border); }
.cta-banner h2 { font-size: 4rem; font-weight: 800; letter-spacing: -2px; margin-bottom: 20px; color: var(--accent); }
.cta-banner p { font-size: 1.2rem; margin-bottom: 40px; color: var(--text-muted); }
footer { background: #050505; color: white; padding: 100px 5% 40px; margin-top: 50px; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px; border-bottom: 1px solid #222; padding-bottom: 60px; margin-bottom: 40px; }
.footer-logo { font-size: 30px; font-weight: 800; margin-bottom: 20px; display: block; letter-spacing: -1px; }
.footer-col h4 { font-size: 1.1rem; margin-bottom: 25px; font-weight: 600; }
.footer-col ul li { margin-bottom: 15px; }
.footer-col ul li a { color: #888; transition: 0.3s; }
.footer-col ul li a:hover { color: white; padding-left: 5px; }

/* =========================================
   MOBILE & TABLET RESPONSIVENESS
========================================= */

/* --- TABLET VIEW (Max 991px) --- */
@media (max-width: 991px) {
    .hero h1 { font-size: 3.5rem; }
    
    /* Convert 4 columns to 2 columns */
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .perks-section { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: repeat(2, 1fr); gap: 40px; }
}

/* --- MOBILE VIEW (Max 768px) --- */
@media (max-width: 768px) {
    /* Mobile Menu Slide-in Overlay */
    .menu-toggle { display: flex; }
    .nav-wrapper {
        position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
        background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px);
        flex-direction: column; justify-content: center; align-items: center;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000; gap: 30px;
    }
    .nav-wrapper.active { right: 0; }
    
    /* Display Menu Links vertically on Mobile */
    .main-nav { 
        display: flex !important; 
        flex-direction: column; 
        text-align: center; 
        gap: 25px; 
    }
    .main-nav li a { font-size: 1.3rem; }
    
    /* Hamburger Animation X */
    .menu-toggle.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Hero Layout */
    .hero { height: 60vh; min-height: 400px; padding-top: 50px; text-align: center; justify-content: center; }
    .hero-content { display: flex; flex-direction: column; align-items: center; }
    .hero h1 { font-size: 2.5rem; line-height: 1.2; letter-spacing: -1px; margin-bottom: 15px; }
    .hero p { font-size: 1rem; margin-bottom: 30px; }
    
    /* Sections */
    .section { padding: 60px 5%; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 15px; margin-bottom: 40px; }
    .section-header h2 { font-size: 2.2rem; }

    /* CSS Only Mobile Slider For Products */
    .product-grid {
        display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
        gap: 15px; padding-bottom: 20px; -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        grid-template-columns: none; /* Remove grid for slider */
    }
    .product-grid::-webkit-scrollbar { display: none; } /* Chrome/Safari */
    .product-card {
        flex: 0 0 85%; /* Card takes 85% width so next card peaks in */
        scroll-snap-align: start;
    }
    .quick-add { opacity: 1; transform: translateX(-50%) translateY(0); bottom: 10px; width: 80%; padding: 10px; font-size: 0.85rem; }

    /* Stacking other elements */
    .bento-grid, .perks-section, .footer-top { grid-template-columns: 1fr; }
    .bento-large, .bento-wide { grid-column: span 1; grid-row: span 1; }
    .bento-grid { grid-template-rows: auto; grid-auto-rows: 250px; }
    
    .perks-section { padding: 50px 5%; gap: 30px; text-align: center; }
    .cta-banner { padding: 50px 5%; margin: 50px 5%; }
    .cta-banner h2 { font-size: 2.5rem; }
    .cta-banner p { font-size: 1rem; }
}