/* ================== Map Functionality CSS ========================*/

#map-container {
    position: relative;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    min-height: 256px;
}

#get-location-btn {
    transition: all 0.3s ease;
}

#get-location-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#location-status {
    display: flex;
    align-items: center;
}

#coordinates-display {
    background-color: #f9fafb;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

#coordinates-display span {
    font-family: 'Courier New', monospace;
}

/* Map marker info window styling */
.gm-style .gm-style-iw-c {
    padding: 8px !important;
    border-radius: 8px !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
}

.gm-style .gm-style-iw-t::after {
    background: linear-gradient(45deg, rgba(255,255,255,1) 50%, rgba(255,255,255,0) 51%, rgba(255,255,255,0) 100%) !important;
}
/* Navigation Tabs */
.nav-tabs-container {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
}

.nav-tabs-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

.nav-tabs {
    display: inline-flex;
    min-width: 100%;
    padding-bottom: 2px; /* Space for scrollbar */
}

.tab-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    white-space: nowrap;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-right: 0.5rem;
}

.tab-link:last-child {
    margin-right: 0;
}

.tab-link:hover {
    color: #1f2937;
}

.tab-link.active {
    color: #1f2937;
    border-bottom-color: #3b82f6;
    font-weight: 600;
}

/* Badge in tabs */
.tab-link .absolute {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(30%, -30%);
    font-size: 0.7rem;
    padding: 0.15rem 0.3rem;
    min-width: 1.25rem;
    height: 1.25rem;
    line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .nav-tabs {
        padding-bottom: 4px;
    }
    
    .tab-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .tab-link .absolute {
        font-size: 0.6rem;
        min-width: 1.1rem;
        height: 1.1rem;
    }
}

/* Filter buttons container */
.filter-buttons-container {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 8px;
    margin-bottom: -8px;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.filter-buttons-container::-webkit-scrollbar {
    height: 6px;
}

.filter-buttons-container::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.filter-buttons-container::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

/* Filter buttons */
.sort-tab, .btn-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.8rem;
    margin: 0.2rem;
    font-size: 0.75rem;
    line-height: 1.2;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sort-tab i, .btn-filter i {
    margin-right: 0.3rem;
    font-size: 0.7rem;
}

.sort-tab.active, .btn-filter.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0a58ca;
}

