/* OkoaMwili Premium Theme */
:root {
    /* Color Palette - Medical Wellness */
    --pm-primary: #0F766E;        /* Deep Teal */
    --pm-primary-rgb: 15, 118, 110;
    --pm-primary-dark: #115E59;
    --pm-primary-light: #14B8A6;
    
    --pm-secondary: #64748B;      /* Cool Slate */
    --pm-secondary-rgb: 100, 116, 139;
    
    --pm-accent: #F43F5E;         /* Vibrant Coral */
    --pm-accent-rgb: 244, 63, 94;
    
    --pm-bg-body: #F0FDFA;        /* Soft Mint Background */
    --pm-bg-card: #FFFFFF;
    
    --pm-text-main: #0F172A;
    --pm-text-muted: #64748B;
    
    /* Gradients */
    --pm-gradient-hero: linear-gradient(135deg, #0F766E 0%, #0D9488 100%);
    --pm-gradient-gold: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    --pm-gradient-glass: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,255,255,0.6));
    
    /* Shadows */
    --pm-shadow-sm: 0 1px 2px rgba(15, 118, 110, 0.05);
    --pm-shadow-md: 0 4px 6px -1px rgba(15, 118, 110, 0.1), 0 2px 4px -1px rgba(15, 118, 110, 0.06);
    --pm-shadow-lg: 0 10px 15px -3px rgba(15, 118, 110, 0.1), 0 4px 6px -2px rgba(15, 118, 110, 0.05);
    --pm-shadow-glow: 0 0 15px rgba(20, 184, 166, 0.3);
    
    /* Border Radius */
    --pm-radius-sm: 0.5rem;
    --pm-radius-md: 0.75rem;
    --pm-radius-lg: 1rem;
    --pm-radius-pill: 9999px;
    
    /* Typography */
    --pm-font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Dark Mode Overrides */
[data-bs-theme="dark"] body {
    background-color: var(--pm-bg-body) !important;
    color: var(--pm-text-main);
}

[data-bs-theme="dark"] {
    /* Reassign Variables for Dark Mode */
    --pm-bg-body: #0F172A;        /* Slate 900 */
    --pm-bg-card: #1E293B;        /* Slate 800 */
    
    --pm-text-main: #F8FAFC;      /* Slate 50 */
    --pm-text-muted: #94A3B8;     /* Slate 400 */
    
    --pm-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --pm-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --pm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    
    --pm-gradient-glass: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(30, 41, 59, 0.6));
}

/* Force dark backgrounds on glass cards */
[data-bs-theme="dark"] .glass-card {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

[data-bs-theme="dark"] .glass-card:hover {
    background: rgba(30, 41, 59, 0.95) !important;
    border-color: var(--pm-primary);
}

/* Fix Header */
[data-bs-theme="dark"] .public-header {
    background: rgba(15, 23, 42, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Fix Product Cards */
[data-bs-theme="dark"] .product-card-premium {
    background-color: var(--pm-bg-card) !important;
    border: 1px solid rgba(255,255,255,0.05);
}

[data-bs-theme="dark"] .section-title-premium {
    color: var(--pm-text-main);
}

[data-bs-theme="dark"] .product-img-frame {
    background: #020617; /* Very dark slate for image backgrounds */
}

/* Fix Form Inputs and Selects that usually have bg-light */
[data-bs-theme="dark"] .form-control, 
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-group-text,
[data-bs-theme="dark"] .bg-light {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--pm-text-main) !important;
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

[data-bs-theme="dark"] .text-muted {
    color: var(--pm-text-muted) !important;
}

[data-bs-theme="dark"] .badge-float {
    background: rgba(30, 41, 59, 0.9);
    color: white;
}

/* Fix Sort Dropdown Options */
[data-bs-theme="dark"] option {
    background-color: var(--pm-bg-card);
    color: var(--pm-text-main);
}

body {
    font-family: var(--pm-font-family);
    background-color: var(--pm-bg-body);
    color: var(--pm-text-main);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--pm-font-family);
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--pm-text-main);
}

/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--pm-shadow-md);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pm-shadow-lg);
    border-color: rgba(20, 184, 166, 0.3);
}

/* Component: Buttons */
.btn-premium {
    background: var(--pm-primary);
    color: white;
    border: none;
    border-radius: var(--pm-radius-pill);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--pm-shadow-md);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn-premium:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--pm-shadow-glow);
}

.btn-premium:hover::before {
    width: 100%;
}

.btn-premium-outline {
    background: transparent;
    border: 2px solid var(--pm-primary);
    color: var(--pm-primary);
    border-radius: var(--pm-radius-pill);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-premium-outline:hover {
    background: var(--pm-primary-light);
    border-color: var(--pm-primary-light);
    color: white;
}

/* Component: Headers */
.public-header {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(15, 118, 110, 0.08) !important;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .public-header {
    background: rgba(15, 23, 42, 0.85) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.public-header.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: var(--pm-shadow-sm);
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Nav Links */
.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--pm-text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: var(--pm-radius-pill);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--pm-primary);
    background: rgba(15, 118, 110, 0.08);
}

.navbar-nav .nav-link.active {
    color: var(--pm-primary);
    background: rgba(15, 118, 110, 0.1);
    font-weight: 600;
}

/* Dropdowns */
.dropdown-menu {
    border: none;
    border-radius: var(--pm-radius-lg);
    box-shadow: var(--pm-shadow-lg);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.5rem;
    margin-top: 10px;
    animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-bs-theme="dark"] .dropdown-menu {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-item {
    border-radius: var(--pm-radius-sm);
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: var(--pm-text-muted);
    transition: all 0.2s;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(15, 118, 110, 0.08);
    color: var(--pm-primary);
}

.dropdown-item i {
    opacity: 0.7;
    transition: transform 0.2s;
}

.dropdown-item:hover i {
    opacity: 1;
    transform: translateX(2px);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product Cards */
.product-card-premium {
    background: var(--pm-bg-card);
    border-radius: var(--pm-radius-lg);
    border: 1px solid transparent; /* Invisible border initially */
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
}

.product-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: var(--pm-shadow-lg);
    border-color: rgba(20, 184, 166, 0.2);
}

.product-img-frame {
    position: relative;
    height: 260px;
    background: #f8fafc;
    overflow: hidden;
}

.product-img-frame img {
    transition: transform 0.5s ease;
}

.product-card-premium:hover .product-img-frame img {
    transform: scale(1.08); /* Gentle zoom */
}

.badge-float {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 0.35rem 0.85rem;
    border-radius: var(--pm-radius-pill);
    background: rgba(255, 255, 255, 0.95);
    color: var(--pm-text-main);
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--pm-shadow-sm);
    z-index: 2;
}

.quick-add-slide {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
}

.product-card-premium:hover .quick-add-slide {
    transform: translateY(0);
}

/* Section Titles */
.section-title-premium {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--pm-text-main); /* Changed from gradient text for better readability on light bg */
    display: inline-block;
    position: relative;
    letter-spacing: -0.03em;
}

/* Premium Hero Section */
.hero-premium {
    background: var(--pm-gradient-hero);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 40px 40px;
    margin-bottom: 40px;
}

.hero-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: rotate 20s linear infinite;
}

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

.hero-premium .container {
    position: relative;
    z-index: 2;
}

.hero-premium h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero-premium .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Sidebar Refinements */
.sticky-top {
    top: 100px;
    z-index: 100; /* Lower z-index so it doesn't overlap notifications */
}

.letter-spacing-2 {
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Card Badge Updates */
.badge-float {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
