/* ==========================================
   GLOBAL VARIABLES & RESET
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&display=swap');

:root {
    --primary-green: #0cae4c;
    --primary-orange: #f37b1d;
    --primary-blue: #0056b3;
    --text-dark: #333333;
    --white: #ffffff;
    --light-bg: #fdfdfd;
    --border-color: #eee;
}

/* গ্লোবাল বক্স সাইজিং ফিক্স যাতে কন্টেন্ট ডিসপ্লের বাইরে না যায় */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; /* প্যাডিং উইডথকে নষ্ট করবে না */
    font-family: 'Hind Siliguri', sans-serif; 
}

body { 
    background-color: var(--light-bg); 
    color: var(--text-dark); 
    line-height: 1.6; 
    overflow-x: hidden; /* ডানে-বামে স্ক্রল বন্ধ করা */
    width: 100%;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container { 
    max-width: 1200px; 
    margin: auto; 
    padding: 0 15px; /* */
}

/* ============================
   HEADER SECTION
   ============================ */
header { 
    background: var(--white); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}

.navbar { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 15px 0; 
}

.logo-text { 
    font-size: 26px; 
    font-weight: 700; 
    color: var(--primary-green); 
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.logo-text span { color: var(--primary-orange); }
.logo-img { height: 45px; width: auto; object-fit: contain; }

.search-box { 
    flex: 1; 
    margin: 0 30px; 
    display: flex; 
    max-width: 500px; 
    border: 2px solid var(--primary-green); 
    border-radius: 50px; 
    overflow: hidden; 
}

.search-box input { width: 100%; border: none; padding: 10px 20px; outline: none; font-size: 16px; }
.search-box button { background: var(--primary-green); border: none; padding: 0 25px; color: white; cursor: pointer; font-size: 18px; }

.nav-icons { display: flex; gap: 20px; align-items: center; }
.nav-link { font-weight: 600; color: var(--text-dark); font-size: 15px; }
.cart-icon { position: relative; font-size: 22px; color: var(--primary-green); }
.cart-badge { position: absolute; top: -8px; right: -10px; background: var(--primary-orange); color: white; font-size: 12px; padding: 2px 6px; border-radius: 50%; }

/* ============================
   HERO SECTION (BANNER)
   ============================ */
.hero { 
    background: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.7)), url('../images/g3.png'); 
    background-size: cover; 
    background-position: center; 
    padding: 80px 0; 
    text-align: center; 
    border-bottom: 5px solid var(--primary-green); 
    margin-bottom: 40px; 
}

.hero h1 { font-size: 42px; color: var(--primary-green); margin-bottom: 15px; font-weight: 700; }
.hero h1 span { color: var(--primary-orange); }
.hero p { font-size: 20px; color: #555; margin-bottom: 30px; }

.btn-shop { 
    background: var(--primary-orange); 
    color: white; 
    padding: 12px 35px; 
    font-size: 18px; 
    border-radius: 50px; 
    font-weight: 600; 
    border: none; 
    cursor: pointer; 
    display: inline-block; 
    transition: 0.3s;
}
.btn-shop:hover { background: #d6660f; transform: translateY(-2px); }

/* ============================
   PRODUCT CARDS
   ============================ */
.section-title { text-align: center; font-size: 32px; margin-bottom: 40px; color: var(--primary-blue); font-weight: 700; position: relative; }
.section-title::after { content: ''; display: block; width: 80px; height: 3px; background: var(--primary-green); margin: 10px auto; }

.product-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 30px; 
    margin-bottom: 60px; 
}

.product-card { 
    background: var(--white); 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.08); 
    border: 1px solid #eee; 
    display: flex; 
    flex-direction: column; 
    text-align: center;
}

