﻿* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif, system-ui;
}

body {
    background-color: #fcf8f2;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #ffffff;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.search {
    flex: 1;
    max-width: 520px;
    background: #f5f3ef;
    border-radius: 12px;
    padding: 12px 15px;
}

.search input {
    border: 0;
    outline: 0;
    background: none;
    width: 100%;
}

.brand {
    font-size: 1.4rem;
    color: #ff5a1f;
}

.delivery {
    font-size: 0.95rem;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 4px 12px;
    border-radius: 20px;
}

.contact-header {
    font-size: 0.95rem;
    color: #444;
}

/* ==========================================================
   Banner Carousel - Frame Removed, Full Image Visibility
   ========================================================== */
.banner-carousel {
    position: relative;
    width: 100%;
    height: 550px;
    overflow: hidden;
    background-color: transparent; /* ஃபிரேம் போல் தெரிவதைத் தடுக்க background வெளிப்படையாக மாற்றப்பட்டுள்ளது */
    margin: 0;
    padding: 0;
    border: none;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill; /* இமேஜ் கட் ஆகாமல் முழுமையாகத் தெரியும் */
    border: none;
    outline: none;
    margin: 0;
    padding: 0;
}

.slide-overlay {
    position: absolute;
    bottom: 20px;
    left: 30px;
    background: rgba(255, 255, 255, 0.9);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    max-width: 500px;
}

.slide-overlay h2 {
    font-size: 1.5rem;
    color: #2e7d32;
    margin-bottom: 4px;
}

.slide-overlay p {
    font-size: 0.95rem;
    color: #444;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    right: 30px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #ff5a1f;
    width: 28px;
    border-radius: 10px;
}

/* ==========================================================
   Products Grid Section - Perfect Margins & 4 Columns
   ========================================================== */
.products-section {
    max-width: 1300px !important; 
    width: 92% !important; /* லெஃப்ட் மற்றும் ரைட் ஓரங்களில் கச்சிதமான இடைவெளி தரும் */
    margin: 40px auto;
    padding: 10px 0 !important; 
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    color: #222;
    margin-bottom: 30px;
}

.products-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; 
    gap: 20px !important; /* கார்டுகளுக்கு நடுவில் போதுமான இடைவெளி */
    justify-content: center;
}

.product-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #f0f0f0;
}

.card-img-wrapper {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    background: #fafafa;
    margin-bottom: 12px;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-tag {
    color: #2e7d32;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-title {
    font-size: 1.15rem;
    color: #222;
    margin: 4px 0 14px;
}

.weight-selection-box {
    margin-bottom: 16px;
}

.weight-title-lbl {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.weight-btns {
    display: flex;
    gap: 8px;
}

.w-btn {
    flex: 1;
    padding: 8px;
    border: 1.5px solid #ddd;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-size: 0.85rem;
}

.w-btn.active {
    border-color: #ff5a1f;
    background: #fff7f3;
    font-weight: 600;
    color: #ff5a1f;
}

.card-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.qty-picker {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.qty-btn-sm {
    background: #f0f0f0;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-weight: bold;
}

.qty-num {
    width: 32px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff5a1f;
}

.btn-buy-card {
    width: 100%;
    background: #ff5a1f;
    color: white;
    border: none;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
}

.btn-buy-card:hover {
    background: #e04810;
}

/* ==========================================================
   Footer & Modals
   ========================================================== */
footer {
    background: #1e242b;
    color: #d1d5db;
    padding: 40px 20px 20px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-col h3 {
    color: #ff5a1f;
    margin-bottom: 12px;
}

.footer-col h4 {
    color: #ffffff;
    margin-bottom: 12px;
}

.footer-col p {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.footer-bottom {
    max-width: 1100px;
    margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px solid #374151;
    text-align: center;
    font-size: 0.85rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: white;
    width: 90%;
    max-width: 450px;
    border-radius: 16px;
    padding: 24px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
}

.order-summary-box {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 0.88rem;
}

.summary-total {
    color: #ff5a1f;
    font-size: 1.05rem;
    margin-top: 4px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.form-group input, 
.form-group textarea, 
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.btn-submit-order {
    width: 100%;
    background: #2e7d32;
    color: white;
    border: none;
    padding: 12px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
}

.success-box {
    text-align: center;
}

.success-icon {
    font-size: 2.8rem;
    margin-bottom: 8px;
}

/* ==========================================================
   Responsive Styles (Media Queries)
   ========================================================== */

@media (max-width: 850px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important; 
    }
}

@media (max-width: 650px) {
    header {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    .banner-carousel {
        height: 350px !important; 
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important; 
    }

    .slide-overlay {
        left: 15px;
        right: 15px;
        bottom: 15px;
        padding: 10px 14px;
    }

    .slide-overlay h2 {
        font-size: 1.1rem;
    }

    .slide-overlay p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr !important; 
    }
}

/* ==========================================================
   WhatsApp Login & User Profile Custom Styles
   ========================================================== */
.startup-login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.login-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    width: 380px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    box-sizing: border-box;
}

.login-card h3 {
    margin-top: 0;
    color: #2d5a27;
}

.login-input {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    font-size: 14px;
}

.login-btn-blue {
    background: #2d5a27;
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
}

.hidden {
    display: none !important;
}

.user-profile-badge {
    background: #e8f5e9;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #2e7d32;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}