/* Custom styles for All The Leads Store */

/* Category Navigation Styles */
.category-item a {
    transition: all 0.3s ease;
}

.category-item a:hover {
    transform: translateY(-2px);
}

.category-item a:hover .category-image-container {
    box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
}

.category-nav-btn {
    transition: all 0.3s ease;
}

.category-nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25) !important;
}

.category-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* Category Container - Simple Flexbox Layout */
#categoriesContainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    gap: 1.5rem;
}

.category-item {
    flex: 0 0 auto;
    width: 120px;
}

.category-image-container {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-name {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    margin-top: 0.75rem;
}

/* Responsive sizing */
@media (min-width: 768px) {
    .category-item {
        width: 140px;
    }
    
    .category-image-container {
        width: 120px;
        height: 120px;
    }
}

@media (min-width: 992px) {
    .category-item {
        width: 160px;
    }
    
    .category-image-container {
        width: 140px;
        height: 140px;
    }
}

/* Main Content Padding */
.site-main {
    margin-top: 76px;
    /* padding: 0.5rem; */  /* Mobile default */
}


/* Mobile Menu Elements - Hidden by default */
.mobile-menu-toggle,
.mobile-filter-toggle,
.mobile-menu,
.filter-sidebar {
    display: none;
}

/* Product Filters */
.product-filters {
    background: white;
    height: 100%;
}

/* Desktop Styles (992px and up) */
@media (min-width: 992px) {
    .product-filters {
        position: sticky;
        top: 1rem;
        padding: 1rem;
        border: 1px solid var(--bs-gray-200);
        border-radius: var(--bs-border-radius);
    }

    .product-filters .filter-header .filter-close {
        display: none;
    }

    .product-filters .filter-header {
        margin-bottom: 1rem;
    }

    .product-filters .filter-header h4 {
        margin: 0;
        font-size: 1.25rem;
    }
}

/* Mobile Styles */
@media (max-width: 991px) {
    /* Position filters off-screen by default */
    .product-filters {
        position: fixed;
        top: 0;
        right: -100%;
        bottom: 0;
        width: 100%;
        max-width: 400px;
        z-index: 1050;
        transition: right 0.3s ease-in-out;
        background: white;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    }

    /* Show filters when sidebar is open */
    .filter-sidebar-open .product-filters {
        right: 0;
    }

    .product-filters .filter-content {
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .product-filters .filter-header {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem;
        border-bottom: 1px solid var(--bs-gray-200);
        background: white;
    }

    .product-filters .filter-header h4 {
        margin: 0;
        font-size: 1.25rem;
    }

    .product-filters .filter-close {
        border: none;
        background: none;
        padding: 0.5rem;
        font-size: 1.25rem;
        color: var(--bs-gray-600);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product-filters .filter-close:hover {
        color: var(--bs-gray-800);
    }

    .product-filters .filter-body {
        flex: 1 1 auto;
        overflow-y: auto;
        padding: 1rem;
    }

    .product-filters .filter-footer {
        flex: 0 0 auto;
        padding: 1rem;
        border-top: 1px solid var(--bs-gray-200);
        background: white;
    }
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
}

/* Mobile Styles */
@media (max-width: 991px) {
    .mobile-menu-toggle,
    .mobile-filter-toggle {
        display: block;
    }

    .desktop-nav,
    .desktop-icons {
        display: none;
    }
    
    /* Ensure mobile header only shows logo and hamburger */
    .navbar .container {
        justify-content: space-between;
        margin: 0px 25px;
    }
    
    .navbar-brand {
        margin: 0 !important;
    }

    /* Slide-out Menu */
    .mobile-menu {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: -81vw;
        width: 80vw;
        height: 100vh;
        background: white;
        z-index: 1050;
        transition: left 0.3s ease;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
        overflow: hidden;
    }

    .mobile-menu.active {
        left: 0;
    }

    /* Filter Sidebar */
    .filter-sidebar {
        display: block;
        position: fixed;
        top: 0;
        right: -320px;
        width: 320px;
        height: 100vh;
        background: white;
        z-index: 1050;
        transition: right 0.3s ease;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
        overflow-y: auto;
        padding: 1rem;
    }

    .filter-sidebar.active {
        right: 0;
    }
}

/* Overlay for mobile menus */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
}

.menu-overlay.active {
    display: block;
}

/* Header Icons */
.navbar-icon-button {
    transition: color 0.3s ease;
}

.navbar-icon-button:hover {
    color: var(--bs-secondary) !important;
}

.navbar-btn:hover {
    background-color: var(--bs-secondary) !important;
    border-color: var(--bs-secondary) !important;
}

/* Navbar spacer adjustment */
.navbar-spacer {
    height: 76px;  /* Adjust based on your navbar height */
}

/* Mobile menu close button */
.mobile-menu-close,
.filter-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--bs-gray-600);
    cursor: pointer;
}

