/* ============================================================
   CentralBusiness — Ultimate Premium Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700;800;900&display=swap');

:root {
    --accent:     #F97316; /* Orange for CENTRAL */
    --accent-glow: rgba(249, 115, 22, 0.4);
    --green:      #198754; /* Green for CB */
    --green-glow: rgba(25, 135, 84, 0.4);
    --bg:         #2a0101; 
    --bg-alt:     #420303; 
    --card-bg:    rgba(66, 3, 3, 0.4);
    --glass:      rgba(255, 255, 255, 0.05);
    --glass-bg:   rgba(66, 3, 3, 0.7);
    --glass-border: rgba(255, 255, 255, 0.12);
    --admin-sidebar-bg: #420303;
    --text:       #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.6);
    --radius:     12px;
    --radius-lg:  24px;
    --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(139, 0, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 0, 0, 0.2) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Mobile-Specific Performance & Layout Tweaks */
@media (max-width: 768px) {
    body {
        background-attachment: scroll !important; /* Fixed backgrounds cause jitter on mobile */
    }
}

/* Fix Input Visibility Global */
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    color: var(--accent) !important;
    background: rgba(0, 0, 0, 0.4) !important;
    background-color: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    font-weight: 700 !important;
}
@media (max-width: 768px) {
    input:not([type="checkbox"]):not([type="radio"]), select, textarea {
        font-size: 16px !important; /* Prevents iOS auto-zoom on focus */
    }
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent) !important;
    outline: none;
    background: rgba(0, 0, 0, 0.8) !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    color: var(--accent) !important;
}
/* Fix Webkit Autofill */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #2a0101 inset !important;
    -webkit-text-fill-color: var(--accent) !important;
    transition: background-color 5000s ease-in-out 0s;
}
/* Fix for browser defaults or white backgrounds */
::placeholder { color: rgba(255, 255, 255, 0.4) !important; }

/* Effet "Visqueux / Brillance" - Overlay CP46 */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 25%, rgba(255,255,255,0.02) 50%, transparent 75%);
    pointer-events: none;
    z-index: 999;
}

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-family: 'Outfit', sans-serif; font-weight: 800; color: var(--text); }
a { color: inherit; text-decoration: none; transition: var(--transition); }

/* ── Header ────────────────────────────────────────────── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: #1f0101 !important; /* Solid Dark Red Fallback */
    background: rgba(31, 1, 1, 0.97) !important; 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    border-bottom: 2px solid var(--green);
    padding: 0 5%;
    transition: background 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}
.header.scrolled {
    background: #1f0101 !important; /* Solid Dark Red */
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.logo img {
    height: 55px; 
    border-radius: 8px; 
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
    filter: brightness(1.1);
}
.nav-link { color: rgba(255,255,255,0.7) !important; }
.nav-link:hover, .nav-link.active { color: white !important; }

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
    font-size: 1.8rem;
    color: var(--green);
}
.logo-text { font-size: 1.5rem; font-weight: 900; color: #FFFFFF; letter-spacing: -0.5px; text-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.logo-sub { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--green); font-weight: 700; opacity: 0.9; }

.nav { display: flex; gap: 20px; align-items: center; }
.nav-link { 
    position: relative;
    padding: 10px 15px;
    font-weight: 700; 
    font-size: 0.95rem; 
    color: rgba(255,255,255,0.7) !important; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 15px;
    right: 15px;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}
.nav-link:hover { color: var(--accent); }
.nav-link:hover::after, .nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}
.nav-link.active { color: var(--accent); }
.nav-link.logout-btn { background:none; border:none; color:rgba(0,0,0,0.4); font-size:0.8rem; cursor:pointer; }
.nav-link.logout-btn:hover { color: var(--accent); }

@media (min-width: 1025px) {
    .nav { gap: 30px; }
}

.cart-btn {
    background: var(--accent);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    color: #fff !important;
    box-shadow: 0 10px 20px var(--accent-glow);
}
.cart-btn:hover { transform: scale(1.05); filter: brightness(1.1); }

.nav-link.logout-btn { background:none; border:none; color:rgba(255,255,255,0.6) !important; font-size:0.85rem; cursor:pointer; font-weight: 700; }
.nav-link.logout-btn:hover { color: var(--accent); }

/* ── Hero ────────────────────────────────────────────────── */
.hero-landing {
    min-height: 85vh;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 4rem;
    padding: 120px 5% 60px;
    background: linear-gradient(135deg, rgba(42, 1, 1, 0.95) 0%, rgba(66, 3, 3, 0.8) 100%), 
                url('/images/assets/exterior.png');
    background-size: cover;
    background-position: center;
    position: relative;
}
.hero-landing-image img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}
.section-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 2rem;
    text-align: left;
    color: white;
    letter-spacing: -1px;
}
@media (max-width: 768px) {
    .section-title { margin-bottom: 2rem; }
}
.section-title span {
    color: var(--accent);
}
.hero-landing h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.1; margin-bottom: 1.5rem; color: #000; }
.hero-landing h1 em { color: var(--accent); font-style: normal; }
.hero-landing p { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin-bottom: 3rem; font-weight: 500; }
.hero-actions { display: flex; gap: 20px; }

