
/* ===============================================
   DARK MODE STYLES
   =============================================== */

/* Base dark mode colors */
.dark {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
}

/* Body and main backgrounds */
.dark body,
.dark .min-h-screen {
    background-color: #0f172a !important;
    color: #f1f5f9;
}

.dark .bg-gray-50,
.dark .bg-gray-100 {
    background-color: #1e293b !important;
}

.dark .bg-white {
    background-color: #1e293b !important;
}

/* Text colors */
.dark .text-gray-900,
.dark .text-gray-800 {
    color: #f1f5f9 !important;
}

.dark .text-gray-700,
.dark .text-gray-600 {
    color: #cbd5e1 !important;
}

.dark .text-gray-500,
.dark .text-gray-400 {
    color: #94a3b8 !important;
}

/* Borders */
.dark .border-gray-100,
.dark .border-gray-200,
.dark .border-gray-300 {
    border-color: #334155 !important;
}

/* Header */
.dark header,
.dark .site-header {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

.dark header.bg-white {
    background-color: #1e293b !important;
}

/* Cards and Containers */
.dark .product-card,
.dark .rounded-xl.bg-white,
.dark .rounded-lg.bg-white {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

.dark .product-card:hover {
    background-color: #334155 !important;
}

/* Shadows in dark mode */
.dark .shadow,
.dark .shadow-sm,
.dark .shadow-md,
.dark .shadow-lg,
.dark .shadow-xl {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2) !important;
}

/* Input fields */
.dark input,
.dark textarea,
.dark select {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: #94a3b8 !important;
}

.dark input:focus,
.dark textarea:focus,
.dark select:focus {
    border-color: #3b82f6 !important;
    background-color: #334155 !important;
}

/* Buttons */
.dark .bg-gray-100:hover,
.dark .hover\:bg-gray-100:hover {
    background-color: #334155 !important;
}

.dark .bg-gray-50:hover,
.dark .hover\:bg-gray-50:hover {
    background-color: #334155 !important;
}

/* Dropdowns and Menus */
.dark .dropdown-menu,
.dark [class*="absolute"][class*="bg-white"] {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

/* Footer */
.dark footer {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

/* Announcement Bar - keep colorful */
.dark .bg-blue-600 {
    background-color: #1d4ed8 !important;
}

/* Links */
.dark a:not([class*="text-"]):not([class*="bg-"]) {
    color: #93c5fd;
}

.dark a:not([class*="text-"]):not([class*="bg-"]):hover {
    color: #bfdbfe;
}

/* Dividers */
.dark hr,
.dark .divide-gray-100 > *,
.dark .divide-gray-200 > * {
    border-color: #334155 !important;
}

/* Modal/Overlay backgrounds */
.dark .bg-black\/50,
.dark .bg-black\/40 {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

/* Scrollbar */
.dark ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Toast/Notifications - keep original colors */
.dark .bg-green-600,
.dark .bg-red-600,
.dark .bg-blue-600,
.dark .bg-yellow-600 {
    /* Keep original colors for toasts */
}

/* Price tags */
.dark .text-green-600 {
    color: #4ade80 !important;
}

.dark .text-red-600,
.dark .text-red-500 {
    color: #f87171 !important;
}

/* Rating stars */
.dark .text-yellow-400,
.dark .text-yellow-500 {
    color: #fbbf24 !important;
}

/* Badge colors - keep vibrant */
.dark .bg-green-100 {
    background-color: rgba(34, 197, 94, 0.2) !important;
}

.dark .bg-red-100 {
    background-color: rgba(239, 68, 68, 0.2) !important;
}

.dark .bg-blue-100 {
    background-color: rgba(59, 130, 246, 0.2) !important;
}

/* Categories/Tags */
.dark .bg-gray-200 {
    background-color: #334155 !important;
}

/* Hover states for cards */
.dark .group:hover .group-hover\:text-blue-600 {
    color: #60a5fa !important;
}

/* Images - slight brightness adjustment */
.dark img:not([class*="logo"]) {
    filter: brightness(0.95);
}

/* Line-through prices */
.dark .line-through {
    color: #64748b !important;
}

/* Skeleton loading */
.dark .animate-pulse {
    background-color: #334155 !important;
}

/* Mobile menu */
.dark .mobile-menu,
.dark [class*="fixed"][class*="inset-0"][class*="bg-white"] {
    background-color: #1e293b !important;
}

/* Cart sidebar */
.dark .cart-sidebar {
    background-color: #1e293b !important;
}

/* Search dropdown */
.dark #search-container .absolute {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

/* Tabs */
.dark [role="tablist"] {
    background-color: #1e293b !important;
}

.dark [role="tab"] {
    color: #94a3b8 !important;
}

.dark [role="tab"][aria-selected="true"] {
    color: #f1f5f9 !important;
    border-color: var(--theme-primary) !important;
}

/* Smooth transition for dark mode */
body,
.bg-white,
.bg-gray-50,
.bg-gray-100,
header,
footer,
.product-card,
input,
textarea,
select {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
