/**
 * Restaurant Menu - Premium Modern Styling
 * La Cabane - Enhanced UI/UX
 */

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

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ========================================
       DEFAULT THEME (Dark Wood)
       ======================================== */
    /* Primary Palette */
    --primary: #d4af37;
    /* Gold Leaf */
    --primary-dark: #b8860b;
    /* Antique Brass */
    --primary-light: #f4f1ea;
    /* Parchment */
    --secondary: #3d2b1f;
    /* Deep Oak */

    /* Background Colors */
    --bg-dark: #2c1810;
    /* Walnut */
    --bg-light: #3d2b1f;
    /* Deep Oak */
    --bg-lighter: #5d4037;
    /* Mahogany */

    /* Text Colors */
    --text-light: #faf8f3;
    /* Cream */
    --text-gray: #e8e3d6;
    /* Aged Paper */
    --text-muted: rgba(250, 248, 243, 0.6);
    --text-inverse: #2c1810;

    /* Accents */
    --success: #6a8e3f;
    --danger: #8b4513;
    --warning: #c87533;
    --info: #8a9a5b;

    /* Texture Defaults */
    --wood-grain: url('../images/wood-texture-dark.jpg');
    --wood-opacity: 0.5;
    --wood-blend: overlay;

    /* Glass Effects */
    --glass-bg: rgba(61, 43, 31, 0.4);
    --glass-bg-light: rgba(61, 43, 31, 0.25);
    --glass-border: rgba(212, 175, 55, 0.2);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 4px 20px rgba(212, 175, 55, 0.3);

    /* UI Measurements */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --transition-base: 0.3s ease;
}

/* ========================================
   LIGHT THEME OVERRIDES
   ======================================== */
[data-theme="light"] {
    /* Primary Palette */
    --primary: #8b5a2b;
    /* Warm Oak */
    --primary-dark: #5c3a1e;
    /* Dark Walnut */
    --primary-light: #d4c5a9;
    /* Pale Birch */
    --secondary: #e6dcc3;
    /* Light Beige */

    /* Background Colors */
    --bg-dark: #e6dcc3;
    --bg-light: #f4f1ea;
    /* Parchment */
    --bg-lighter: #faf8f3;
    /* Cream */

    /* Text Colors */
    --text-light: #3d2b1f;
    /* Dark Brown */
    --text-gray: #5d4037;
    /* Medium Brown */
    --text-muted: rgba(61, 43, 31, 0.6);
    --text-inverse: #faf8f3;

    /* Texture */
    --wood-grain: url('../images/wood-texture.jpg');
    --wood-opacity: 0.3;
    --wood-blend: multiply;

    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-bg-light: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(139, 90, 43, 0.2);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(61, 43, 31, 0.1);
    --shadow-md: 0 4px 16px rgba(61, 43, 31, 0.15);
    --shadow-glow: 0 4px 20px rgba(139, 90, 43, 0.2);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-light) 50%, var(--bg-dark) 100%);
    background-attachment: fixed;
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Wood Grain Texture Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--wood-grain);
    background-repeat: repeat;
    background-size: 500px;
    opacity: var(--wood-opacity);
    pointer-events: none;
    z-index: -1;
    mix-blend-mode: var(--wood-blend);
}

/* Subtle Vignette Effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    position: relative;
    text-align: center;
    padding: 80px 20px 60px;
    margin-bottom: 40px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(193, 154, 107, 0.15) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* ========================================
   HEADER
   ======================================== */
.header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
}

.logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #d4af37 0%, #f4f1ea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.4));
    animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tagline {
    color: var(--text-gray);
    font-size: 1.1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: fadeInUp 0.8s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   SEARCH BAR
   ======================================== */
.search-wrapper {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
    animation: fadeIn 0.8s ease 0.4s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.search-box {
    width: 100%;
    padding: 16px 50px 16px 20px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    color: var(--text-light);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.search-box:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(44, 24, 16, 0.9);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.25),
        0 0 20px rgba(212, 175, 55, 0.3),
        var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 1.2rem;
    pointer-events: none;
}

/* ========================================
   CATEGORY TABS
   ======================================== */
.categories-wrapper {
    margin-bottom: 50px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
}

.categories-wrapper::-webkit-scrollbar {
    height: 6px;
}

.categories-wrapper::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: var(--radius-full);
}

