/* ============================================================
   SmartShopper Enterprise — Layout (Header, Footer, Hero, Grids)
   ============================================================ */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 700; border-radius: 16px; border: none; cursor: pointer;
  transition: all .2s ease; font-size: .875rem; padding: .75rem 1.5rem;
  text-align: center;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg,var(--primary) 0%,var(--primary-light) 100%); color:#fff; box-shadow:0 4px 16px rgba(11,122,67,.3); }
.btn-primary:hover { box-shadow:0 8px 32px rgba(11,122,67,.4); transform: translateY(-1px); }
.btn-dark { background:var(--primary); color:#fff; }
.btn-dark:hover { background:var(--primary-dark); }
.btn-outline { background:transparent; border:1px solid var(--border); color:var(--text-secondary); }
.btn-outline:hover { background:rgba(0,0,0,.03); }
html.dark .btn-outline:hover { background:rgba(255,255,255,.05); }
.btn-gold { background:var(--gold); color:#fff; }
.btn-gold:hover { background:var(--gold-dark); }
.btn-white { background:#fff; color:var(--text-primary); box-shadow:0 10px 25px rgba(0,0,0,.15); }
.btn-white:hover { background:#f3f4f6; }
.btn-sm { padding:.5rem 1rem; font-size:.8rem; border-radius:12px; }
.btn-block { width:100%; }
.btn-disabled, .btn:disabled { background:#e5e7eb; color:#9ca3af; cursor:not-allowed; box-shadow:none; }

/* ---------- Top Utility Bar ---------- */
.topbar { display:none; background:#17212B; color:#d1d5db; font-size:.75rem; padding:.5rem 0; }
@media (min-width:1024px){ .topbar{ display:block; } }
.topbar-inner { max-width:1520px; margin-inline:auto; padding-inline:1.5rem; display:flex; align-items:center; justify-content:space-between; }
.topbar-left, .topbar-right { display:flex; align-items:center; gap:1.5rem; }
.topbar a, .topbar button { color:inherit; background:none; border:none; font-size:.75rem; display:flex; align-items:center; gap:.375rem; }
.topbar a:hover, .topbar button:hover { color:var(--primary-light); }
.topbar-sep { width:1px; height:.75rem; background:#374151; }

/* ---------- Main Header ---------- */
.site-header { position:sticky; top:0; z-index:50; background:var(--card); border-bottom:1px solid var(--border); box-shadow:0 1px 2px rgba(0,0,0,.04); }
.header-inner { max-width:1520px; margin-inline:auto; padding-inline:1rem; display:flex; align-items:center; gap:.5rem; height:4rem; }
@media (min-width:1024px){ .header-inner{ padding-inline:1.5rem; gap:1rem; height:4.5rem; } }

.brand-logo { display:flex; align-items:center; gap:.625rem; flex-shrink:0; }
.brand-mark { width:2.25rem; height:2.25rem; border-radius:16px; background:linear-gradient(135deg,var(--primary-dark),var(--primary-light)); display:flex; align-items:center; justify-content:center; box-shadow:0 6px 16px rgba(11,122,67,.35); color:#fff; font-weight:800; font-size:.8rem; flex-shrink:0; }
@media (min-width:640px){ .brand-mark{ width:2.5rem; height:2.5rem; } }
.brand-text { display:none; line-height:1.1; }
@media (min-width:640px){ .brand-text{ display:block; } }
.brand-text b { display:block; font-weight:800; color:var(--text-primary); font-size:1rem; }
.brand-text span { color:var(--primary-light); font-size:.75rem; }

.main-nav { display:none; align-items:center; gap:.25rem; margin-inline-end:1rem; }
@media (min-width:1024px){ .main-nav{ display:flex; } }
.main-nav a { display:flex; align-items:center; gap:.375rem; padding:.5rem .75rem; border-radius:12px; font-size:.875rem; font-weight:600; color:var(--text-secondary); transition:all .15s; white-space:nowrap; }
.main-nav a:hover, .main-nav a.active { color:var(--primary); background:rgba(11,122,67,.06); }

.search-form { flex:1; max-width:36rem; margin-inline:.25rem; }
@media (min-width:640px){ .search-form{ margin-inline:.5rem; } }
.search-box { position:relative; display:flex; align-items:center; background:#f9fafb; border:1px solid var(--border); border-radius:16px; transition:all .3s; }
html.dark .search-box { background:var(--card); }
.search-box.focused { border-color:var(--primary); box-shadow:0 4px 16px rgba(11,122,67,.1); background:var(--card); }
.search-submit { position:absolute; inset-inline-end:.875rem; background:none; border:none; color:#9ca3af; padding:0; display:flex; }
.search-submit:hover { color:var(--primary); }
.search-input { width:100%; background:transparent; border:none; outline:none; padding:.65rem 4.25rem .65rem 2.5rem; font-size:.875rem; color:var(--text-primary); text-align:right; }
html[dir="rtl"] .search-input { padding:.65rem 4.25rem .65rem 2.5rem; }
.search-tools { position:absolute; inset-inline-start:.5rem; display:none; align-items:center; gap:.25rem; }
@media (min-width:480px){ .search-tools{ display:flex; } }
.search-tools button { background:none; border:none; padding:.375rem; border-radius:8px; color:#9ca3af; }
.search-tools button:hover { background:#e5e7eb; }
html.dark .search-tools button:hover { background:var(--border); }

.header-actions { display:flex; align-items:center; gap:.25rem; }
@media (min-width:1024px){ .header-actions{ gap:.5rem; } }
.icon-btn { position:relative; padding:.5rem; border-radius:12px; background:none; border:none; color:var(--text-secondary); display:flex; }
.icon-btn:hover { background:#f3f4f6; }
html.dark .icon-btn:hover { background:var(--border); }
.icon-badge { position:absolute; top:-2px; inset-inline-end:-2px; width:1rem; height:1rem; background:var(--offer-red); color:#fff; font-size:.6rem; font-weight:800; border-radius:999px; display:flex; align-items:center; justify-content:center; }
.cart-btn { position:relative; display:flex; align-items:center; gap:.5rem; padding:.5rem .75rem; background:var(--primary); color:#fff; border-radius:16px; font-weight:700; font-size:.875rem; border:none; }
.cart-btn:hover { background:var(--primary-dark); }
.cart-btn span.label { display:none; }
@media (min-width:640px){ .cart-btn span.label{ display:inline; } }
.cart-count { width:1.25rem; height:1.25rem; background:#fff; color:var(--primary); font-size:.65rem; font-weight:800; border-radius:999px; display:flex; align-items:center; justify-content:center; }
.menu-toggle { display:flex; }
@media (min-width:1024px){ .menu-toggle{ display:none; } }

.mobile-nav { display:none; background:var(--card); border-top:1px solid var(--border); padding:1rem; }
.mobile-nav.open { display:block; }
.mobile-nav a { display:flex; align-items:center; gap:.75rem; padding:.65rem .75rem; border-radius:12px; font-size:.875rem; font-weight:600; }
.mobile-nav a:hover { background:#f9fafb; }
html.dark .mobile-nav a:hover { background:var(--border); }

.bottom-nav { display:flex; position:fixed; inset-inline:0; bottom:0; z-index:50; background:var(--card); border-top:1px solid var(--border); align-items:center; justify-content:space-around; padding:.5rem 0 calc(env(safe-area-inset-bottom) + .5rem); }
@media (min-width:1024px){ .bottom-nav{ display:none; } }
.bottom-nav a { display:flex; flex-direction:column; align-items:center; gap:.125rem; font-size:.7rem; color:var(--text-secondary); }
.bottom-nav a .ic { font-size:1.15rem; }
.bottom-nav a.active { color:var(--primary); }

/* ---------- Footer ---------- */
.site-footer { background:#17212B; color:#d1d5db; margin-top:auto; padding-bottom:4rem; }
@media (min-width:1024px){ .site-footer{ padding-bottom:0; } }
.footer-inner { max-width:1520px; margin-inline:auto; padding:2.5rem 1.5rem; }
.footer-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:2rem; }
@media (min-width:768px){ .footer-grid{ grid-template-columns:repeat(4,1fr); } }
@media (min-width:1024px){ .footer-grid{ grid-template-columns:repeat(5,1fr); } }
.footer-brand { display:flex; align-items:center; gap:.625rem; margin-bottom:1rem; }
.footer-tagline { font-size:.75rem; color:#9ca3af; line-height:1.6; }
.footer-copy { font-size:.75rem; color:var(--gold); margin-top:.75rem; }
.footer-col h4 { font-weight:700; color:#fff; margin:0 0 .75rem; font-size:.875rem; }
.footer-col ul { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.6rem; }
.footer-col a, .footer-col span { font-size:.75rem; color:#9ca3af; }
.footer-col a:hover { color:var(--primary-light); }
.footer-contact li { display:flex; align-items:center; gap:.5rem; font-size:.75rem; color:#9ca3af; }
.app-btn { width:100%; text-align:start; background:#1f2937; color:#fff; padding:.6rem .75rem; border-radius:12px; font-size:.75rem; border:none; display:flex; align-items:center; gap:.5rem; margin-bottom:.5rem; }
.app-btn:hover { background:#374151; }
.footer-bottom { border-top:1px solid #1f2937; padding:1rem; }
.footer-bottom p { text-align:center; font-size:.75rem; color:#6b7280; margin:0; }

/* ---------- Hero Banner ---------- */
.hero-section { padding-top:1.5rem; }
.hero-banner { position:relative; overflow:hidden; border-radius:24px; min-height:380px; transition:background .7s ease; }
@media (min-width:640px){ .hero-banner{ min-height:350px; } }
@media (min-width:768px){ .hero-banner{ height:350px; min-height:0; } }
.hero-gradient-1 { background:linear-gradient(to right,#075B32,#0B7A43); }
.hero-gradient-2 { background:linear-gradient(to right,#E12D39,#b91c1c); }
.hero-gradient-3 { background:linear-gradient(to right,#9C6A08,#D7A51E); }
.hero-blobs { position:absolute; inset:0; opacity:.1; pointer-events:none; }
.hero-blob-a { position:absolute; top:0; left:0; width:18rem; height:18rem; background:#fff; border-radius:999px; transform:translate(-8rem,-8rem); }
.hero-blob-b { position:absolute; bottom:0; right:0; width:24rem; height:24rem; background:rgba(255,255,255,.2); border-radius:999px; transform:translate(8rem,8rem); }
.hero-arrow { display:none; position:absolute; top:50%; transform:translateY(-50%); z-index:30; width:2.25rem; height:2.25rem; border-radius:999px; background:rgba(255,255,255,.15); backdrop-filter:blur(4px); align-items:center; justify-content:center; color:#fff; border:none; }
@media (min-width:640px){ .hero-arrow{ display:flex; } }
.hero-arrow:hover { background:rgba(255,255,255,.25); }
.hero-arrow.prev { left:.75rem; } .hero-arrow.next { right:.75rem; }
@media (min-width:1024px){ .hero-arrow.prev{ left:1rem; } .hero-arrow.next{ right:1rem; } }

.hero-grid { position:relative; z-index:10; height:100%; display:grid; grid-template-columns:1fr; gap:.75rem; align-items:center; padding:2rem 1.25rem; }
@media (min-width:768px){ .hero-grid{ grid-template-columns:38% 22% 40%; gap:.5rem; padding:1rem 1.5rem; } }
@media (min-width:1024px){ .hero-grid{ gap:1rem; padding:1rem 2.5rem; } }

.hero-text { order:1; display:flex; flex-direction:column; align-items:center; text-align:center; gap:.5rem; }
@media (min-width:768px){ .hero-text{ order:0; grid-column:1; grid-row:1; align-items:flex-start; text-align:right; gap:.6rem; } }
html[dir="ltr"] .hero-text { text-align:center; }
@media (min-width:768px){ html[dir="ltr"] .hero-text{ text-align:left; } }

.hero-badge { display:inline-flex; align-items:center; gap:.375rem; background:rgba(255,255,255,.2); backdrop-filter:blur(4px); border-radius:999px; padding:.35rem .75rem; color:#fff; font-size:.7rem; font-weight:700; }
.hero-title { font-size:1.5rem; font-weight:900; color:#fff; line-height:1.25; margin:0; }
@media (min-width:640px){ .hero-title{ font-size:1.875rem; } }
@media (min-width:1024px){ .hero-title{ font-size:2.25rem; } }
.hero-title .hl { color:var(--gold); }
.hero-discount { color:var(--gold); font-weight:800; font-size:1.125rem; margin:0; }
@media (min-width:640px){ .hero-discount{ font-size:1.25rem; } }
@media (min-width:1024px){ .hero-discount{ font-size:1.5rem; } }
.hero-subtitle { color:rgba(255,255,255,.8); font-size:.8rem; max-width:300px; margin:0; }
@media (min-width:640px){ .hero-subtitle{ font-size:.875rem; } }
.hero-cta { margin-top:.25rem; }

.hero-connector { order:2; display:none; align-items:center; justify-content:center; height:4rem; gap:.5rem; opacity:.9; pointer-events:none; }
@media (min-width:640px){ .hero-connector{ display:flex; } }
@media (min-width:768px){ .hero-connector{ order:0; grid-column:2; grid-row:1; height:100%; } }
.hero-connector span { font-size:1.5rem; filter:drop-shadow(0 10px 15px rgba(0,0,0,.3)); }
@media (min-width:1024px){ .hero-connector span{ font-size:2.25rem; } }

.hero-groceries { order:3; display:flex; align-items:center; justify-content:center; height:7rem; gap:.5rem; pointer-events:none; }
@media (min-width:640px){ .hero-groceries{ height:8rem; gap:.75rem; } }
@media (min-width:768px){ .hero-groceries{ order:0; grid-column:3; grid-row:1; height:100%; } }
.hero-groceries span { font-size:2.5rem; filter:drop-shadow(0 20px 25px rgba(0,0,0,.35)); }
@media (min-width:640px){ .hero-groceries span{ font-size:3rem; } }
@media (min-width:1024px){ .hero-groceries span{ font-size:3.75rem; } }
.hero-groceries span:nth-child(1){ transform:rotate(-6deg); }
.hero-groceries span:nth-child(2){ transform:rotate(3deg) translateY(-1rem); }
.hero-groceries span:nth-child(3){ transform:rotate(-3deg) translateY(.5rem); }
.hero-groceries span:nth-child(4){ transform:rotate(6deg); }
.hero-groceries span:nth-child(5){ transform:rotate(-6deg) translateY(.75rem); }
.hero-groceries span:nth-child(6){ transform:rotate(3deg) translateY(-.25rem); }

.hero-dots { position:absolute; bottom:.75rem; inset-inline:0; display:flex; justify-content:center; gap:.375rem; z-index:20; }
@media (min-width:768px){ .hero-dots{ bottom:1rem; } }
.hero-dots button { height:.375rem; width:.375rem; border-radius:999px; background:rgba(255,255,255,.4); border:none; padding:0; transition:all .2s; }
.hero-dots button.active { width:1.5rem; background:#fff; }

/* ---------- Section headers ---------- */
.section { max-width:1520px; margin-inline:auto; padding-inline:1rem; padding-top:2.5rem; }
@media (min-width:1024px){ .section{ padding-inline:1.5rem; } }
.section:last-of-type { padding-bottom:2.5rem; }
.section-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:1.5rem; gap:1rem; flex-wrap:wrap; }
.section-head h2 { font-size:1.25rem; font-weight:800; margin:0; color:var(--text-primary); }
.section-head p { font-size:.75rem; color:var(--text-secondary); margin:.15rem 0 0; }
.section-link { font-size:.875rem; color:var(--primary); font-weight:700; display:flex; align-items:center; gap:.25rem; white-space:nowrap; }
.section-link:hover { color:var(--primary-dark); }
.section-icon { width:2.5rem; height:2.5rem; border-radius:16px; display:flex; align-items:center; justify-content:center; color:#fff; flex-shrink:0; }
.section-title-group { display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; }

/* ---------- Category grid ---------- */
.category-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:.75rem; }
@media (min-width:1024px){ .category-grid{ grid-template-columns:repeat(10,1fr); } }
.category-chip { display:flex; flex-direction:column; align-items:center; gap:.5rem; padding:.75rem; border-radius:16px; background:var(--card); border:1px solid var(--border); transition:all .2s; text-align:center; }
.category-chip:hover { border-color:var(--primary-light); box-shadow:0 8px 20px rgba(0,0,0,.06); transform:translateY(-3px); }
.category-chip .ic { width:3rem; height:3rem; border-radius:999px; background:rgba(22,163,93,.1); display:flex; align-items:center; justify-content:center; font-size:1.125rem; transition:transform .2s; }
.category-chip:hover .ic { transform:scale(1.1); }
.category-chip span.lbl { font-size:.625rem; font-weight:600; line-height:1.2; }

.category-pill { flex-shrink:0; display:inline-flex; align-items:center; gap:.375rem; padding:.5rem 1rem; border-radius:16px; font-size:.875rem; font-weight:600; background:var(--card); border:1px solid var(--border); color:var(--text-secondary); white-space:nowrap; }
.category-pill.active { background:var(--primary); color:#fff; border-color:var(--primary); }
.pill-row { display:flex; gap:.75rem; overflow-x:auto; margin-bottom:1.5rem; padding-bottom:.25rem; }

/* ---------- Product grid & card ---------- */
.product-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:.75rem; }
@media (min-width:640px){ .product-grid{ grid-template-columns:repeat(3,1fr); } }
@media (min-width:1024px){ .product-grid{ grid-template-columns:repeat(5,1fr); } }
@media (min-width:1280px){ .product-grid{ grid-template-columns:repeat(6,1fr); } }
.product-grid.cols-4 { grid-template-columns:repeat(2,1fr); }
@media (min-width:1024px){ .product-grid.cols-4{ grid-template-columns:repeat(6,1fr); } }

.product-card { position:relative; display:block; background:var(--card); border:1px solid var(--border); border-radius:16px; overflow:hidden; transition:all .35s; }
.product-card:hover { box-shadow:0 20px 40px rgba(0,0,0,.1); transform:translateY(-6px); }
.product-media { position:relative; height:12rem; background:#f9fafb; overflow:hidden; }
.product-media img { width:100%; height:100%; object-fit:cover; transition:transform .5s; }
.product-card:hover .product-media img { transform:scale(1.06); }
.product-media .ph { width:100%; height:100%; display:flex; align-items:center; justify-content:center; background:#f3f4f6; color:#d1d5db; }
.badge-discount { position:absolute; top:.75rem; inset-inline-start:.75rem; background:var(--offer-red); color:#fff; font-size:.65rem; font-weight:800; padding:.15rem .5rem; border-radius:8px; box-shadow:0 4px 10px rgba(0,0,0,.15); }
.badge-golden { position:absolute; top:.75rem; inset-inline-end:.75rem; background:var(--gold); color:#fff; font-size:.65rem; font-weight:800; padding:.15rem .5rem; border-radius:8px; display:flex; align-items:center; gap:.15rem; }
.wish-btn { position:absolute; top:.75rem; inset-inline-start:.75rem; width:2rem; height:2rem; border-radius:12px; background:rgba(255,255,255,.9); color:var(--text-secondary); border:none; display:flex; align-items:center; justify-content:center; box-shadow:0 4px 10px rgba(0,0,0,.12); opacity:0; transition:all .2s; }
.product-card:hover .wish-btn { opacity:1; }
.wish-btn.active { opacity:1; background:var(--offer-red); color:#fff; }
.wish-btn:hover { background:var(--offer-red); color:#fff; }

.product-body { padding:.75rem; }
.product-brand { font-size:.625rem; color:var(--primary); font-weight:700; margin:0 0 .1rem; }
.product-name { font-size:.75rem; font-weight:700; color:var(--text-primary); margin:0 0 .35rem; line-height:1.35; min-height:2.1em; }
.product-unit { font-size:.625rem; color:var(--text-secondary); margin:0 0 .5rem; }
.product-price-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:.5rem; direction:ltr; }
.product-price { font-size:.875rem; font-weight:800; color:var(--text-primary); }
.product-price .cur { font-size:.625rem; font-weight:400; color:var(--text-secondary); margin-inline-start:.15rem; }
.product-price-old { font-size:.625rem; color:var(--text-secondary); text-decoration:line-through; margin-inline-start:.25rem; }

.add-cart-btn { width:100%; display:flex; align-items:center; justify-content:center; gap:.25rem; padding:.5rem; border-radius:12px; font-size:.75rem; font-weight:700; border:none; background:rgba(11,122,67,.1); color:var(--primary); transition:all .2s; }
.add-cart-btn:hover { background:var(--primary); color:#fff; }
.add-cart-btn:disabled { background:#f3f4f6; color:#9ca3af; cursor:not-allowed; }
.qty-stepper { display:flex; align-items:center; gap:.25rem; background:#f3f4f6; border-radius:12px; padding:.25rem; }
html.dark .qty-stepper { background:var(--border); }
.qty-stepper button { width:1.75rem; height:1.75rem; display:flex; align-items:center; justify-content:center; border-radius:8px; border:none; background:transparent; color:var(--text-primary); }
.qty-stepper button:hover { background:#fff; }
html.dark .qty-stepper button:hover { background:var(--background); }
.qty-stepper .val { flex:1; text-align:center; font-size:.75rem; font-weight:800; }

/* list layout variant */
.product-card.list { display:flex; align-items:center; gap:1rem; padding:1rem; }
.product-card.list .product-media { width:6rem; height:6rem; flex-shrink:0; border-radius:16px; }
.product-card.list .product-body { flex:1; padding:0; min-width:0; }
.product-card.list .product-name { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-height:0; }
.product-list { display:flex; flex-direction:column; gap:.75rem; }

/* ---------- Brand grid ---------- */
.brand-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:.75rem; }
@media (min-width:1024px){ .brand-grid{ grid-template-columns:repeat(8,1fr); } }
.brand-card { display:flex; flex-direction:column; align-items:center; gap:.5rem; padding:1rem; background:var(--card); border:1px solid var(--border); border-radius:16px; transition:all .2s; text-align:center; text-decoration:none; cursor:pointer; }
.brand-card:hover { border-color:var(--primary-light); box-shadow:0 8px 20px rgba(0,0,0,.06); transform:translateY(-3px); }
.brand-card .nm { font-weight:700; color:var(--text-secondary); }
.brand-card:hover .nm { color:var(--primary); }
.brand-card .ct { font-size:.625rem; color:var(--text-secondary); }

/* ---------- Branch cards ---------- */
.branch-grid { display:grid; grid-template-columns:1fr; gap:1rem; }
@media (min-width:640px){ .branch-grid{ grid-template-columns:repeat(2,1fr); } }
@media (min-width:1024px){ .branch-grid{ grid-template-columns:repeat(3,1fr); } }
.branch-grid.cols-4 { grid-template-columns:1fr; }
@media (min-width:640px){ .branch-grid.cols-4{ grid-template-columns:repeat(2,1fr); } }
@media (min-width:1024px){ .branch-grid.cols-4{ grid-template-columns:repeat(3,1fr); } }
@media (min-width:1280px){ .branch-grid.cols-4{ grid-template-columns:repeat(4,1fr); } }
.branch-card { background:var(--card); border:1px solid var(--border); border-radius:16px; padding:1.25rem; transition:all .2s; }
.branch-card:hover { box-shadow:0 10px 24px rgba(0,0,0,.06); transform:translateY(-2px); }
.branch-head { display:flex; align-items:flex-start; justify-content:space-between; gap:.5rem; margin-bottom:.75rem; }
.branch-head .info { display:flex; align-items:center; gap:.6rem; }
.branch-head b { display:block; font-weight:700; }
.branch-head .city { font-size:.7rem; color:var(--text-secondary); }
.status-chip { font-size:.625rem; font-weight:800; padding:.2rem .5rem; border-radius:8px; white-space:nowrap; }
.status-chip.open { background:rgba(22,163,93,.1); color:var(--primary); }
.status-chip.maintenance { background:#fef9c3; color:#a16207; }
.branch-meta { font-size:.7rem; color:var(--text-secondary); margin:.15rem 0; }
.branch-foot { display:flex; align-items:center; gap:1rem; margin-top:.75rem; font-size:.7rem; color:var(--text-secondary); }

/* ---------- Benefits ---------- */
.benefits-panel { display:grid; grid-template-columns:repeat(2,1fr); gap:1rem; background:var(--card); border:1px solid var(--border); border-radius:24px; padding:1.5rem; }
@media (min-width:1024px){ .benefits-panel{ grid-template-columns:repeat(4,1fr); } }
.benefit-item { display:flex; align-items:center; gap:.75rem; }
.benefit-item .ic { width:2.5rem; height:2.5rem; border-radius:16px; background:rgba(11,122,67,.1); color:var(--primary); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.benefit-item b { display:block; font-size:.875rem; font-weight:700; }
.benefit-item small { font-size:.7rem; color:var(--text-secondary); }

/* ---------- Reviews ---------- */
.review-grid { display:grid; grid-template-columns:1fr; gap:1rem; }
@media (min-width:768px){ .review-grid{ grid-template-columns:repeat(2,1fr); } }
@media (min-width:1024px){ .review-grid{ grid-template-columns:repeat(4,1fr); } }
.review-card { background:var(--card); border:1px solid var(--border); border-radius:16px; padding:1.25rem; }
.review-stars { display:flex; gap:.15rem; margin-bottom:.75rem; color:var(--gold); }
.review-comment { font-size:.875rem; color:var(--text-secondary); line-height:1.7; margin:0 0 1rem; }
.review-person { display:flex; align-items:center; gap:.75rem; }
.review-avatar { width:2.25rem; height:2.25rem; border-radius:12px; background:linear-gradient(135deg,var(--primary),var(--primary-light)); color:#fff; font-weight:800; font-size:.75rem; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.review-person b { font-size:.875rem; font-weight:700; display:block; }
.review-person small { font-size:.7rem; color:var(--text-secondary); }
.review-summary { text-align:center; margin-bottom:2rem; }
.review-summary h2 { font-size:1.5rem; font-weight:800; margin:0 0 .5rem; }
.review-summary .stars-row { display:flex; align-items:center; justify-content:center; gap:.35rem; color:var(--gold); }
.review-summary .score { font-weight:800; color:var(--text-primary); margin-inline-start:.25rem; }

/* ---------- Generic content cards / pages ---------- */
.page-wrap { min-height:100vh; display:flex; flex-direction:column; background:var(--background); }
.page-main { max-width:1520px; width:100%; margin-inline:auto; padding:1.5rem 1rem; flex:1; }
@media (min-width:1024px){ .page-main{ padding:2rem 1.5rem; } }
.page-title { font-size:1.5rem; font-weight:800; margin:0 0 1.5rem; }
.breadcrumb { display:flex; align-items:center; gap:.5rem; font-size:.875rem; color:var(--text-secondary); margin-bottom:1.5rem; flex-wrap:wrap; }
.breadcrumb a:hover { color:var(--primary); }
.breadcrumb .current { color:var(--text-primary); font-weight:600; }

.card-box { background:var(--card); border:1px solid var(--border); border-radius:16px; padding:1.25rem; }
.card-box-lg { border-radius:24px; padding:1.5rem; }
@media (min-width:1024px){ .card-box-lg{ padding:2rem; } }

.info-tile { display:flex; align-items:center; gap:.5rem; background:#f9fafb; border-radius:12px; padding:.6rem; }
html.dark .info-tile { background:var(--border); }
.info-tile .k { font-size:.7rem; color:var(--text-secondary); }
.info-tile .v { font-size:.7rem; font-weight:700; }

.tabs-row { display:flex; gap:.5rem; margin-bottom:1.5rem; flex-wrap:wrap; }
.tab-btn { padding:.6rem 1rem; border-radius:12px; font-size:.875rem; font-weight:600; background:var(--card); border:1px solid var(--border); color:var(--text-secondary); }
.tab-btn.active { background:var(--primary); color:#fff; border-color:var(--primary); }

.contact-grid { display:grid; grid-template-columns:1fr; gap:1.5rem; }
@media (min-width:1024px){ .contact-grid{ grid-template-columns:repeat(3,1fr); } }
.contact-card { background:var(--card); border:1px solid var(--border); border-radius:16px; padding:1.5rem; }
.contact-card .ic { width:3rem; height:3rem; border-radius:16px; background:rgba(11,122,67,.1); color:var(--primary); display:flex; align-items:center; justify-content:center; margin-bottom:1rem; }
.contact-card h3 { margin:0 0 .5rem; font-weight:700; }
.contact-card p { margin:0; font-size:.875rem; color:var(--text-secondary); }

/* ---------- Empty state ---------- */
.empty-state { display:flex; flex-direction:column; align-items:center; text-align:center; padding:4rem 1rem; }
.empty-state .ic-wrap { width:6rem; height:6rem; background:#f3f4f6; border-radius:24px; display:flex; align-items:center; justify-content:center; margin-bottom:1.5rem; color:#9ca3af; }
html.dark .empty-state .ic-wrap { background:var(--border); }
.empty-state h2 { font-size:1.375rem; font-weight:800; margin:0 0 .5rem; }
.empty-state p { color:var(--text-secondary); font-size:.875rem; max-width:24rem; margin:0 0 1.5rem; }

/* ---------- Toast ---------- */
.toast-host { position:fixed; bottom:1rem; inset-inline:0; z-index:100; display:flex; justify-content:center; padding-inline:1rem; pointer-events:none; }
.toast { pointer-events:auto; display:flex; align-items:center; gap:.6rem; padding:.75rem 1rem; border-radius:16px; box-shadow:0 20px 40px rgba(0,0,0,.2); font-size:.875rem; font-weight:600; max-width:24rem; background:#17212B; color:#fff; }
.toast.success { background:var(--primary); }
.toast button { background:none; border:none; color:inherit; opacity:.7; }
.toast button:hover { opacity:1; }

/* ---------- Utility spacing shims ---------- */
.mt-6 { margin-top:1.5rem; }
.mb-6 { margin-bottom:1.5rem; }
.gap-2 { gap:.5rem; }
.flex { display:flex; }
.flex-col { flex-direction:column; }
.items-center { align-items:center; }
.justify-between { justify-content:space-between; }
.w-full { width:100%; }
.text-center { text-align:center; }
.hidden { display:none !important; }


/* SmartShopper 10.17.3 — Storefront product cards + Golden Card promo */
.product-card{border-radius:20px;border-color:rgba(15,23,42,.09);box-shadow:0 5px 18px rgba(15,23,42,.045)}
.product-card:hover{box-shadow:0 22px 50px rgba(15,23,42,.13);transform:translateY(-7px)}
.product-media{height:13rem;background:linear-gradient(180deg,#fff,#f7faf8)}
.product-body{padding:.9rem}
.product-name{font-size:.82rem;line-height:1.55;min-height:2.55em}
.product-price{font-size:1rem}
.add-cart-btn{min-height:42px;border-radius:13px;font-weight:800}
.add-cart-btn.is-branch-only{background:#f2f4f7;color:#667085}
.product-availability-badges{position:absolute;left:.65rem;bottom:.65rem;display:flex;gap:.35rem;flex-wrap:wrap;z-index:3;max-width:90%}
.availability-badge{font-size:.58rem;font-weight:900;padding:.28rem .46rem;border-radius:999px;box-shadow:0 4px 10px rgba(0,0,0,.08);white-space:nowrap}
.availability-badge.branch{background:#eef2ff;color:#3730a3}
.availability-badge.online{background:#e8f8ee;color:#087443}
.golden-card-promo{position:absolute;left:34px;top:36px;z-index:8;display:flex;align-items:center;gap:12px;width:230px;min-height:118px;padding:16px 18px;border-radius:22px;background:linear-gradient(135deg,#fff8d8,#f2c94c 55%,#c99300);color:#3e2e00;text-decoration:none;box-shadow:0 18px 38px rgba(94,67,0,.24);transform:rotate(-6deg);border:1px solid rgba(255,255,255,.75);transition:.25s}
.golden-card-promo:hover{transform:rotate(-3deg) translateY(-4px);box-shadow:0 24px 48px rgba(94,67,0,.3)}
.golden-card-crown{font-size:38px;filter:drop-shadow(0 4px 8px rgba(0,0,0,.18))}
.golden-card-copy{display:flex;flex-direction:column;line-height:1.25}
.golden-card-copy small{font-size:.72rem;opacity:.82}
.golden-card-copy b{font-size:1.12rem;margin:.2rem 0 .45rem}
.golden-card-copy em{font-size:.7rem;font-style:normal;font-weight:900;background:rgba(255,255,255,.68);padding:.35rem .55rem;border-radius:999px;align-self:flex-start}
.ss-fly-item{position:fixed;z-index:99999;pointer-events:none;border-radius:16px;box-shadow:0 10px 25px rgba(0,0,0,.18);transition:all .55s cubic-bezier(.2,.8,.2,1)}
@media(max-width:1000px){.golden-card-promo{left:18px;top:18px;width:190px;min-height:96px;padding:12px}.golden-card-crown{font-size:30px}}
@media(max-width:760px){.golden-card-promo{position:relative;left:auto;top:auto;margin:12px 16px 58px;width:auto;transform:rotate(-2deg)}.hero-banner{height:auto!important;min-height:430px}}

/* 10.17.9 product card */
.ss-product-card{display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(15,23,42,.08);border-radius:22px;background:var(--card);box-shadow:0 8px 24px rgba(15,23,42,.05);transition:.22s;position:relative}.ss-product-card:hover{transform:translateY(-5px);box-shadow:0 20px 44px rgba(15,23,42,.12)}.ss-product-card .product-media{height:210px;position:relative;padding:10px;background:linear-gradient(180deg,#fff,#f8faf9)}.product-media-link{display:grid;place-items:center;width:100%;height:100%;border-radius:17px;overflow:hidden}.ss-product-card .product-media img{width:100%;height:100%;object-fit:contain}.product-image-placeholder{width:100%;height:100%;place-items:center;font-size:48px}.product-wish-form{position:absolute;top:14px;inset-inline-start:14px;z-index:5}.product-availability-badges{position:absolute;left:14px;right:14px;bottom:12px}.availability-badge{font-size:11px;font-weight:800;padding:5px 9px;border-radius:999px}.availability-badge.online{background:#ecfdf3;color:#067647}.availability-badge.branch{background:#eef2ff;color:#3538cd}.ss-product-card .product-body{display:flex;flex-direction:column;gap:7px;padding:13px 14px 14px;flex:1}.product-code-row{display:flex;justify-content:space-between;gap:8px}.product-code{font-size:11px;color:#98a2b3;direction:ltr}.stock-pill.out{font-size:10px;background:#fff1f0;color:#b42318;padding:4px 8px;border-radius:999px}.product-title-link{color:inherit;text-decoration:none}.ss-product-card .product-name{font-size:14px;font-weight:800;line-height:1.55;min-height:44px;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ss-product-card .product-price{font-size:20px;font-weight:900;color:var(--primary)}.product-price-contact{font-size:12px;font-weight:800;color:#b54708;background:#fffaeb;border-radius:10px;padding:7px 10px}.product-card-action{margin-top:auto}.ss-product-card .add-cart-btn{width:100%;min-height:44px;border-radius:14px;border:0;background:linear-gradient(135deg,var(--primary),var(--primary-light));color:#fff;font-weight:900;cursor:pointer}.ss-product-card .add-cart-btn.is-branch-only,.ss-product-card .add-cart-btn.is-unavailable{background:#f2f4f7;color:#667085;cursor:not-allowed}.ss-fly-item{position:fixed;z-index:999999;pointer-events:none;border-radius:18px;background:#fff;box-shadow:0 16px 34px rgba(15,23,42,.22);object-fit:contain;transition:left .62s cubic-bezier(.2,.8,.2,1),top .62s cubic-bezier(.2,.8,.2,1),width .62s,height .62s,opacity .62s,transform .62s}.cart-fly-pulse{animation:ssCartPulse .55s ease}@keyframes ssCartPulse{0%,100%{transform:scale(1)}45%{transform:scale(1.17)}}


/* SmartShopper 10.17.15 — product grid/card geometry */
.product-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(220px,260px))!important;
  gap:22px!important;
  align-items:stretch!important;
  justify-content:start!important;
}
html[dir="rtl"] .product-grid{justify-content:start!important}

.ss-product-card{
  width:100%!important;
  min-width:0!important;
  max-width:260px!important;
  min-height:395px!important;
  height:100%!important;
  border-radius:20px!important;
}
.ss-product-card .product-media{
  width:100%!important;
  height:220px!important;
  min-height:220px!important;
  padding:14px!important;
}
.ss-product-card .product-media-link{
  width:100%!important;
  height:100%!important;
}
.ss-product-card .product-media img{
  display:block;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
}
.ss-product-card .product-body{
  min-height:160px!important;
  padding:14px 15px 15px!important;
}
.ss-product-card .product-name{
  min-height:46px!important;
  font-size:15px!important;
}
.ss-product-card .product-price-row{
  display:flex!important;
  align-items:center!important;
  min-height:38px!important;
}
.ss-product-card .add-cart-btn{
  min-height:46px!important;
  font-size:13px!important;
}
.product-image-placeholder{
  width:100%!important;
  height:100%!important;
  border-radius:15px!important;
}

@media (min-width:1200px){
  .product-grid{
    grid-template-columns:repeat(auto-fill,minmax(230px,260px))!important;
  }
}
@media (max-width:700px){
  .product-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:12px!important;
  }
  .ss-product-card{
    max-width:none!important;
    min-height:330px!important;
  }
  .ss-product-card .product-media{
    height:165px!important;
    min-height:165px!important;
  }
}

/* 10.17.18 product detail image/price */
.detail-price-missing{display:inline-flex;align-items:center;padding:10px 14px;border-radius:12px;background:#fff4e5;color:#b54708;font-weight:900;font-size:15px}
.gallery-main img{width:100%;height:100%;max-height:610px;object-fit:contain;object-position:center;display:block}


/* ============================================================
   SmartShopper 10.17.23 — ROOT FIX: storefront product grid
   Root cause:
   <main> is display:flex + flex-direction:column.
   .section had margin-inline:auto + max-width but no explicit width,
   allowing flex shrink-to-content behavior and collapsing product
   grids to one card wide.
   ============================================================ */

/* Every storefront section must occupy the available main width. */
.page-wrap > main > .section,
main > .section,
.section {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  align-self: stretch !important;
}

/* Product grids always use the entire section width. */
.product-grid {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: stretch !important;
  justify-content: stretch !important;
}

/* Cards fill their grid cell instead of constraining the grid itself. */
.product-grid > .ss-product-card,
.product-grid > .product-card:not(.list) {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: 100% !important;
}

/* Tablet */
@media (min-width: 700px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }
}

/* Large desktop */
@media (min-width: 1360px) {
  .product-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }
}

/* Keep card proportions balanced after full-width grid fix. */
@media (min-width: 1024px) {
  .ss-product-card .product-media {
    height: 205px !important;
    min-height: 205px !important;
  }
  .ss-product-card {
    min-height: 385px !important;
  }
}

@media (max-width: 699px) {
  .ss-product-card {
    min-height: 320px !important;
  }
  .ss-product-card .product-media {
    height: 160px !important;
    min-height: 160px !important;
  }
}


/* SmartShopper 10.17.29 — discount badge must stay inside product image */
.ss-product-card .product-media{position:relative!important;}
.ss-product-card .badge-discount{
  position:absolute!important;
  top:12px!important;
  right:12px!important;
  left:auto!important;
  inset-inline-start:auto!important;
  inset-inline-end:auto!important;
  z-index:8!important;
  margin:0!important;
  transform:none!important;
}
.ss-product-card .product-wish-form{
  position:absolute!important;
  top:12px!important;
  left:12px!important;
  right:auto!important;
  z-index:9!important;
}

/* 10.20.13 — refined storefront product card */
.ss-product-card{border:1px solid #e4ece8!important;border-radius:24px!important;background:linear-gradient(180deg,#fff 0%,#fff 72%,#fbfdfc 100%)!important;box-shadow:0 8px 28px rgba(12,61,44,.07)!important;isolation:isolate}.ss-product-card:hover{border-color:#b9dccd!important;box-shadow:0 22px 55px rgba(12,61,44,.15)!important}.ss-product-card .product-media{background:radial-gradient(circle at 50% 35%,#fff 0,#f5faf7 74%,#edf5f1 100%)!important;border-bottom:1px solid #eef3f0}.ss-product-card .product-media-link{background:#fff;border:1px solid rgba(226,235,230,.8)}.ss-product-card .product-media img{transition:transform .35s ease,filter .35s ease}.ss-product-card:hover .product-media img{transform:scale(1.055);filter:saturate(1.05)}.ss-product-card .product-body{gap:9px!important;padding:15px 16px 16px!important}.product-code-row{min-height:25px;align-items:center}.product-code{font-size:10px!important;font-weight:700;background:#f4f6f5;padding:4px 7px;border-radius:7px}.product-unit-chip{max-width:58%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:800;color:#52655d;background:#eef5f1;padding:4px 8px;border-radius:999px}.ss-product-card .product-name{font-size:15px!important;line-height:1.65!important;color:#10271f}.ss-product-card .product-price-row{display:flex;align-items:baseline;gap:6px}.ss-product-card .product-price{font-size:22px!important;color:#087443!important;letter-spacing:-.3px}.ss-product-card .cur{font-size:11px;color:#66756f}.ss-product-card .product-price-old{font-size:12px;color:#98a2b3}.ss-product-card .add-cart-btn{position:relative;overflow:hidden;min-height:48px!important;border-radius:15px!important;background:linear-gradient(135deg,#0a8b50,#087443)!important;box-shadow:0 8px 18px rgba(8,116,67,.2);font-size:13px!important;transition:.2s ease!important}.ss-product-card .add-cart-btn:hover{transform:translateY(-2px);box-shadow:0 12px 24px rgba(8,116,67,.28)}.cart-btn-icon{display:grid;place-items:center;width:26px;height:26px;border-radius:9px;background:rgba(255,255,255,.16)}.best-selling-badge{position:absolute;z-index:9;top:13px;right:13px;display:inline-flex;align-items:center;padding:6px 9px;border-radius:10px;background:linear-gradient(135deg,#ffca4b,#d99b09);color:#382600;font-size:10px;font-weight:900;box-shadow:0 5px 14px rgba(190,130,0,.24)}.ss-product-card .badge-discount+.best-selling-badge{top:48px}.ss-fly-item{border:2px solid #fff!important;box-shadow:0 18px 48px rgba(8,116,67,.35)!important}@media(max-width:699px){.ss-product-card .product-body{padding:11px 12px 13px!important}.ss-product-card .product-name{font-size:13px!important}.ss-product-card .product-price{font-size:18px!important}.best-selling-badge{font-size:9px;padding:5px 7px}}

/* SmartShopper 10.23.08 — mobile viewport containment */
html,body{width:100%;max-width:100%;overflow-x:hidden}
.page-wrap,.page-wrap>main,main,.section,.header-inner,.bottom-nav{min-width:0;max-width:100%}
@media(max-width:699px){
  .section{width:100%!important;padding-inline:12px!important;margin-inline:0!important}
  .brand-grid{width:100%!important;min-width:0!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .brand-card{width:100%!important;min-width:0!important;padding:.85rem .5rem!important;overflow:hidden!important}
  .brand-card .nm,.brand-card .ct{max-width:100%;overflow-wrap:anywhere}
  .bottom-nav{width:100%;max-width:100vw;overflow-x:hidden}
}
