:root {
    --primary-color: #00b060;
    --primary-dark: #008751;
    --secondary-color: #004d2e;
    --bg-color: #f7f9fa;
    --text-color: #1a1a1a;
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow-soft: 0 10px 30px rgba(0, 77, 46, 0.08);
    --shadow-hover: 0 20px 40px rgba(0, 176, 96, 0.15);
    --border-radius-lg: 20px;
    --border-radius-sm: 12px;
}

body {
    background-color: var(--bg-color);
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Glassmorphism Navbar */
.custom-navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 176, 96, 0.1);
    box-shadow: 0 4px 20px rgba(0, 176, 96, 0.08);
    z-index: 1030 !important;
    position: sticky;
    top: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-navbar .navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00b060 0%, #004d2e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease;
}

.custom-navbar .navbar-brand:hover {
    transform: scale(1.02);
}

/* Custom Hamburger Button */
.custom-navbar .navbar-toggler {
    border: 2px solid var(--primary-color) !important;
    border-radius: 12px !important;
    padding: 6px 10px !important;
    background: rgba(0, 176, 96, 0.08);
    transition: all 0.3s ease;
}
.custom-navbar .navbar-toggler:hover {
    background: var(--primary-color);
}
.custom-navbar .navbar-toggler:hover .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}
.custom-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%2300b060' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    width: 22px;
    height: 22px;
}

/* Mobile collapsed menu styling */
.custom-navbar .navbar-collapse {
    border-radius: 16px;
}
@media (max-width: 991px) {
    .custom-navbar .navbar-collapse {
        background: white;
        border-radius: 16px;
        padding: 12px;
        margin-top: 10px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    .custom-navbar .nav-link {
        margin: 2px 0;
        border-radius: 10px;
        padding: 0.75rem 1rem;
    }
    .custom-navbar .navbar-nav {
        gap: 2px;
    }
}

.custom-navbar .nav-link {
    color: #374151 !important;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    margin: 0 4px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.custom-navbar .nav-link:hover {
    background: rgba(0, 176, 96, 0.08);
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.custom-navbar .nav-link.active {
    background: var(--primary-color);
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 176, 96, 0.2);
}

/* Notification Pulse Animation */
@keyframes bell-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.notif-pulse {
    animation: bell-pulse 2s infinite ease-in-out;
}

.nav-link i {
    font-size: 1.2rem;
    vertical-align: middle;
}

/* Beautiful Cards */
.card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 30px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-header-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
    padding: 1.5rem;
    border-bottom: none;
}

/* Product Cards specific */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-footer {
    border-bottom-left-radius: 30px !important;
    border-bottom-right-radius: 30px !important;
    background-color: transparent !important;
}

.product-card img {
    object-fit: cover;
    width: 100%;
    height: 280px;
    border-top-left-radius: 30px !important;
    border-top-right-radius: 30px !important;
}
.product-card .card-body {
    padding: 1.5rem;
}
.product-card .card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

/* Modern Buttons */
.btn {
    border-radius: 50px;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 176, 96, 0.3);
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 176, 96, 0.4);
}

.btn-outline-secondary {
    border: 2px solid #e2e8f0;
    color: #4a5568;
}
.btn-outline-secondary:hover {
    background: #e2e8f0;
    color: #1a202c;
    border-color: #e2e8f0;
}

/* Badges */
.badge {
    padding: 0.5rem 0.8rem;
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.bg-success {
    background-color: rgba(0, 176, 96, 0.15) !important;
    color: var(--primary-dark) !important;
}
.bg-warning {
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #d97706 !important;
}

/* Forms & Inputs */
.form-control, .form-select {
    border-radius: var(--border-radius-sm);
    padding: 0.8rem 1.2rem;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    transition: all 0.3s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 176, 96, 0.1);
    background-color: #ffffff;
}

/* Tables */
.table-responsive {
    border-radius: var(--border-radius-sm);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}
.table {
    margin-bottom: 0;
}
.table-light {
    background-color: #f8fafc;
}
.table th {
    font-weight: 600;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
    padding: 1rem;
    white-space: nowrap;
}
.table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}
.table td.text-end {
    white-space: nowrap;
}

/* Video Wrapper */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    padding-top: 30px; 
    height: 0; 
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
}
.video-container iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

/* --- MODERN ENHANCEMENTS --- */

