/* Fly Tech Store - Modern Responsive CSS Design System */
:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --secondary-color: #0f172a;
    --accent-color: #f59e0b;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header & Navbar */
.top-bar {
    background-color: var(--secondary-color);
    color: #cbd5e1;
    font-size: 0.85rem;
    padding: 6px 0;
}
.navbar-brand-logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.navbar-brand-logo span {
    color: var(--primary-color);
}
.nav-link {
    font-weight: 500;
    color: var(--text-color);
    padding: 8px 14px !important;
    transition: color 0.2s ease;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 70px 0;
    border-radius: 0 0 24px 24px;
    position: relative;
    overflow: hidden;
}
.hero-section::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(13,110,253,0.2) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
}
.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: #94a3b8;
    margin-bottom: 30px;
    max-width: 600px;
}

/* Category Cards */
.category-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
    display: block;
    height: 100%;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.category-icon {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

/* Product Cards */
.product-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    background: #f1f5f9;
    overflow: hidden;
}
.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card:hover .product-img-wrapper img {
    transform: scale(1.05);
}
.badge-promo {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--danger-color);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}
.product-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
    text-decoration: none;
}
.product-title:hover {
    color: var(--primary-color);
}
.product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
}
.product-price-old {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 8px;
}

/* Dynamic Product Page Attributes */
.attribute-group {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}
.attribute-label {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 8px;
    display: block;
}
.custom-file-upload-box {
    border: 2px dashed var(--primary-color);
    background: #f0f7ff;
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease;
}
.custom-file-upload-box:hover {
    background: #e0effe;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #25d366;
    color: #fff;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: transform 0.3s ease;
    text-decoration: none;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    color: #fff;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
    background: #ffffff;
    z-index: 1040;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
}
.mobile-bottom-nav .nav-item {
    color: #64748b;
    transition: color 0.2s ease;
}
.mobile-bottom-nav .nav-item:hover,
.mobile-bottom-nav .nav-item.active {
    color: var(--primary-color) !important;
    font-weight: 700;
}
.mobile-bottom-nav .nav-item.text-success {
    color: #25d366 !important;
}

/* Adjust layout on mobile devices */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 85px !important;
    }
    /* Hide floating WhatsApp button on mobile & tablets because bottom nav bar or mobile view already handles communication */
    .whatsapp-float {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

@media (max-width: 767.98px) {
    /* Product Main Image */
    #main-product-img {
        max-height: 250px !important;
        object-fit: contain !important;
    }

    /* Hero Slider Responsive Sizes */
    .hero-slide-content {
        min-height: 280px !important;
    }
    .hero-slide-content h1 {
        font-size: 1.5rem !important;
        line-height: 1.25 !important;
        margin-bottom: 8px !important;
    }
    .hero-slide-content .btn {
        padding: 8px 18px !important;
        font-size: 0.82rem !important;
    }

    /* Category Cards Mobile Sizing */
    .category-card {
        padding: 16px 10px !important;
    }
    .category-icon {
        font-size: 1.6rem !important;
        margin-bottom: 8px !important;
    }
    .category-card h6 {
        font-size: 0.85rem !important;
    }

    /* Product Cards Sizing */
    .product-title {
        font-size: 0.95rem !important;
    }
    .product-price {
        font-size: 1.1rem !important;
    }
    .product-body {
        padding: 12px !important;
    }

    /* Page Header Banner Sizing */
    .bg-dark.text-white.py-5,
    .bg-gradient {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    .display-6 {
        font-size: 1.35rem !important;
    }
}

/* Hero Slider Carousel UI & Animations */
.hero-slider-wrapper {
    position: relative;
}
#homeHeroCarousel {
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Glassmorphism Slide Counter Badge */
.glass-badge {
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

/* Carousel Control Arrow Buttons with Glass Effect & Hover */
#homeHeroCarousel .carousel-control-prev,
#homeHeroCarousel .carousel-control-next {
    width: 60px;
    opacity: 0.85;
    transition: all 0.3s ease;
}
#homeHeroCarousel:hover .carousel-control-prev,
#homeHeroCarousel:hover .carousel-control-next {
    opacity: 1;
}
.carousel-btn-icon {
    width: 46px;
    height: 46px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#homeHeroCarousel .carousel-control-prev:hover .carousel-btn-icon {
    transform: translateX(-4px) scale(1.1);
    background: var(--primary-color);
    border-color: var(--primary-color);
}
#homeHeroCarousel .carousel-control-next:hover .carousel-btn-icon {
    transform: translateX(4px) scale(1.1);
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Modern Animated Indicators */
#homeHeroCarousel .carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 5px;
}
#homeHeroCarousel .carousel-indicators .active {
    width: 32px;
    border-radius: 20px;
    background-color: #ffc107;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.6);
}

/* Slide Entrance Animations */
.carousel-item.active .animate-slide-badge {
    animation: slideInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.carousel-item.active .animate-slide-title {
    animation: slideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}
.carousel-item.active .animate-slide-sub {
    animation: slideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}
.carousel-item.active .animate-slide-btn {
    animation: zoomInUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.45s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes zoomInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* CTA Button Pulse Effect */
.btn-cta-pulse {
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.35);
}
.btn-cta-pulse:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 30px rgba(255, 193, 7, 0.55);
}

/* Mini Cart Slide-Over Drawer Styling */
#miniCartDrawer {
    z-index: 1060;
}
.mini-cart-item-row {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mini-cart-item-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md) !important;
}
#miniCartItemsList::-webkit-scrollbar {
    width: 5px;
}
#miniCartItemsList::-webkit-scrollbar-track {
    background: #f1f5f9;
}
#miniCartItemsList::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
#miniCartItemsList::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Custom Main Site Footer Styling */
.site-footer {
    background-color: #0f172a !important;
    color: #cbd5e1 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.site-footer h5, 
.site-footer h6 {
    color: #ffffff !important;
    letter-spacing: 0.3px;
}
.site-footer p {
    color: #94a3b8 !important;
}
.site-footer .footer-link {
    color: #94a3b8 !important;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}
.site-footer .footer-link:hover {
    color: #38bdf8 !important;
    transform: translateX(3px);
}
.site-footer .social-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1 !important;
    transition: all 0.3s ease;
}
.site-footer .social-icon-btn:hover {
    background: var(--primary-color);
    color: #ffffff !important;
    transform: translateY(-3px);
}
.site-footer .social-icon-btn.wa:hover {
    background: #25d366;
}

/* Printable Invoice Styles */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
        padding-bottom: 0 !important;
    }
    .no-print, header, footer, .top-bar, .whatsapp-float, .mobile-bottom-nav {
        display: none !important;
    }
    .printable-invoice {
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}
