/* Global Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e40af;
    --secondary-color: #f59e0b;
    --text-color: #1f2937;
    --light-bg: #f9fafb;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --warning-color: #ef4444;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a8a 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.tagline {
    font-size: 14px;
    opacity: 0.9;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
    font-weight: 500;
}

.nav-link:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a8a 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    opacity: 0.95;
}

/* Products Section */
.products-section {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    color: var(--primary-color);
}

/* Filters */
.filters {
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.filters label {
    font-weight: 600;
    color: var(--text-color);
}

.filters select {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filters select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

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

.product-image {
    width: 100%;
    height: 200px;
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-placeholder {
    font-size: 48px;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.product-category {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 10px;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.product-stock {
    font-size: 14px;
    margin-bottom: 15px;
}

.stock-available {
    color: var(--success-color);
    font-weight: 600;
}

.stock-limited {
    color: var(--warning-color);
    font-weight: 600;
}

.stock-unavailable {
    color: var(--warning-color);
    font-weight: 600;
}

.product-button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.product-button:hover {
    background-color: #1e3a8a;
}

.product-button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-color);
    font-size: 16px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--text-color);
}

.modal-product-image {
    width: 100%;
    height: 300px;
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 5px;
    overflow: hidden;
}

.modal-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-product-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.modal-product-category {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 15px;
}

.modal-product-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.modal-product-stock {
    font-size: 16px;
    margin-bottom: 15px;
}

.modal-product-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.8;
}

.modal-button {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.modal-button:hover {
    background-color: #1e3a8a;
}

.modal-button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* About Section */
.about-section {
    padding: 60px 0;
    background-color: white;
}

.about-section h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-section p {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
}

/* Contact Section */
.contact-section {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.contact-section h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: center;
}

.contact-info {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 16px;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        flex-direction: column;
        gap: 10px;
    }

    .hero h2 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .section-title {
        font-size: 28px;
    }

    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 20px;
    }

    .filters {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 20px;
    }

    .hero h2 {
        font-size: 24px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 24px;
    }

    .modal-product-name {
        font-size: 20px;
    }

    .modal-product-price {
        font-size: 24px;
    }
}
