/**
 * SHAWAF MEDICAL - E-Commerce Stylesheet
 * Brand Colors: Deep Navy (#0A2647, #0F2C59) & Medical Cyan/Teal (#00A8CC, #00B4D8, #06B6D4)
 */

:root {
    --primary-900: #07192f;
    --primary-800: #0A2647;
    --primary-700: #0F2C59;
    --primary-600: #144272;
    --primary-500: #1D5B96;
    
    --teal-600: #0087A5;
    --teal-500: #00A8CC;
    --teal-400: #00B4D8;
    --teal-300: #38BDF8;
    --teal-100: #E0F2FE;
    --teal-50:  #F0F9FF;

    --accent-glow: rgba(0, 180, 216, 0.35);
    
    --surface-light: #F8FAFC;
    --surface-card: #FFFFFF;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --border-light: #E2E8F0;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 9999px;
    
    --shadow-soft: 0 4px 20px -2px rgba(10, 38, 71, 0.07);
    --shadow-card: 0 10px 25px -5px rgba(10, 38, 71, 0.1), 0 8px 10px -6px rgba(10, 38, 71, 0.05);
    --shadow-hover: 0 20px 35px -5px rgba(0, 168, 204, 0.18), 0 10px 15px -5px rgba(10, 38, 71, 0.08);
}

/* Global Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background-color: var(--surface-light);
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-image: 
        radial-gradient(at 100% 0%, rgba(0, 180, 216, 0.06) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(10, 38, 71, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--teal-500);
}

/* Glassmorphism Classes */
.glass-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.glass-dark {
    background: rgba(10, 38, 71, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #FFFFFF;
}

/* Subtle Brand Accent Lines */
.brand-gradient-text {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--teal-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-gradient-btn {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-700) 60%, var(--teal-600) 100%);
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(10, 38, 71, 0.25);
}
.brand-gradient-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 168, 204, 0.35);
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--teal-600) 100%);
}

.brand-teal-btn {
    background: linear-gradient(135deg, var(--teal-500) 0%, #0284C7 100%);
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(0, 168, 204, 0.3);
}
.brand-teal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 168, 204, 0.45);
    filter: brightness(1.06);
}

/* Animations */
@keyframes floatY {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
.animate-float {
    animation: floatY 4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.4); }
    50% { box-shadow: 0 0 0 14px rgba(0, 180, 216, 0); }
}
.animate-pulse-glow {
    animation: pulseGlow 2.5s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-fade-up {
    animation: slideInUp 0.4s ease-out forwards;
}

/* Free Shipping Progress Bar */
.shipping-progress-bar {
    height: 8px;
    border-radius: 9999px;
    background: #E2E8F0;
    overflow: hidden;
    position: relative;
}
.shipping-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--teal-400), #10B981);
    border-radius: 9999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.shipping-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.25) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0.25) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    animation: progressStripe 1s linear infinite;
}
@keyframes progressStripe {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

/* Product Card Styling */
.product-card {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-lg);
    background: #FFFFFF;
    border: 1px solid #EEF2F6;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-soft);
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 180, 216, 0.4);
}
.product-image-container {
    position: relative;
    overflow: hidden;
    background-color: #F8FAFC;
    aspect-ratio: 1 / 1;
}
.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover .product-card-img {
    transform: scale(1.05);
}

/* Color Swatches */
.color-swatch-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #FFFFFF;
    box-shadow: 0 0 0 1px #CBD5E1;
    position: relative;
}
.color-swatch-dot:hover {
    transform: scale(1.2);
}
.color-swatch-dot.active {
    box-shadow: 0 0 0 2.5px var(--teal-500);
    transform: scale(1.15);
}

/* Size Pills */
.size-pill {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    background: #F8FAFC;
}
.size-pill:hover {
    border-color: var(--teal-400);
    color: var(--teal-600);
}
.size-pill.active {
    background: var(--primary-800);
    color: #FFFFFF;
    border-color: var(--primary-800);
}

/* Quick Action Overlay */
.quick-action-bar {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}
.product-card:hover .quick-action-bar {
    opacity: 1;
    transform: translateY(0);
}

/* Wishlist Heart Icon */
.wishlist-btn {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 12;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.wishlist-btn:hover {
    color: #EF4444;
    transform: scale(1.15);
    background: #FFFFFF;
}
.wishlist-btn.active {
    color: #EF4444;
    background: #FFFFFF;
}
.wishlist-btn.active i {
    animation: heartPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Drawer Component Styles */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 38, 71, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}
.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}
.drawer-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 440px;
    background: #FFFFFF;
    z-index: 1000;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(10, 38, 71, 0.2);
    display: flex;
    flex-direction: column;
}
/* RTL Drawer: Opens from Left */
.drawer-panel-rtl {
    left: 0;
    transform: translateX(-100%);
}
.drawer-panel-rtl.active {
    transform: translateX(0);
}

