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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* Header Styles */
header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

header h1 {
    font-size: 1.8rem;
    font-weight: bold;
}

header nav a {
    color: black;
    text-decoration: none;
    margin-left: 2rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

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

/* Main Content */
main {
    padding: 2rem 0;
    min-height: 70vh;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    border-radius: 10px;
    margin-bottom: 3rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Product Grid */
.products h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 2rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

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

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

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

.product-card h3 {
    padding: 1rem;
    color: #2c3e50;
    font-size: 1.3rem;
}

.product-card .category {
    padding: 0 1rem;
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
}

.product-card .description {
    padding: 0 1rem;
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.product-card .price {
    padding: 0 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.product-card .btn-order {
    display: block;
    margin: 0 1rem 1rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.product-card .btn-order:hover {
    background: linear-gradient(135deg, #00a085, #00b894);
}

/* Order Page Styles */
.order-section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.order-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 2rem;
}

.order-product {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.order-product img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.product-info h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.product-info .category {
    color: #7f8c8d;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.product-info .description {
    color: #555;
    margin-bottom: 1rem;
}

.product-info .price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e74c3c;
}

.order-form {
    display: grid;
    gap: 2rem;
}

.quantity-section {
    text-align: center;
}

.quantity-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.quantity-controls button {
    width: 40px;
    height: 40px;
    border: none;
    background: #3498db;
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s;
}

.quantity-controls button:hover {
    background: #2980b9;
}

.quantity-controls input {
    width: 80px;
    height: 40px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1.1rem;
}

.total-section {
    text-align: center;
    padding: 1.5rem;
    background: #e8f5e8;
    border-radius: 8px;
}

.total-section h3 {
    margin-bottom: 1rem;
    color: #27ae60;
}

.total-section .total-price {
    font-size: 2rem;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 0.5rem;
}

.total-section .delivery-info {
    color: #7f8c8d;
    font-style: italic;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    resize: vertical;
}

.btn-submit {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #00a085, #00b894);
}

/* Success Page */
.success-section {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.success-message {
    padding: 2rem;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
}

.success-message h2 {
    margin-bottom: 1rem;
    color: #155724;
}

.btn-back {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn-back:hover {
    background: #2980b9;
}

/* Admin Login */
.admin-login {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.admin-login h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.login-form {
    margin-bottom: 2rem;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-login:hover {
    background: #2980b9;
}

.login-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    color: #6c757d;
}

.login-info p {
    margin: 0.2rem 0;
}

/* Admin Dashboard */
.admin-dashboard h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: #7f8c8d;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.orders-table {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.orders-table h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.orders-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.orders-table th,
.orders-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.orders-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #cce5ff;
    color: #004085;
}

.status-delivered {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-right: 0.3rem;
    transition: background 0.3s;
}

.btn-processing {
    background: #3498db;
    color: white;
}

.btn-processing:hover {
    background: #2980b9;
}

.btn-delivered {
    background: #27ae60;
    color: white;
}

.btn-delivered:hover {
    background: #229954;
}

.btn-cancel {
    background: #e74c3c;
    color: white;
}

.btn-cancel:hover {
    background: #c0392b;
}

/* Admin Products */
.product-management {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.add-product-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.add-product-form h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.btn-add {
    width: 100%;
    padding: 1rem;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-add:hover {
    background: #229954;
}

.products-list {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.products-list h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.admin-product-card {
    position: relative;
}

.admin-product-card .btn-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.5rem 1rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.admin-product-card .btn-delete:hover {
    background: #c0392b;
}

/* Error and Success Messages */
.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 3rem;
}

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

    header nav a {
        margin: 0 0.5rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

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

    .order-product {
        flex-direction: column;
    }

    .order-product img {
        width: 100%;
        height: 200px;
    }

    .product-management {
        grid-template-columns: 1fr;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .orders-table {
        overflow-x: auto;
    }

    .orders-table table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}