/* /css/global.css */

/* 1. CHEETAH BRAND VARIABLES */
:root {
    /* Brand Colors */
    --primary: #F59E0B;      /* Cheetah Gold */
    --primary-dark: #D97706; /* Dark Gold (Hover) */
    --accent: #EF4444;       /* Red (Deals/Errors) */
    --dark: #111827;         /* Black/Dark Gray */
    --light: #F9FAFB;        /* Page Background */
    --white: #FFFFFF;        /* Card Background */
    --gray-soft: #E5E7EB;    /* Borders */
    --gray-text: #6B7280;    /* Muted Text */

    /* Typography */
    --font-main: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Layout */
    --radius: 8px;           /* Rounded Corners */
    --radius-lg: 16px;       /* Larger Cards */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --container: 1200px;
}

/* 2. RESET & DEFAULTS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    font-weight: 600;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* 3. UTILITY CLASSES */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1rem;
}

.section-padding { padding: 3rem 0; }
.hidden { display: none !important; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: var(--font-main);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}
.btn-primary:hover { background-color: var(--primary-dark); }

.btn-outline {
    background: transparent;
    border: 2px solid var(--dark);
    color: var(--dark);
}
.btn-outline:hover { background: var(--dark); color: var(--white); }
/* Add this to css/global.css */

.site-logo {
    height: 40px; /* Adjust based on your preference (usually 40px - 60px) */
    width: auto;  /* Maintains aspect ratio */
    object-fit: contain;
    display: block;
}

/* On Mobile, you might want it slightly smaller */
@media (max-width: 768px) {
    .site-logo {
        height: 32px;
    }
}
/* Add breathing room above footer on Desktop */
@media (min-width: 1024px) {
    .site-footer {
        margin-top: 6rem !important; /* Increases the gap to ~96px */
    }
}
/* --- MOBILE (4 Items per Row) --- */
.category-grid {
    display: grid;
    /* CHANGE: 4 columns */
    grid-template-columns: repeat(4, 1fr); 
    gap: 6px; /* Very tight spacing */
    padding-bottom: 20px;
}

.cat-card {
    position: relative;
    border-radius: 6px; /* Smaller radius for tiny cards */
    overflow: hidden;
    aspect-ratio: 1 / 1; 
    text-decoration: none;
}

.cat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 4px; /* Minimal padding */
}

.cat-name {
    color: white;
    font-weight: 700;
    font-size: 0.7rem; /* 11px - Small enough to fit */
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    text-align: center;
    line-height: 1.1;
}

/* --- DESKTOP (No Changes to size) --- */
@media (min-width: 768px) {
    .category-grid {
        display: flex;
        justify-content: space-between;
        gap: 20px;
    }

    .cat-card {
        flex: 1;
        border-radius: 12px;
        aspect-ratio: 3 / 4; /* Portrait shape */
        max-width: 200px;
    }

    .cat-overlay {
        padding: 15px;
        justify-content: flex-start; /* Align left on desktop */
    }

    .cat-name {
        font-size: 1.25rem; /* Big font on desktop */
        margin-bottom: 5px;
    }
}
/* --- HEADER LAYOUT (Mobile Default) --- */
.header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    position: relative;
    height: 60px; 
}

/* LOGO CONTAINER - Mobile (Centered) */
.logo-container {
    display: flex;
    flex-direction: column; /* Stack Name on top of Slogan */
    align-items: center;    /* Center text horizontally */
    justify-content: center;
    text-decoration: none;
    line-height: 1; 
    
    /* ABSOLUTE CENTER for Mobile */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    z-index: 10; 
}

/* MAIN BRAND NAME */
.logo-text {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 1.4rem; 
    letter-spacing: -0.5px;
    color: #0F172A;
    text-transform: uppercase;
}

/* SLOGAN */
.logo-slogan {
    font-size: 0.6rem;
    color: #64748B;
    font-weight: 500;
    margin-top: 2px;
    white-space: nowrap;
}

.logo-slogan strong {
    color: #D97706; 
    font-weight: 700;
}