/* Mobile menu header */
.mobile-menu-header {
    padding: 1rem;
    border-bottom: 1px solid var(--bs-gray-200);
}

/* Mobile menu items */
.mobile-menu-items {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mobile-menu-items .nav-link {
    color: var(--bs-gray-900);
    font-size: 1.1rem;
    padding: 0.5rem 0;
}

/* Mobile search section */
.mobile-top-section {
    padding: 2rem;
    border-bottom: 1px solid var(--bs-gray-200);
    background-color: var(--bs-gray-50);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mobile-search-form .input-group {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-search-form .form-control {
    border: 1px solid var(--bs-gray-300);
    font-size: 1rem;
}

.mobile-search-form .btn {
    border-radius: 0;
    font-weight: 500;
}

.mobile-top-section .nav-item {
    margin: 0 1.25rem;
}

.mobile-top-section .nav-link {
    font-weight: 500;
    color: var(--bs-primary);
    display: flex;
    align-items: center;
}

.mobile-top-section .nav-link:hover {
    color: var(--bs-secondary);
}

/* Active link styling */
.mobile-top-section .nav-link.active,
.mobile-menu-items .nav-link.active {
    color: var(--bs-secondary);
    font-weight: 600;
    background-color: rgba(var(--bs-secondary-rgb), 0.1);
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    margin: 0 -1rem;
}

.mobile-top-section .nav-link.active:hover,
.mobile-menu-items .nav-link.active:hover {
    color: var(--bs-secondary);
    background-color: rgba(var(--bs-secondary-rgb), 0.15);
}

/* Desktop active link styling */
.desktop-nav .nav-link.active {
    color: var(--bs-secondary) !important;
    font-weight: 600;
}

.desktop-nav .nav-link.active:hover {
    color: var(--bs-secondary) !important;
}

/* Desktop icon active styling */
.navbar-icon-button.active {
    color: var(--bs-secondary) !important;
}

.navbar-icon-button.active:hover {
    color: var(--bs-secondary) !important;
}

/* Login button active styling */
.navbar-btn.active {
    background-color: var(--bs-secondary) !important;
    border-color: var(--bs-secondary) !important;
    color: white !important;
}

.navbar-btn.active:hover {
    background-color: var(--bs-secondary) !important;
    border-color: var(--bs-secondary) !important;
    color: white !important;
    opacity: 0.9;
}

/* Filter Styles */
/* .filter-footer {
    position: sticky;
    bottom: 0;
    background: white;
} */
.filter-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Make filter sections scrollable */


/* Ensure filter sections don't collapse */
.filter-body .filter-section:last-child {
    margin-bottom: 0;
}

/* Custom scrollbar styling */
.filter-body::-webkit-scrollbar {
    width: 6px;
}

.filter-body::-webkit-scrollbar-track {
    background: var(--bs-gray-100);
    border-radius: 3px;
}

.filter-body::-webkit-scrollbar-thumb {
    background: var(--bs-gray-400);
    border-radius: 3px;
}

.filter-body::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}

/* Hide filters container on mobile by default */
@media (max-width: 991px) {
    #filters-container {
        display: none;
    }
    
    .filter-sidebar.active #filters-container {
        display: block;
    }
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--bs-gray-800);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-range {
    accent-color: var(--bs-primary);
}

/* Filter button */
.btn-outline-primary {
    border-color: var(--bs-gray-300);
    color: var(--bs-gray-700);
}

.btn-outline-primary:hover {
    background-color: var(--bs-gray-100);
    border-color: var(--bs-gray-400);
    color: var(--bs-gray-900);
}

/* Hover Effects */
.hover-accent {
    transition: opacity 0.2s ease;
}

