/* ========================================
   PHARMACIE DE L'EXTRÊME-NORD - STYLES
   Version mise à jour avec Upload Images
   ======================================== */

/* ========== VARIABLES ========== */
:root {
    --blue-primary: #0D47A1;
    --blue-light: #1976D2;
    --blue-dark: #0A3A80;
    --green-accent: #4CAF50;
    --green-light: #81C784;
    --teal-accent: #00897B;
    --cream: #F8FAFC;
    --blue-cream: #E3F2FD;
    --gray-soft: #E2E8F0;
    --white: #FFFFFF;
}

/* ========== BASE ========== */
* { box-sizing: border-box; }
body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--cream);
    margin: 0;
    padding: 0;
}
h1, h2, h3, h4 { 
    font-family: 'Poppins', sans-serif; 
    font-weight: 700; 
}

/* ========== LOGO ========== */
.logo-text { 
    font-family: 'Poppins', sans-serif; 
    font-weight: 800;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.logo-pharma { 
    background: linear-gradient(180deg, #1976D2 0%, #0D47A1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo-sahel {
    color: var(--green-accent);
    font-size: 0.85em;
}

/* ========== UTILITY CLASSES ========== */
.bg-blue-primary { background-color: var(--blue-primary); }
.bg-blue-light { background-color: var(--blue-light); }
.bg-blue-dark { background-color: var(--blue-dark); }
.bg-green-accent { background-color: var(--green-accent); }
.bg-cream { background-color: var(--cream); }
.bg-blue-cream { background-color: var(--blue-cream); }
.text-blue-primary { color: var(--blue-primary); }
.text-green-accent { color: var(--green-accent); }

.gradient-hero { 
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-primary) 50%, var(--blue-light) 100%); 
    position: relative;
    overflow: hidden;
}

/* ========== HERO SECTION ========== */
.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}
.hero-shape-1 { width: 300px; height: 300px; background: var(--green-accent); top: -100px; right: -50px; }
.hero-shape-2 { width: 200px; height: 200px; background: white; bottom: -50px; left: 10%; animation-delay: 2s; }
.hero-shape-3 { width: 150px; height: 150px; background: var(--green-accent); top: 50%; left: -50px; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease-out forwards;
}
.hero-title-delay { animation-delay: 0.2s; }
.hero-subtitle { animation-delay: 0.4s; }
.hero-buttons { animation-delay: 0.6s; }
.hero-stats { animation-delay: 0.8s; }

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

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}
.stat-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.floating-badge { animation: bounce 2s ease-in-out infinite; }
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.btn-shine {
    position: relative;
    overflow: hidden;
}
.btn-shine::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    transform: rotate(30deg);
    animation: shine 3s infinite;
}
@keyframes shine {
    0% { left: -50%; }
    100% { left: 150%; }
}

/* ========== NAVBAR ========== */
#navbar { transition: all 0.3s ease; }
#navbar .nav-inner { height: 64px; transition: all 0.3s ease; }
#navbar .logo-icon { width: 48px; height: 48px; transition: all 0.3s ease; }
#navbar .logo-icon i { font-size: 24px; transition: all 0.3s ease; }
#navbar .logo-text-size { font-size: 1.25rem; transition: all 0.3s ease; }

#navbar.shrink { box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
#navbar.shrink .nav-inner { height: 52px; }
#navbar.shrink .logo-icon { width: 38px; height: 38px; }
#navbar.shrink .logo-icon i { font-size: 18px; }
#navbar.shrink .logo-text-size { font-size: 1.1rem; }

@media (min-width: 1024px) {
    #navbar .nav-inner { height: 80px; }
    #navbar .logo-icon { width: 56px; height: 56px; }
    #navbar .logo-icon i { font-size: 28px; }
    #navbar .logo-text-size { font-size: 1.5rem; }
    #navbar.shrink .nav-inner { height: 60px; }
    #navbar.shrink .logo-icon { width: 42px; height: 42px; }
    #navbar.shrink .logo-icon i { font-size: 20px; }
    #navbar.shrink .logo-text-size { font-size: 1.2rem; }
}