/* ── Hero Banner (Store Homepage) ── */
.hero-banner {
    position: relative;
    width: 100%;
    min-height: 40vh; /* Adjust height for impact */
    background: url('../images/assets/storefront_wide.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    color: white;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.85) 0%, rgba(200, 20, 20, 0.4) 100%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}
.hero-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}
.hero-subtitle {
    font-size: clamp(1rem, 3.5vw, 1.3rem);
    font-weight: 400;
    opacity: 0.95;
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
    line-height: 1.6;
}
.hero-search-btn {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 14px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 12px;
}
.hero-search-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Animations d'entrée */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
    animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

/* ── NEW SPLIT HERO CP46 ── */
.hero-split {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
}

/* Bloc Texte : Haute visibilité */
.hero-top-text {
    background: linear-gradient(135deg, #2a0101 0%, #420303 100%);
    padding: 120px 5% 60px;
    text-align: center;
    color: white;
    z-index: 10;
}

/* Bloc Image : Paysage pur - FIX VISIBILITE CP46 */
.hero-bottom-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 480px;
    background-color: #1e293b; /* Fallback color */
    background-image: url('/images/assets/storefront_wide.jpg') !important; /* Absolute path */
    background-position: center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    position: relative;
    border-top: 6px solid var(--green);
    box-shadow: 0 -20px 50px rgba(0,0,0,0.5);
    z-index: 5;
}
.hero-bottom-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, transparent 100%);
}

.home-title {
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -2px;
}

/* Cycle de couleur Vert/Noir - VIBRANT CP46 */
.color-cycle {
    animation: colorShift 4s ease-in-out infinite;
    font-weight: 900;
}
@keyframes colorShift {
    0%, 100% { color: var(--accent); text-shadow: 0 0 20px rgba(249, 115, 22, 0.4); }
    50% { color: #f8fafc; text-shadow: 0 0 10px rgba(255,255,255,0.2); }
}


/* Typing Cursor Effect */
.typing-cursor::after {
    content: '|';
    animation: blink 0.8s infinite;
    color: var(--accent);
    margin-left: 5px;
    font-weight: 900;
}
@keyframes blink { 50% { opacity: 0; } }

/* Glow Pulse for Captivating effect */
.glow-pulse {
    animation: glowPulse 3s infinite alternate;
}
@keyframes glowPulse {
    from { filter: drop-shadow(0 0 5px rgba(255,255,255,0.2)); }
    to { filter: drop-shadow(0 0 15px var(--green)); }
}

/* Shake Animation Loop (Continu) - FORCED CP46 */
@keyframes shakeLoop {
    0%, 100% { transform: scale(1) translateX(0) translateY(0); }
    10%, 30%, 50%, 70%, 90% { transform: scale(1.02) translateX(-3px) translateY(-1px); }
    20%, 40%, 60%, 80% { transform: scale(1.02) translateX(3px) translateY(1px); }
}
.animate-shake-loop {
    animation: shakeLoop 3.5s ease-in-out infinite !important;
    display: inline-block !important;
}

/* Shake Animation hover override */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px) rotate(-1deg); }
    75% { transform: translateX(3px) rotate(1deg); }
}
.animate-shake:hover {
    animation: shake 0.3s ease-in-out infinite;
}

.home-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 20px;
}

.home-title {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: -1px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.home-subtitle {
    font-size: clamp(1rem, 4vw, 1.4rem);
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
    text-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
@media (max-width: 768px) {
    .home-subtitle {
        min-height: 5rem; /* Allow space for typing without shifting */
    }
}
.glass-pill {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 700;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.glass-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Optimisation Mobile Hero - SPLIT DESIGN CP46 */
@media (max-width: 991px) {
    .hero-top-text {
        padding: 90px 4% 30px !important;
    }
    .hero-bottom-image {
        aspect-ratio: 16 / 11 !important;
        min-height: 250px !important;
        border-top-width: 4px;
    }
    .hero-actions {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 0 10px;
    }
    .hero-actions .btn {
        width: 100% !important;
        margin: 0 !important;
    }
}

/* Animations et effets */
@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}
.animate-float {
    animation: floating 3s ease-in-out infinite;
}

/* ── Section ─────────────────────────────────────────────── */
.page { max-width: 1400px; margin: 0 auto; padding: 4rem 5%; }
/* Section Titles WHITE CP46 */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: left;
    color: white;
}
.section-title span {
    color: var(--accent);
}

/* ── Category Filter (Horizontal Scroll Mobile Optimized) ── */
.cat-scroll-container {
    position: relative;
    margin-bottom: 2rem;
    overflow: hidden; 
    padding: 0 40px; /* Espace pour les flèches */
}
@media (max-width: 600px) {
    .cat-scroll-container {
        padding: 0 10px; /* Moins d'espace sur mobile */
    }
}
.cat-scroll-container::after {
    content: ''; position: absolute; top:0; right:0; width: 60px; height: 100%;
    background: linear-gradient(to left, var(--bg), transparent);
    pointer-events: none;
    z-index: 2;
}

/* Flèches de navigation */
.scroll-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1rem;
    color: var(--text);
    user-select: none;
}
@media (max-width: 600px) {
    .scroll-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}