/* --- DESKTOP OVERRIDES (Screens wider than 1024px) --- */
@media (min-width: 1024px) {
    .logo-container {
        /* Stop floating in center */
        position: static; 
        transform: none;
        
        /* Align to Left */
        align-items: flex-start; 
        margin-right: 2rem; 
    }

    .logo-text {
        font-size: 1.8rem; /* Bigger on desktop */
    }

    .logo-slogan {
        font-size: 0.75rem; /* Readable slogan */
    }
}

/* 1. Main Header Layout */
.header-top-row {
    display: flex;
    align-items: center;
    /* Pack items (Menu, Logo) to the LEFT by default */
    justify-content: flex-start; 
    gap: 15px; /* Space between Menu button and Logo */
    padding: 10px 0;
    width: 100%;
}

/* 2. Logo Alignment */
.logo-container {
    display: flex;
    flex-direction: column;
    /* Ensure the slogan sits nicely under the logo, aligned left */
    align-items: flex-start; 
    text-align: left;
    text-decoration: none;
    line-height: 1.1;
    z-index: 10;
}

.logo-text {
    font-weight: 900;
    font-size: 1.5rem;
    color: #000;
    letter-spacing: -0.5px;
}

.logo-slogan {
    font-size: 0.7rem;
    color: #666;
    margin-top: 2px;
}

/* 3. The Search Bar (The Spacer) */
.header-search-desktop {
    /* This makes the search bar take up all available space in the middle */
    flex-grow: 1; 
    margin: 0 30px; /* Add breathing room on sides */
    max-width: 600px;
}

/* 4. The Actions (Account/Cart) */
.header-actions {
    /* MAGIC: This forces the icons to the far RIGHT */
    margin-left: auto; 
    
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0; /* Prevent icons from getting squashed */
}

/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 768px) {
    /* Hide desktop search to clear space */
    .header-search-desktop {
        display: none !important;
    }
    
    /* On mobile, tighten the gap slightly */
    .header-top-row {
        gap: 12px;
    }

    /* Ensure logo stays small enough to fit */
    .logo-text {
        font-size: 1.3rem;
    }
}