.categories-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

.categories {
    display: flex;
    gap: 15px;
    padding: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-tab {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 14px 28px;
    border-radius: var(--radius-full);
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 600;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.category-tab::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(193, 154, 107, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.category-tab:hover::before {
    width: 300px;
    height: 300px;
}

.category-tab:hover {
    background: rgba(193, 154, 107, 0.2);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* Button press feedback */
.category-tab:active {
    transform: translateY(-1px) scale(0.97);
    transition: transform 0.1s ease;
}

.category-tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    color: var(--secondary);
    box-shadow: var(--shadow-glow);
    position: relative;
}

/* Animated bottom border for active tab */
.category-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary), var(--primary-light));
    animation: slideInFromLeft 0.4s ease;
}

@keyframes slideInFromLeft {
    from {
        transform: scaleX(0);
        opacity: 0;
    }

    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* ========================================
   PRODUCTS GRID
   ======================================== */
.main-content {
    min-height: 400px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(15px);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
    cursor: pointer;
    opacity: 0;
    animation: slideInUp 0.6s ease forwards;
    position: relative;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered entrance effect for product cards */
.product-card:nth-child(1) {
    animation-delay: 0.05s;
}

.product-card:nth-child(2) {
    animation-delay: 0.1s;
}

.product-card:nth-child(3) {
    animation-delay: 0.15s;
}

.product-card:nth-child(4) {
    animation-delay: 0.2s;
}

.product-card:nth-child(5) {
    animation-delay: 0.25s;
}

.product-card:nth-child(6) {
    animation-delay: 0.3s;
}

.product-card:nth-child(7) {
    animation-delay: 0.35s;
}

.product-card:nth-child(8) {
    animation-delay: 0.4s;
}

.product-card:nth-child(9) {
    animation-delay: 0.45s;
}

.product-card:nth-child(10) {
    animation-delay: 0.5s;
}

.product-card:nth-child(11) {
    animation-delay: 0.55s;
}

.product-card:nth-child(12) {
    animation-delay: 0.6s;
}


.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(193, 154, 107, 0.3);
    border-color: var(--primary);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: var(--bg-light);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.product-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(26, 15, 10, 0.9) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.product-card:hover .product-image-overlay {
    opacity: 1;
}

.product-info {
    padding: 24px;
}

.product-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-light);
    line-height: 1.3;
}

.product-description {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.product-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(193, 154, 107, 0.4);
}

.btn-order {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--secondary);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 700;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.btn-order::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-order:hover::before {
    left: 100%;
}

.btn-order:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.btn-order:active {
    transform: scale(0.98);
}

/* ========================================
   SKELETON LOADERS
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-light) 25%, var(--bg-lighter) 50%, var(--bg-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(15px);
    border-radius: var(--radius-xl);
    overflow: hidden;
    padding: 0;
}

.skeleton-image {
    width: 100%;
    height: 240px;
}

.skeleton-content {
    padding: 24px;
}

.skeleton-title {
    height: 28px;
    width: 70%;
    margin-bottom: 12px;
}

.skeleton-text {
    height: 16px;
    width: 100%;
    margin-bottom: 8px;
}

.skeleton-text:last-of-type {
    width: 80%;
    margin-bottom: 20px;
}

.skeleton-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skeleton-price {
    height: 32px;
    width: 100px;
}

.skeleton-button {
    height: 44px;
    width: 120px;
    border-radius: var(--radius-full);
}

/* ========================================
   LOADING & EMPTY STATES
   ======================================== */
.loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-gray);
    font-size: 1.2rem;
}

.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid var(--glass-border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.no-products {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-gray);
    font-size: 1.2rem;
}

.no-products-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.toast {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    color: var(--text-light);
    box-shadow: var(--shadow-xl);
    animation: slideInRight 0.4s ease, fadeOut 0.4s ease 2.6s forwards;
    display: flex;
    align-items: center;
    gap: 12px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--danger);
}

.toast.warning {
    border-color: var(--warning);
}

.toast.info {
    border-color: var(--info);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--danger);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast.info .toast-icon {
    color: var(--info);
}

/* ========================================
   FLOATING SOCIAL MEDIA MENU (FAB)
   ======================================== */
.fab-container {
    position: fixed;
    right: 30px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 2000;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fab-container.fab-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.social-float {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    gap: 15px;
    /* Reset fixed positioning */
    right: auto;
    bottom: auto;
}

/* Toggle Button */
.social-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: var(--secondary);
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.social-toggle:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-glow), var(--shadow-xl);
}

.social-toggle:active {
    transform: translateY(-2px) scale(1.05);
}

/* Toggle Icons */
.toggle-icon,
.toggle-close {
    position: absolute;
    transition: all 0.3s ease;
}

.toggle-close {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

.social-float.active .toggle-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

.social-float.active .toggle-close {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Social Menu Container */
.social-menu {
    display: flex;
    flex-direction: column-reverse;
    gap: 15px;
}

.social-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    color: var(--secondary);
    text-decoration: none;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    position: relative;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
}

/* Animate icons when menu is active */
.social-float.active .social-icon {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.social-float.active .social-icon:nth-child(1) {
    transition-delay: 0.1s;
}

.social-float.active .social-icon:nth-child(2) {
    transition-delay: 0.15s;
}

.social-float.active .social-icon:nth-child(3) {
    transition-delay: 0.2s;
}

.social-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: -1;
    filter: blur(10px);
}

.social-icon:hover::before {
    opacity: 0.7;
    animation: pulse 1.5s ease infinite;
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-glow), var(--shadow-xl);
}

.social-icon.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.social-icon.facebook {
    background: linear-gradient(135deg, #1877F2 0%, #0E5BB6 100%);
}

.social-icon.instagram {
    background: linear-gradient(135deg, #E4405F 0%, #C13584 50%, #833AB4 100%);
}

.social-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* Back to Top Button */
.back-to-top {
    /* Reset fixed positioning */
    position: static;
    width: 60px;
    height: 60px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: var(--primary);
    display: none;
    /* Hidden by default in flex stack */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-base);
    font-size: 1.5rem;
}

.back-to-top.visible {
    display: flex;
    /* Show in flex stack when visible */
    opacity: 1;
}

.back-to-top:hover {
    background: var(--primary);
    color: var(--secondary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    text-align: center;
    padding: 60px 20px 40px;
    margin-top: 80px;
    border-top: 2px solid var(--glass-border);
    color: var(--text-gray);
    background: rgba(26, 15, 10, 0.5);
}

.footer p {
    margin-bottom: 8px;
}

.footer-localization {
    margin-bottom: 25px;
}

.address-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.address-link:hover {
    background: var(--primary);
    color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary);
}

.map-icon {
    font-size: 1.4rem;
}

.footer-link {
    color: inherit;
    text-decoration: none;
    transition: all var(--transition-base);
    border-bottom: 1px dashed var(--text-gray);
}

.footer-link:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ========================================
   ADMIN LOGIN
   ======================================== */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-body::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -200px;
    animation: float 6s ease-in-out infinite;
}

.login-body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, 30px) scale(1.1);
    }
}

.login-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 50px 40px;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: fadeInScale 0.6s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.login-card h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-gray);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group input,
.form-card input,
.form-card textarea,
.form-card select {
    width: 100%;
    padding: 16px 20px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.form-group input:focus,
.form-card input:focus,
.form-card textarea:focus,
.form-card select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--secondary);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--bg-light);
    color: var(--text-light);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-danger {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4), var(--shadow-lg);
}

