/* ---------- Reset Box Sizing for All Elements ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ---------- Global Styles ---------- */
body {
    font-family: Arial, sans-serif;
    background-color: #273463;
    color: white;
    margin: 0;
    padding: 0;
}

/* ---------- Header Styles ---------- */
header {
    background-color: #1e284d;
    color: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header.hide {
    top: -100px;
}

header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logo h1 {
    font-size: 36px;
    white-space: nowrap;
}

nav ul {
    list-style-type: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

nav ul li a:hover {
    color: #3498db;
}

@media (max-width: 768px) {
    header {
        flex-wrap: wrap;
        padding: 15px 20px;
    }

    .logo {
        flex-basis: 100%;
        margin-bottom: 10px;
    }

    nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 10px 15px;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    nav ul li {
        flex: 1 1 auto;
    }

    nav ul li a {
        font-size: 16px;
        padding: 6px 10px;
    }
}

#shop-hero {
    padding: 60px 40px;
    text-align: center;
}

#shop-hero h2 {
    font-size: 40px;
    margin-bottom: 40px;
}

.shop-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
    align-items: flex-start;
}

#product-search {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.category-button {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.category-button:hover,
.category-button.active {
    background-color: #1c5980;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 75px;
    padding: 20px;
    margin-left: -20px;
}

.product-card {
    background-color: #1e284d;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-align: center;
    transition: transform 0.3s ease;
    width: 100%;
    min-height: 350px;
}

.product-card.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.product-card:hover {
    transform: scale(1.05);
}

.product-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.product-card h3 {
    margin: 15px 0 10px;
    font-size: 20px;
}

.product-card .price {
    font-size: 18px;
    margin-bottom: 10px;
}

.add-to-cart {
    background-color: #3498db;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-to-cart:hover {
    background-color: #1c5980;
}