/* ============================================
   WhatsApp Order System — Frontend CSS
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #6e8264;
    --primary-dark: #556350;
    --wa-green: #6e8264;
    --text: #1a1a2e;
    --muted: #6c757d;
    --border: #e8ecef;
    --card-bg: #fff;
    --body-bg: #f8f9fa;
}

html { scroll-behavior: auto; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--body-bg); color: var(--text); overflow-x: hidden; }

/* ---- Navbar ---- */
.navbar { background: #fff; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.navbar-inner { max-width: 1100px; margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.navbar-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.navbar-logo { height: 40px; width: 40px; object-fit: cover; border-radius: 8px; }
.navbar-logo-placeholder { width: 40px; height: 40px; background: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.navbar-name { font-size: 17px; font-weight: 700; color: var(--text); }
.navbar-links { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 8px 14px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 8px; transition: all .2s; }
.nav-link:hover, .nav-link.active { color: var(--primary); background: rgba(37,211,102,0.08); }
.navbar-right { display: flex; align-items: center; gap: 10px; }
.lang-switcher { display: flex; align-items: center; gap: 4px; }
.lang-btn { padding: 5px 9px; border: 1.5px solid var(--border); border-radius: 6px; background: none; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted); transition: all .2s; }
.lang-btn.active, .lang-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(37,211,102,0.08); }
.cart-btn { display: flex; align-items: center; gap: 6px; background: var(--primary); color: #fff; border: none; border-radius: 10px; padding: 9px 16px; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .2s; position: relative; }
.cart-btn:hover { background: var(--primary-dark); }
.cart-count { background: #fff; color: var(--primary); border-radius: 50%; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.burger { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text); }

/* ---- Hero ---- */
.hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; text-align: center; padding: 60px 20px; }
.hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 10px; }
.hero p { font-size: 16px; opacity: .88; max-width: 500px; margin: 0 auto; }

/* ---- Container ---- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---- Category Nav ---- */
.cat-nav { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 63px; z-index: 90; transform: translateZ(0); }
.cat-nav-inner { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 20px; max-width: 1100px; margin: 0 auto; }
.cat-nav-btn { white-space: nowrap; padding: 7px 16px; border: 1.5px solid var(--border); border-radius: 20px; background: none; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); transition: all .2s; }
.cat-nav-btn:hover, .cat-nav-btn.active { border-color: var(--primary); color: var(--primary); background: rgba(37,211,102,0.08); }

/* ---- Products ---- */
.products-section { padding: 40px 0; }
.category-section { margin-bottom: 48px; }
.category-title { font-size: 22px; font-weight: 800; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }

/* ---- Product Card ---- */
.product-card { background: var(--card-bg); border-radius: 14px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.07); cursor: pointer; will-change: auto; }
@media (hover: hover) { .product-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.12); } }
.product-img { width: 100%; height: 180px; object-fit: cover; display: block; }
.product-img-placeholder { width: 100%; height: 180px; background: linear-gradient(135deg, #f0f2f5, #e8ecef); display: flex; align-items: center; justify-content: center; font-size: 52px; }
.product-info { padding: 14px 16px 16px; }
.product-name { font-size: 15px; font-weight: 700; margin-bottom: 5px; color: var(--text); }
.product-desc { font-size: 13px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-footer { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-size: 17px; font-weight: 800; color: var(--primary); }
.btn-add { background: var(--primary); color: #fff; border: none; border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .2s; }
.btn-add:hover { background: var(--primary-dark); }

/* ---- Product Modal ---- */
.product-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.product-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.product-modal-box { background: #fff; border-radius: 20px 20px 0 0; width: 100%; max-width: 540px; max-height: 92vh; overflow-y: auto; position: relative; z-index: 1; animation: slideUp .3s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.pmodal-imgs { position: relative; }
.pmodal-img { width: 100%; height: 260px; object-fit: cover; display: block; }
.pmodal-img-placeholder { width: 100%; height: 200px; background: linear-gradient(135deg, #f0f2f5, #e8ecef); display: flex; align-items: center; justify-content: center; font-size: 72px; }
.pmodal-img-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.img-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.6); cursor: pointer; transition: background .2s; }
.img-dot.active { background: #fff; }
.pmodal-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; background: rgba(0,0,0,0.4); border: none; border-radius: 50%; color: #fff; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; }
.pmodal-body { padding: 20px 20px 100px; }
.pmodal-name { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.pmodal-desc { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.pmodal-ingredients-label { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.pmodal-footer { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--border); padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pmodal-price { font-size: 22px; font-weight: 800; color: var(--primary); }
.qty-control { display: flex; align-items: center; gap: 12px; background: #f0f2f5; border-radius: 10px; padding: 4px 8px; }
.qty-btn { width: 30px; height: 30px; border: none; border-radius: 8px; background: #fff; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.qty-val { font-size: 16px; font-weight: 700; min-width: 24px; text-align: center; }
.btn-add-modal { background: var(--primary); color: #fff; border: none; border-radius: 10px; padding: 12px 22px; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .2s; flex: 1; }
.btn-add-modal:hover { background: var(--primary-dark); }

/* ---- Cart Drawer ---- */
.cart-drawer { position: fixed; inset: 0; z-index: 300; display: flex; justify-content: flex-end; }
.cart-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.cart-panel { background: #fff; width: 100%; max-width: 400px; height: 100%; display: flex; flex-direction: column; position: relative; z-index: 1; animation: slideRight .3s ease; }
@keyframes slideRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
.cart-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.cart-header h3 { font-size: 18px; font-weight: 700; }
.cart-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px; }
.cart-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.cart-empty span { font-size: 52px; display: block; margin-bottom: 12px; }
.cart-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-item-img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.cart-item-img-placeholder { width: 56px; height: 56px; background: #f0f2f5; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 600; }
.cart-item-price { font-size: 13px; color: var(--primary); font-weight: 700; margin-top: 2px; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.qty-btn-sm { width: 26px; height: 26px; border: 1.5px solid var(--border); border-radius: 6px; background: #fff; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.cart-item-remove { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px; }
.cart-footer { border-top: 1px solid var(--border); padding: 16px; }
.cart-total-row { display: flex; justify-content: space-between; font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.order-form { }
.order-type-btns { display: flex; gap: 8px; margin-bottom: 14px; }
.order-type-btn { flex: 1; padding: 10px; border: 2px solid var(--border); border-radius: 10px; background: none; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s; text-align: center; }
.order-type-btn.active { border-color: var(--primary); color: var(--primary); background: rgba(37,211,102,0.06); }
.order-input { width: 100%; padding: 10px 13px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; margin-bottom: 10px; font-family: inherit; transition: border-color .2s; }
.order-input:focus { border-color: var(--primary); }
.btn-whatsapp { width: 100%; padding: 14px; background: var(--wa-green); color: #fff; border: none; border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: background .2s; }
.btn-whatsapp:hover { background: var(--primary-dark); }
.btn-whatsapp svg { width: 22px; height: 22px; fill: #fff; }

/* ---- Sections ---- */
.section { padding: 60px 0; }
.section-alt { background: #fff; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.section-header p { color: var(--muted); font-size: 15px; }

/* ---- About ---- */
.about-content { max-width: 700px; margin: 0 auto; text-align: center; font-size: 16px; line-height: 1.8; color: #444; }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; max-width: 800px; margin: 0 auto; }
.contact-card { background: #fff; border-radius: 14px; padding: 24px; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
.contact-icon { font-size: 36px; margin-bottom: 10px; }
.contact-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.contact-value { font-size: 15px; font-weight: 600; color: var(--text); }

/* ---- Footer ---- */
footer { background: var(--text); color: rgba(255,255,255,0.7); text-align: center; padding: 24px 20px; font-size: 13px; }
footer strong { color: #fff; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .navbar-links { display: none; }
    .burger { display: block; }
    .hero h1 { font-size: 26px; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
    .product-img, .product-img-placeholder { height: 140px; }
    .cart-panel { max-width: 100%; }
    .product-modal { align-items: flex-end; }
}
@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .navbar-inner { padding: 0 14px; }
    .lang-switcher { gap: 2px; }
    .lang-btn { padding: 4px 6px; font-size: 11px; }
}

/* ---- Mobile Nav Menu ---- */
.mobile-nav { display: none; background: #fff; border-top: 1px solid var(--border); padding: 10px 20px; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 10px 0; color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; border-bottom: 1px solid var(--border); }