.scroll-nav-btn:hover {
    background: var(--green);
    color: white;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 8px 25px var(--green-glow);
}
.scroll-nav-btn.left { left: 5px; }
.scroll-nav-btn.right { right: 5px; }

/* Hide arrows if not needed (optional, but good for UX) */
.scroll-nav-btn.hidden { opacity: 0; pointer-events: none; }

.cat-filter {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0 25px 0; 
    margin-bottom: -15px;
    scrollbar-width: none;
    /* scroll-behavior: smooth; <- RETIRÉ car conflit avec requestAnimationFrame sur Safari/iOS */
    width: 100%;
    cursor: grab;
    user-select: none; /* Empêche de surligner le texte pendant le grab-scroll */
}
.cat-filter:active { cursor: grabbing; }
.cat-filter::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
.cat-filter::-webkit-scrollbar {
    height: 6px;
}
.cat-filter::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.02);
    border-radius: 10px;
}
.cat-filter::-webkit-scrollbar-thumb {
    background: var(--green);
    border-radius: 10px;
}

/* Premium Shine/Shimmer Effect on Hover */
.product-card::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: 0.8s;
    pointer-events: none;
}
.product-card:hover::after {
    left: 150%;
}

/* Glassmorphism Refinement */
.cat-chip {
    padding: 10px 22px;
    border-radius: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.cat-chip.active, .cat-chip:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #FFF;
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 10px 25px var(--accent-glow);
}

/* ── New Search Bar ────────────────────────────────────────── */
.search-toggle-btn {
    width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--glass-border);
    background: var(--glass-bg); color: #fff; font-size: 1.1rem; cursor: pointer; display: flex; align-items: center;
    justify-content: center; transition: all 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    flex-shrink: 0;
}
.search-toggle-btn:hover { border-color: var(--accent); background: var(--accent); color: #fff; transform: scale(1.1); }

/* ── GLOBAL SEARCH BAR CP46 ── */
.global-search-overlay {
    position: fixed;
    top: 83px; /* Just below header + border */
    left: 0;
    width: 100%;
    z-index: 998;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 5%;
    display: none;
    transform-origin: top;
    animation: slideInDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-bar-form-luxe {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 8px 12px 8px 25px;
    max-width: 1000px;
    margin: 0 auto;
    transition: all 0.3s ease;
}
.search-bar-form-luxe:focus-within {
    border-color: var(--green);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 25px var(--green-glow);
}

.search-bar-form-luxe input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 10px 0;
    outline: none;
}
.search-bar-form-luxe input::placeholder {
    color: rgba(255,255,255,0.4);
}

@keyframes slideInDown {
    from { transform: scaleY(0); opacity: 0; }
    to { transform: scaleY(1); opacity: 1; }
}

@media (max-width: 991px) {
    .global-search-overlay { top: 73px; padding: 15px 3%; }
    .search-bar-form-luxe { border-radius: 12px; padding: 6px 8px 6px 15px; }
    .search-bar-form-luxe input { font-size: 0.95rem; }
}

.search-bar-submit {
    background: var(--green); color: #fff; border: none; padding: 14px 20px;
    font-weight: 800; font-size: 0.85rem; cursor: pointer; transition: 0.3s;
    white-space: nowrap; flex-shrink: 0;
}
.search-bar-submit:hover { background: #146c43; }

/* Old Cards cleanup - merged above */

/* Step Cards - welcome page CP46 */
.step-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
}
.step-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}
.step-card h3 { color: white; margin: 1rem 0; }
.step-card p { color: rgba(255,255,255,0.7); }
.step-num {
    background: var(--accent);
    color: white;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    font-weight: 900;
}

/* Product Grid - Premium Red Staggered CP46 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Consolidated Product Card - Royal Butcher Red CP46 */
.product-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 20px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 15px 45px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 70px rgba(0,0,0,0.5);
    border-color: var(--accent);
}