/* Responsive adjustments */
@media (min-width: 640px) {
    .sort-tab, .btn-filter {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .sort-tab i, .btn-filter i {
        font-size: 0.8rem;
    }
}

@media (min-width: 1024px) {
    .sort-tab, .btn-filter {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }
    
    .sort-tab i, .btn-filter i {
        font-size: 0.9rem;
    }
}

.btn-remove-img::before {
    top: 10%;
    right: 10%;
    padding: 5px;
    border-radius: 5px;
    position: absolute;
    cursor: pointer;
    background-color: #eee;
    opacity: 0.8;
}

.bg-vertical-center {
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center center;
}

.bg-vertical-center-cover {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}


/* form validation */

label.error {
    color: red;
    margin-top: 10px;
}

.form-group.error .form-control {
    color: red;
    border: 1px solid red !important;
}

form.error-inline label.error {
    position: absolute;
    margin-top: 60px;
}


/* fix breadcrumb link */

.breadcrumb-item a {
    text-decoration: none;
    color: var(--bs-body-color);
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: #fffe;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader .loader {
    position: relative;
    padding: 30px;
    background: #fff;
    border-radius: 10px;
}

.preloader .loader:before {
    content: "";
    width: 50px;
    height: 50px;
    border: 4px solid #0003;
    border-top: 4px solid #000a;
    display: block;
    border-radius: 50%;
    animation: preloader 1s linear infinite;
}

@keyframes preloader {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* ================== Badge Overlay CSS ========================*/

.badge-overlay {
    position: absolute;
    left: 0%;
    top: 0px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 100;
    -webkit-transition: width 1s ease, height 1s ease;
    -moz-transition: width 1s ease, height 1s ease;
    -o-transition: width 1s ease, height 1s ease;
    transition: width 0.4s ease, height 0.4s ease
}


/* ================== Badge CSS ========================*/

.custom-badge {
    margin: 0;
    padding: 0;
    color: white;
    padding: 10px 10px;
    font-size: 15px;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    line-height: normal;
    text-transform: uppercase;
    background: #ed1b24;
}

.custom-badge::before,
.custom-badge::after {
    content: '';
    position: absolute;
    top: 0;
    margin: 0 -1px;
    width: 100%;
    height: 100%;
    background: inherit;
    min-width: 55px
}

.custom-badge::before {
    right: 100%
}

.custom-badge::after {
    left: 100%
}


/* ================== Badge Position CSS ========================*/

.custom-badge.top-left {
    position: absolute;
    top: 0;
    left: 0;
    -ms-transform: translateX(-30%) translateY(0%) rotate(-45deg);
    -webkit-transform: translateX(-30%) translateY(0%) rotate(-45deg);
    transform: translateX(-30%) translateY(0%) rotate(-45deg);
    -ms-transform-origin: top right;
    -webkit-transform-origin: top right;
    transform-origin: top right;
}

.custom-badge.top-right {
    position: absolute;
    top: 0;
    right: 0;
    -ms-transform: translateX(30%) translateY(0%) rotate(45deg);
    -webkit-transform: translateX(30%) translateY(0%) rotate(45deg);
    transform: translateX(30%) translateY(0%) rotate(45deg);
    -ms-transform-origin: top left;
    -webkit-transform-origin: top left;
    transform-origin: top left;
}

.custom-badge.bottom-left {
    position: absolute;
    bottom: 0;
    left: 0;
    -ms-transform: translateX(-30%) translateY(0%) rotate(45deg);
    -webkit-transform: translateX(-30%) translateY(0%) rotate(45deg);
    transform: translateX(-30%) translateY(0%) rotate(45deg);
    -ms-transform-origin: bottom right;
    -webkit-transform-origin: bottom right;
    transform-origin: bottom right;
}

.custom-badge.bottom-right {
    position: absolute;
    bottom: 0;
    right: 0;
    -ms-transform: translateX(30%) translateY(0%) rotate(-45deg);
    -webkit-transform: translateX(30%) translateY(0%) rotate(-45deg);
    transform: translateX(30%) translateY(0%) rotate(-45deg);
    -ms-transform-origin: bottom left;
    -webkit-transform-origin: bottom left;
    transform-origin: bottom left;
}

.custom-badge.top-full {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
}

.custom-badge.middle-full {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    text-align: center;
    -ms-transform: translateX(0%) translateY(-50%) rotate(0deg);
    -webkit-transform: translateX(0%) translateY(-50%) rotate(0deg);
    transform: translateX(0%) translateY(-50%) rotate(0deg);
}

.custom-badge.bottom-full {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
}


/* ================== Badge color CSS ========================*/

.custom-badge.red {
    background: #ed1b24;
}

.custom-badge.orange {
    background: #fa7901;
}

.custom-badge.pink {
    background: #ee2b8b;
}

.custom-badge.blue {
    background: #00adee;
}

.custom-badge.green {
    background: #b4bd00;
}

.product-images .slick-slide {
    height: auto !important;
}

/* Fixed tabs section styles */
/* #fixed-tabs-section {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 10;
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid #e5e7eb;
    top: 80px;
} */

/* Ensure proper spacing for content below fixed headers */
body {
    padding-top: calc(var(--header-height, 0px) + var(--tabs-height, 0px));
}

/* Tab link hover effects */
.tab-link {
    transition: all 0.2s ease-in-out;
}

.tab-link:hover {
    color: #1f2937 !important;
    background-color: #f9fafb;
}

/* Sort Tab Styles */
.sort-tab {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sort-tab:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sort-tab.active {
    background: #1f2937;
    color: white;
    border-color: #1f2937;
    box-shadow: 0 2px 8px rgba(31, 41, 55, 0.3);
}

.sort-tab.secondary {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
    font-size: 13px;
    padding: 6px 12px;
    min-height: 32px;
}

.sort-tab.secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #475569;
}

.sort-tab.secondary.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-filter {
    padding: 8px 16px;
    background: rgb(255 94 32);
    border: 1px solid #e5e7eb;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments for fixed tabs */
@media (max-width: 768px) {
    #fixed-tabs-section .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #fixed-tabs-section .flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    #fixed-tabs-section .flex.items-center {
        justify-content: space-between;
    }
    
    .sort-tab {
        font-size: 12px;
        padding: 6px 12px;
        min-height: 32px;
    }
    
    .sort-tab.secondary {
        font-size: 11px;
        padding: 4px 8px;
        min-height: 28px;
    }
}

@media (max-width: 480px) {
    .sort-tab {
        font-size: 11px;
        padding: 4px 8px;
        min-height: 28px;
    }

    .btn-filter {
        font-size: 11px;
        padding: 8px 12px;
        min-height: 40px;
        border-radius: 8px;
        background-color: rgb(255 94 32);
        border: 1px solid #e5e7eb;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    #mobileOpenFilterModal i {
        font-size: 12px;
        color: #ffffff;
        margin-right: 0px;
    }
    
    .sort-tab.secondary {
        font-size: 10px;
        padding: 3px 6px;
        min-height: 24px;
    }
}

/* Filter Sidebar Styles */
.filter-sidebar {
    width: 256px;
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border-right: 1px solid #e5e7eb;
    padding: 1rem;
    flex-shrink: 0;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: all 0.2s ease-in-out;
}

.filter-header:hover {
    color: #1f2937;
}

.filter-header h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.filter-chevron {
    width: 1rem;
    height: 1rem;
    color: #6b7280;
    transform: rotate(0deg);
    transition: transform 0.2s ease-in-out;
}

.filter-chevron.expanded {
    transform: rotate(180deg);
}

.filter-content {
    margin-top: 0.75rem;
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: all 0.2s ease-in-out;
}

.filter-option:hover {
    color: #1f2937;
}

.filter-option input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1px solid #d1d5db;
    background-color: white;
    cursor: pointer;
}

.filter-option input[type="checkbox"]:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.filter-option span {
    font-size: 0.875rem;
    color: #374151;
    user-select: none;
}

/* Category Group Styles */
.category-group {
    margin-bottom: 0.75rem;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: all 0.2s ease-in-out;
}

.category-header:hover {
    color: #1f2937;
}

.category-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
}

