﻿* { 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; transition: margin-right 0.3s ease; }
body.cart-active { margin-right: 450px; }

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; }

/* ================== Header Categories Nav (CENTERED) ================== */
.header-cat-nav { 
    display: flex; 
    gap: 15px; 
    background: #fff; 
    padding: 12px 24px; 
    border-bottom: 1px solid #eee; 
    justify-content: center; 
    flex-wrap: wrap; 
}
.header-cat-btn { background: none; border: none; cursor: pointer; font-size: 14px; font-weight: 600; color: #555; padding: 6px 16px; border-radius: 20px; transition: 0.2s; }
.header-cat-btn:hover { color: #ff5a1f; background: #fff7f3; }
.header-cat-btn.active { background: #ff5a1f; color: white; }

/* ================== Banner ================== */
.banner-carousel { position: relative; width: 100%; height: 550px; overflow: hidden; background-color: transparent; }
.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; }

/* ================== Categories Grid (CENTERED) ================== */
.categories-section { max-width: 1300px !important; width: 92% !important; margin: 20px auto 0; padding: 10px 0 !important; }
.categories-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.category-card { width: 260px; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.05); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; border: 1px solid #eee; text-align: center; }
.category-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); border-color: #ff5a1f; }
.cat-img-wrapper { width: 100%; height: 160px; background: #fafafa; }
.cat-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.cat-title { padding: 12px; font-size: 1.1rem; font-weight: 600; color: #222; }

/* ================== Products Grid ================== */
.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: flex !important; flex-wrap: wrap !important; justify-content: center !important; gap: 20px !important; }
.product-card { width: 260px; 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; }
.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 */
@media (max-width: 850px) { body.cart-active { margin-right: 0; } }
@media (max-width: 650px) {
    header { flex-direction: column; gap: 6px; text-align: center; }
    .banner-carousel { height: 350px !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; }
}

/* WhatsApp Login & User Profile */
.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; }

/* Cart Panel */
.cart-panel { position: fixed; top: 0; right: -500px; width: 450px; height: 100vh; background: white; box-shadow: -4px 0 15px rgba(0,0,0,0.1); z-index: 2000; transition: right 0.3s ease; display: flex; flex-direction: column; }
.cart-panel.active { right: 0; }
.cart-header { padding: 15px; border-bottom: 1px solid #ddd; display: flex; justify-content: space-between; align-items: center; background: #fcf8f2; }
.cart-items-list { flex: 1; overflow-y: auto; padding: 15px; }
.cart-item { display: flex; justify-content: space-between; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.cart-item-details { flex: 1; }
.cart-item-title { font-size: 0.95rem; font-weight: 600; }
.cart-item-price { color: #ff5a1f; font-weight: bold; }
.cart-item-remove { background: #ff4d4d; color: white; border: none; padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; margin-top: 5px;}
.cart-footer { padding: 15px; border-top: 1px solid #ddd; background: #fcf8f2; }
@media (max-width: 480px) { .cart-panel { width: 100%; right: -100%; } }