.product-card .product-img img {
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.product-card .product-name {
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.product-card:hover .product-name {
    color: var(--accent);
}

/* Staggered Grid Animation — keyframes MUST be defined here */
@keyframes animate-up {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.products-grid > .product-card:nth-child(n) { animation: animate-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
.products-grid > .product-card:nth-child(1) { animation-delay: 0.05s; }
.products-grid > .product-card:nth-child(2) { animation-delay: 0.1s; }
.products-grid > .product-card:nth-child(3) { animation-delay: 0.15s; }
.products-grid > .product-card:nth-child(4) { animation-delay: 0.2s; }
.products-grid > .product-card:nth-child(5) { animation-delay: 0.25s; }

/* Shine Effect CP46 */
.product-card::before {
    content: ''; position: absolute; top:0; left:-100%; width:50%; height:100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
    transform: skewX(-25deg);
    transition: 0.8s;
    z-index: 10; pointer-events: none;
}
.product-card:hover::before { left: 200%; }

.product-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 22px;
    position: relative;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.05);
}
.product-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; /* PERFECT DISPLAY */
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s cubic-bezier(0.16, 1, 0.3, 1); 
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.05));
}
.product-card:hover .product-img img { 
    transform: scale(1.1); 
    filter: drop-shadow(0 25px 25px rgba(0,0,0,0.15));
}

.badge-cat {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--glass-bg);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    z-index: 10;
}

@media (max-width: 991px) {
    .product-card .badge-cat {
        display: none !important;
    }
}

