/* /css/pages/home.css */

/* --- LAYOUT UTILS --- */
.section-wrapper {
    margin-bottom: 3rem;
    position: relative;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    padding: 0 4px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--gray-text);
    margin-top: 4px;
}

.see-more {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: 0.2s;
}
.see-more:hover { gap: 8px; }

/* --- A. HERO SECTION --- */
.hero-wrapper {
    margin-top: 1rem;
    margin-bottom: 2.5rem;
}

.hero-banner {
    position: relative;
    width: 100%;
    height: 380px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-md);
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: transform 10s ease;
}
.hero-banner:hover .hero-img { transform: scale(1.05); }

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
    z-index: 1;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 3rem;
    transform: translateY(-50%);
    z-index: 2;
    max-width: 500px;
    color: white;
}

.hero-badge {
    background: var(--accent);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    display: inline-block;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.btn-white {
    background: white;
    color: var(--dark);
    font-weight: 600;
}
.btn-white:hover { background: #f0f0f0; }

/* --- B. CATEGORY RAIL --- */
.category-rail {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
}
.category-rail::-webkit-scrollbar { display: none; /* Chrome */ }

.cat-item {
    min-width: 85px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.cat-item:hover { transform: translateY(-4px); }

.cat-icon {
    width: 65px;
    height: 65px;
    background: var(--white);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    border: 1px solid var(--gray-soft);
    box-shadow: var(--shadow-sm);
    transition: 0.2s;
}

.cat-item:hover .cat-icon {
    border-color: var(--primary);
    background: #FFFBEB;
}

.cat-item span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--dark);
}

/* --- C. SKELETON LOADING (Premium Feel) --- */
.skeleton-card {
    background: #e0e0e0;
    border-radius: var(--radius);
    height: 280px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.skeleton-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* --- D. PROMO BANNER --- */
.promo-banner {
    background: linear-gradient(135deg, #111827, #374151);
    border-radius: var(--radius-lg);
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    margin-top: 2rem;
}

.promo-text h3 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.promo-text p { color: #9CA3AF; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hero-banner { height: 400px; } /* Taller on mobile for text */
    .hero-content { left: 1.5rem; right: 1.5rem; text-align: center; }
    .hero-title { font-size: 2.2rem; }
    .hero-actions { justify-content: center; }
    
    .promo-banner { flex-direction: column; text-align: center; gap: 1.5rem; padding: 2rem; }
    
    .cat-item { min-width: 75px; }
    .cat-icon { width: 55px; height: 55px; font-size: 1.6rem; }
}
/* /css/pages/home.css - Updated Section Layout */

.section-wrapper {
    margin-bottom: 2.5rem;
    background: #fff; /* White container */
    padding: 1.5rem 0 1.5rem 1rem; /* Left padding only */
    border-radius: 0; /* Full width feel */
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-right: 1rem; /* Right padding for link */
}

.section-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #111827;
}

.see-more {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
}

/* HORIZONTAL PRODUCT SCROLL */
.product-grid {
    display: flex; /* Changed from Grid to Flex */
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 1rem; /* Space for scrollbar/shadow */
    scroll-behavior: smooth;
    padding-right: 1rem; /* End padding */
}

/* Hide Scrollbar */
.product-grid::-webkit-scrollbar { display: none; }

/* Fixed width for cards in scroll view */
.product-grid .product-card {
    flex: 0 0 160px; /* Don't shrink, fixed width */
    width: 160px;
}

@media (min-width: 768px) {
    .product-grid .product-card {
        flex: 0 0 200px; /* Wider on desktop */
        width: 200px;
    }
}
/* SEARCH BAR SPACING */
.home-search-bar {
    margin-top: 2rem;    /* Space between Header and Search */
    margin-bottom: 2rem; /* Space between Search and Categories */
    padding: 0 1rem;     /* Prevents it from touching the very edges of the screen */
}

/* SEARCH FORM STYLING (Optional: Makes it look sharper) */
.home-search-bar .search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;    /* Keeps it from getting too wide on desktop */
    margin: 0 auto;      /* Centers it on the screen */
}

.home-search-bar .search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
    background: #F9FAFB;
    transition: all 0.2s;
}

.home-search-bar .search-input:focus {
    background: #fff;
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.home-search-bar .search-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s;
}

.home-search-bar .search-btn:active {
    transform: scale(0.95);
}
/* ======================================================
   DESKTOP SEARCH CLEANUP
   ====================================================== */
@media (min-width: 769px) {
    /* Hide the body search bar on Desktop since we have one in the Header now */
    .home-search-bar {
        display: none !important;
    }
    
    /* Add a little top spacing since the search bar is gone */
    .section-wrapper:first-of-type {
        margin-top: 1rem;
    }
}


/* --- GRID REFINEMENT (Responsive) --- */
#grid-featured {
    display: grid;
    /* 1. MOBILE DEFAULT: 2 Columns (Keep this for phones) */
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; /* Tight gap for mobile */
    padding: 15px;
    
    /* 2. CENTER ON LARGE SCREENS */
    width: 100%;
    max-width: 1400px; /* Prevents it from stretching infinitely on huge monitors */
    margin: 0 auto; 
}