/* --- AUTH POPUP (MODAL) --- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 99999;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.auth-popup-box {
    background: white; width: 100%; max-width: 420px;
    border-radius: 12px; overflow: hidden; position: relative;
    transform: translateY(20px); transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    display: flex; flex-direction: column;
}
.modal-overlay.open .auth-popup-box { transform: translateY(0); }

/* HEADER & TABS */
.popup-close {
    position: absolute; top: 15px; right: 15px; background: none; border: none;
    font-size: 1.5rem; cursor: pointer; color: #666; z-index: 10;
}
.popup-tabs { display: flex; border-bottom: 1px solid #eee; background: #fafafa; }
.popup-tab {
    flex: 1; padding: 18px; border: none; background: transparent;
    font-weight: 600; color: #666; cursor: pointer; font-size: 0.95rem;
}
.popup-tab.active { background: white; color: #111; border-bottom: 2px solid #111; }

/* CONTENT */
.popup-content { padding: 30px; }
.auth-view { display: none; }
.auth-view.active { display: block; }

/* FORMS MATCHING YOUR STYLE */
.pop-group { margin-bottom: 15px; position: relative; }
.pop-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: #374151; }
.pop-input {
    width: 100%; padding: 12px; border: 1px solid #E5E7EB; border-radius: 8px;
    font-size: 1rem; color: #111; transition: border 0.2s;
}
.pop-input:focus { border-color: #111; outline: none; }

/* PASSWORD TOGGLE */
.password-wrapper { position: relative; }
.toggle-pass {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: #666; font-size: 1.2rem;
}

/* BUTTONS */
.btn-pop-submit {
    width: 100%; padding: 14px; background: #111; color: white;
    border: none; border-radius: 8px; font-weight: 700; cursor: pointer;
    font-size: 1rem; margin-top: 10px;
}
.btn-pop-submit:disabled { opacity: 0.7; cursor: wait; }

.btn-google-pop {
    width: 100%; padding: 12px; background: white; border: 1px solid #E5E7EB;
    border-radius: 8px; font-weight: 600; cursor: pointer; margin-top: 15px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    color: #374151;
}

.pop-divider { 
    text-align: center; margin: 20px 0; color: #9CA3AF; font-size: 0.85rem; position: relative; 
}
.pop-divider::before, .pop-divider::after {
    content: ""; position: absolute; top: 50%; width: 40%; height: 1px; background: #E5E7EB;
}
.pop-divider::before { left: 0; } .pop-divider::after { right: 0; }

.pop-error {
    background: #FEF2F2; color: #EF4444; padding: 10px; border-radius: 6px;
    font-size: 0.9rem; margin-bottom: 15px; display: none; border: 1px solid #FEE2E2;
}

/* =========================================
   MARKETING & ANNOUNCEMENTS
   ========================================= */

/* --- 1. TOP ANNOUNCEMENT BAR --- */
.top-announcement-bar {
    background: #111;        /* Black background */
    color: white;
    text-align: center;
    padding: 10px 15px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 2000;           /* Above everything */
    animation: slideDown 0.3s ease-out;
}

.top-announcement-bar span {
    letter-spacing: 0.5px;
}

.top-announcement-bar button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: 0.2s;
}
.top-announcement-bar button:hover {
    color: #fff;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* --- 2. FLASH SALE MODE --- */
/* When Flash Sale is Active, add a red border to the header */
body.flash-sale-active header {
    border-bottom: 2px solid #EF4444 !important;
}

/* The Pulsing Badge */
.flash-badge {
    position: fixed;
    top: 90px;            /* Adjusts based on your header height */
    right: 20px;
    background: #EF4444;  /* Red */
    color: white;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    z-index: 1500;
    animation: pulseBadge 2s infinite;
    cursor: default;
    pointer-events: none; /* Lets clicks pass through */
}

@keyframes pulseBadge {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* --- 3. POP-UP POSTER (MODAL) --- */
.marketing-popup-overlay {
    position: fixed;
    inset: 0;               /* Covers full screen */
    background: rgba(0, 0, 0, 0.75); /* Dark dim */
    z-index: 9999;          /* Very top */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.4s ease-out;
    backdrop-filter: blur(3px); /* Nice blur effect behind */
}

.marketing-popup-box {
    position: relative;
    width: 100%;
    max-width: 420px;       /* Good size for posters */
    background: transparent;
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.marketing-popup-box img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}

.marketing-popup-box img:hover {
    transform: scale(1.02);
}

.marketing-popup-close {
    position: absolute;
    top: -15px;
    right: -10px;
    background: white;
    border: none;
    color: #111;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: 0.2s;
}

.marketing-popup-close:hover {
    background: #111;
    color: white;
    transform: rotate(90deg);
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* =========================================
   ADDED TO CART POPUP (With Close Button)
   ========================================= */
.cart-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.cart-popup-overlay.active {
    display: flex;
    opacity: 1;
}

.cart-popup-box {
    position: relative; /* Essential for the close button positioning */
    background: white;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-popup-overlay.active .cart-popup-box {
    transform: scale(1);
}

/* THE CLOSE BUTTON (X) */
.cp-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: #9CA3AF;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    border-radius: 50%;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-close:hover {
    background: #F3F4F6;
    color: #111;
}

/* ICON & TEXT */
.cp-icon {
    font-size: 3rem;
    color: #10B981;
    margin-bottom: 15px;
    background: #D1FAE5;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    display: inline-block;
}

.cp-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111;
    margin: 0 0 10px 0;
}

.cp-text {
    color: #6B7280;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* ACTION BUTTONS */
.cp-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.cp-btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
}

.cp-btn-outline {
    background: white;
    border-color: #E5E7EB;
    color: #374151;
}

.cp-btn-outline:hover {
    border-color: #111;
    color: #111;
}

.cp-btn-primary {
    background: #111;
    color: white;
    border-color: #111;
}

.cp-btn-primary:hover {
    background: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}