.product-name { font-size: 1.25rem; margin-bottom: 5px; color: #000; font-weight: 800; line-height: 1.3; }
.product-price { font-size: 1.5rem; font-weight: 900; color: var(--accent); margin-bottom: 20px; }
.product-price span { font-size: 0.85rem; color: var(--text-muted); font-weight: 700; }

.product-body { flex: 1; display: flex; flex-direction: column; }
.product-footer { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }

/* Interactive Qty Controls */
.qty-control {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}
.qty-control:hover { 
    border-color: var(--accent); 
    background: rgba(255, 255, 255, 0.08); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); 
}
.qty-btn {
    width: 36px; height: 36px; border-radius: 10px; border: none;
    background: rgba(255, 255, 255, 0.1); font-size: 1.2rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1); color:#fff;
    display:flex; align-items:center; justify-content:center;
}
.qty-btn:hover { background: var(--accent); color: #fff; transform: scale(1.1); box-shadow: 0 5px 15px var(--accent-glow); }
.qty-btn:active { transform: scale(0.9); }
.qty-input {
    width: 40px; text-align: center; border: none; background: transparent; 
    font-size: 1.1rem; font-weight: 800; color: #fff; outline: none;
}
.qty-unit { font-size: 0.85rem; color: var(--text-muted); font-weight: 700; padding-right: 15px; margin-left: auto; text-transform:uppercase; letter-spacing:0.5px; }

/* Animated Add to Cart Button */
.add-btn-animated {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    position: relative; overflow: hidden; padding: 14px; border-radius: 14px !important;
    background: var(--green); color: #fff; font-weight: 800; font-size: 0.95rem; border: none; cursor: pointer;
    box-shadow: 0 4px 10px rgba(25,135,84,0.2); transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.add-btn-animated .btn-icon { transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.add-btn-animated:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(25,135,84,0.4); background: #146c43; }
.add-btn-animated:hover .btn-icon { transform: translateX(-5px) scale(1.2) rotate(-10deg); }
.add-btn-animated::after {
    content:''; position:absolute; top:50%; left:50%; width:0; height:0;
    background: rgba(255,255,255,0.2); border-radius: 50%;
    transform: translate(-50%, -50%); transition: width 0.6s ease-out, height 0.6s ease-out;
}
.add-btn-animated:hover::after { width: 300px; height: 300px; }

.add-cart-btn {
    /* Kept for disabled button fallback */
    padding: 14px; border-radius: 14px; font-weight: 800; font-size: 0.95rem; border: none; width:100%;
}

/* ── Footer LUXE RED CP46 ── */
.footer {
    background: var(--bg-alt); /* Deep Burgundy */
    padding: 6rem 5% 3rem;
    border-top: 4px solid var(--green);
    color: white;
}
.footer-inner { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer h4 { margin-bottom: 25px; color: white; font-weight: 900; font-size: 1.25rem; letter-spacing: -0.5px; }
.footer p { color: rgba(255,255,255,0.7); margin-bottom: 12px; font-weight: 500; }
.footer a { color: rgba(255,255,255,0.6) !important; display: inline-block; margin-bottom: 8px; }
.footer a:hover { color: var(--accent) !important; }


/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1rem;
    display: inline-block;
    cursor: pointer;
    border: none;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 25px var(--accent-glow); }
.btn-primary:hover { opacity: 0.9; }
/* btn-outline: dark text on light bg by default */
.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }
/* Small variant */
.btn-sm { padding: 8px 16px; font-size: 0.8rem; border-radius: 8px; font-weight: 700; border-width: 1px; }
/* on dark hero sections, keep the white outline */
.hero .btn-outline {
    border-color: #fff;
    color: #fff;
}
.hero .btn-outline:hover { background: #fff; color: #2a0101; }

/* ── Scroll Animations (Triggered by motion.js .is-visible) ── */
.animate-up {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.animate-up.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.animate-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.animate-scale.is-visible {
    opacity: 1;
    transform: scale(1);
}

.stagger-grid > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.stagger-grid > *.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* ── Modern Premium Effects ── */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}
.floating { animation: float 5s ease-in-out infinite; }

.btn {
    position: relative;
    overflow: hidden;
    transform: translateZ(0); /* Force GPU */
}
.btn::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover::after { transform: translate(-50%, -50%) scale(1); }
.btn:active { transform: scale(0.95); }

.img-glow {
    box-shadow: 0 40px 100px rgba(0,0,0,0.15), 0 0 0 1px var(--glass-border);
    transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.img-glow:hover {
    box-shadow: 0 50px 120px rgba(249,115,22,0.15), 0 0 0 1px var(--accent);
    transform: translateY(-10px) scale(1.02);
}

@media (max-width: 1024px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 991px) {
    /* Global overflow protection — prevents iPhone keyboard/search bar horizontal scroll */
    html, body { overflow-x: hidden !important; }
    .page { overflow-x: hidden; }

    /* Force header to stay on top on mobile */
    .header {
        position: fixed !important;
        top: 0 !important;
        left: 0;
        right: 0;
        z-index: 9999 !important;
    }

    .header-inner { padding: 0 1rem; height: 65px; }
    .logo-text { font-size: 1.1rem; }
    .logo-sub { display: none; }
    .logo img { height: 40px !important; }
    
    .nav { 
        position: fixed;
        top: 0; right: -100%;
        width: 80%; height: 100vh;
        background: rgba(42, 1, 1, 0.98); /* Deep Red Mobile Nav */
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 4rem 2rem;
        transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
        box-shadow: -20px 0 60px rgba(0,0,0,0.5);
    }
    .nav.open { right: 0; }
    .nav a, .nav .nav-link { 
        color: #FFFFFF !important; 
        font-size: clamp(1.2rem, 5vw, 1.5rem); 
        width: 100%; 
        text-align: center;
        padding: 15px 0 !important;
    }
    .nav-link::after { bottom: 8px !important; }

    
    .mobile-toggle { 
        display: flex; 
        flex-direction: column; 
        gap: 6px; 
        cursor: pointer; 
        z-index: 1100;
        padding: 5px;
    }
    .mobile-toggle span { 
        width: 30px; height: 3px; background: #FFFFFF; 
        border-radius: 5px; transition: 0.4s;
    }
    .mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
    .mobile-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

    /* Product Grid Mobile — compact but visible */
    .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
    .product-card { padding: 0.5rem; }
    .product-name { font-size: 0.85rem; }
    .product-price { font-size: 1rem; margin-bottom: 10px; }
    .product-img { margin-bottom: 10px; }
    .qty-control { padding: 4px; }
    .qty-btn { width: 30px; height: 30px; font-size: 1rem; }
    .qty-input { width: 30px; font-size: 0.9rem; }
    .qty-unit { font-size: 0.7rem; padding-right: 8px; }
    .add-btn-animated { padding: 10px; font-size: 0.8rem; }

    /* Search bar mobile */
    .search-bar-submit { padding: 14px 14px; font-size: 0.8rem; }
    .search-bar-icon { padding: 0 8px; }

    /* Hero Landing */
    .hero-landing { grid-template-columns: 1fr; text-align: center; padding: 100px 5% 40px; }
    .hero-actions { flex-direction: column; }
    .hero-landing h1 { font-size: 2.8rem; }
    
    /* Footer single column on mobile */
    .footer-inner { grid-template-columns: 1fr !important; gap: 20px; }

    /* Delivery dashboard */
    .delivery-map { height: 180px !important; }
}

/* Ensure visibility if JS fails or slow */
@media (prefers-reduced-motion: reduce) {
    .animate-up, .animate-scale, .stagger-grid > * { opacity: 1 !important; transform: none !important; }
}
.is-visible { opacity: 1 !important; transform: none !important; }


/* --- Auth Pages --- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, var(--accent-glow), var(--bg));
    padding: 2rem;
}
.hero {
    position: relative;
    background: linear-gradient(135deg, rgba(15,12,12,0.85) 0%, rgba(26,21,21,0.95) 100%),
                url('/images/assets/rayon\ frigo\ .jpg') center/cover;
    color: var(--white);
    padding: 5rem 2rem 4rem;
    overflow: hidden;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 32px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
}
.auth-title { font-size: 2.2rem; margin-bottom: 0.5rem; text-align: center; }
.auth-sub { color: var(--text-muted); text-align: center; margin-bottom: 2.5rem; font-size: 0.95rem; }

/* --- Admin Dashboard --- */
.admin-layout { display: flex; min-height: 100vh; background: var(--bg); }
.admin-sidebar { width: 280px; background: var(--admin-sidebar-bg); border-right: 1px solid var(--glass-border); padding: 2rem; }
.admin-main { flex: 1; padding: 3rem; }

.stat-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    height: 100%;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
}
.stat-card.red::before { background: var(--accent); }
.stat-card.gold::before { background: var(--gold); }
.stat-card.green::before { background: #10b981; }
.stat-card.blue::before { background: #3b82f6; }

.stat-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 0.5rem; }
.stat-value { font-size: 2.5rem; font-weight: 700; font-family: 'Playfair Display', serif; }

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}
.data-table th { text-align: left; padding: 1rem; color: var(--text-muted); font-weight: 500; font-size: 0.85rem; text-transform: uppercase; }
.data-table td { padding: 1.2rem 1rem; background: var(--glass); border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); }
.data-table td:first-child { border-left: 1px solid var(--glass-border); border-radius: 12px 0 0 12px; }

.data-table td:last-child { border-right: 1px solid var(--glass-border); border-radius: 0 12px 12px 0; }

/* --- Administrative UI Refinements --- */
.glass-form .form-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.glass-form .form-control, 
.admin-main .form-control,
.assistant-main .form-control,
.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #FFFFFF;
    padding: 1rem 1.2rem;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
}
.form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 15px var(--accent-glow);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Image Thumbnails */
.img-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition);
}

