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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Header */
.header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

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

.nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Notification Overlay */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.notification-modal {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    margin: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.notification-modal h2 {
    margin-bottom: 20px;
    color: #007bff;
}

.notification-modal p {
    margin-bottom: 30px;
    font-size: 18px;
    line-height: 1.6;
}

.notification-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.notification-buttons .btn {
    min-width: 140px;
}

/* Login/Register Forms */
.login-section, .register-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.login-form, .register-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h2, .register-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #007bff;
}

.login-form input, .register-form input {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-form input:focus, .register-form input:focus {
    outline: none;
    border-color: #007bff;
}

.login-form button, .register-form button {
    width: 100%;
    margin-bottom: 20px;
}

.login-form p, .register-form p {
    text-align: center;
}

.login-form a, .register-form a {
    color: #007bff;
    text-decoration: none;
}

.login-form a:hover, .register-form a:hover {
    text-decoration: underline;
}

/* Main App */
.main-app {
    padding: 40px 0;
}

/* Supermarket Section */
.supermarket-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: #333;
}

.supermarket-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.supermarket-card.custom-order {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: 2px solid #28a745;
}

.supermarket-card.custom-order:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-8px);
}

.custom-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.supermarket-card.custom-order h3,
.supermarket-card.custom-order p {
    color: white;
}

.supermarket-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.supermarket-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.supermarket-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 20px;
}

.supermarket-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.supermarket-card p {
    color: #666;
    font-size: 14px;
}

/* Custom Order Section */
.custom-order-section {
    padding: 20px 0;
}

.custom-order-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.custom-order-header h2 {
    color: #28a745;
    font-size: 2rem;
}

.custom-order-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.custom-order-form h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.custom-order-form p {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
}

#custom-order-text {
    width: 100%;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 150px;
    margin-bottom: 25px;
    transition: border-color 0.3s;
}

#custom-order-text:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.custom-order-actions {
    text-align: center;
}

.custom-order-actions .btn {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
}

/* Product Section */
.product-section {
    padding: 20px 0;
}

.product-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.product-header h2 {
    color: #333;
    font-size: 2rem;
}

.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 12px 24px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    font-weight: 500;
}

.tab-btn.active, .tab-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

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

.product-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-3px);
}

.product-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.product-card h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #333;
}

.product-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 15px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    font-size: 14px;
}

/* Cart */
.cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 1000;
}

.cart.open {
    display: block;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.cart-header h3 {
    color: #333;
}

.cart-count {
    background: #007bff;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f8f9fa;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info h5 {
    font-size: 14px;
    margin-bottom: 5px;
}

.cart-item-info p {
    font-size: 12px;
    color: #666;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.quantity-btn:hover {
    background: #f8f9fa;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

.cart-total {
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.1rem;
}

.checkout-btn {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .supermarket-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .cart {
        width: calc(100% - 40px);
        bottom: 10px;
        right: 20px;
        left: 20px;
    }
    
    .product-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .category-tabs {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .notification-modal {
        padding: 30px 20px;
    }
    
    .login-form, .register-form {
        padding: 30px 20px;
    }
    
    .supermarket-card {
        padding: 20px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}
