/* Bhavani Bright Custom CSS Design System - Senior Software Engineer Grade */

:root {
    /* Color Tokens */
    --primary-blue: #242662;
    --primary-blue-rgb: 36, 38, 98;
    --primary-blue-hover: #323580;
    --primary-blue-light: rgba(36, 38, 98, 0.08);
    --primary-blue-glow: rgba(36, 38, 98, 0.25);
    
    --bg-base: #f9fbfd;
    --bg-card: #ffffff;
    --bg-dark: #0b0c10;
    --bg-dark-card: #1f2833;
    
    --border-light: rgba(0, 0, 0, 0.06);
    --border-dark: rgba(255, 255, 255, 0.08);
    
    --text-primary: #0a0b0d;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-light: #f8fafc;
    
    /* Typography */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Spacing & Radii */
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    
    /* Shadows */
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.02);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 40px rgba(36, 38, 98, 0.12);
    --shadow-glow: 0 0 30px rgba(36, 38, 98, 0.35);
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

/* Global Reset & Typography */
body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Responsive Images Reset */
img {
    max-width: 100%;
    height: auto;
}

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

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-blue-hover);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Layout Utilities */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* Premium Navigation Header */
.navbar-custom {
    background: #242662 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1020;
    transition: var(--transition-smooth);
}

/* Ensure the mobile responsive toggler is beautifully visible on dark blue */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3) !important;
    padding: 8px 12px !important;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15) !important;
}

.navbar-toggler-icon {
    /* Custom SVG in white to ensure perfect visibility */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.95%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-brand-custom {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 24px;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand-logo {
    width: 32px;
    height: 32px;
    background-color: #ffffff !important;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #242662 !important;
    font-weight: 900;
}

.nav-link-custom {
    font-family: var(--font-heading);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.nav-link-custom:hover, .nav-link-custom.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
}

.navbar-custom .btn-secondary-custom {
    background-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.navbar-custom .btn-secondary-custom:hover {
    background-color: rgba(255, 255, 255, 0.22) !important;
    border-color: #ffffff !important;
}

.navbar-custom .btn-primary-custom {
    background-color: transparent !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.navbar-custom .btn-primary-custom:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

/* Premium Buttons inspired by modern aesthetics */
.btn-primary-custom {
    background-color: var(--text-primary);
    color: var(--text-light) !important;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--text-primary);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-subtle);
}

.btn-primary-custom:hover {
    background-color: transparent;
    color: var(--text-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.btn-secondary-custom {
    background-color: transparent;
    color: var(--text-primary) !important;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary-custom:hover {
    background-color: var(--primary-blue-light);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

.btn-blue {
    background-color: var(--primary-blue);
    color: #ffffff !important;
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    border: none;
    box-shadow: 0 4px 14px rgba(36, 38, 98, 0.3);
    transition: var(--transition-smooth);
}

.btn-blue:hover {
    background-color: var(--primary-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(36, 38, 98, 0.5);
}

/* Dynamic Glassmorphic Hero Banner (inspired by the crypto mockup) */
.hero-container {
    background: radial-gradient(circle at 80% 20%, rgba(36, 38, 98, 0.15) 0%, transparent 60%), 
                radial-gradient(circle at 10% 80%, rgba(36, 38, 98, 0.05) 0%, transparent 50%),
                #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 80px 60px;
    margin-top: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.hero-tag {
    background: var(--primary-blue-light);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    border: 1px solid rgba(36, 38, 98, 0.2);
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero-title span {
    color: var(--primary-blue);
    position: relative;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 580px;
    margin-bottom: 40px;
}

.hero-showcase-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    transform: perspective(1000px) rotateY(-8deg) rotateX(5deg);
    transition: var(--transition-smooth);
}

.hero-showcase-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.02);
}

/* Category Grid & Cards */
.category-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition-smooth);
    height: 100%;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-subtle);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-smooth);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(36, 38, 98, 0.3);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-image-wrapper {
    height: 140px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.category-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.category-card:hover .category-image {
    transform: scale(1.05);
}

/* Product Catalog Cards */
.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-smooth);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-subtle);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(36, 38, 98, 0.4);
}

.product-image-container {
    height: 220px;
    position: relative;
    overflow: hidden;
    background-color: #f8fafc;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    transition: var(--transition-smooth);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-sku-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(11, 12, 16, 0.75);
    color: var(--text-light);
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
    backdrop-filter: blur(4px);
}

.product-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category-title {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 50px;
}

.product-price-tiers {
    background: var(--bg-base);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 20px;
}

.price-tier-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    border-bottom: 1px dashed var(--border-light);
    padding: 4px 0;
}

