/* Base reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #EBF4FF;
    /* very light blue */
    color: #16213E;
}

.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 16px 0;
    /* Any styling you need */
}

main {
    flex: 1;
}

.breadcrumb-container {
    width: 100%;
}

/* Navigation */
.top-nav {
    background-color: #a3cef1;
    /* dark navy blue */
    color: white;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 64, 128, 0.25);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 900;
    font-size: 1.85rem;
    letter-spacing: 2px;
    color: #A9D6FF;
}

.nav-links {
    display: flex;
    gap: 1.8rem;
    list-style-type: none;
}

.nav-links a {
    color: #A9D6FF;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links a:hover,
.nav-links a:focus {
    background-color: #3399FF;
    /* medium bright blue */
    color: white;
    outline: none;
}

/* Search bar */
.nav-search {
    display: flex;
    gap: 8px;
    margin-left: 1.6rem;
}

.nav-search input[type="search"] {
    padding: 0.5rem 1.2rem;
    border: 2px solid #3399FF;
    border-radius: 30px;
    background-color: #DAECFF;
    /* very light blue */
    color: #16213E;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    width: 160px;
}

.nav-search input[type="search"]:focus {
    outline: none;
    background-color: #E8F4FF;
    border-color: #007BFF;
    box-shadow: 0 0 7px #3399FFaa;
}

.nav-search button[type="submit"] {
    border: none;
    border-radius: 50%;
    background-color: #007BFF;
    color: white;
    padding: 0.55rem 1rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.nav-search button[type="submit"]:hover,
.nav-search button[type="submit"]:focus {
    background-color: #004A99;
    outline: none;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 2rem auto 3rem;
    padding: 0 1rem;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

/* Sidebar */
.sidebar {
    background-color: #E3F2FD;
    /* light blue background */
    border-radius: 14px;
    box-shadow: 0 6px 20px #a5c4f070;
    padding: 1.8rem 1.4rem;
    width: 260px;
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
}

.top-button-group {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 0.8rem;
}

.toggle-btn {
    flex: 1;
    padding: 0.75rem 0;
    font-weight: 700;
    border: none;
    border-radius: 35px;
    cursor: pointer;
    color: #A9D6FF;
    background-color: #004080;
    box-shadow: 0 5px 18px #005bb5aa;
    font-size: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.toggle-btn.active {
    background-color: #007BFF;
    color: #fff;
    box-shadow: 0 6px 22px #3399FFcc;
}

.toggle-btn:hover:not(.active),
.toggle-btn:focus-visible:not(.active) {
    background-color: #3399FF;
    color: #f0faff;
    outline: none;
}

/* Category section */
.category-section h2 {
    font-weight: 900;
    font-size: 1.2rem;
    color: #007BFF;
    margin-bottom: 1rem;
    border-bottom: 3px solid #3399FF;
    padding-bottom: 0.3rem;
    margin-top: 20px;
}


.button-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.category-btn {
    background-color: #A9D6FF;
    padding: 0.7rem 1.2rem;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 700;
    color: #003366;
    border: none;
    text-align: left;
    cursor: pointer;
    box-shadow: inset 0 0 6px #74a9ff55;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.category-btn.active,
.category-btn:focus-visible {
    background-color: #007BFF;
    color: white;
    box-shadow: inset 0 0 8px #85baffbb;
    outline: none;
}

.category-btn:hover:not(.active) {
    background-color: #80b3ff;
    color: #001f4d;
}

/* Main content */
.main-content {
    flex: 1;
    min-width: 0;
}

h1 {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    margin-bottom: 2.3rem;
    text-align: center;
    color: #004080;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem 1.7rem;
    margin-bottom: 4rem;
}

@media (max-width: 1080px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 780px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        gap: 1.5rem;
    }

    .button-list {
        /* flex-direction: row; */
        gap: 0.9rem;
        overflow-x: auto;
    }

    .category-btn {
        flex-shrink: 0;
        text-align: center;
        padding: 0.6rem 1rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Product card */
.product {
    background-color: #E3F2FD;
    border-radius: 22px;
    box-shadow: 0 6px 25px #3399ff44;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: box-shadow 0.3s ease, transform 0.25s ease;
    cursor: pointer;
}


.product-footer {
    /* position: relative; */
    /* bottom: 0px; */
    display: flex;
    margin-top: auto;
    margin-bottom: 0px;
}
.card-body1 .product-footer{
    margin: 20px 0px 0px 0px;
}
.card-body1 {
    padding: 1.5rem 1.2rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* grow and fill remaining vertical space */
    /* height: 100%; */
}

.product:hover,
.product:focus-within {
    box-shadow: 0 5px 15px #007BFF88;
    transform: translateY(-8px) scale(1.03);
    outline: none;
}

.product h3 {
    font-weight: 900;
    font-size: 1.3rem;
    margin: 0.5rem 0 0.5rem;
    color: #003366;
}

.product p {
    color: #004080;
    font-size: 1rem;
}

.price {
    color: #43a047;
    font-weight: 900;
    font-size: 1.15rem;
    margin-top: auto;
}

/* Image slider */
.image-slider {
    flex: 0 0 auto;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    position: relative;
    width: 100%;
    height: 300px;
    /* padding-top: 56.25%; */
    overflow: hidden;
    /* border-radius: 18px; */
    background: #80b3ff44;
    /* box-shadow: 0 10px 30px #3399ff44; */
    /* margin-bottom: 1.1rem; */
}

.image-slider .slide-track {
    display: flex;
    height: 100%;
    justify-content: center;
    align-items: center;
    /* width: 100%; */
    text-align: center;
    /* JS updates this */
    /* transition: transform 0.7s cubic-bezier(0.64, 0.05, 0.12, 0.94); */
    /* position: absolute; */
    /* top: 0; */
    /* left: 0; */
}

.image-slider img {
    /* width: 100%;
    height: 100%; */
    /* object-fit:fill ; */
    flex-shrink: 0;
    border-radius: 5px;
}

.nav-btn {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #673ab7aa;
    border: none;
    color: white;
    padding: 0.5rem 0.9rem;
    font-size: 1.2rem;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.25s;
    z-index: 10;
    box-shadow: 0 1px 7px #a188f0dd;
}

.nav-btn:hover,
.nav-btn:focus-visible {
    background-color: #4a148cdd;
    outline: none;
}

.nav-left {
    left: 1rem;
}

.nav-right {
    right: 1rem;
}

/* Footer */
footer {
    background-color: #ff9100;
    color: white;
    text-align: center;
    padding: 1.4rem 1.2rem;
    font-weight: 900;
    letter-spacing: 1.3px;
    font-size: 1rem;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    box-shadow: 0 -4px 16px #ffcf000d;
    position: relative;
}


.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #673ab7aa;
    border: none;
    color: white;
    padding: 0.3rem 0.6rem;
    /* Reduced padding */
    font-size: 1rem;
    /* Smaller font size */
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.25s;
    z-index: 10;
    box-shadow: 0 1px 7px #a188f0dd;
}

.nav-btn:hover,
.nav-btn:focus-visible {
    background-color: #4a148cdd;
    outline: none;
}

.nav-left {
    left: 0.5rem;
    /* Adjust if needed */
}

.nav-right {
    right: 0.5rem;
    /* Adjust if needed */
}

.mode-btn {
    background-color: #3399ff;
    /* bright blue */
    border: none;
    border-radius: 20px;
    padding: 0.65rem 1.3rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
    user-select: none;
}

.mode-btn:hover,
.mode-btn:focus-visible {
    background-color: #1a75ff;
    outline: none;
}

.mode-btn.active,
.mode-btn[aria-checked="true"] {
    background-color: #004080;
    /* dark navy for active */
    box-shadow: 0 0 6px #003366cc;
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 1rem auto 1.5rem;
    padding: 0 1rem;
}

.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    font-size: 0.95rem;
    color: #555;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li+li::before {
    content: "›";
    margin: 0 0.4rem;
    color: #999;
}

/* Breadcrumb link styling */
.breadcrumb a {
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}

.breadcrumb a:hover,
.breadcrumb a:focus {
    text-decoration: underline;
    outline: none;
}

.breadcrumb .active {
    font-weight: 600;
    color: #333;
    cursor: default;
    text-decoration: none;
}