.img-thumb:hover {
    transform: scale(1.1);
    border-color: var(--green);
    box-shadow: 0 5px 15px var(--green-glow);
}

.admin-main h3, .assistant-main h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text);
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 99999;
    overflow-y: auto; /* Enable vertical scroll */
    padding: 2rem 0; /* Space for scrolling content */
    display: flex;
    align-items: flex-start; /* Align to top instead of center to facilitate scrolling */
    justify-content: center;
    -webkit-overflow-scrolling: touch;
}

.modal-content {
    background: var(--bg-alt);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 40px 100px rgba(0,0,0,0.4);
    margin: auto; /* Keeps it centered horizontally */
    margin-bottom: 2rem;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.3s;
}

.modal-close:hover { color: var(--accent); transform: rotate(90deg); }

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-style: italic;
}

/* --- Pagination (Bootstrap 5) --- */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.page-item {
    list-style: none;
}
.page-item .page-link {
    display: block;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: 12px !important;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
}
.page-item.active .page-link {
    background: var(--gold);
    border-color: var(--gold);
    color: #000;
    box-shadow: 0 5px 15px var(--gold-glow);
}
.page-item .page-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: var(--gold);
}
.page-item.disabled .page-link {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.1);
}
.page-link:focus {
    box-shadow: 0 0 0 0.25rem var(--gold-glow);
    background: var(--glass);
    color: #fff;
    outline: none;
}

/* --- Administrative Readability Overrides (Simple & Natural) --- */
.admin-layout, 
.admin-layout, 
.admin-main, 
.assistant-main {
    --bg: #F9FAFB;
    --bg-alt: #FFFFFF;
    --text: #1F2937;
    --text-muted: #6B7280;
    --glass: #FFFFFF;
    --glass-bg: #FFFFFF;
    --glass-border: #E5E7EB;
    --card-bg: #FFFFFF;
    --admin-sidebar-bg: #FFFFFF;
    color: var(--text) !important;
}

.admin-layout body { 
    background-color: var(--bg);
    background-image: none; /* Remove luxury glows for admin */
}

