.shop-header {
    background-color: #ffffff;
    padding: 8px 0;
    border-bottom: 3px solid #e0e0e0;
}

/* Shop Product Cards - Smaller Size */
.shop-products .shop-product-item .card {
    min-height: auto;
    margin-bottom: 20px;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-products .shop-product-item .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Stop click propagation on action buttons */
.shop-products .shop-product-item .wishlist-btn,
.shop-products .shop-product-item .cart-btn,
.shop-products .shop-product-item .inquiry-btn {
    position: relative;
    z-index: 10;
    cursor: pointer;
}

.shop-products .shop-product-item .card-img-top {
    height: 120px;
    padding: 8px;
}

.shop-products .shop-product-item .card-body {
    padding: 8px;
}

.shop-products .shop-product-item .card-title {
    font-size: 12px;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-products .shop-product-item .card-text {
    font-size: 11px;
    margin-bottom: 4px;
}

.shop-products .shop-product-item .card-price {
    font-size: 14px;
    font-weight: 700;
}

.shop-products .shop-product-item .wishlist-btn,
.shop-products .shop-product-item .cart-btn,
.shop-products .shop-product-item .inquiry-btn {
    padding: 4px 6px;
    font-size: 12px;
}

.shop-products .shop-product-item .d-flex.gap-2 {
    gap: 4px !important;
}

/* Mobile product cards - even smaller */
.shop-products .mobile-product-card {
    max-width: 140px;
}

.shop-products .mobile-product-card .card-img-top {
    height: 80px;
}

.shop-products .mobile-product-card .card-body {
    padding: 6px;
}

.shop-products .mobile-product-card .card-title {
    font-size: 11px;
}

.shop-products .mobile-product-card .card-price {
    font-size: 12px;
}

.shop-products .mobile-product-card .d-flex.gap-1 {
    gap: 3px !important;
}

/* Extra small mobile */
@media (max-width: 480px) {
    .shop-products .mobile-product-card {
        max-width: 120px;
    }
    
    .shop-products .mobile-product-card .card-img-top {
        height: 70px;
    }
}

.shop-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.shop-header h4 {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin: 0;
    white-space: nowrap;
}

.shop-header .shop-title {
    flex-shrink: 0;
}

.shop-header .search-form {
    flex-grow: 1;
    max-width: 400px;
    margin: 0 20px;
    min-width: 0;
}

.shop-header .input-group {
    width: 100%;
}

.shop-header .input-group .form-control {
    border-right: none;
    border-color: #a5a5a5;
}

.shop-header .input-group .btn {
    color: #000000;
    border-color: #a5a5a5;
    border-left: none;
    background-color: #fff;
}

.shop-header .input-group .btn:focus {
    box-shadow: none;
}

.shop-header .input-group .btn:hover {
    background-color: #f8f9fa;
}

/* Product Cards - Align buttons to left */
.shop-products .card-body {
    text-align: left;
}

.shop-products .card-body .btn {
    display: inline-block;
    text-align: left;
}

/* Product Card Images */
.shop-products .card-img-top {
    padding: 15px;
    border-radius: 15px;
    object-fit: cover;
}

.shop-products .card {
    border-radius: 15px;
}

/* Cart Button */
.cart-btn {
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    padding: 8px 12px;
}

.cart-btn:hover {
    background-color: #0056b3;
    color: white;
}

/* Wishlist Button */
.wishlist-btn {
    background-color: transparent;
    border: 1px solid #dee2e6;
    border-radius: 100px;
    padding: 8px 12px;
    color: #6c757d;
    transition: all 0.3s;
    font-size: 16px;
}

.wishlist-btn:hover {
    background-color: #ffe6e6;
    border-color: #dc3545;
    color: #dc3545;
}

.wishlist-btn .bi-heart-fill {
    color: #dc3545;
}

.cart-btn {
    background-color: #8a8a8a;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 16px;
}

/* Category Container - Remove spacing between buttons */
.category-container {
    padding: 0;
    margin: 0;
}

.category-container .list-group {
    padding: 0;
    margin: 0;
}

.category-container .list-group-item {
    padding: 8px 0;
    margin: 0;
}

.category-container .category-link {
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    display: block;
}

.category-container .category-link:hover {
    background-color: #f0f0f0;
    border-radius: 4px;
}

.category-container .category-link.active {
    background-color: #007bff;
    color: rgb(0, 0, 0);
    border-radius: 4px;
}

.shop-header .header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

#featuredDropdown {
  border-color: #a5a5a5;
  border-radius: 8px;  
  background-color: #fff;   
  width: min(180px, 100%);       
}

#featuredDropdown:hover {
    background-color: #f8f9fa;
    border-color: #3B00FF;
}

#featuredDropdown:focus {
    box-shadow: none;
    border-color: #3B00FF;
}

/* Active filter indicator */
.shop-header .featured-active {
    color: #3B00FF;
    font-weight: 600;
}

.shop-header .dropdown-item:active {
    background-color: #3B00FF;
}

/* Category */

.category-container {
    padding: 20px;
}

.category-container .card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
    width: min(220px, 100%);
    flex-shrink: 0;
}