.error-message {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid var(--danger);
    color: var(--danger);
    padding: 14px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-weight: 500;
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.login-hint {
    margin-top: 24px;
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* ========================================
   ADMIN DASHBOARD
   ======================================== */
.admin-body {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
    background-attachment: fixed;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.admin-header {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: var(--shadow-lg);
}

.admin-header h1 {
    font-family: 'Playfair Display', serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 14px 28px;
    background: var(--bg-light);
    border: 2px solid var(--glass-border);
    color: var(--text-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 600;
    font-size: 1rem;
}

.tab-btn:hover {
    background: var(--glass-bg);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--secondary);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.admin-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    color: var(--text-light);
    font-size: 2rem;
}

.form-card {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    padding: 35px;
    margin-bottom: 35px;
    box-shadow: var(--shadow-lg);
    animation: fadeInScale 0.4s ease;
}

.form-card h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 25px;
    color: var(--primary);
    font-size: 1.5rem;
}

.form-card textarea {
    resize: vertical;
    min-height: 100px;
    font-family: 'Inter', sans-serif;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
    width: auto;
    flex: 1;
}

.items-list {
    display: grid;
    gap: 18px;
}

.item-card {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-base);
    gap: 20px;
}

.item-card:hover {
    border-color: var(--primary);
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.item-actions {
    display: flex;
    gap: 12px;
}

.btn-edit {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--secondary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-delete {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4), var(--shadow-md);
}

.upload-section {
    margin: 20px 0;
}

.file-upload-btn {
    display: inline-block;
    padding: 14px 24px;
    background: var(--bg-light);
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 500;
}

.file-upload-btn:hover {
    border-color: var(--primary);
    background: var(--glass-bg);
}

.file-upload-btn input[type="file"] {
    display: none;
}

#upload-status {
    margin-left: 15px;
    color: var(--success);
    font-weight: 500;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .logo {
        font-size: 2.8rem;
    }

    .tagline {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .admin-header {
        flex-direction: column;
        text-align: center;
    }

    .categories {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 15px;
    }

    .category-tab {
        padding: 12px 24px;
        font-size: 0.95rem;
        flex-shrink: 0;
    }

    .social-float {
        gap: 12px;
        /* Reset positioning to fix alignment */
        right: auto;
        bottom: auto;
    }

    .social-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .back-to-top {
        left: 20px;
        bottom: 100px;
        width: 45px;
        height: 45px;
    }

    .toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .login-card {
        padding: 40px 30px;
    }

    .form-actions {
        flex-direction: column;
    }

    .item-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .item-actions {
        width: 100%;
    }

    .item-actions button {
        flex: 1;
    }
}

/* ========================================
   ACCESSIBILITY & PERFORMANCE
   ======================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

/* Improved text readability */
h1,
h2,
h3,
h4,
h5,
h6 {
    text-rendering: optimizeLegibility;
}

/* GPU acceleration for animations */
.product-card,
.category-tab,
.btn-order,
.btn-primary,
.social-icon {
    will-change: transform;
}

/* ========================================
   SHOPPING CART
   ======================================== */

/* Floating Cart Button */
.cart-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 50%;
    color: var(--secondary);
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Reset fixed positioning as it's now in flex container */
}

.cart-button:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-glow), var(--shadow-xl);
}

.cart-button .cart-icon {
    display: block;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: var(--radius-full);
    min-width: 22px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1600;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-dark);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    z-index: 1700;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    transform: translateX(0);
}

