/* Navbar Styling */
.navbar {
    background-color: #232f3e;
    padding: 5px 0;
    margin-top: 0;
}

.navbar-brand {
    color: #fff !important;
    font-size: 24px;
    font-weight: bold;
}
.navbar-brand:hover {
    color: #ff9900 !important;
}

.nav-link {
    color: #fff !important;
    font-size: 14px;
    margin: 0 10px;
}
.nav-link:hover {
    color: #ff9900 !important;
}

.navbar-toggler {
    border-color: #fff;
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Dropdowns */
.navbar-dark .navbar-nav .nav-item .dropdown-menu,
.userDropdown-menu {
    background-color: #232f3e;
    border: none;
}
.navbar-dark .navbar-nav .nav-item .dropdown-menu .dropdown-item,
.userDropdown-menu .dropdown-item,
.dropdown-item {
    color: #fff !important;
    background-color: #232f3e;
}
.navbar-dark .navbar-nav .nav-item .dropdown-menu .dropdown-item:hover,
.userDropdown-menu .dropdown-item:hover,
.dropdown-item:hover {
    background-color: #495057;
    color: #000 !important;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
}
.search-box input {
    border-radius: 5px 0 0 5px;
    border: none;
    padding: 10px;
    width: 100%;
}
.search-box button {
    border-radius: 0 5px 5px 0;
    background-color: #ff9900;
    border: none;
    padding: 10px 20px;
    color: #000;
}
.search-box button:hover {
    background-color: #e68a00;
}

/* Cart Icon */
.cart-icon {
    position: relative;
    color: #fff;
    font-size: 20px;
}
.cart-icon .badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ff9900;
    color: #000;
    border-radius: 50%;
    padding: 5px 8px;
    font-size: 12px;
}

/* Product Card */
 .product-card {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        min-width: 0;
        max-width: 100%;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

   .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    }

  .product-img-container {
        width: 100%;
        aspect-ratio: 1/1;
        /* Always square */
        max-height: 180px;
        /* Limit height */
        overflow: hidden;
        background: #f8f9fa;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .product-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        /* Crop to fit */
        display: block;
    }
.product-card:hover .product-img {
    transform: scale(1.05);
}
    .product-title {
        font-size: 0.95rem;
        font-weight: 500;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 2.8em;
        margin-bottom: 0.5rem;
    }

.product-title a {
    display: block;
    word-wrap: break-word;
}
.product-price {
    color: #b12704;
    font-size: 1.2rem;
    margin-top: 5px;
    text-decoration: line-through;
}
.product-selling-price {
    color: #b12704;
    font-size: 1.2rem;
    margin-top: 5px;
}
.product-discount {
    color: #28a745;
    font-size: 1rem;
    margin-top: 5px;
}

    .product-rating {
        font-size: 0.85rem;
        color: #ffc107;
        margin-bottom: 0.5rem;
    }

.product-rating i {
    margin-right: 2px;
}
.product-vendor {
    color: #555;
    margin-top: 5px;
}
.add-to-cart {
    width: 100%;
    background-color: #ff9900;
    border-color: #ff9900;
    color: white;
}
.add-to-cart:hover {
    background-color: #e68a00;
    border-color: #e68a00;
}

 @media (max-width: 576px) {
        .product-img-container {
            max-height: 120px;
            /* Smaller on mobile */
        }

        .product-card {
            padding: 8px;
        }

        .product-title {
            font-size: 0.85rem;
        }
    }

    .current-price {
        color: #dc3545;
    }

    .original-price {
        opacity: 0.8;
    }

/* Wishlist Button */
.wishlist-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: all 0.3s ease;
}
.wishlist-btn:hover {
    color: #dc3545;
    transform: scale(1.1);
}

/* Nearest Vendor */
.nearest_vendor {
    text-align: center;
    margin-top: 20px;
}
.nearest_vendor h2 {
    font-size: 30px;
    color: #333;
}
.nearest_vendor a {
    display: inline-block;
    padding: 10px 20px;
    background: #ff9900;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
}
.nearest_vendor a:hover {
    background: #e68a00;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .product-card {
        margin-bottom: 15px;
    }
    .product-title {
        font-size: 0.9rem;
    }
    .current-price {
        font-size: 1rem;
    }
    .product-rating {
        font-size: 14px;
        color: #ffc107;
        margin-bottom: 8px;
    }
    .product-rating i {
        margin-right: 2px;
    }
}