/* --- PRODUCT CARD Overhaul (Keep your existing style) --- */
.product-card {
    background: transparent;
    text-align: left !important;
    border: none !important;
    position: relative;
    margin-bottom: 20px;
    width: 100%; /* Ensure it fills the grid cell */
}

/* --- TABLET SCREENS (e.g. iPads) --- */
@media (min-width: 768px) {
    #grid-featured {
        grid-template-columns: repeat(3, 1fr); /* Switch to 3 columns */
        gap: 20px; /* Increase gap slightly */
    }
}

/* --- DESKTOP SCREENS (Laptops/PC) --- */
@media (min-width: 1024px) {
    #grid-featured {
        grid-template-columns: repeat(4, 1fr); /* Switch to 4 columns */
        gap: 24px; /* Professional spacing */
    }
}

/* --- LARGE MONITORS --- */
@media (min-width: 1440px) {
    #grid-featured {
        grid-template-columns: repeat(5, 1fr); /* 5 columns for high-res screens */
    }
}

/* Keep your existing premium image styles */
.card-image-wrapper {
    position: relative;
    aspect-ratio: 1 / 1.25; /* Taller ratio looks better on desktop */
    background: #f5f5f5;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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




/* --- BADGES (Pure Black/White) --- */
.card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #000;
    color: #fff;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 2;
}

/* --- TYPOGRAPHY --- */
.card-details {
    padding: 10px 0;
}

.card-title a {
    font-size: 0.9rem;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    text-transform: capitalize;
}

.card-price-block {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 4px 0;
}

.current-price {
    font-size: 0.95rem;
    font-weight: 800;
    color: #000;
}

.old-price {
    font-size: 0.8rem;
    color: #999;
    text-decoration: line-through;
}

/* --- ACTION BUTTON (Home Page Quick Add) --- */
.btn-quick-add {
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-quick-add.in-cart {
    background: #fff;
    color: #000;
    border: 1px solid #000;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.search-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 1. Hide the input by default */
.search-input {
    width: 0;
    opacity: 0;
    padding: 8px 0;
    border: none;
    border-bottom: 1.5px solid #000; /* Minimalist underline */
    background: transparent;
    outline: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.4s ease;
    pointer-events: none;
}

/* 2. Style the icon button */
.search-icon-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    color: #000;
}

/* 3. The "Active" state when search is clicked */
.search-wrapper.active {
    background: #fff;
    width: 200px; /* Expands to this width on mobile */
}

.search-wrapper.active .search-input {
    width: 100%;
    opacity: 1;
    padding-right: 35px; /* Leave room for icon */
    pointer-events: auto;
}

/* Icon adjustment when active */
.search-wrapper.active .search-icon-btn {
    position: absolute;
    right: 0;
}


/* 1. CONTAINER: FLIP THE ORDER */
.search-wrapper-premium {
    display: flex;
    align-items: center;
    position: relative;
    height: 44px; /* Slightly taller for better touch target */
    
    /* CRITICAL FIX: Put the Icon (Button) on the Left, Input on the Right */
    flex-direction: row-reverse; 
}

/* 2. THE ICON (TRIGGER) */
.search-icon-trigger {
    position: relative;
    z-index: 20; /* Stays above the input */
    
    width: 44px; /* Fixed square size */
    height: 44px;
    border-radius: 50%; /* Circle shape */
    background: #fff; /* White background */
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    border: none;
    font-size: 1.5rem;
    color: #000;
    cursor: pointer;
    transition: background 0.2s;
}

/* Optional: Slight grey background on hover */
.search-icon-trigger:hover {
    background: #f2f2f2;
}

/* 3. THE INPUT BOX (SLIDE OUT) */
.search-input-hidden {
    position: absolute;
    left: 22px; /* Start from the CENTER of the icon */
    top: 50%;
    transform: translateY(-50%);
    
    height: 40px; /* Matches icon height nicely */
    width: 0;     /* Hidden by default */
    
    background: #fff;
    border: 1.5px solid #000; /* Sharp, premium border */
    border-radius: 99px; /* Pill shape (matches screenshot style) */
    
    /* Hide text when closed */
    padding: 0; 
    opacity: 0;
    font-size: 1rem;
    color: #000;
    outline: none;
    
    /* LAYER: Below the icon so it slides "out" from under it */
    z-index: 10; 
    
    /* SMOOTH ANIMATION */
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Placeholder styling */
.search-input-hidden::placeholder {
    color: #999;
}

/* 4. ACTIVE STATE (EXPAND) */
.search-wrapper-premium.active .search-input-hidden {
    width: 240px; /* Full width */
    opacity: 1;
    
    /* Padding: Left needs to clear the icon, Right for text */
    padding-left: 50px; 
    padding-right: 20px;
    
    /* Shadow for depth */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Mobile Tweak: Don't overflow small screens */
@media (max-width: 360px) {
    .search-wrapper-premium.active .search-input-hidden {
        width: 200px;
    }
}

/* Container: Black bar across the screen */
.ticker-wrapper {
    width: 100%;
    background: #000; /* Pure Black */
    color: #fff; /* Pure White */
    overflow: hidden; /* Hides the text as it leaves the screen */
    padding: 12px 0;
    white-space: nowrap; /* Prevents text from wrapping to a new line */
    display: flex;
    align-items: center;
    border-top: 1px solid #333; /* Subtle border for depth */
    border-bottom: 1px solid #333;
}

/* The actual moving container */
.ticker-content {
    display: inline-block;
    padding-left: 100%; /* Starts the animation off-screen */
    animation: ticker-move 30s linear infinite; /* Smooth infinite loop */
}

/* Individual text items */
.ticker-content span {
    display: inline-block;
    padding: 0 40px; /* Space between the phrases */
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* THE ANIMATION LOGIC */
@keyframes ticker-move {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Pause the animation on hover so users can read */
.ticker-wrapper:hover .ticker-content {
    animation-play-state: paused;
}




/* --- SCOPED ANNOUNCEMENT BAR STYLES --- */
#clz-announcement-bar.clz-slider-wrapper {
    background: #000000 !important; /* Pure Black */
    color: #ffffff !important; /* Pure White */
    height: 45px !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 9999 !important; /* Highest priority */
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

#clz-announcement-bar .clz-viewport {
    flex: 1 !important;
    height: 100% !important;
    overflow: hidden !important;
}

#clz-announcement-bar .clz-track {
    display: flex !important;
    height: 100% !important;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

#clz-announcement-bar .clz-slide-item {
    min-width: 100% !important;
    flex-shrink: 0 !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.2px !important;
    white-space: nowrap !important;
}

#clz-announcement-bar .clz-nav-btn {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 1.2rem !important;
    width: 45px !important;
    height: 45px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10000 !important;
    pointer-events: auto !important;
    transition: opacity 0.2s !important;
}

#clz-announcement-bar .clz-nav-btn:active {
    opacity: 0.5 !important;
}

/* Mobile font adjustment */
@media (max-width: 480px) {
    #clz-announcement-bar .clz-slide-item {
        font-size: 0.65rem !important;
    }
}

