/* CSS Variables & Theme (Light Green Accent) */
:root {
    --primary-color: #7baf6c;      /* Light green accent */
    --primary-hover: #639255;
    --text-dark: #000000;
    --text-light: #000000;
    --bg-light: #f5f5f6;
    --white: #ffffff;
    --border-color: #d4d5d9;
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --radius: 8px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

/* Utilities */
.section-padding {
    padding: 4rem 10%;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.w-100 {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* Navigation Bar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 1rem 5%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo span {
    color: var(--primary-color);
}

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

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    text-transform: uppercase;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.search-bar {
    display: flex;
    flex: 0 1 400px;
    background-color: var(--bg-light);
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    align-items: center;
}

.search-bar input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
}

.search-bar button {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.2rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 1.1rem;
}

.login-link {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.4rem 1rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.login-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.admin-link {
    border: 1px solid var(--border-color);
    color: var(--text-light);
}

.nav-actions a:not(.login-link):hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.cart-count {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    position: relative;
    top: -10px;
    left: -5px;
    font-weight: bold;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    padding: 0 5%;
    min-height: 80vh;
}

.hero-content {
    flex: 1;
    padding-right: 3rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    max-height: 70vh;
    object-fit: cover;
}

/* Categories Section */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
}

.category-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card h3 {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1.2rem;
}

.category-card:hover img {
    transform: scale(1.05);
}

/* Featured Products */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.product-card {
    background-color: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.product-image {
    position: relative;
    padding-top: 100%; /* Aspect ratio square for general products */
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1rem;
}

.product-category {
    font-size: 0.8rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.product-brand {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.product-title {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.center-btn {
    text-align: center;
}

/* Newsletter */
.newsletter {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

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

.newsletter-form {
    display: flex;
    margin-top: 2rem;
    gap: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border-radius: var(--radius);
    border: none;
    font-family: inherit;
}

.newsletter-form button {
    background-color: var(--text-dark);
}

.newsletter-form button:hover {
    background-color: #000;
}

/* Modals */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); 
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--white);
    margin: 10% auto; 
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out forwards;
}

.admin-modal {
    border-top: 4px solid #e74c3c; /* Distinctive border for admin */
}

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

.close {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

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

.modal h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.login-form .form-group {
    margin-bottom: 1.2rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.login-form input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(123, 175, 108, 0.2);
}

.login-hint {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.login-hint a {
    color: var(--primary-color);
    font-weight: 600;
}

/* Footer */
.footer {
    background-color: #fafbfc;
    padding: 4rem 5% 1rem;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.footer-block {
    flex: 1;
    min-width: 250px;
}

.footer-block h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    color: var(--text-dark);
}

.footer-block p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-block ul li {
    margin-bottom: 0.8rem;
}

.footer-block ul li a {
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-block ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive Design */
@media screen and (max-width: 900px) {
    .nav-links, .search-bar {
        display: none; 
    }
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 3rem;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 3rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .section-padding {
        padding: 3rem 5%;
    }
}

@media screen and (max-width: 600px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .section-padding {
        padding: 2rem 5%;
    }

    .nav-actions {
        gap: 0.8rem;
    }

    .nav-actions a.btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.85rem !important;
    }

    .logo {
        font-size: 1.4rem;
    }
    
    .logo > span:last-child {
        font-size: 0.55rem !important;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1.2rem;
    }
    
    .product-card h3 {
        font-size: 0.9rem;
    }
    
    .product-price {
        font-size: 1rem;
    }

    .footer {
        padding: 3rem 5% 1rem;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 15% auto;
    }
}