.hover-accent:hover {
    opacity: 1 !important;
}

/* Logo Invert for Footer */
.invert {
    filter: brightness(0) invert(1);
}

/* Product Card Styles */
.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 600/400;
    overflow: hidden;
    background-color: var(--bs-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img-wrapper img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.card-img-wrapper.portrait img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
}

.product-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.product-tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0.5rem 0.5rem 0;
}

.product-tag:hover {
    opacity: 0.8;
}

/* Alert Message Styles */
.alert-message {
    position: fixed;
    top: 90px;
    right: 15px;
    z-index: 9999;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    max-width: calc(100vw - 30px);
    font-weight: 500;
}

/* Desktop: Inside bootstrap container width, aligned to container's right edge */
@media (min-width: 992px) {
    .alert-message {
        right: max(20px, calc((100vw - 1140px) / 2 + 20px));
        left: auto;
        max-width: 500px;
    }
}

@media (min-width: 1200px) {
    .alert-message {
        right: max(20px, calc((100vw - 1320px) / 2 + 20px));
    }
}

.alert-message.alert-success {
    background-color: var(--bs-success);
    color: white;
}

.alert-message.alert-error {
    background-color: var(--bs-danger);
    color: white;
}

/* Hero Carousel Styles */
#hero-carousel {
    height: 35vh;
    min-height: 450px;
}

#hero-carousel .c-item {
    height: 35vh;
    min-height: 450px;
}

#hero-carousel .c-img {
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#hero-carousel .carousel-caption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Company color tints for each slide */
#hero-carousel .carousel-item:nth-child(1) .carousel-caption {
    background: linear-gradient(135deg, rgba(1, 60, 195, 0.8) 0%, rgba(1, 60, 195, 0.3) 100%);
}

#hero-carousel .carousel-item:nth-child(2) .carousel-caption {
    background: linear-gradient(135deg, rgba(57, 178, 126, 0.8) 0%, rgba(57, 178, 126, 0.3) 100%);
}

#hero-carousel .carousel-item:nth-child(3) .carousel-caption {
    background: linear-gradient(135deg, rgba(242, 158, 25, 0.8) 0%, rgba(242, 158, 25, 0.3) 100%);
}

/* Text drop shadows */
#hero-carousel .carousel-caption h1,
#hero-carousel .carousel-caption .display-1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

#hero-carousel .carousel-caption p,
#hero-carousel .carousel-caption .lead {
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

#hero-carousel .carousel-caption .text-uppercase {
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

#hero-carousel .carousel-indicators {
    bottom: 20px;
    z-index: 15;
    margin-bottom: 0;
}

#hero-carousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background-color: transparent;
    margin: 0 5px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

#hero-carousel .carousel-indicators button.active {
    background-color: white;
    opacity: 1;
}

#hero-carousel .carousel-control-prev,
#hero-carousel .carousel-control-next {
    width: 60px;
    height: 60px;
    background-color: rgba(0,0,0,0.3);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

#hero-carousel .carousel-control-prev {
    left: 20px;
}

#hero-carousel .carousel-control-next {
    right: 20px;
}

#hero-carousel .carousel-control-prev:hover,
#hero-carousel .carousel-control-next:hover {
    background-color: rgba(0,0,0,0.5);
    transform: translateY(-50%) scale(1.1);
}

/* Responsive adjustments for carousel */
@media (max-width: 768px) {
    #hero-carousel {
        height: 60vh;
        min-height: 400px;
    }
    
    #hero-carousel .c-item {
        height: 60vh;
        min-height: 400px;
    }
    
    #hero-carousel .carousel-caption {
        padding-bottom: 70px; /* More space on mobile for indicators */
    }
    
    #hero-carousel .carousel-caption .container {
        padding: 0 1rem;
    }
    
    #hero-carousel .carousel-caption h1 {
        font-size: 2rem;
    }
    
    #hero-carousel .carousel-caption .lead {
        font-size: 1rem;
    }
    
    #hero-carousel .carousel-control-prev,
    #hero-carousel .carousel-control-next {
        width: 50px;
        height: 50px;
    }
    
    #hero-carousel .carousel-control-prev {
        left: 10px;
    }
    
    #hero-carousel .carousel-control-next {
        right: 10px;
    }
}