/* ========== PRODUCT CARDS ========== */
.product-card {
    position: relative;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(13, 71, 161, 0.2);
}

.product-img-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f1f5f9;
}
.product-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.3s ease;
}
.product-card:hover .product-img-container img { transform: scale(1.1); }

/* Skeleton Loading */
.skeleton-loader {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    z-index: 5;
}
.skeleton-loader.loaded { opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.product-img-container img.loading { opacity: 0; }
.product-img-container img.loaded { opacity: 1; }

.product-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 71, 161, 0.9) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
}
.product-card:hover .product-overlay { opacity: 1; }

.overlay-actions {
    display: flex;
    gap: 10px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease 0.1s;
}
.product-card:hover .overlay-actions { transform: translateY(0); opacity: 1; }

.overlay-btn {
    width: 45px; height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}
.overlay-btn:hover { transform: scale(1.15); }
.overlay-btn-cart { background: var(--green-accent); color: white; }
.overlay-btn-view { background: white; color: var(--blue-primary); }
.overlay-btn-wa { background: #25D366; color: white; }

/* Wishlist Button */
.wishlist-btn {
    position: absolute;
    top: 12px; right: 12px;
    width: 36px; height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transition: all 0.3s;
    z-index: 10;
    border: none;
    color: #cbd5e1;
}
.wishlist-btn:hover { transform: scale(1.1); color: #f43f5e; }
.wishlist-btn.active { background: #f43f5e; color: white; }

/* Product Badges */
.product-badges {
    position: absolute;
    top: 12px; left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.badge-promo {
    background: linear-gradient(135deg, #f43f5e, #fb7185);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
    animation: badge-pulse 2s ease-in-out infinite;
}

.badge-new {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.badge-bestseller {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.badge-outofstock {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    animation: badge-pulse 1.5s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Star Rating */
.star-rating { display: inline-flex; align-items: center; gap: 2px; }
.star-rating .star { color: #fbbf24; font-size: 12px; }
.star-rating .star.empty { color: #e2e8f0; }
.star-rating .rating-count { font-size: 11px; color: #94a3b8; margin-left: 4px; }

.star-rating-lg { gap: 3px; }
.star-rating-lg .star { font-size: 18px; }
.star-rating-lg .rating-count { font-size: 14px; margin-left: 8px; }

/* Stock Indicators */
.stock-indicator { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.stock-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: stockPulse 2s infinite; }
.stock-dot-red { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: stockPulse 1s infinite; }
.stock-dot-orange { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; animation: stockPulse 1.5s infinite; }

@keyframes stockPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Out of Stock */
.out-of-stock-card { position: relative; }
.out-of-stock-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    border-radius: 20px;
    z-index: 1;
}
.grayscale-img { filter: grayscale(60%) opacity(0.8); }
.out-of-stock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8;
}
.out-of-stock-overlay span {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== BUTTONS ========== */
.btn-primary { 
    background-color: var(--blue-primary); 
    color: white; 
    font-family: 'Poppins', sans-serif; 
    font-weight: 600; 
    transition: all 0.3s; 
    border: none;
    cursor: pointer;
}
.btn-primary:hover { background-color: var(--blue-light); transform: translateY(-2px); }

.btn-accent { 
    background-color: var(--green-accent); 
    color: white; 
    font-family: 'Poppins', sans-serif; 
    font-weight: 600; 
    transition: all 0.3s; 
    border: none;
    cursor: pointer;
}
.btn-accent:hover { background-color: #43a047; }

.whatsapp-btn { background: linear-gradient(135deg, #25D366, #128C7E); }
.whatsapp-btn:hover { background: linear-gradient(135deg, #22c55e, #0f766e); transform: scale(1.02); }

.consultation-btn {
    background: linear-gradient(135deg, var(--teal-accent), #00695C);
    color: white;
    transition: all 0.3s;
}
.consultation-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 137, 123, 0.3);
}

.btn-lift { transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.btn-lift:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); }

/* ========== NAVIGATION ========== */
.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    color: #475569;
    transition: all 0.3s ease;
    text-decoration: none;
}
.nav-link:hover { color: var(--blue-primary); background: var(--blue-cream); }
.nav-link.active { color: var(--blue-primary); background: var(--blue-cream); }

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #374151;
}
.mobile-nav-link:hover { background: var(--blue-cream); }
.mobile-nav-link i { width: 20px; text-align: center; color: var(--blue-primary); }

/* Cart Badge */
.cart-badge { 
    position: absolute; 
    top: -8px; right: -8px; 
    background: var(--green-accent); 
    color: white; 
    font-size: 11px; 
    font-weight: 700; 
    min-width: 20px; height: 20px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.mini-cart { 
    position: absolute; 
    top: 100%; right: 0; 
    width: 320px; 
    background: white; 
    border-radius: 16px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.2); 
    z-index: 100; 
}

/* ========== SEARCH ========== */
.search-input {
    width: 100%;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    padding: 14px 50px 14px 48px;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}
.search-input:focus { border-color: var(--blue-primary); box-shadow: 0 8px 25px rgba(13, 71, 161, 0.15); }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
}

/* ========== TOP BAR ========== */
.top-bar {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-primary) 100%);
    transition: transform 0.3s ease;
}
.top-bar.hidden { transform: translateY(-100%); }

.promo-carousel { display: flex; align-items: center; justify-content: center; height: 24px; overflow: hidden; }
.promo-messages { display: flex; flex-direction: column; animation: promoSlide 12s infinite; }
.promo-message { height: 24px; display: flex; align-items: center; justify-content: center; white-space: nowrap; }
@keyframes promoSlide {
    0%, 30% { transform: translateY(0); }
    33%, 63% { transform: translateY(-24px); }
    66%, 96% { transform: translateY(-48px); }
    100% { transform: translateY(0); }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}
.fade-in { animation: fadeIn 0.4s ease-out; }

.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

.stagger-container .stagger-item { opacity: 0; transform: translateY(30px); transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.stagger-container.active .stagger-item { opacity: 1; transform: translateY(0); }
.stagger-container.active .stagger-item:nth-child(1) { transition-delay: 0.1s; }
.stagger-container.active .stagger-item:nth-child(2) { transition-delay: 0.2s; }
.stagger-container.active .stagger-item:nth-child(3) { transition-delay: 0.3s; }
.stagger-container.active .stagger-item:nth-child(4) { transition-delay: 0.4s; }
.stagger-container.active .stagger-item:nth-child(5) { transition-delay: 0.5s; }
.stagger-container.active .stagger-item:nth-child(6) { transition-delay: 0.6s; }

/* Loader */
.loader { 
    border: 4px solid var(--gray-soft); 
    border-top-color: var(--blue-primary); 
    border-radius: 50%; 
    width: 50px; height: 50px; 
    animation: spin 1s linear infinite; 
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--blue-light); border-radius: 4px; }

/* Line Clamp */
.line-clamp-2 { 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}

/* ========== FORMS ========== */
.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
    font-family: 'Inter', sans-serif;
}
.form-input:focus { border-color: var(--teal-accent); box-shadow: 0 0 0 4px rgba(0, 137, 123, 0.1); }

.form-label { display: block; font-weight: 600; color: #374151; margin-bottom: 8px; font-size: 14px; }

.urgency-option {
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}
.urgency-option:hover { border-color: var(--teal-accent); }
.urgency-option.selected { border-color: var(--teal-accent); background: rgba(0, 137, 123, 0.1); }

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-overlay.active .modal-content { transform: scale(1) translateY(0); opacity: 1; }

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--blue-primary), var(--blue-light));
    color: white;
}
.modal-header h3 { font-size: 1.25rem; font-weight: 700; margin: 0; }

.modal-close {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.3); transform: rotate(90deg); }

.modal-body { padding: 1.5rem; overflow-y: auto; max-height: calc(90vh - 140px); }

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: #f8fafc;
}

/* Form Grid */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-full { grid-column: 1 / -1; }
.form-group { margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }

/* Toggle Switch */
.toggle-switch { position: relative; width: 50px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 26px;
    transition: 0.3s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--green-accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(24px); }

/* Badge Checkbox */
.badge-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.badge-checkbox:hover { border-color: var(--blue-light); }
.badge-checkbox.checked { border-color: var(--blue-primary); background: var(--blue-cream); }
.badge-checkbox input { display: none; }

/* Confirm Modal */
.modal-confirm .modal-content { max-width: 400px; text-align: center; }
.modal-confirm .modal-body { padding: 2rem; }
.confirm-icon { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; }
.confirm-icon.delete { background: #fee2e2; color: #ef4444; }
.confirm-title { font-size: 1.25rem; font-weight: 700; color: #1e293b; margin-bottom: 0.5rem; }
.confirm-message { color: #64748b; margin-bottom: 1.5rem; }
.confirm-buttons { display: flex; gap: 0.75rem; justify-content: center; }

/* ========== IMAGE UPLOAD ========== */
.image-tab {
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.image-tab.active {
    border-bottom-color: var(--blue-primary);
    color: var(--blue-primary);
}

.upload-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 16px;
    background: #f9fafb;
    transition: all 0.3s;
    cursor: pointer;
}
.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--blue-primary);
    background: var(--blue-cream);
}
.upload-dropzone.dragover {
    transform: scale(1.02);
}

.image-preview {
    width: 100%;
    height: 150px;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    overflow: hidden;
    color: #94a3b8;
    gap: 0.5rem;
}
.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.image-preview.empty {
    flex-direction: column;
}
.image-preview:not(.empty) {
    border-style: solid;
    border-color: var(--green-accent);
}

.image-error {
    border-color: #ef4444 !important;
}

/* ========== ADMIN ========== */
.admin-tabs {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 24px;
}
.admin-tab {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    border: none;
    background: transparent;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.admin-tab:hover { color: #1e293b; background: white; }
.admin-tab.active { background: white; color: var(--blue-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.admin-tab .badge-count {
    background: #ef4444;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.admin-table th {
    text-align: left;
    padding: 12px 16px;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
}
.admin-table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; }

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}
.admin-search { flex: 1; min-width: 200px; max-width: 300px; position: relative; }
.admin-search input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
}
.admin-search input:focus { outline: none; border-color: var(--blue-primary); }
.admin-search i { position: absolute; left: 0.875rem; top: 50%; transform: translateY(-50%); color: #94a3b8; }

/* Action Buttons */
.btn-action {
    width: 36px; height: 36px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.btn-action:hover { transform: scale(1.1); }
.btn-action-edit { background: #dbeafe; color: #2563eb; }
.btn-action-edit:hover { background: #2563eb; color: white; }
.btn-action-delete { background: #fee2e2; color: #ef4444; }
.btn-action-delete:hover { background: #ef4444; color: white; }
.btn-action-duplicate { background: #f3e8ff; color: #9333ea; }
.btn-action-duplicate:hover { background: #9333ea; color: white; }
.btn-action-stock { background: #d1fae5; color: #059669; }
.btn-action-stock:hover { background: #059669; color: white; }

/* Status Toggle */
.status-toggle { cursor: pointer; }
.status-toggle:hover { opacity: 0.8; }

/* Firebase Status */
.firebase-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.firebase-status.connected { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.firebase-status.disconnected { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
.firebase-status.connecting { background: rgba(251, 191, 36, 0.15); color: #d97706; }
.firebase-status .status-dot { width: 8px; height: 8px; border-radius: 50%; animation: pulse 2s infinite; }
.firebase-status.connected .status-dot { background: #22c55e; }
.firebase-status.disconnected .status-dot { background: #ef4444; }
.firebase-status.connecting .status-dot { background: #fbbf24; animation: blink 0.5s infinite; }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Sync Indicator */
.sync-indicator { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #64748b; }
.sync-indicator.syncing { color: #d97706; }
.sync-indicator.synced { color: #16a34a; }
.sync-indicator.syncing i { animation: spin 1s linear infinite; }

.firebase-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Monaco', 'Consolas', monospace;
    transition: all 0.2s;
}
.firebase-input:focus { outline: none; border-color: var(--blue-primary); box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1); }

/* ========== CONSULTATIONS ========== */
.consultation-card-admin {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid #e2e8f0;
    transition: all 0.3s ease;
}
.consultation-card-admin:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.1); transform: translateY(-2px); }
.consultation-card-admin.urgency-normal { border-left-color: #3b82f6; }
.consultation-card-admin.urgency-urgent { border-left-color: #f59e0b; }
.consultation-card-admin.urgency-tres-urgent { border-left-color: #ef4444; animation: urgentPulse 2s ease-in-out infinite; }

@keyframes urgentPulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1); }
    50% { box-shadow: 0 2px 20px rgba(239, 68, 68, 0.3); }
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.status-badge:hover { transform: scale(1.05); }
.status-pending { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }
.status-in-progress { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1e40af; }
.status-completed { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #065f46; }
.status-archived { background: linear-gradient(135deg, #f3f4f6, #e5e7eb); color: #6b7280; }

/* Status Dropdown */
.status-dropdown {
    position: absolute;
    top: 100%; left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 8px;
    z-index: 50;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}
.status-dropdown.show { opacity: 1; visibility: visible; transform: translateY(5px); }
.status-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
}
.status-dropdown-item:hover { background: #f3f4f6; }

/* Urgency Badges */
.urgency-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}
.urgency-badge.normal { background: #dbeafe; color: #1e40af; }
.urgency-badge.urgent { background: #fef3c7; color: #92400e; }
.urgency-badge.tres-urgent { background: #fee2e2; color: #dc2626; animation: urgentBlink 1s ease-in-out infinite; }

@keyframes urgentBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}
.quick-action-btn {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}
.quick-action-btn:hover { transform: translateY(-2px); }
.quick-action-btn.whatsapp { background: #25D366; color: white; }
.quick-action-btn.whatsapp:hover { background: #1da851; }
.quick-action-btn.view { background: #e0f2fe; color: #0369a1; }
.quick-action-btn.view:hover { background: #0369a1; color: white; }
.quick-action-btn.archive { background: #f3f4f6; color: #6b7280; }
.quick-action-btn.archive:hover { background: #6b7280; color: white; }

/* Empty State */
.empty-state { text-align: center; padding: 60px 20px; color: #94a3b8; }
.empty-state i { font-size: 64px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 18px; color: #64748b; margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

/* Consultation Detail */
.consultation-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
}
.consultation-avatar {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal-accent), #00695C);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
}
.consultation-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.consultation-info-item { background: #f8fafc; padding: 12px 16px; border-radius: 10px; }
.consultation-info-item.full-width { grid-column: 1 / -1; }
.consultation-info-label { font-size: 11px; text-transform: uppercase; color: #64748b; font-weight: 600; margin-bottom: 4px; }
.consultation-info-value { font-size: 14px; color: #1e293b; font-weight: 500; }
.symptoms-box {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}
.symptoms-box.urgent { background: #fee2e2; border-color: #fecaca; }

/* ========== CART ANIMATION ========== */
@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.1); }
}
.cart-bounce { animation: cartBounce 0.6s ease-in-out; }

@keyframes flyToCart {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--fly-x), var(--fly-y)) scale(0.3); }
}
.fly-to-cart { animation: flyToCart 0.6s ease-in-out forwards; position: fixed; z-index: 1000; pointer-events: none; }

/* Toast */
#toast {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#toast.toast-success { background: linear-gradient(135deg, #22c55e, #16a34a); }
#toast.toast-cart { background: linear-gradient(135deg, var(--green-accent), #2e7d32); }
#toast.toast-wishlist { background: linear-gradient(135deg, #ec4899, #db2777); }
#toast.toast-error { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* Page Transitions */
#app { animation: pageEnter 0.4s ease-out; }
@keyframes pageEnter {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.page-transition-out { animation: pageExit 0.3s ease-in forwards; }
@keyframes pageExit {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .product-img-container { height: 160px; }
    .wishlist-btn { width: 32px; height: 32px; top: 8px; right: 8px; }
    .overlay-btn { width: 40px; height: 40px; }
}