/* Modal Dialogs */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 38, 71, 0.65);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1250;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-container {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(10, 38, 71, 0.25);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.active .modal-container {
    transform: scale(1);
}

/* Admin Status Badges */
.admin-badge-new { background-color: #FEF3C7; color: #92400E; }
.admin-badge-processing { background-color: #DBEAFE; color: #1E40AF; }
.admin-badge-shipped { background-color: #E0E7FF; color: #3730A3; }
.admin-badge-delivered { background-color: #D1FAE5; color: #065F46; }
.admin-badge-cancelled { background-color: #FEE2E2; color: #991B1B; }
.admin-badge-refunded { background-color: #F3E8FF; color: #6B21A8; }


/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
    pointer-events: none;
}
.toast-msg {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    background: #FFFFFF;
    box-shadow: 0 10px 30px rgba(10, 38, 71, 0.15);
    border: 1px solid #E2E8F0;
    font-size: 0.95rem;
    font-weight: 600;
    animation: toastSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 380px;
}
.toast-msg.success {
    border-right: 4px solid #10B981;
}
.toast-msg.error {
    border-right: 4px solid #EF4444;
}
.toast-msg.info {
    border-right: 4px solid var(--teal-500);
}
@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Live Buyer Social Proof Notification (Bottom Left) */
.social-proof-toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 180, 216, 0.3);
    box-shadow: 0 10px 25px rgba(10, 38, 71, 0.12);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 900;
    max-width: 320px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}
.social-proof-toast.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Floating WhatsApp Quick Order Button */
.whatsapp-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    z-index: 950;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.whatsapp-float-btn:hover {
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.55);
}
.whatsapp-float-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    opacity: 0.5;
    animation: ripplePulse 2s infinite ease-out;
    z-index: -1;
}
@keyframes ripplePulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Admin Dashboard Specific */
.admin-badge-new { background-color: #FEF3C7; color: #D97706; }
.admin-badge-processing { background-color: #DBEAFE; color: #1D4ED8; }
.admin-badge-shipped { background-color: #E0E7FF; color: #4338CA; }
.admin-badge-delivered { background-color: #D1FAE5; color: #047857; }
.admin-badge-cancelled { background-color: #FEE2E2; color: #B91C1C; }

.payment-option-card {
    transition: all 0.2s ease-in-out;
}
.payment-option-card:hover {
    border-color: var(--teal-500);
    box-shadow: 0 4px 12px rgba(0, 168, 204, 0.12);
}

/* Shake Error Animation */
@keyframes shakeAnimation {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}
.shake {
    animation: shakeAnimation 0.4s ease-in-out;
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    #printable-invoice, #printable-invoice * {
        visibility: visible;
    }
    #printable-invoice {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 20px;
        background: white;
    }
}

/* Mobile-First Adaptations for Phone Screens */
@media (max-width: 768px) {
    .whatsapp-float-btn {
        display: none !important;
    }
}

/* Explicit 9:16 Aspect Ratio for Full-Body Product Cards - 100% Complete Image Display */
.product-image-container {
    aspect-ratio: 9 / 16 !important;
    width: 100% !important;
    overflow: hidden !important;
    position: relative;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block;
    background-color: #f8fafc;
}

/* Full-Screen HD Lightbox Modal */
#image-lightbox-modal {
    transition: opacity 0.25s ease-in-out;
}
#lightbox-img {
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.75);
}

/* -------------------------------------------------------------
   Hero 5-Second Brand Carousel Styles
   ------------------------------------------------------------- */
.hero-carousel-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #0A2647;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1.03);
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 2;
}

.hero-carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 12;
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    background: rgba(10, 38, 71, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    opacity: 0.75;
}

@media (min-width: 640px) {
    .hero-carousel-nav-btn {
        width: 44px;
        height: 44px;
    }
}

.hero-carousel-nav-btn:hover {
    background: rgba(0, 168, 204, 0.95);
    border-color: #ffffff;
    opacity: 1;
    transform: translateY(-50%) scale(1.08);
}

.hero-carousel-prev {
    right: 10px;
}

.hero-carousel-next {
    left: 10px;
}

@media (min-width: 640px) {
    .hero-carousel-prev {
        right: 18px;
    }
    .hero-carousel-next {
        left: 18px;
    }
}

.hero-carousel-indicators {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 38, 71, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 4px 10px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

@media (max-width: 640px) {
    .hero-carousel-indicators {
        bottom: 44px;
        gap: 6px;
        padding: 3px 8px;
    }
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.35s ease;
}

.hero-dot.active {
    width: 26px;
    background: #00B4D8;
    box-shadow: 0 0 10px rgba(0, 180, 216, 0.85);
}

