/* ========== SEARCH BOX STYLES ========== */
.search-container {
    display: flex;
    width: 100%;
    border: 3px double #12837B;
    border-radius: 5px;
    overflow: hidden;
}

.search-container input {
    flex: 1;
    border-radius: 0;
    font-size: 16px;
    background: #f5f5f5;
}

.search-container .search-btn {
    background: #12837B;
    border-radius: 0;
    padding: 0 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-container .search-btn i {
    color: white;
    font-size: 18px;
}

#product-search-container {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.search-box {
    display: flex;
    align-items: center;
    border: 1px solid #0073aa;
    border-radius: 5px;
    padding: 5px;
    background: #fff;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 4px;
    background: transparent;
}

.search-box .search-icon {
    font-size: 16px;
    padding: 4px;
    cursor: pointer;
    color: #0073aa;
}

/* ========== FILTER STYLES ========== */
.filter-wrapper {
    display: flex;
    align-items: center;
    background: white;
    padding: 10px 10px 10px 10px;
    margin: 0;
    border-radius: 10px;
    border: 3px double #01664A;
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.scroll-btn {
    background: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 30px 10px 30px 10px;
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    color: black;
    transition: background 0.3s;
}

.scroll-btn:hover {
    background: white;
    color: black;
}

.scroll-left {
    left: 0;
}

.scroll-right {
    right: 0;
}

.filter-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    white-space: nowrap;
    padding: 10px 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-container::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: #e0e0e0;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: bold;
    color: #333;
    transition: background 0.3s, color 0.3s;
}

.filter-btn.active {
    background: #007bff;
    color: white;
}

.filter-btn:hover {
    background: #007bff;
    color: white;
}

/* Popup Filter Button */
.pop-filter-btn {
    background: linear-gradient(145deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    position: relative;
    margin-top: 20px;
    z-index: 10;
    font-size: 16px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 400px;
    display: block;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.pop-filter-btn:hover { 
    background: linear-gradient(145deg, #0056b3, #007bff); 
    transform: scale(1.05); 
}

/* Popup Styles */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 350px;
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-height: 75vh;
    overflow: hidden;
    transition: 0.2s ease-in-out;
}

.popup-content { 
    text-align: center; 
    padding: 10px; 
}

.popup-content hr { 
    margin: 10px 0; 
    border: 0.5px solid #ddd; 
}

#sub-category-buttons {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 10px;
    margin-right: -20px;
    scrollbar-width: thin;
    scrollbar-color: #007bff #ddd;
}

#sub-category-buttons::-webkit-scrollbar {
    width: 6px;
    margin-right: -5px;
}

#sub-category-buttons::-webkit-scrollbar-thumb {
    background-color: #007bff;
    border-radius: 10px;
}

#sub-category-buttons::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.popup-close {
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #eee;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 10px;
    right: 10px;
    transition: all 0.3s ease;
}

.popup-close:hover { 
    background: #ddd; 
    transform: scale(1.1); 
}

.sub-category-btn {
    background: #f9f9f9;
    border: none;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    display: block;
    margin-top: 8px;
    text-align: left;
    width: 100%;
    font-size: 14px;
    transition: all 0.2s ease;
    color: black;
}

.sub-category-btn:hover { 
    background: #007bff; 
    color: white; 
    transform: translateX(5px); 
}

.sub-category-btn.active { 
    background: #0056b3; 
    color: white; 
    font-weight: bold; 
}

/* ========== CAROUSEL STYLES ========== */
.carousel-wrapper {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.5s ease-in-out;
}

.carousel-wrapper.expanded {
    flex-wrap: wrap;
    overflow: visible;
    white-space: normal;
}

.see-all-btn {
    background-color: white;
    color: #12837B;
    padding: 5px 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    border-radius: 5px;
    position: relative;
    display: block;
    z-index: 10;
    margin: 20 auto;
    position: sticky;
}

.see-all-btn:hover {
    background: white !important;
    color: #D4A017;
}

.see-all-btn:focus,
.see-all-btn:active {
    background-color: white !important;
    color: #D4A017 !important;
    outline: none;
}

.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    white-space: nowrap;
    scrollbar-width: none;
}

.carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.carousel-btn {
    cursor: pointer;
}

.carousel-card {
    flex: 0 0 auto; 
	width: 131px; 
	transition: transform 0.3s ease-in-out;
}

.carousel-card.active {
    transform: scale(1.1);
}

.carousel-card:hover {
    transform: scale(1.1);
}

.carousel-btn.left {
    left: 0;
}

.carousel-btn.right {
    right: 0;
}
	
@media (max-width: 768px) {
  .carousel-wrapper.expanded .carousel-card {
    flex: 1 1 calc(33.33% - 12px); /* 3 cards per row */
    margin-bottom: 15px;
  }
}

@media (max-width: 480px) {
  .carousel-wrapper.expanded .carousel-card {
    flex: 1 1 calc(33.33% - 10px);
    margin-bottom: 10px;
  }
}

/* ========== RESPONSIVE STYLES ========== */
/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .filter-wrapper {
        padding: 10px 0 10px 0;
        margin: 0 0 0 0;
    }
    
    .scroll-btn {
        display: none !important;
    }
    
    #sub-category-buttons {
        max-height: 280px;
        padding-right: 15px;
        margin-right: -60px;
    }

    #sub-category-buttons::-webkit-scrollbar {
        width: 5px;
    }
}

/* Mobile (up to 767px) */
@media (max-width: 767px) {
    .search-box {
        padding: 5px;
    }

    .search-box input {
        font-size: 14px;
        padding: 5px;
    }

    .search-box .search-icon {
        font-size: 18px;
        padding: 5px;
    }
	
/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
    #sub-category-buttons {
        max-height: 280px;
        padding-right: 20px;
        margin-right: -40px;
    }
   
    #sub-category-buttons::-webkit-scrollbar {
        width: 4px;
    }
}