/* Sidebar Refinement */
.admin-sidebar {
    background: #FFFFFF !important;
    border-right: 1px solid #E2E8F0 !important;
    box-shadow: 10px 0 30px rgba(0,0,0,0.02);
}
.sidebar-link { color: #475569 !important; }
.sidebar-link:hover { background: #F1F5F9 !important; color: #0F172A !important; }
.sidebar-link.active { 
    background: #F1F5F9 !important; 
    color: #1E293B !important; 
    border-left: 4px solid var(--accent) !important;
    font-weight: 700;
}

/* Table & Card Refinement */
.data-table th {
    background: #F1F5F9 !important;
    color: #1E293B !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #E2E8F0 !important;
    border-top: none !important;
}
.data-table td {
    background: #FFFFFF !important;
    border-top: 1px solid #EDF2F7 !important;
    border-bottom: 1px solid #EDF2F7 !important;
    color: #1A202C !important;
    box-shadow: none !important;
}
.data-table tr:hover td {
    background: #F8FAFC !important;
}
.stat-card {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important;
}
.stat-value { color: #0F172A !important; }

/* ── Admin / Assistant Mobile Refinement ─────────────────────── */
.admin-mobile-bar {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
/* Auth & Specialized Cards CP46 */
.auth-card, .admin-card {
    background: var(--bg-alt);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    color: white;
}
    border-bottom: 1px solid var(--glass-border);
    z-index: 9000;
    align-items: center;
    padding: 0 1.2rem;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.admin-burger {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
}
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 9500;
    animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sb-header-mobile { display: none; }
.sb-header-desktop { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 1.2rem 1rem; }

@media (max-width: 991px) {
    .admin-mobile-bar { display: flex; }
    .admin-main { padding: 1.5rem 1rem !important; padding-top: 5rem !important; height: auto !important; overflow: visible !important; }
    
    .admin-sidebar {
        position: fixed !important;
        left: -280px !important;
        top: 0;
        bottom: 0;
        width: 280px !important;
        z-index: 10000 !important;
        box-shadow: 20px 0 60px rgba(0,0,0,0.3) !important;
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
        height: 100vh !important;
    }
    .admin-sidebar.open {
        transform: translateX(280px);
    }
    .sb-header-desktop { display: none; }
    .sb-header-mobile { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 1.2rem; }
    .sb-label { display: block !important; }
    .sb-toggle-btn-dsktp { display: none !important; }
    
    /* Responsive stats grid */
    .stat-card { padding: 1.2rem !important; }
    .stat-value { font-size: 1.6rem !important; }

    /* Management Grids */
    .admin-grid-stack { grid-template-columns: 1fr !important; gap: 1rem !important; }
    .admin-stats-flex { flex-direction: column !important; gap: 1rem !important; }

    /* Responsive tables (Horizontal Scroll) */
    .data-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1.5rem; border-radius: 12px; border: 1px solid var(--glass-border); }
    .data-table { min-width: 900px; margin-bottom: 0 !important; }

    /* Dashboard Tabs */
    .order-tabs { 
        overflow-x: auto; 
        white-space: nowrap; 
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
    .tab-btn { flex: 0 0 auto; padding: 10px 15px !important; }

    /* Modal Mobile Fixes */
    .modal-content {
        padding: 1.5rem !important;
        width: 95% !important;
        border-radius: 12px !important;
    }
    .modal-close {
        top: 1rem !important;
        right: 1rem !important;
    }
    .modal-overlay {
        padding: 1rem 0 !important;
    }
}

.admin-main .form-control:focus,
.assistant-main .form-control:focus,
.modal-content .form-control:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 4px var(--accent-glow) !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: #FFFFFF !important;
}
.admin-main .form-control::placeholder,
.assistant-main .form-control::placeholder,
.modal-content .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Section Titles */
.admin-main .section-title, .assistant-main .section-title {
    text-align: left;
    font-size: 2rem;
    color: #0F172A;
    margin-bottom: 2rem;
}

/* Header in Admin */
.admin-layout .header {
    background: var(--bg-alt);
    border-bottom: 2px solid var(--green);
    color: white;
}
.admin-layout .logo-text {
    background: #0F172A;
    -webkit-text-fill-color: #0F172A;
}
.admin-layout .nav a { color: #475569; }

/* Specific Overrides */
.admin-main h3,
.assistant-main h3 {
    color: #0F172A !important;
}
.assistant-main .card {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important;
}
.assistant-main .card .text-muted {
    color: #64748B !important;
}
.assistant-main .card .gold {
    color: #92400E !important;
}

/* Category Filter Tags in Admin */
/* Cleanup admin chip overrides CP46 */
.cat-filter .cat-chip {
    background: var(--glass-bg);
    color: white;
    border: 1px solid var(--glass-border);
}
.cat-filter .cat-chip.active, .cat-filter .cat-chip:hover {
    background: var(--accent);
    color: #FFFFFF;
    border-color: var(--accent);
}

/* Base body reset for admin layout wrapper */
body:has(.admin-layout),
body:has(.assistant-main) {
    background-color: #F8FAFC !important;
    background-image: none !important;
    color: #0F172A !important;
}
/* ── Satisfying Fun Effects ───────────────────────────────── */
@keyframes particle-fade {
    0% { transform: scale(1) translate(0,0); opacity: 1; }
    100% { transform: scale(0) translate(var(--tw), var(--th)); opacity: 0; }
}
.click-particle {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: particle-fade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes float-up-fade {
    0% { transform: translateY(0); opacity: 0; }
    20% { transform: translateY(-20px); opacity: 1; }
    100% { transform: translateY(-80px); opacity: 0; }
}
.fun-feedback {
    position: absolute;
    pointer-events: none;
    z-index: 10001;
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent);
    white-space: nowrap;
    text-shadow: 0 4px 10px rgba(0,0,0,0.1);
    animation: float-up-fade 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cart-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4) rotate(-10deg); }
}
.cart-header-active { animation: cart-bounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

@keyframes img-wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

.flying-img {
    position: fixed;
    z-index: 9999;
    border-radius: 12px;
    pointer-events: none;
    object-fit: cover;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    animation: img-wobble 0.3s infinite linear;
}

@keyframes count-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.9; }
}
.cart-count { animation: count-pulse 2s infinite ease-in-out; }

.product-card .add-cart-btn {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card .add-cart-btn.added {
    background: var(--accent) !important;
    transform: scale(1.05);
    box-shadow: 0 10px 20px var(--accent-glow);
}
.feat-item {
    padding: 0.5rem 0;
    transition: var(--transition);
}
.feat-item:hover { transform: translateX(10px); color: var(--green); cursor: default; }
.feat-item span { display: inline-block; transition: 0.5s; }
.feat-item:hover span { transform: scale(1.5) rotate(20deg); }

.logo:hover .logo-mark {
    animation: img-wobble 0.4s infinite linear;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 3rem 0;
}
.gallery-item {
    border-radius: 20px;
    overflow: hidden;
    height: 300px;
    position: relative;
    cursor: pointer;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-item:hover img { transform: scale(1.1); }
.gallery-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    transform: translateY(10px);
    opacity: 0;
    transition: 0.4s;
}
.gallery-item:hover .gallery-caption { transform: translateY(0); opacity: 1; }

/* --- Pagination & Image Optimizations --- */
.img-fade-in {
    opacity: 0;
    filter: blur(10px);
    transition: opacity 0.8s ease-out, filter 0.8s ease-out;
}
.img-fade-in[src] {
    opacity: 1;
    filter: blur(0);
}

.pagination-wrapper .pagination {
    gap: 8px;
    border: none;
}
.pagination-wrapper .page-item .page-link {
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-weight: 700;
    padding: 10px 18px;
    transition: var(--transition);
}
.pagination-wrapper .page-item.active .page-link {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
    box-shadow: 0 5px 15px var(--accent-glow);
}
.pagination-wrapper .page-item .page-link:hover {
    background: var(--bg);
    color: var(--accent);
    border-color: var(--accent);
}
/* --- Infinite Scroll Loading Animation --- */
.loading-dots {
    display: none;
    align-items: center;
    gap: 6px;
}
.loading-dots span {
    width: 10px;
    height: 10px;
    background-color: var(--accent);
    border-radius: 50%;
    display: inline-block;
    animation: dot-pulse 1.4s infinite ease-in-out both;
}
.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes dot-pulse {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1.0); opacity: 1; }
}