.category-card{
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
    width: min(220px, 100%);
    height: fit-content;
    flex-shrink: 0;
}

.category-title {
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #a3a3a3;
    margin-top: 20px;
}

.desktop-layout .category-container,
.tablet-layout .category-container {
    display: grid;
    align-items: start;
    width: 100%;
    max-width: 100%;
    margin: 0;
    gap: 20px;
}

.desktop-layout .category-container {
    grid-template-columns: minmax(220px, 240px) minmax(0, 1fr);
}

.tablet-layout .category-container {
    grid-template-columns: minmax(200px, 220px) minmax(0, 1fr);
}

.desktop-layout .category-card,
.tablet-layout .category-card,
.desktop-layout .product-container,
.tablet-layout .product-container {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
}

.desktop-layout .category-card,
.tablet-layout .category-card {
    position: sticky;
    top: 20px;
}

.desktop-layout .shop-products,
.tablet-layout .shop-products {
    min-width: 0;
}

#shopProductsRowDesktop,
#shopProductsRowTablet {
    display: grid;
    align-items: start;
    width: 100%;
    margin: 0;
}

#shopProductsRowDesktop {
    grid-template-columns: repeat(auto-fit, minmax(180px, 200px));
    justify-content: start;
    gap: 16px;
}

#shopProductsRowTablet {
    grid-template-columns: repeat(auto-fit, minmax(160px, 220px));
    justify-content: start;
    gap: 16px;
}

#shopProductsRowDesktop > .shop-product-item,
#shopProductsRowTablet > .shop-product-item {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0 !important;
    padding: 0;
}

#shopProductsRowDesktop > .shop-product-item[class*="col-"],
#shopProductsRowTablet > .shop-product-item[class*="col-"] {
    flex: initial;
    max-width: none;
}

#shopProductsRowDesktop .card,
#shopProductsRowTablet .card {
    width: 100% !important;
    max-width: none;
    margin: 0;
}

/* Products container */
.shop-products .row {
    --bs-gutter-x: 16px;
    --bs-gutter-y: 16px;
}

.shop-products .shop-product-item {
    margin-bottom: 0 !important;
}

.shop-products .shop-product-item .card {
    margin-bottom: 0;
}


/* Mobile responsive */
@media (max-width: 768px) {
    .shop-header .container {
        justify-content: space-between;
        text-align: left;
    }
    
    .shop-header .shop-title {
        width: auto;
        text-align: left;
        margin-bottom: 0;
        padding: 8px 0;
    }
    
    .shop-header .search-form {
        width: 100%;
        max-width: 100%;
        margin: 10px 0;
        order: 3;
    }
    
    .shop-header .header-actions {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .category-container {
        padding: 12px;
    }

    .category-container .card,
    .category-card {
        width: 100%;
    }
}

@media (max-width: 1199px) {
    .desktop-layout .category-card,
    .tablet-layout .category-card {
        position: static;
    }
}

footer {
    background-color: #000000;
}

/* Cart Slide-out Panel */

/* Cart Slide-out Panel */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cart-slide {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 1050;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.cart-slide.open {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h5 {
    margin: 0;
    font-weight: 600;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Mobile cart-item specific */
@media (max-width: 767.98px) {
    .cart-item {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background-color: #f8f9fa;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 10px;
}

/* Mobile Cart Modal (below 768px) */
@media (max-width: 767.98px) {
    .cart-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .cart-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .cart-slide {
        position: fixed;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        width: min(350px, calc(100vw - 24px));
        height: min(500px, calc(100vh - 24px));
        border-radius: 15px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        display: flex;
        flex-direction: column;
        overflow: hidden !important;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .cart-slide.open {
        opacity: 1;
        visibility: visible;
    }

    /* Hide mobile menu when cart modal is open */
    .cart-slide.open ~ .mobile-menu-panel,
    .cart-slide.open ~ .mobile-menu-overlay,
    #cartSlide.open ~ #mobileMenuPanel,
    #cartSlide.open ~ #mobileMenuOverlay {
        display: none;
    }

    .cart-header {
        padding: 15px 20px;
        border-bottom: 1px solid #e0e0e0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-radius: 15px 15px 0 0;
    }

    .cart-body {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 15px;
        max-height: 320px;
        width: 100%;
        box-sizing: border-box;
    }

    .cart-footer {
        padding: 15px 20px;
        border-top: 1px solid #e0e0e0;
        background-color: #f8f9fa;
        border-radius: 0 0 15px 15px;
    }

    .cart-header > div:first-child {
        flex: 1;
    }

    .cart-header .rounded-circle {
        width: 45px !important;
        height: 45px !important;
    }

    .cart-header .icon {
        width: 20px !important;
    }
}

/* Tablet product cards */
@media (min-width: 768px) and (max-width: 991px) {
    .shop-products .shop-product-item .card {
        max-width: 180px;
    }
    
    .shop-products .shop-product-item .card-img-top {
        height: 100px;
    }
    
    .shop-products .shop-product-item .card-body {
        padding: 8px;
    }
    
    .shop-products .shop-product-item .card-title {
        font-size: 11px;
    }
}
