/* --- Google Fonts & Global Styles --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #2E7D32; /* Janatha Bazar Green */
    --secondary-color: #FFC107; /* Accent Gold/Yellow */
    --text-color: #333;
    --light-text-color: #6c757d;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --box-shadow: 0 4px 15px rgba(0,0,0,0.07);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

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

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

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

.logo-container img {
    height: 50px;
}

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

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    padding-bottom: 5px;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}
.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile Navigation */
.hamburger-menu {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--card-bg);
        flex-direction: column;
        text-align: center;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links li {
        padding: 1rem 0;
        border-top: 1px solid var(--border-color);
    }
    .hamburger-menu {
        display: block;
    }
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #1E4D20;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color);
}
.btn-secondary:hover {
    background-color: #fbc02d;
}

/* --- Homepage Sections --- */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('images/hero-background.jpeg') no-repeat center center/cover;
    color: white;
    text-align: center;
    padding: 100px 20px;
}
.hero h1 { font-size: 3rem; margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; margin-bottom: 2rem; }

.section { padding: 60px 0; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 40px; color: var(--primary-color); }

/* Category Cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}
.category-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}
.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.category-card img { height: 80px; margin-bottom: 15px; object-fit: contain; }
.category-card h3 { font-size: 1.1rem; color: var(--text-color); }


/* --- Products Page --- */
.products-layout { display: flex; gap: 2rem; align-items: flex-start; }
.filters-sidebar { flex: 0 0 250px; background-color: var(--card-bg); padding: 20px; border-radius: 10px; box-shadow: var(--box-shadow); }
.filter-group { margin-bottom: 25px; }
.filter-group h3 { font-size: 1.2rem; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); }
.filter-group ul { list-style: none; }
.filter-group ul li { margin-bottom: 10px; }
.filter-group a { color: var(--light-text-color); }
.filter-group a:hover { color: var(--primary-color); }

.product-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }

/* Product Card */
.product-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.product-card-img { height: 200px; overflow: hidden; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.product-card:hover .product-card-img img { transform: scale(1.05); }

.product-card-info { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; }
.product-card-info h3 { font-size: 1.1rem; font-weight: 600; }
.product-card-info .price { font-size: 1.4rem; font-weight: 700; color: var(--primary-color); margin: 10px 0; }
.product-card-info .btn { width: 100%; margin-top: auto; }

/* --- Product Detail Page --- */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
}
.product-detail-image img { width: 100%; border-radius: 10px; }
.product-detail-info h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.product-detail-info .price { font-size: 2rem; color: var(--primary-color); font-weight: 700; margin-bottom: 1rem; }
.product-detail-info .description { margin: 1.5rem 0; line-height: 1.8; color: var(--light-text-color); }
.quantity-selector { display: flex; align-items: center; gap: 10px; margin-bottom: 1.5rem; }
.quantity-selector input { width: 50px; text-align: center; padding: 8px; border: 1px solid var(--border-color); border-radius: 5px; }
.quantity-selector button { width: 35px; height: 35px; border: 1px solid var(--border-color); background: #f1f1f1; cursor: pointer; font-size: 1.2rem; }

/* --- Reviews Section --- */
.reviews-section { margin-top: 40px; }
.review-card { background-color: var(--card-bg); padding: 20px; border-radius: 10px; margin-bottom: 15px; border: 1px solid var(--border-color); }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.review-header h4 { font-weight: 600; }
.star-rating { color: var(--secondary-color); }

/* --- Checkout & Cart --- */
.cart-table { width: 100%; border-collapse: collapse; background: var(--card-bg); border-radius: 10px; overflow: hidden; }
.cart-table th, .cart-table td { padding: 15px; text-align: left; }
.cart-table th { background: #f1f1f1; }
.cart-table td { border-bottom: 1px solid var(--border-color); }
.cart-item-info { display: flex; align-items: center; gap: 15px; }
.cart-item-info img { width: 80px; height: 80px; object-fit: cover; border-radius: 5px; }
.cart-actions { margin-top: 30px; text-align: right; }

.checkout-layout { display: flex; flex-wrap: wrap; gap: 2rem; align-items: flex-start; }
.checkout-form { flex: 2; min-width: 300px; }
.checkout-summary { flex: 1; min-width: 280px; background-color: var(--card-bg); padding: 20px; border-radius: 10px; box-shadow: var(--box-shadow); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 5px; }
.delivery-options label { display: block; background: var(--card-bg); padding: 15px; border: 2px solid var(--border-color); border-radius: 8px; margin-bottom: 10px; cursor: pointer; transition: all 0.2s ease; }
.delivery-options input[type="radio"]:checked + label { border-color: var(--primary-color); box-shadow: 0 0 10px rgba(46, 125, 50, 0.2); }
#delivery-address-form { display: none; padding-left: 20px; border-left: 3px solid var(--primary-color); margin-top: 10px; }

/* Order Status */
.order-status-container { background: var(--card-bg); padding: 40px; text-align: center; border-radius: 10px; }
.order-status-timeline { display: flex; justify-content: space-between; margin-top: 40px; position: relative; }
.order-status-timeline::before { content: ''; position: absolute; top: 25px; left: 10%; width: 80%; height: 4px; background: var(--border-color); z-index: 1; }
.status-step { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; z-index: 2; width: 25%; }
.status-step .icon { width: 50px; height: 50px; border-radius: 50%; background: var(--card-bg); border: 4px solid var(--border-color); display: flex; justify-content: center; align-items: center; font-size: 1.5rem; margin-bottom: 10px; color: var(--light-text-color); transition: all 0.3s ease; }
.status-step p { font-weight: 500; }
.status-step.completed .icon { border-color: var(--success-color); background-color: var(--success-color); color: white; }
.status-step.active .icon { border-color: var(--primary-color); }

/* Footer */
.footer { background-color: #212529; color: white; padding: 40px 0; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-col h4 { font-size: 1.2rem; margin-bottom: 15px; color: var(--secondary-color); }
.footer-col p, .footer-col a { color: #ccc; line-height: 1.8; }
.footer-col a:hover { color: white; }

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 100;
    transition: transform 0.3s ease;
}
.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Make radio buttons invisible */
.delivery-options input[type="radio"] {
    display: none;
}
/* --- Additional Styles for Login & Admin --- */

/* Login Page */
.login-container {
    max-width: 450px;
    margin: 40px auto;
    padding: 40px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    text-align: center;
}
.login-container h2 {
    margin-bottom: 15px;
    color: var(--primary-color);
}
.otp-section {
    display: none; /* Hidden by default */
    margin-top: 20px;
}
#login-message {
    margin-top: 20px;
    font-weight: 600;
}

/* Admin Panel Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}
.admin-sidebar {
    width: 250px;
    background-color: #212529;
    color: white;
    flex-shrink: 0;
}
.admin-sidebar ul {
    list-style: none;
    padding-top: 20px;
}
.admin-sidebar ul li a {
    display: block;
    padding: 15px 25px;
    color: #ccc;
    transition: all 0.3s ease;
}
.admin-sidebar ul li a:hover, .admin-sidebar ul li a.active {
    background-color: var(--primary-color);
    color: white;
}
.admin-main-content {
    flex-grow: 1;
    background-color: var(--bg-color);
}
.admin-header {
    background-color: var(--card-bg);
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
}
.admin-content-area {
    padding: 30px;
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card-bg);
    box-shadow: var(--box-shadow);
    border-radius: 8px;
    overflow: hidden;
}
.admin-table th, .admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.admin-table th {
    background-color: #f1f1f1;
}
.btn-sm { padding: 5px 10px; font-size: 0.9rem; }

/* Status Pills */
.status-packing, .status-delivered, .status-instock, .status-outofstock {
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 600;
    color: white;
    font-size: 0.8rem;
}
.status-packing { background-color: #ffc107; color: var(--text-color); }
.status-delivered { background-color: var(--success-color); }
.status-instock { background-color: var(--success-color); }
.status-outofstock { background-color: #dc3545; }

/* Modal for Editing Product */
.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);
}
.modal-content {
    background-color: var(--card-bg);
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    position: relative;
}
.close-btn {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
/* --- Admin Link on Login Page --- */
.admin-link-container {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.admin-link-container a {
    color: var(--light-text-color);
    font-size: 0.9rem;
    text-decoration: none;
}

.admin-link-container a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}
/* --- Special Offer Banner --- */
.offer-banner {
    background-color: var(--secondary-color);
    padding: 2rem 1rem;
    text-align: center;
}

.offer-banner h2 {
    font-size: 2.2rem;
    color: #444;
    margin-bottom: 0.5rem;
}

.offer-banner p {
    font-size: 1.2rem;
    color: #555;
}

/* --- Scroll Animation --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* --- New Styles for Header Branding --- */
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px; /* Adds space between logo and text */
    text-decoration: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text .main-title {
    font-size: 1.5rem; /* Adjust size as needed */
    font-weight: 700;
    color: var(--primary-color);
}

.logo-text .sub-title {
    font-size: 0.9rem; /* Adjust size as needed */
    color: var(--light-text-color);
    letter-spacing: 0.5px;
}