.category-chevron {
    width: 1rem;
    height: 1rem;
    color: #6b7280;
    transform: rotate(0deg);
    transition: transform 0.2s ease-in-out;
}

.category-chevron.expanded {
    transform: rotate(180deg);
}

.subcategory-content {
    margin-top: 0.5rem;
    margin-left: 0.75rem;
}

.subcategory-content .filter-option {
    padding: 0.125rem 0;
    font-size: 0.8125rem;
}

.subcategory-content .filter-option span {
    font-size: 0.8125rem;
    color: #6b7280;
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: block;
    background: white;
    border: 1px solid #d1d5db;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.mobile-filter-toggle:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

@media (min-width: 1024px) {
    .mobile-filter-toggle {
        display: none;
    }
}

/* Filter Layout */
.filter-container {
    display: flex;
    flex-direction: row;
    gap: 0;
}

.filter-main-content {
    flex: 1;
    padding: 1rem;
    margin: 20px 0px 20px 0px;
}

/* Mobile Filter Styles */
@media (max-width: 1023px) {
    .filter-sidebar {
        width: 100%;
        border-right: none;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        margin-bottom: 1rem;
    }
}

/* Sort Tab Styles */
.sort-tab {
    transition: all 0.2s ease-in-out;
}

.sort-tab:hover {
    background-color: #f9fafb !important;
    border-color: #d1d5db !important;
}

.sort-tab.active {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: white !important;
}

.sort-tab.secondary.active {
    background-color: #1e40af !important;
    border-color: #1e40af !important;
    color: white !important;
}

/* Override inline styles for active state */
.sort-tab.active:not(.secondary) {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: white !important;
}

.sort-tab.active.secondary {
    background-color: #1e40af !important;
    border-color: #1e40af !important;
    color: white !important;
}

/* Category Pill Styles */
.category-pill {
    display: inline-block;
    cursor: pointer;
}

.category-pill .category-checkbox {
    display: none;
}

.category-pill .flex {
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    transition: all 0.2s ease-in-out;
}

.category-pill:hover .flex {
    background: #f9fafb;
    border-color: #9ca3af;
}

.category-pill.active .flex {
    background: #1f2937;
    border-color: #1f2937;
    color: white;
}

.category-pill.active .flex span {
    color: white;
}

.category-pill .flex img {
    filter: grayscale(0);
    transition: filter 0.2s ease-in-out;
}

.category-pill.active .flex img {
    filter: grayscale(0) brightness(1.2);
}

/* Modal Styles */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Checkbox and Radio Styles */
.category-checkbox,
.condition-checkbox,
.sort-radio {
    accent-color: #3b82f6;
}