/* CP46 - High Contrast & Mobile Refinements */
@media (max-width: 991px) {
    .badge-cat-mobile-hide {
        display: none !important;
    }
    .product-img {
        max-height: 180px;
    }
}

.form-control-simple {
    background: rgba(0,0,0,0.4) !important;
    color: #FFF !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
}

/* CP46.2 - Delivery & Payment UI */
.delivery-selector, .payment-strategy-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 1rem;
}
.delivery-option, .payment-strategy-option {
    flex: 1;
    cursor: pointer;
}
.option-box, .strategy-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-muted);
}
.delivery-option input:checked + .option-box,
.payment-strategy-option input:checked + .strategy-box {
    background: rgba(249, 115, 22, 0.15);
    border-color: var(--accent);
    color: #FFF;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(249, 115, 22, 0.2);
}

.strategy-box {
    text-align: left;
    padding: 15px;
}

/* Admin Form Control - Bug FIx */
.form-control {
    background: rgba(0,0,0,0.6) !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    padding: 10px 15px;
    border-radius: 8px;
    width: 100%;
    outline: none !important;
}

.form-control:focus {
    background: rgba(0,0,0,0.8) !important;
    color: #FFFFFF !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2) !important;
}

/* Force text visibility during typing and autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-text-fill-color: #FFFFFF !important;
    -webkit-box-shadow: 0 0 0px 1000px #2a0101 inset !important;
    box-shadow: 0 0 0px 1000px #2a0101 inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

select.form-control option {
    background: #2a0101;
    color: #fff;
}

.qty-unit {
    color: #FFF !important;
    font-weight: 800;
    font-size: 0.75rem;
}

/* CP46.1 - Enhanced Input States & Branding */
.form-control-simple:focus {
    background: rgba(0,0,0,0.5) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15) !important;
    outline: none !important;
}

.hero-split {
    background: linear-gradient(145deg, #1f0101 0%, #3d0202 50%, #1f0101 100%) !important;
}

