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

:root {
    --primary-color: #2c5f4f;
    --secondary-color: #8b6f47;
    --accent-color: #d4a574;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --error: #dc3545;
    --success: #28a745;
}

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

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

/* Header & Navigation */
header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo h1 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 0;
}

.logo .tagline {
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-top: 0.2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

.admin-link {
    background: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
}

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

.hero-content p {
    font-size: 1.2rem;
    color: var(--accent-color);
}

/* Filters Section */
.filters {
    padding: 3rem 0 1rem;
    background: var(--bg-light);
}

.filters h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 2rem;
    border: 2px solid var(--primary-color);
    background: var(--white);
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

/* Products Section */
.products {
    padding: 3rem 0;
    background: var(--bg-light);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

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

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

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

.product-info {
    padding: 1.5rem;
}

.product-category {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.product-name {
    font-size: 1.3rem;
    margin: 0.5rem 0;
    color: var(--primary-color);
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin: 0.5rem 0;
}

.product-details {
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.product-details p {
    margin: 0.3rem 0;
}

.product-description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 0.5rem;
}

.stock-status {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.in-stock {
    background: #d4edda;
    color: #155724;
}

.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

.loading, .no-products {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--text-light);
    grid-column: 1 / -1;
}

/* About Section */
.about {
    padding: 4rem 0;
    background: var(--white);
}

.about h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 2rem;
}

.about p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* Contact Section */
.contact {
    padding: 4rem 0;
    background: var(--bg-light);
}

.contact h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 2rem;
}

.contact-info {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info p {
    font-size: 1.1rem;
    margin: 1rem 0;
    color: var(--text-dark);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Admin Styles */
.admin-section {
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
}

.admin-box {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.admin-box h2, .admin-box h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-color);
}

.btn-secondary {
    background: var(--text-light);
    color: var(--white);
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: var(--text-dark);
}

.btn-danger {
    background: var(--error);
    color: var(--white);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-edit {
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.form-actions {
    display: flex;
    align-items: center;
}

.error-message {
    color: var(--error);
    margin-top: 1rem;
    font-size: 0.9rem;
}

.success-message {
    color: var(--success);
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Product List in Admin */
.product-item {
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.product-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}

.product-item-info {
    flex: 1;
}

.product-item-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.product-item-actions {
    display: flex;
    gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .product-item {
        flex-direction: column;
        text-align: center;
    }
    
    .product-item-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}
