/* Modern Spring Theme (Glassmorphism & Organic) */

:root {
    --spring-bg-gradient: radial-gradient(at 0% 0%, hsla(88,38%,92%,1) 0, transparent 50%), 
                          radial-gradient(at 50% 0%, hsla(47,89%,94%,1) 0, transparent 50%), 
                          radial-gradient(at 100% 0%, hsla(168,46%,90%,1) 0, transparent 50%);
    --spring-primary: #7cb342; /* Fresh Green */
    --spring-primary-dark: #558b2f;
    --spring-text: #3e2723;
    --spring-card-bg: rgba(255, 255, 255, 0.85); /* Increased opacity for better visibility */
    --spring-glass-border: 1px solid rgba(255, 255, 255, 0.6);
    --spring-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --spring-radius: 16px;
    --spring-btn-radius: 50px; /* Pill shape */
}

body {
    background-color: #fcfdfa;
    background-image: var(--spring-bg-gradient);
    background-attachment: fixed;
    background-size: cover;
    color: var(--spring-text);
}

/* Glassmorphism Header */
.main-nav {
    background: rgba(62, 39, 35, 0.9) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cards with Soft Lift & Glass Effect */
.product-card, .card, .profile-card, .auth-container, .cart-item, .order-card {
    background: var(--spring-card-bg) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: var(--spring-glass-border) !important;
    box-shadow: var(--spring-shadow) !important;
    border-radius: var(--spring-radius) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    
    /* CRITICAL FIXES FOR VISIBILITY */
    display: flex; /* Removed !important to allow JS toggling (search filter) */
    flex-direction: column !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 380px !important;
    position: relative !important;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.15) !important;
}

/* Ensure Product Card Content Visibility */
.product-card h3 {
    color: #3e2723 !important; /* Force dark coffee color */
    font-size: 1.3rem !important;
    margin: 10px 0 !important;
    padding: 0 10px !important;
    position: relative !important;
    z-index: 100 !important;
    font-weight: 800 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-align: center !important;
    flex-shrink: 0 !important;
}

.product-card p {
    color: #5d4037 !important;
    position: relative;
    z-index: 100;
    padding: 0 10px;
    display: block !important;
    text-align: center !important; /* Center description/category */
}

.product-card .add-btn-container {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important; /* Changed to flex for better centering */
    justify-content: center !important; /* Center the button */
    position: relative !important;
    z-index: 100 !important;
    width: 100%;
    margin-top: 10px;
}