.product-img-wrapper { height: 200px; overflow: hidden; background: #f9f9f9; display: flex; align-items: center; justify-content: center; position: relative; }
.product-img { max-height: 100%; width: auto; object-fit: contain; }
.discount-tag { position: absolute; top: 10px; left: 10px; background: red; color: white; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: bold; }

.product-info { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.product-name { font-size: 18px; font-weight: 700; margin-bottom: 10px; color: var(--text-dark); }
.product-price { font-size: 18px; color: var(--primary-orange); font-weight: bold; margin-bottom: 15px; }

.add-btn { width: 100%; padding: 10px; background: white; border: 2px solid var(--primary-green); color: var(--primary-green); font-weight: 600; border-radius: 6px; cursor: pointer; transition: 0.3s; }
.add-btn:hover { background: var(--primary-green); color: white; }

/* ============================
   FORMS & TABLES (RESPONSIVE)
   ============================ */
.form-container { max-width: 500px; margin: 40px auto; background: white; padding: 30px; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); width: 100%; box-sizing: border-box; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; }
.form-control { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 16px; outline: none; box-sizing: border-box; }
.form-control:focus { border-color: var(--primary-green); }

.btn-primary { 
    width: 100%; 
    padding: 12px; 
    background: var(--primary-green); 
    color: white; 
    border: none; 
    border-radius: 6px; 
    font-size: 16px; 
    font-weight: bold; 
    cursor: pointer; 
    box-sizing: border-box; /* বাটন স্ক্রিনের বাইরে যাবে না */
    transition: 0.3s;
}
.btn-primary:hover { background: #088a3b; }

/* টেবিল যাতে মোবাইলে বাইরে না যায় */
.table-wrapper { width: 100%; overflow-x: auto; margin-bottom: 20px; }
.table-styled { width: 100%; min-width: 600px; border-collapse: collapse; background: white; }
.table-styled th, .table-styled td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
.table-styled th { background: var(--primary-green); color: white; }

/* ==========================================
   MOBILE VIEW COMPACT (চিকন এবং সরু স্ক্রিন অপ্টিমাইজেশন)
   ========================================== */

@media (max-width: 480px) {
    /* কন্টেইনার গ্যাপ কমানো */
    .container { padding: 0 10px; }

    /* হেডার চিকন করা */
    .navbar { flex-wrap: wrap; padding: 8px 0; }
    .logo-text { font-size: 19px; gap: 5px; }
    .logo-img { height: 35px; }
    
    .search-box { order: 3; width: 100%; margin: 8px 0 0 0; max-width: 100%; border-width: 1.5px; }
    .search-box input { padding: 6px 12px; font-size: 13px; }
    .search-box button { padding: 0 15px; }

    .nav-icons { gap: 10px; flex-wrap: wrap; justify-content: center; width: 100%; margin-top: 10px; }
    .nav-link { font-size: 12px; }
    .cart-icon { font-size: 18px; }

    /* হিরো সেকশন সরু করা */
    .hero { padding: 30px 0; margin-bottom: 20px; }
    .hero h1 { font-size: 20px; }
    .hero p { font-size: 13px; padding: 0 5px; margin-bottom: 15px; }
    .btn-shop { padding: 8px 20px; font-size: 14px; }

    /* প্রোডাক্ট কার্ড সরু ও ছোট করা */
    .product-grid { 
        grid-template-columns: repeat(2, 1fr); /* ২ কলাম ফিক্সড */
        gap: 8px; 
        padding: 5px; 
    }
    .product-img-wrapper { height: 130px; }
    .product-info { padding: 8px; }
    .product-name { font-size: 13px; height: 38px; margin-bottom: 3px; overflow: hidden; }
    .product-price { font-size: 14px; }
    .add-btn { padding: 6px; font-size: 12px; border-radius: 4px; }

    /* পপ-আপ মেসেজ বক্স ফিক্স */
    .popup-box { width: 92%; max-width: 310px; padding: 25px 15px; border-radius: 12px; box-sizing: border-box; }
    .popup-title { font-size: 18px; }
    .popup-message { font-size: 13px; }
    .popup-icon-box { width: 50px; height: 50px; margin-bottom: 15px; }
    
    .form-container { padding: 20px 15px; }
}

/* ============================
   CUSTOM POPUP GLOBAL STYLES
   ============================ */
.popup-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); z-index: 9999;
    display: none; justify-content: center; align-items: center;
    backdrop-filter: blur(5px); animation: fadeIn 0.3s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleUp { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ============================
   FOOTER
   ============================ */
footer { background: #1a1a1a; color: #ddd; padding: 40px 0 20px; margin-top: 40px; text-align: center; }
.copyright { margin-top: 20px; padding-top: 15px; border-top: 1px solid #333; font-size: 13px; }