.main-section {
    padding: 2vh;
    height: auto;
}
.products-wrap {
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3vh;
}
.all-products {
    width: 80%;
    display: grid;
    gap: 2vh;
    grid-template-columns: repeat(4, 1fr);
}
.dropdown-search-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    width: 100%;
}
.dropdown, .search-bar {
    display: inline-block;
    min-width: 110px;
    vertical-align: middle;
}
.link-product {
    text-decoration: none;
    color: black;
}
.search-bar {
    min-width: 120px;
    flex: 1 1 0;
}
.dropdown {
    min-width: 110px;
    flex: 1 1 0;
}
.search-bar input {
    padding: 10px 30px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
}

.search-bar button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 5px;
}

.search-bar button i {
    font-size: 16px;
}
.card {
    height: 40vh;
    border: 1px solid black;
    padding: 2vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.img {
    background-color: rgba(128, 128, 128, 0);
    height: 24vh;
    width: 24vh;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 1px 1px 5px black;
    overflow: hidden;
    transition: all ease-in-out .3s;
}

.img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
.img:hover {
    transform: scale(1.03);
}
.card h3 {
    font-size: 1rem;
    margin-top: 1vh;
}

.col {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 2vh;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    padding: 20px 0;
}

.page {
    padding: 8px 14px;
    border: 1px solid black;
    text-decoration: none;
    color: black;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.page:hover {
    background-color: black;
    color: white;
}

.page.active {
    background-color: black;
    color: white;
    cursor: default;
}

.page.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .main-section {
        padding: 2px;
    }
    .products-wrap {
        margin-top: 0;
    }
    .all-products {
        padding: 1vh;
        width: 100%;
        gap: 8px;
        grid-template-columns: repeat(2, 1fr);
        margin-top: 2vh;
    }
    .card {
        height: 25vh;
        margin-top: 1px;
    }
    .img {
        height: 10vh;
        width: 10vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .card h3 {
        font-size: .8rem;
    }
    .col {
        margin-top: 1vh;
    }
    .col p {
        font-size: .8rem;
    }
    .pagination {
        gap: 4px;
        margin-top: 20px;
    }
    .page {
        padding: 6px 12px;
        font-size: 14px;
    }
    .dropdown, .search-bar {
    min-width: 110px;
    flex: 1 1 0;
    }
}
.product-card.out-of-stock {
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
}

.card.disabled {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.card.disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.out-of-stock-text {
    color: #ff0000;
    font-weight: bold;
}

.link-product {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.no-products {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    width: 100%;
    grid-column: 1 / -1;
}

/* Navigation Dropdown Styles */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.nav-dropdown-toggle i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle i {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #7D0A0A;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1001;
    border-radius: 4px;
    overflow: hidden;
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-dropdown-menu a:last-child {
    border-bottom: none;
}

.nav-dropdown-menu a:hover {
    background-color: #5a0808;
}

/* Mobile responsive for navigation dropdown */
@media (max-width: 768px) {
    .nav-dropdown {
        position: static;
        display: block;
    }

    .nav-dropdown-toggle {
        display: none;
    }

    .nav-dropdown-menu {
        position: static;
        background-color: transparent;
        box-shadow: none;
        display: block;
        padding-left: 0;
        min-width: auto;
    }

    .nav-dropdown-menu a {
        border-bottom: none;
        color: black;
        margin: 0;
        text-align: left;
        display: block;
        padding: 0;
        font-size: 18px;
    }

    .nav-dropdown-menu a:hover {
        background-color: transparent;
    }
}