/* 🌐 Global Styles */
body {
    font-family: "Poppins", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    color: #333;
}

/* 🧭 Header Navigation */
header.header {
    background: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    flex-wrap: wrap;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

/* 🛍️ Logo / Title */
header h1 {
    margin: 0;
    font-size: 1.8em;
    letter-spacing: 0.5px;
    flex: 1;
}

/* 🔍 Search & Sort Container */
.search-sort {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 2;
}

.search-sort input,
.search-sort select {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    outline: none;
    min-width: 160px;
    transition: all 0.3s ease;
}

.search-sort input:focus,
.search-sort select:focus {
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.4);
}

/* 🛒 View Cart Button */
.cart-btn {
    background: white;
    color: #007bff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    flex-shrink: 0;
}

.cart-btn:hover {
    background: #0056b3;
    color: white;
}

/* 🧱 Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* 🏷️ Product Card */
.product-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.product-card h3 {
    margin: 10px 0 5px;
    font-size: 1.1em;
}

.product-card p {
    padding: 0 10px;
    font-size: 0.9em;
    color: #666;
}

.product-card button {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    margin: 10px 0 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    transition: 0.3s;
}

.product-card button:hover {
    background: #0056b3;
}

/* 🔢 Pagination */
.pagination {
    text-align: center;
    padding: 20px;
}

.pagination button {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    margin: 0 5px;
    cursor: pointer;
    transition: 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: #0056b3;
}

.pagination button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#pageInfo {
    font-weight: bold;
    margin: 0 10px;
}

/* 🦶 Footer */
footer {
    background: #f1f1f1;
    text-align: center;
    padding: 12px;
    font-size: 0.9em;
}

/* 📱 RESPONSIVE DESIGN */

/* 📺 Laptops (992px - 1200px) */
@media (max-width: 1200px) {
    header.header {
        padding: 15px 20px;
    }
    .search-sort {
        gap: 8px;
    }
}

/* 💻 Tablets (768px - 991px) */
@media (max-width: 991px) {
    header.header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 10px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .search-sort {
        flex-wrap: wrap;
        justify-content: center;
    }

    .cart-btn {
        align-self: center;
        width: 100%;
        max-width: 260px;
    }
}

/* 📱 Mobiles (up to 767px) */
@media (max-width: 767px) {
    header.header {
        flex-direction: column;
        gap: 8px;
        padding: 15px;
    }

    header h1 {
        font-size: 1.3em;
        text-align: center;
    }

    .search-sort {
        flex-direction: column;
        width: 100%;
    }

    .search-sort input,
    .search-sort select {
        width: 100%;
        max-width: 320px;
    }

    .cart-btn {
        width: 100%;
        max-width: 320px;
        font-size: 0.9em;
        padding: 8px 14px;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        padding: 10px;
    }
}

/* 📱 Small Phones (≤480px) */
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-card img {
        height: 160px;
    }

    .product-card h3 {
        font-size: 1em;
    }

    .product-card p {
        font-size: 0.85em;
    }
}
