/* Color Variables */
:root {
    --theme-black: #000000;
    --theme-dark-grey: #1a1a1a;
    --theme-royal-blue: #4169E1; /* Royal Blue */
    --theme-blue-hover: #3456b3;
    --theme-blue-faint: rgba(65, 105, 225, 0.1);
    --theme-grey: #878787;
    --theme-light-grey: #f1f3f6;
    --theme-light: #f0f0f0;
    
    /* Semantic Mappings */
    --theme-green: var(--theme-royal-blue); /* Backward compatibility */
    --theme-green-faint: var(--theme-blue-faint);
}

/* Dark Theme Overrides */
[data-theme="dark"] {
    --theme-light-grey: #000000;
    --theme-black: #000000;
    --theme-light: #121212;
    --theme-white: #1a1a1a;
    --theme-dark-grey: #1a1a1a;
    color: #ffffff;
}

[data-theme="dark"] body {
    background-color: var(--theme-black) !important;
    color: #ffffff;
}

[data-theme="dark"] .bg-white,
[data-theme="dark"] .bg-theme-light-grey {
    background-color: var(--theme-light-grey) !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .category-item-box,
[data-theme="dark"] .product-card {
    background-color: #121212 !important;
    border-color: #2a2a2a !important;
    color: #ffffff !important;
}

[data-theme="dark"] .text-dark,
[data-theme="dark"] .text-theme-black,
[data-theme="dark"] .product-title {
    color: #ffffff !important;
}

[data-theme="dark"] .text-muted,
[data-theme="dark"] .text-secondary {
    color: #aaaaaa !important;
}

[data-theme="dark"] .categories-section {
    background-color: #0d0d0d !important;
    border-bottom: 1px solid #222;
}

[data-theme="dark"] .search-form input {
    background-color: #1a1a1a !important;
    color: white !important;
    border-color: #333 !important;
}

[data-theme="dark"] .btn-login {
    background-color: #1a1a1a;
    color: white !important;
    border: 1px solid #333;
}

body {

    font-family: 'Inter', sans-serif;
    background-color: var(--theme-light-grey);
    color: #212121;
    padding-top: 170px; /* Offset for fixed-top header on mobile/tablet */
}

@media (min-width: 992px) {
    body {
        padding-top: 100px; /* Offset for fixed-top header on desktop */
    }
}

/* Navbar overrides */
.top-nav {
    background-color: var(--theme-black);
    min-height: 140px; /* Base for two-row mobile header */
}

@media (min-width: 992px) {
    .top-nav {
        min-height: 80px; /* Standard row for desktop */
    }
}

.navbar-spacer {
    display: none !important; /* Disabling separate spacer in favor of body padding */
}

.text-brand {
    color: white !important;
    font-size: 1.5rem;
}

.text-theme-green {
    color: var(--theme-green) !important;
}

.bg-theme-green {
    background-color: var(--theme-green) !important;
    color: var(--theme-black) !important;
}

.bg-theme-black {
    background-color: var(--theme-black) !important;
}

.btn-theme-green {
    background-color: var(--theme-green);
    color: var(--theme-black);
    border: none;
}

.btn-theme-green:hover {
    background-color: var(--theme-green-hover);
    color: white;
}

/* Remove hover/focus effects from header menu button */
.navbar-toggler,
.navbar-toggler:focus,
.navbar-toggler:active,
.navbar-toggler-icon:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

.navbar-toggler:hover {
    background: transparent !important;
}

/* Sidebar & Header Visibility Refinement */
.offcanvas-start {
    width: 280px !important;
}

.top-nav {
    z-index: 1020 !important;
}

.navbar-toggler {
    z-index: 1021 !important;
    position: relative;
}

.search-form {
    width: 100%;
    max-width: 500px;
    height: 40px;
    display: flex;
    align-items: center;
}

.search-form input {
    background-color: white;
    box-shadow: none !important;
    height: 100%; /* Fill the 40px form height */
}

.search-form input:focus {
    border: 1px solid var(--theme-green);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
}

.btn-login {
    background-color: white;
    color: var(--theme-black) !important;
    font-weight: 600;
    border-radius: 2px;
}

.btn-login:hover {
    background-color: var(--theme-green);
    color: var(--theme-black) !important;
}

.nav-link {
    font-weight: 500;
}

.nav-link:hover {
    color: var(--theme-green) !important;
}

.cart-badge {
    font-size: 0.6rem;
    padding: 0.25em 0.5em;
    border: 2px solid var(--theme-black);
}

.navbar-spacer {
    height: 72px;
}

/* Categories Bar */
.categories-section {
    background-color: var(--white) !important;
    border-bottom: 1px solid #eee;
    z-index: 5;
    position: relative;
    padding-top: 20px;
    padding-bottom: 20px;
}

.hide-scrollbar {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}

.hide-scrollbar::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.category-item {
    color: var(--theme-black);
    min-width: 80px;
    padding: 0 10px;
    transition: color 0.2s ease;
}

.category-item:hover {
    color: var(--theme-green);
}

.category-item:hover .cat-img-wrapper i {
    color: var(--theme-green);
    transform: scale(1.1);
}

.cat-img-wrapper {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-img-wrapper i {
    font-size: 2rem;
    color: var(--theme-black);
    transition: all 0.2s ease;
}

.category-item span {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Brand New Categories Bar Boxes */
.category-item-box {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid #eee !important;
    background-color: #ffffff !important;
    position: relative;
    overflow: hidden;
    padding: 10px !important;
    border-radius: 12px !important;
    min-height: 110px;
}

.category-image-box {
    width: 65px;
    height: 65px;
    background-size: cover;
    background-position: center;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease;
}

.category-label {
    font-size: 0.85rem;
    line-height: 1.2;
    color: var(--theme-black);
    transition: color 0.3s ease;
}

/* Desktop & Tablet View: Horizontal Box + Text near it */
@media (min-width: 768px) {
    .category-item-box {
        flex-direction: row !important;
        justify-content: flex-start !important;
        min-height: 80px;
        padding: 12px 15px !important;
    }
    
    .category-image-box {
        width: 50px;
        height: 50px;
        margin-right: 12px;
        margin-bottom: 0 !important;
        flex-shrink: 0;
    }
    
    .category-label {
        text-align: center !important;
        font-size: 1rem;
        flex: 1;
    }
}

.category-item-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 255, 0.08) !important;
    border-color: var(--theme-green) !important;
    background-color: #fdfdfd !important;
}

.category-item-box:hover .category-image-box {
    transform: scale(1.05);
    border-color: var(--theme-green);
}

.category-item-box:hover .category-label {
    color: var(--theme-green-hover);
}

/* Mobile specific category adjustments */
@media (max-width: 576px) {
    .category-item-box {
        min-height: 100px;
        padding: 8px !important;
    }
    .category-image-box {
        width: 55px;
        height: 55px;
    }
    .category-label {
        font-size: 0.70rem;
    }
}

.transition-icon {
    transition: all 0.3s ease;
}

/* Main Content */
.main-bg {
    background-color: var(--theme-light-grey);
}

.banner-img {
    height: 280px;
    object-fit: cover;
    background-color: var(--theme-dark-black);
}

@media (max-width: 768px) {
    .banner-img {
        height: 160px; /* "40" height requested for mobile */
    }
}

/* Carousel Indicators (Dots) */
.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #bbbbbb !important; 
    border: none;
    margin: 0 6px;
    opacity: 0.5 !important;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: var(--theme-green) !important;
    width: 25px !important;
    border-radius: 10px;
    opacity: 1 !important;
}