/* Quantity Selector Modern Styling */
.qty-container {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 50px;
    padding: 6px;
    width: fit-content;
    border: 1px solid #e2e8f0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: white;
    color: var(--secondary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 800;
    font-size: 1.2rem;
    cursor: pointer;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.qty-input {
    width: 50px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.qty-input:focus {
    outline: none;
}

/* Modern Badge Styling */
.badge-modern {
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.7rem;
    display: inline-block;
}

.badge-stock-alt { background: rgba(0, 176, 96, 0.1); color: #00b060; }
.badge-preorder-alt { background: rgba(245, 158, 11, 0.1); color: #d97706; }

/* Large Buttons */
.btn-premium {
    padding: 16px 40px;
    border-radius: 18px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-premium:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.bg-light-blue { background-color: rgba(13, 110, 253, 0.05); }
.dropdown-item:active { background-color: var(--primary-color); }

/* Animation Keyframes */
.animate {
    animation-duration: 0.3s;
    animation-fill-mode: both;
}

@keyframes slideIn {
    0% { transform: translateY(1rem); opacity: 0; }
    100% { transform: translateY(0rem); opacity: 1; }
}

.slideIn {
    animation-name: slideIn;
}

.brand-icon {
    box-shadow: 0 4px 10px rgba(0, 176, 96, 0.3);
    transition: all 0.3s ease;
}

.navbar-brand:hover .brand-logo {
    transform: rotate(5deg) scale(1.05);
}

.notif-pulse i {
    display: inline-block;
}

/* =====================
   MOBILE RESPONSIVE
   ===================== */

@media (max-width: 768px) {

    /* Container padding */
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Page title */
    h2.fw-bold {
        font-size: 1.5rem;
    }

    /* Product grid - 1 column on mobile */
    .row-cols-md-3, .row-cols-lg-4 {
        --bs-columns: 1;
    }
    .row.row-cols-1.row-cols-md-3 > .col,
    .row.row-cols-1.row-cols-lg-4 > .col {
        width: 100%;
    }

    /* Product image height on mobile */
    .product-card img {
        height: 220px;
    }

    /* Category filter buttons scroll horizontally */
    .d-flex.flex-wrap.gap-2 {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .d-flex.flex-wrap.gap-2::-webkit-scrollbar {
        display: none;
    }
    .d-flex.flex-wrap.gap-2 .btn {
        flex-shrink: 0;
    }

    /* Cart/Orders/Profile sidebar layout */
    .row > .col-md-3,
    .row > .col-md-9 {
        width: 100% !important;
    }

    /* Cart table */
    .table-responsive {
        font-size: 0.85rem;
    }
    .table td, .table th {
        padding: 0.6rem 0.5rem;
    }

    /* Global Button Sizing for Mobile */
    .btn {
        padding: 0.45rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.6rem 1.2rem;
    }
    
    .btn-sm {
        padding: 0.3rem 0.75rem;
        font-size: 0.8rem;
    }

    .btn-premium {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    /* Ensure icons inside buttons scale nicely */
    .btn i {
        font-size: 0.95em;
    }

    /* Card padding on mobile */
    .card-body {
        padding: 1.2rem;
    }

    /* Toast notification */
    .toast-container {
        width: 90vw !important;
        right: 5vw !important;
        left: 5vw !important;
    }
    #cartToast {
        width: 100% !important;
    }

    /* Qty container */
    .qty-container {
        width: 100%;
        justify-content: center;
    }

    /* Profile/Order page column layout */
    .col-md-3, .col-md-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Admin / Agent sidebars */
    .offcanvas-md {
        width: 100% !important;
        max-width: 280px;
    }

    /* Form grids */
    .row .col-md-6,
    .row .col-md-4,
    .row .col-md-3,
    .row .col-lg-8,
    .row .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Modal fullscreen on mobile */
    .modal-dialog {
        margin: 8px;
    }

    /* Invoice / bill pages */
    .col-md-10 {
        width: 100% !important;
        padding: 0 8px;
    }

    /* Product detail page */
    .display-4 {
        font-size: 2rem;
    }

    /* Notification dropdown */
    .dropdown-menu[style*="width: 320px"] {
        width: 90vw !important;
        left: 0 !important;
        right: 0 !important;
    }
}

/* Small tablets 768px – 992px */
@media (min-width: 769px) and (max-width: 992px) {
    .row-cols-md-3 > .col {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .product-card img {
        height: 240px;
    }
}