/* =========================================
   HERO SLIDER (CMS CONNECTED) - ROUNDED & COLORED
   ========================================= */
#hero-section {
    position: relative;
    /* Rounding the container */
    border-radius: 24px; 
    /* Adding margin so the rounded corners are visible against the background */
    width: calc(100% - 40px); 
    margin: 20px auto 40px auto;
    
    height: 85vh;
    max-height: 700px;
    min-height: 500px;
    background: #111;
    overflow: hidden; /* Ensures images don't bleed out of rounded corners */
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.3); /* Adds depth */
}

#hero-slider-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

/* Dark overlay - slightly warmer tone now */
.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    color: white;
    max-width: 800px;
    padding: 30px;
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Subtitle - Now YELLOW/GOLD */
.hero-content h4 {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    font-weight: 800;
    color: #F59E0B; /* Gold accent color */
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Main Title - White with warm shadow */
.hero-content h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 30px;
    line-height: 1.05;
    letter-spacing: -1px;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(217, 119, 6, 0.4); /* Subtle orange glow */
}

/* Button - Now ORANGE */
.btn-hero {
    display: inline-block;
    background: #D97706; /* Your brand orange */
    color: white;
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid #D97706;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
}

.btn-hero:hover {
    transform: translateY(-3px);
    background: #B45309; /* Darker orange on hover */
    border-color: #B45309;
    box-shadow: 0 10px 25px rgba(217, 119, 6, 0.5);
}

/* Mobile Responsiveness - FORCE LEFT ALIGNMENT */
@media (max-width: 768px) {
    #hero-section { 
        width: 100%; 
        margin: 0 0 30px 0;
        border-radius: 0 0 24px 24px;
        height: 70vh; 
        min-height: 450px; 
    }

    /* 1. Force the flex container to start at the very left edge */
    .hero-slide {
        justify-content: flex-start !important; 
        align-items: center; /* Keep vertical centering */
        padding-left: 0;     /* Remove wrapper padding */
    }

    /* 2. Push the text box to the edge */
    .hero-content {
        text-align: left !important;
        margin-left: 0 !important;
        margin-right: auto !important; /* Pushes everything else to the right */
        padding-left: 20px !important; /* Small safety gap from screen edge */
        padding-right: 20px;
        width: 100%;       /* Allow it to take full width if needed */
        max-width: 90%;    /* Prevent it from hitting the right edge */
    }

    .hero-content h1 { 
        font-size: 2.8rem; 
        line-height: 1.1;
    }

    .hero-content h4 { 
        font-size: 0.85rem; 
        letter-spacing: 2px; 
        margin-bottom: 10px;
    }

    .btn-hero { 
        padding: 14px 28px; 
        font-size: 0.85rem; 
        margin-top: 15px; 
        width: auto; /* Let button size itself, don't stretch */
    }
}

@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}