/* Cart Header */
.cart-header {
    background: var(--glass-bg);
    border-bottom: 2px solid var(--glass-border);
    backdrop-filter: blur(15px);
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.cart-header h2 {
    font-family: 'Playfair Display', serif;
    color: var(--text-light);
    font-size: 1.8rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-header .cart-icon {
    font-size: 1.5rem;
}

#cart-count-header {
    color: var(--primary);
    font-size: 1.2rem;
}

.cart-close-btn {
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 2rem;
    cursor: pointer;
    transition: all var(--transition-base);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.cart-close-btn:hover {
    background: var(--glass-bg);
    color: var(--primary);
    transform: rotate(90deg);
}

/* Cart Items Container */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-items::-webkit-scrollbar {
    width: 8px;
}

.cart-items::-webkit-scrollbar-track {
    background: var(--bg-light);
}

.cart-items::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

/* Individual Cart Item */
.cart-item {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    padding: 15px;
    margin-bottom: 15px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-item-content {
    display: flex;
    gap: 15px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    gap: 10px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-light);
    padding: 6px 12px;
    border-radius: var(--radius-full);
}

.qty-btn {
    background: var(--primary);
    color: var(--secondary);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-display {
    font-weight: 600;
    font-size: 1.1rem;
    min-width: 30px;
    text-align: center;
    color: var(--text-light);
}

.cart-item-subtotal {
    font-weight: 700;
    color: var(--text-light);
    font-size: 1.1rem;
}

.btn-remove-item {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-base);
    font-weight: 500;
}

.btn-remove-item:hover {
    background: var(--danger);
    color: white;
}

/* Empty Cart State */
.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-gray);
}

.empty-cart-icon {
    font-size: 5rem;
    opacity: 0.5;
    margin-bottom: 20px;
}

.empty-cart p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-light);
}

.empty-cart small {
    color: var(--text-muted);
}

/* Cart Footer */
.cart-footer {
    background: var(--glass-bg);
    border-top: 2px solid var(--glass-border);
    backdrop-filter: blur(15px);
    padding: 25px;
    flex-shrink: 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-light);
}

.cart-total-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.btn-checkout {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-bottom: 12px;
    box-shadow: var(--shadow-md);
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4), var(--shadow-lg);
}

.btn-checkout:active {
    transform: translateY(0);
}

.btn-clear-cart {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--danger);
    border: 2px solid var(--danger);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: block;
    /* Ensure visibility */
    margin-top: 10px;
    /* Add spacing */
}

.btn-clear-cart:hover {
    background: var(--danger);
    color: white;
}

/* Product Card - Update "Commander" button to "Ajouter au panier" */
.btn-add-to-cart {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--secondary);
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-md);
}

.btn-add-to-cart:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.btn-add-to-cart:active {
    transform: scale(0.98);
}

/* Responsive Design for Cart */
@media (max-width: 768px) {
    .cart-button {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
        /* Reset positioning */
        bottom: auto;
        right: auto;
    }

    .cart-sidebar {
        width: 100vw;
        max-width: 100vw;
    }

    .cart-item-content {
        flex-direction: column;
    }

    .cart-item-image {
        width: 100%;
        height: 150px;
    }

    .cart-item-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-item-quantity {
        justify-content: center;
    }
}

/* ========================================
   Admin Dashboard Button (Floating)
   ======================================== */
.admin-dashboard-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #8B6914 0%, #C19A6B 100%);
    color: #2C1810;
    border: 2px solid rgba(193, 154, 107, 0.5);
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 105, 20, 0.4);
    transition: all 0.3s ease;
    z-index: 1050;
    text-decoration: none;
}

.admin-dashboard-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(193, 154, 107, 0.6);
    background: linear-gradient(135deg, #C19A6B 0%, #D4AF78 100%);
}

.admin-dashboard-btn:active {
    transform: translateY(-2px) scale(1.05);
}

@media (max-width: 768px) {
    .admin-dashboard-btn {
        bottom: 20px;
        left: 20px;
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
}

/* ========================================
   THEME TOGGLE BUTTON
   ======================================== */
.theme-toggle {
    width: 60px;
    height: 60px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Reset fixed positioning */
    position: static;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--glass-bg-light);
    border-color: var(--primary);
}