.product-card .product-actions {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 15px !important;
    width: 100% !important;
    margin-top: auto !important; /* Push to bottom */
    position: relative !important;
    z-index: 100 !important;
    background: transparent !important;
    box-sizing: border-box !important; /* Ensure padding doesn't affect width */
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.product-price {
    color: #3e2723 !important;
    font-weight: bold !important;
    font-size: 1.2rem !important;
    display: block !important;
    margin-bottom: 10px !important;
    text-align: center !important; /* Ensure text is centered */
    width: 100% !important;
}

/* Volume Selector Visibility */
.volume-selector {
    display: flex !important;
    justify-content: center !important;
    gap: 5px !important;
    margin-bottom: 15px !important;
    width: 100% !important;
    position: relative !important;
    z-index: 100 !important;
}

/* Modern Pill Buttons */
.add-btn, .hero-btn, .btn-primary, .btn-checkout, .btn-modal-save, .admin-btn {
    border-radius: var(--spring-btn-radius) !important;
    background-image: linear-gradient(135deg, #5d4037 0%, #3e2723 100%) !important; /* Coffee Gradient */
    box-shadow: 0 4px 15px rgba(62, 39, 35, 0.3) !important;
    border: none !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    color: white !important;
    padding: 10px 20px !important;
    cursor: pointer !important;
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.add-btn:hover, .hero-btn:hover, .btn-primary:hover, .btn-checkout:hover, .admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(62, 39, 35, 0.4) !important;
    filter: brightness(1.1);
}

/* Generic Action Button (keeps original colors but adds shape) */
.btn-action {
    border-radius: var(--spring-btn-radius) !important;
    border: none !important;
    font-weight: 600 !important;
    color: white !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2) !important;
    filter: brightness(1.1);
}

/* Specific Admin Button Colors with Gradient */
.admin-btn.btn-warning {
    background-image: linear-gradient(135deg, #FFB74D 0%, #FF9800 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3) !important;
}

.admin-btn.btn-info {
    background-image: linear-gradient(135deg, #64B5F6 0%, #2196F3 100%) !important;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3) !important;
}

.admin-btn.btn-success {
    background-image: linear-gradient(135deg, #5d4037 0%, #3e2723 100%) !important;
}

/* Custom Admin Colors Override (Menu, Library, Payment, Telegram, Reports) */
a[href="admin_menu.php"].admin-btn {
    background-image: linear-gradient(135deg, #9575CD 0%, #673AB7 100%) !important;
    box-shadow: 0 4px 15px rgba(103, 58, 183, 0.3) !important;
}

a[href="admin_library.php"].admin-btn {
    background-image: linear-gradient(135deg, #A1887F 0%, #795548 100%) !important;
    box-shadow: 0 4px 15px rgba(121, 85, 72, 0.3) !important;
}

a[href="admin_reports.php"].admin-btn {
    background-image: linear-gradient(135deg, #90A4AE 0%, #607D8B 100%) !important;
    box-shadow: 0 4px 15px rgba(96, 125, 139, 0.3) !important;
}

/* Theme Selector Fix for Spring Theme */
.theme-selector select.admin-btn {
    background-color: var(--spring-primary-dark) !important;
    color: white !important;
    border-color: var(--spring-primary) !important;
    background-image: none !important;
}

.theme-selector select.admin-btn option {
    color: var(--spring-text) !important;
    background-color: var(--spring-card-bg) !important;
}

a[href="admin_payment.php"].admin-btn {
    background-image: linear-gradient(135deg, #F06292 0%, #E91E63 100%) !important;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3) !important;
}

a[href="admin_telegram.php"].admin-btn {
    background-image: linear-gradient(135deg, #4FC3F7 0%, #039BE5 100%) !important;
    box-shadow: 0 4px 15px rgba(3, 155, 229, 0.3) !important;
}

/* Quantity Controls - Pill Shape */
.quantity-controls {
    border-radius: var(--spring-btn-radius) !important;
    background: #5d4037 !important; /* Keep brown for contrast */
    padding: 4px 8px !important;
}

/* Hero Section Refined */
.hero-section {
    background: transparent !important; /* Let the mesh gradient show */
    padding: 100px 20px 60px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.hero-section h1 {
    font-size: 3.5rem !important;
    font-weight: 800 !important;
    color: #3e2723 !important; /* Fallback color */
    background: none !important; /* Remove gradient background that clips emoji */
    -webkit-text-fill-color: initial !important; /* Restore emoji colors */
    text-shadow: none !important; 
    margin-bottom: 20px !important;
    letter-spacing: -1px;
}

.hero-section p {
    color: #5d4037 !important;
    font-size: 1.3rem !important;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.hero-btn {
    padding: 18px 40px !important;
    font-size: 1.2rem !important;
    box-shadow: 0 10px 30px rgba(102, 187, 106, 0.4) !important;
}

.hero-location-info {
    margin-top: 60px !important;
    padding: 30px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    max-width: 500px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.hero-location-info h3 {
    color: #3e2723;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.hero-location-info p {
    color: #5d4037 !important;
    font-size: 1rem !important;
    margin-bottom: 8px;
}

/* Floating Action Button (FAB) */
.fab-cart {
    background: linear-gradient(135deg, #ffca28, #ffb300) !important; /* Sunny Yellow */
    box-shadow: 0 8px 25px rgba(255, 179, 0, 0.4) !important;
    backdrop-filter: blur(4px);
}

/* Inputs Modernized */
.form-control, input[type="text"], input[type="password"], input[type="tel"], textarea, select {
    border-radius: 12px !important;
}
