/* assets/css/advanced.css */
/* Global Status Dropdown Visibility Fix */
select option {
    color: #1a202c !important; /* text-gray-900 */
    background-color: #ffffff !important;
}

/* Glass Select - Fixes native dropdown invisibility */
.glass-select {
    background-color: rgba(255, 255, 255, 0.4) !important;
    color: var(--text-main) !important;
    color-scheme: light !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.glass-select option {
    background-color: white !important;
    color: #1a202c !important;
}

/* When focused, we turn the select solid to ensure browser native menus pick up the right contrast */
.glass-select:focus {
    background-color: white !important;
    color: #1a202c !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2) !important;
}

/* Force Light Picker for Native Elements if needed */
select {
    color-scheme: light !important;
}

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --secondary: #1e293b;
    --accent: #fbbf24;
    --bg-surface: #ffffff;
    --bg-body: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #f1f5f9;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    --bg-surface: #1e293b;
    --bg-body: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3);
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-white { background-color: var(--bg-surface) !important; }
.bg-gray-50 { background-color: var(--bg-body) !important; }
.text-secondary { color: var(--text-main) !important; }
.text-gray-500, .text-gray-400 { color: var(--text-muted) !important; }
.border-gray-100, .border-gray-50 { border-color: var(--border-color) !important; }

/* Advanced Glassmorphism */
header.sticky, .sticky-nav {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid var(--glass-border) !important;
}

/* 3D Premium Card Hover (Using Perspective) */
.product-card, .scroll-card {
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    perspective: 1000px;
}

.product-card:hover {
    transform: translateY(-8px) rotateX(2deg) rotateY(1deg);
    box-shadow: var(--card-shadow);
}

/* Theme Toggle Button Styling */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--border-color);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .theme-toggle-btn svg {
    transform: rotate(360deg);
}

/* Skeleton Loading Animation */
@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-body) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    border-radius: 12px;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px; /* Moved to right to avoid sidebar conflict */
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000; /* Higher z-index to stay above other elements */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

.whatsapp-float::after {
    content: "Chat with us";
    position: absolute;
    left: 70px;
    background: #1e293b;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.whatsapp-float:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.whatsapp-pulse {
    animation: whatsapp-pulse 2s infinite;
}

@keyframes whatsapp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
}

/* Premium Hero Animations */
.hero-content-fade-up {
    animation: hero-fade-up 1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0;
}

@keyframes hero-fade-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.swiper-pagination-bullet-active {
    background: var(--primary) !important;
    width: 24px !important;
    border-radius: 4px !important;
}

/* ── Ordering Unit Selection UI ────────────────────────────────── */
.unit-selector:checked + label {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: white !important;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.2) !important;
}

.unit-selector:checked + label .rounded-full {
    opacity: 1 !important;
    transform: scale(1.2);
    background-color: white !important;
}

.unit-selector + label {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.unit-selector + label .rounded-full {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
