/* Product Card Images */
.card-img-top {
    height: 300px;
    object-fit: cover;
}

.card-body {
    background-color: #ececec;
}

/* Sidebar Typography */
aside h6 {
    font-size: 24px;
}

main h6 {
    font-size: 20px;
}

/* Navbar Link Underline Animation */
.navbar-nav .nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: #000;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

.navbar-nav .nav-link:hover {
    color: #000;
}

.navbar-nav .nav-link.active {
    color: #000;
    font-weight: bold;
}

/* Desktop Navbar Icons */
.nav-icon-link {
    color: #212529;
    font-size: 22px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.nav-icon-link:hover {
    color: #000;
    background-color: #f8f9fa;
}

/* Search Bar in Navbar */
.search-wrapper {
    position: relative;
    width: 250px;
}

.search-input {
    padding-left: 35px;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #000;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1);
    width: 280px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.navbar-nav.mx-auto.mb-2.mb-lg-0.gap-2 {
    gap: 2rem !important;
    font-weight: bold;
    /* Reduced from larger gap */
}


@media (max-width: 991px) {
    .navbar-nav.mx-auto.mb-2.mb-lg-0.gap-2 {
        gap: 0.5rem !important;
        /* Even smaller gap on mobile */
    }

    .navbar-nav .nav-item {
        margin-bottom: 0.25rem;
    }
}

/* Mobile Menu Icons */
.mobile-menu-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #212529;
    font-size: 14px;
    gap: 5px;
    padding: 10px 20px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    position: relative;
}

.mobile-menu-icon:hover {
    background-color: #f8f9fa;
    color: #000;
}

.mobile-menu-icon i {
    font-size: 28px;
}

.mobile-menu-icon span:not(.cart-badge) {
    font-size: 13px;
    font-weight: 500;
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}
/* Sidebar Filters */
aside input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: black;
    margin-right: 8px;
}

aside li {
    padding-left: 6px;
    font-size: 18px;
}

aside label {
    cursor: pointer;
    display: flex;
    align-items: center;
}

aside label:hover {
    color: #666;
}

@media (max-width: 768px) {
    /* Mobile Card Optimization */
    .card {
        height: auto !important;
    }

    .card img {
        height: 150px;
        width: 100%;
        object-fit: cover;
    }

    .card-body {
        padding: 0.75rem;
    }

    /* Limit title to 2 lines with ellipsis */
    .card-body h6 {
        font-size: 13px;
        margin-bottom: 0.25rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        height: 33.8px;
    }
    
    /* Limit description to 1 line */
    .card-body .text-muted {
        font-size: 11px;
        margin-bottom: 0.25rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .card-body .fw-bold {
        font-size: 13px;
        margin-bottom: 0;
    }

    .card-body .badge {
        font-size: 10px;
        padding: 0.2rem 0.4rem;
    }
}