.carousel-indicators-wrapper {
    margin-top: -10px;
    margin-bottom: 20px;
}






/* Product Cards */
.product-card {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px);
}

.card-img-top-wrapper {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img-top-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--theme-black);
    margin-bottom: 0.2rem;
}

.product-price {
    font-size: 1rem;
}

.product-desc {
    margin-bottom: 0;
}

/* Footer */
.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--theme-green);
    text-decoration: underline;
}

.border-theme-green {
    border-top: 2px solid var(--theme-green) !important;
}

/* Animations */
@keyframes bump {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.5); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.bump {
    animation: bump 0.3s ease-out;
}

/* responsive adjust */
@media (max-width: 991px) {
    .search-form {
        max-width: 100%;
        flex: 1 1 100%;
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    .navbar-spacer {
        height: 120px;
    }
    .navbar-collapse {
        background-color: #222;
        padding: 1rem;
        border-radius: 5px;
        margin-top: 10px;
        z-index: 1000;
    }
    .btn-login {
        display: inline-flex;
        align-items: center;
        margin-bottom: 0;
    }
}

/* Bottom Navigation */
.bottom-nav {
    min-height: 60px;
    z-index: 1030;
}

.bottom-nav-link {
    flex: 1;
    color: #6c757d;
    transition: all 0.2s ease;
}

.bottom-nav-link.active, .bottom-nav-link:hover {
    color: var(--theme-green) !important;
}

.bottom-nav-link.active span, .bottom-nav-link:hover span {
    color: var(--theme-green) !important;
}

.bottom-nav-link i {
    transition: transform 0.2s ease;
}

.bottom-nav-link:hover i, .bottom-nav-link.active i {
    transform: scale(1.1);
}

body {
    padding-bottom: 70px; /* Prevent content from hiding behind bottom nav */
}

/* Show bottom nav on all screens */
.bottom-nav {
    display: flex !important;
}

body {
    padding-bottom: 70px; /* Prevent content from hiding behind bottom nav on all screens */
}

/* Creative Cart Icon */
.creative-cart-icon {
    width: 35px;
    height: 35px;
    background: rgba(65, 105, 225, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.creative-cart-icon:hover {
    background: rgba(65, 105, 225, 0.2);
    transform: translateY(-2px) scale(1.05);
}

.cart-sparkle {
    width: 6px;
    height: 6px;
    background: var(--theme-green);
    border-radius: 50%;
    top: -2px;
    right: -2px;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.cart-sparkle-2 {
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    bottom: 2px;
    left: 2px;
    animation: pulse 2s infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* Royal Blue Animation */
.animate-royal-blue {
    animation: royalBlueFlow 4s ease-in-out infinite;
    background: linear-gradient(90deg, #4169E1, #1E90FF, #0000CD, #4169E1);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

@keyframes royalBlueFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Sidebar Quick Actions */
.btn-theme-dark {
    background: #2a2a2a;
    border: 1px solid #444;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.btn-theme-dark:hover {
    background: #333;
    border-color: var(--theme-green);
    color: var(--theme-green) !important;
}

.user-info-box {
    transition: transform 0.3s ease;
}

.user-info-box:hover {
    transform: scale(1.02);
}

.bg-theme-green-faint {
    background: rgba(65, 105, 225, 0.1) !important;
}

/* Role Badge Checkboxes */
.role-badge-check .form-check-input:checked + .form-check-label {
    background-color: var(--theme-royal-blue) !important;
    color: white !important;
    border-color: var(--theme-royal-blue) !important;
    font-weight: bold;
}

.role-badge-check .form-check-label {
    transition: all 0.2s ease;
    background-color: white;
    cursor: pointer;
}

.role-badge-check .form-check-label:hover {
    background-color: #f8f9fa;
}

[data-theme="dark"] .role-badge-check .form-check-label {
    background-color: #1a1a1a;
    color: #fff;
    border-color: #333;
}

[data-theme="dark"] .role-badge-check .form-check-label:hover {
    background-color: #222;
}

.line-height-1 { line-height: 1.2 !important; }

.user-row-item {
    transition: all 0.2s ease;
}

.user-row-item:hover {
    background-color: #f8f9fa !important;
    transform: scale(1.005);
}

[data-theme="dark"] .user-row-item {
    background-color: #1a1a1a !important;
    border-color: #333 !important;
}

[data-theme="dark"] .user-row-item:hover {
    background-color: #222 !important;
}

.copy-action-btn:hover {
    background-color: var(--theme-green) !important;
    color: var(--theme-black) !important;
    transform: scale(1.1);
}

.copy-action-btn:active {
    transform: scale(0.9);
}

[data-theme="dark"] .sticky-filter-bar {
    background: rgba(26, 26, 26, 0.95) !important;
}

.filter-btn {
    border-radius: 12px;
}


.role-selector .btn-outline-dark {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-color: #eee;
    color: #888;
}

[data-theme="dark"] .role-selector .btn-outline-dark {
    border-color: #333;
    color: #666;
}

/* Sidebar Access Box Styling */
.access-box {
    margin: 10px 15px;
    padding: 12px;
    border-radius: 15px;
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
}

.access-box-header {
    font-size: 0.65rem;
    font-weight: 800;
    color: #000000 !important;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-left: 5px;
    text-transform: uppercase;
}

.access-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    color: #000000 !important;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 8px;
    border-bottom: 1px solid #eee !important;
    width: 100%;
}

.access-link:last-child {
    border-bottom: none;
}

.access-link:hover {
    background: rgba(65, 105, 225, 0.1) !important;
    color: var(--theme-royal-blue, #007bff) !important;
}

.access-link i {
    width: 20px;
    text-align: center;
    color: #007bff !important;
    font-size: 0.9rem;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sticky-filter-bar {
    border: 1px solid #eee;
}

[data-theme="dark"] .sticky-filter-bar {
    background-color: #1a1a1a !important;
    border-color: #333;
}

.filter-btn {
    border: none;
    background: transparent;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: var(--theme-royal-blue);
    color: white;
}

[data-theme="dark"] .filter-btn {
    color: #aaa;
}

[data-theme="dark"] .filter-btn.active {
    background: var(--theme-royal-blue);
    color: white;
}

.user-item-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important;
}

[data-theme="dark"] .user-item-card {
    background-color: #121212 !important;
    border-color: #2a2a2a !important;
}

.cursor-pointer {
    cursor: pointer;
}

.modal-content {
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

[data-theme="dark"] .modal-content {
    background-color: #1a1a1a;
}

[data-theme="dark"] .modal-body {
    background-color: #121212 !important;
}

/* Universal Notification Popups */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10005;
}

.notification-overlay.active {
    display: flex;
    animation: fadeInPopup 0.3s ease;
}

.notification-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 450px;
    width: 90%;
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification-overlay.active .notification-card {
    transform: translateY(0);
}

.notification-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.notification-icon.success {
    background: rgba(65, 105, 225, 0.1);
    color: #3456b3;
}

.notification-icon.error {
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
}

.notification-icon.info {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.notification-content h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
}

.notification-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.notification-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.notification-close:hover {
    color: #666;
}

@keyframes fadeInPopup {
    from { opacity: 0; }
    to { opacity: 1; }
}

[data-theme="dark"] .notification-card {
    background: #1a1a1a;
    border: 1px solid #333;
}
[data-theme="dark"] .notification-content h4 { color: white; }
[data-theme="dark"] .notification-content p { color: #aaa; }

/* Carousel Indicators Enhancements */
.carousel-indicators-wrapper {
    margin-top: 10px;
    z-index: 10;
    position: relative;
}

/* Inactive: small circles */
.carousel-indicators button {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background-color: #aaa !important;
    border: none !important;
    position: relative;
    overflow: hidden;
    margin: 0 5px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 0.5 !important;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Override Bootstrap's .active styles — keep it as a circle unless JS animating */
.carousel-indicators button.active {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    opacity: 0.8 !important;
    background-color: #fff !important;
    margin: 0 5px !important;
}

/* Animating: expands into a pill */
.carousel-indicators button.bar-animating {
    width: 36px !important;
    height: 8px !important;
    border-radius: 50px !important;
    opacity: 1 !important;
    background-color: rgba(65, 105, 225, 0.2) !important;
    margin-top: 0 !important;
}

/* Progress fill animation inside the active pill — driven by JS */
.carousel-indicators button.bar-animating::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: var(--theme-green);
    border-radius: 50px;
    animation: carouselProgress 5s linear forwards;
}

@keyframes carouselProgress {
    0%   { width: 0%; }
    100% { width: 100%; }
}

[data-theme="light"] .carousel-indicators button {
    background-color: #bbb !important;
}

[data-theme="light"] .carousel-indicators button.active {
    background-color: rgba(0, 0, 0, 0.08) !important;
}


/* Settings Page */
.settings-row {
    color: var(--theme-black);
    transition: background 0.2s ease;
}

.settings-row:hover {
    background: rgba(65, 105, 225, 0.04);
}

[data-theme="dark"] .settings-row {
    color: #eee;
}

[data-theme="dark"] .settings-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .bg-white {
    background: #1e1e1e !important;
}