.price-tier-row:last-child {
    border-bottom: none;
}

.price-tier-qty {
    font-weight: 600;
    color: var(--text-secondary);
}

.price-tier-val {
    font-weight: 800;
    color: var(--text-primary);
}

.price-tier-val.active-tier {
    color: var(--primary-blue);
}

.price-box {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.price-retail {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

/* Wholesale Bulk Matrix Table */
.matrix-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    overflow-x: auto;
}

.matrix-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.matrix-table th {
    background-color: var(--text-primary);
    color: var(--text-light);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
    padding: 18px 24px;
    border: none;
}

.matrix-table td {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.matrix-table tr:last-child td {
    border-bottom: none;
}

.matrix-qty-input {
    width: 80px;
    text-align: center;
    border-radius: var(--radius-sm);
    border: 1px solid #cbd5e1;
    padding: 6px;
    font-weight: 700;
    transition: var(--transition-fast);
}

.matrix-qty-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px var(--primary-blue-glow);
}

/* Floating Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.08);
    z-index: 1050;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

.cart-drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.cart-drawer-footer {
    padding: 24px;
    border-top: 1px solid var(--border-light);
    background: #f8fafc;
}

.cart-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1040;
    transition: var(--transition-fast);
}

/* Elegant Details Pages */
.product-detail-container {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-card);
}

@media (max-width: 768px) {
    .product-detail-container {
        padding: 24px 16px;
        border-radius: var(--radius-lg);
    }
}

.product-detail-image-box {
    background-color: #f8fafc;
    border-radius: var(--radius-lg);
    height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 1px solid var(--border-light);
}

.detail-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Glass login screen styling */
.login-bg {
    background: #ffffff !important;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 460px;
    padding: 48px;
}

.login-card .navbar-brand-custom,
.popup-modal .navbar-brand-custom {
    color: #242662 !important;
}

/* Interactive Admin Panel styling */
.admin-sidebar {
    background-color: var(--text-primary);
    color: var(--text-light);
    min-height: calc(100vh - 80px);
    padding: 32px 24px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94a3b8;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.admin-nav-link:hover, .admin-nav-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

.admin-nav-link.active {
    border-left: 4px solid var(--primary-blue);
    padding-left: 12px;
    background-color: rgba(36, 38, 98, 0.1);
    color: var(--primary-blue);
}

.admin-dashboard-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    background: #ffffff;
    box-shadow: var(--shadow-subtle);
    padding: 24px;
    height: 100%;
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}

/* Beautiful Upi Payment styling */
.upi-pay-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    padding: 48px;
    text-align: center;
}

.qr-code-wrapper {
    background: #f8fafc;
    border: 1.5px solid var(--primary-blue-hover);
    padding: 20px;
    border-radius: var(--radius-lg);
    display: inline-block;
    box-shadow: var(--shadow-subtle);
    margin: 24px 0;
    position: relative;
}

.qr-code-img {
    width: 240px;
    height: 240px;
}

.screenshot-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--radius-md);
    margin-top: 12px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-subtle);
}