.theme-toggle:active {
    transform: translateY(0);
}

/* ========================================
   RESPONSIVE FAB LAYOUT (MOBILE)
   ======================================== */
@media (max-width: 768px) {
    .fab-container {
        right: 20px;
        bottom: 20px;
        gap: 12px;
    }

    .theme-toggle,
    .cart-button,
    .social-toggle,
    .back-to-top {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    /* Ensure icons inside scale properly if needed */
    .cart-button .cart-icon,
    .theme-toggle,
    .social-toggle .toggle-icon {
        font-size: 1.3rem;
    }
}

/* Fix Social Icons size on mobile to match other buttons */
.social-float .social-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
}

/* Ensure social float container doesn't have extra width */
.social-float {
    align-items: center;
    width: 50px;
}

/* Operator Access Button */
.operator-btn {
    width: 60px;
    height: 60px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    font-size: 1.5rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    position: relative;
    /* Resets for flex stack */
}

.operator-btn:hover {
    transform: translateY(-2px);
    background: var(--glass-bg-light);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

/* Error Overlay */
.error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.error-content {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
    animation: bounce 1s infinite;
}

.error-content h2 {
    color: var(--danger);
    font-family: 'Playfair Display', serif;
    margin-bottom: 10px;
}

.error-content p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.loading-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    width: 0%;
    height: 100%;
    background: var(--primary);
    animation: fillBar 2s linear forwards;
}

@keyframes fillBar {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 768px) {
    .operator-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* ========================================
   ADMIN DASHBOARD REDESIGN (PLUTO STYLE)
   ======================================== */

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: var(--bg-dark);
    border-right: 2px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 30px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.admin-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.sidebar-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    color: var(--text-gray);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    font-weight: 500;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--glass-bg);
    color: var(--primary);
    border: 1px solid var(--glass-border);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

.sidebar-user {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-weight: bold;
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    background: var(--bg-lighter);
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--text-light);
}

.topbar-actions {
    display: flex;
    gap: 15px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-icon.orange {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.2;
}

.stat-info p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin: 0;
}

/* Chart Section */
.chart-card {
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 30px;
    height: 400px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: none;
    }

    .admin-sidebar.active {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .admin-main {
        margin-left: 0;
        padding: 15px;
    }

    .admin-topbar {
        padding-bottom: 15px;
        margin-bottom: 20px;
    }

    .page-title {
        font-size: 1.4rem;
    }

    .menu-toggle-btn {
        display: block;
        padding: 8px 12px;
        font-size: 1.2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 20px;
    }

    .chart-card {
        height: 300px;
        padding: 15px;
    }

    .admin-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(5px);
        z-index: 999;
        animation: fadeIn 0.3s ease;
    }

    .admin-sidebar.active~.admin-sidebar-overlay {
        display: block;
    }
}

/* Specific overlay style to ensure it works even if not sibling */
.admin-sidebar-overlay.active {
    display: block;
}

/* ========================================
   PUBLIC PAGE REDESIGN (PLUTO STYLE)
   ======================================== */

.public-body {
    background: var(--bg-lighter);
    /* Consistent background */
    margin: 0;
    overflow-x: hidden;
}

/* Ensure sidebar links work for public nav */
.sidebar-menu .category-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    color: var(--text-gray);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
}

.sidebar-menu .category-link:hover,
.sidebar-menu .category-link.active {
    background: var(--glass-bg);
    color: var(--primary);
    border: 1px solid var(--glass-border);
}

.sidebar-menu .category-link i {
    width: 20px;
    text-align: center;
}

/* Search Box in Sidebar (Mobile) */
.sidebar-search-mobile .search-input {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    padding: 10px;
    border-radius: var(--radius-md);
    color: var(--text-light);
}

/* Products Grid Adjustments for Main Content */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Cart Button in Topbar */
#cart-button-top .cart-icon {
    font-size: 1.2rem;
}