/* Badge System */
.badge-custom {
    padding: 6px 12px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-pending {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-verifying {
    background-color: var(--primary-blue-light);
    color: #0369a1;
}

.badge-paid {
    background-color: #dcfce7;
    color: #15803d;
}

.badge-shipped {
    background-color: #f1f5f9;
    color: #475569;
}

.badge-cancelled {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* Global Accent Color Overrides for #242662 */
.text-primary {
    color: var(--primary-blue) !important;
}
.border-primary {
    border-color: var(--primary-blue) !important;
}
.bg-primary {
    background-color: var(--primary-blue) !important;
}

/* Footer Navigation Styling in Accent Color #242662 */
footer {
    background-color: #242662 !important;
    color: #ffffff !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}
footer .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}
footer .navbar-brand-custom {
    color: #ffffff !important;
}
footer .navbar-brand-logo {
    background-color: #ffffff !important;
    color: #242662 !important;
}

/* ==========================================================================
   Mobile-Friendly Responsiveness Optimizations (Senior Engineer Grade)
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. Fluid & Proportional Hero Layout */
    .hero-container {
        padding: 40px 24px !important;
        min-height: auto !important;
    }
    .hero-title {
        font-size: 32px !important;
        line-height: 1.2 !important;
        margin-bottom: 16px !important;
    }
    .hero-subtitle {
        font-size: 15px !important;
        line-height: 1.5 !important;
        margin-bottom: 24px !important;
    }
    .hero-container .btn-blue {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* 2. Fluid Drawer & Modals */
    .cart-drawer {
        width: 100% !important;
        right: -100% !important;
    }
    .cart-drawer.open {
        right: 0 !important;
    }
    .login-card {
        padding: 32px 20px !important;
        border-radius: var(--radius-lg) !important;
    }
    .upi-pay-card {
        padding: 32px 20px !important;
        border-radius: var(--radius-lg) !important;
    }
    .qr-code-img {
        width: 190px !important;
        height: 190px !important;
    }

    /* 3. Responsive Product Grid Card Optimizations */
    .col-6 .product-card,
    .col-4 .product-card {
        border-radius: var(--radius-md) !important;
    }
    .col-6 .product-image-container,
    .col-4 .product-image-container {
        height: 140px !important;
    }
    .col-6 .product-image,
    .col-4 .product-image {
        padding: 8px !important;
    }
    .col-6 .product-sku-badge,
    .col-4 .product-sku-badge {
        top: 8px !important;
        left: 8px !important;
        font-size: 9px !important;
        padding: 2px 6px !important;
    }
    .col-6 .product-body,
    .col-4 .product-body {
        padding: 12px !important;
    }
    .col-6 .product-category-title,
    .col-4 .product-category-title {
        font-size: 10px !important;
        margin-bottom: 4px !important;
    }
    .col-6 .product-title,
    .col-4 .product-title {
        font-size: 13px !important;
        height: 38px !important;
        line-height: 1.3 !important;
        margin-bottom: 6px !important;
    }
    .col-6 .price-box,
    .col-4 .price-box {
        margin-bottom: 8px !important;
    }
    .col-6 .price-retail,
    .col-4 .price-retail {
        font-size: 14px !important;
    }
    .col-6 .product-body .d-flex.justify-content-between,
    .col-4 .product-body .d-flex.justify-content-between {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
    }
    .col-6 .product-body .d-flex.justify-content-between .input-group,
    .col-4 .product-body .d-flex.justify-content-between .input-group {
        width: 100% !important;
    }
    .col-6 .product-body .d-flex.justify-content-between .btn-primary-custom,
    .col-4 .product-body .d-flex.justify-content-between .btn-primary-custom {
        width: 100% !important;
        font-size: 12px !important;
        padding: 6px 12px !important;
    }

    .col-12 .product-image-container {
        height: 180px !important;
    }
    .col-12 .product-body {
        padding: 16px !important;
    }
    .col-12 .product-title {
        font-size: 15px !important;
        height: 42px !important;
    }
}

@media (max-width: 576px) {
    /* Micro Padding & Spacing for Small Screens */
    .main-content {
        margin-top: 16px !important;
        margin-bottom: 16px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .btn-primary-custom, .btn-secondary-custom, .btn-blue {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
    h2 {
        font-size: 24px !important;
    }
}
