/* Sari-sari Store PriceList: orange storefront theme */
:root {
  --orange: #FC5702;
  --orange-2: #FF6D03;
  --peach: #FEEEDF;
  --peach-line: #F8E3D2;
  --ink: #291F19;
  --ink-soft: #6B5A4E;
  --font-display: "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--font-body); line-height: 1.45; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header: mockup banner + live nav ---------- */
.site-header { position: relative; }
.banner { display: block; width: 100%; height: auto; }

.main-nav {
  position: absolute; top: 0; left: 34%; right: 1.5%; height: 20%;
  display: flex; align-items: center; gap: clamp(.5rem, 2vw, 2rem);
  font-size: clamp(.8rem, 1.45vw, 1.25rem); font-weight: 700;
}
.nav-link {
  display: inline-flex; align-items: center; gap: .45em; flex: none;
  padding: .55em 1.1em; border-radius: 999px; color: var(--ink); text-decoration: none;
}
.nav-link svg { width: 1.3em; height: 1.3em; }
.nav-link:not(.active) svg { color: #1F4E8C; }
.nav-link:hover { color: var(--orange); }
.nav-link.active { background: var(--orange); color: #fff; }
.nav-search {
  margin-left: auto; display: flex; align-items: center; gap: .5em; flex: 0 1 270px; min-width: 0;
  padding: .55em 1em; border: 2px solid #D9D9DE; border-radius: 999px; background: #F7F7F9;
}
.nav-search svg { width: 1.3em; height: 1.3em; flex: none; }
.nav-search input { width: 100%; min-width: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink); outline: none; }
.nav-search:focus-within { border-color: var(--orange); }

/* ---------- Sidebar + grid ---------- */
.layout {
  display: grid; grid-template-columns: 272px 1fr; gap: 1.1rem;
  max-width: 1536px; margin: 0 auto; padding: 1.2rem 1.2rem 1rem; align-items: start;
}
.sidebar { border: 2px solid #E8E8EC; border-radius: 14px; overflow: hidden; background: #fff; }
.sidebar-title {
  margin: 0; display: flex; align-items: center; gap: .7rem; padding: .85rem 1.2rem;
  background: var(--orange); color: #fff; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700;
}
.sidebar-title svg { width: 26px; height: 26px; }
.category-nav { display: flex; flex-direction: column; padding: .6rem .5rem; }
.category-btn {
  display: flex; align-items: center; gap: .9rem; width: 100%; padding: .55rem .8rem;
  border: 0; border-radius: 10px; background: none; text-align: left; font-size: 1.1rem; font-weight: 600;
}
.category-btn svg { width: 30px; height: 30px; flex: none; color: var(--orange); }
.category-btn:hover { background: var(--peach); }
.category-btn.active { background: var(--peach); font-weight: 800; box-shadow: inset 4px 0 0 var(--orange); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .9rem; }
.product-card {
  display: flex; flex-direction: column; align-items: center; padding: .8rem .6rem .9rem;
  background: var(--peach); border: 1px solid var(--peach-line); border-radius: 14px;
  text-align: center; cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(252, 87, 2, .18); }
.product-image-wrapper { display: grid; place-items: center; width: 100%; aspect-ratio: 1.15; color: var(--orange); }
.product-image-wrapper img { width: 100%; height: 100%; object-fit: contain; }
.product-image-wrapper > svg { width: 45%; height: 45%; opacity: .8; }
.product-info { width: 100%; margin-top: .45rem; }
.product-name { font-weight: 800; font-size: 1.05rem; line-height: 1.2; min-height: 2.4em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-category-wrapper { display: none; }
.product-price {
  margin-top: .45rem; padding: .2rem 1.3rem; border-radius: 999px;
  background: var(--orange-2); color: #fff; font-weight: 800; font-size: 1.2rem;
}
.empty-message { grid-column: 1 / -1; padding: 3rem 1rem; text-align: center; color: var(--ink-soft); }
.empty-message svg { width: 48px; height: 48px; margin: 0 auto .5rem; }

.load-more {
  grid-column: 1 / -1; justify-self: center; margin: .6rem 0 .4rem; padding: .7rem 1.8rem;
  border: 0; border-radius: 999px; background: var(--orange); color: #fff; font-weight: 800; font-size: 1rem;
}
.load-more:hover { filter: brightness(.92); }

/* ---------- Tagline strip ---------- */
.promo {
  max-width: calc(1536px - 2.4rem); margin: .4rem 1.2rem 1.2rem; padding: 1.4rem 1.5rem; text-align: center;
  border-radius: 14px; background: linear-gradient(90deg, #FDD57E, #FED37D 60%, #FBB85F);
}
@media (min-width: 1560px) { .promo { margin-inline: auto; } }
.promo-text { margin: 0; font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: clamp(1.3rem, 3vw, 2.2rem); line-height: 1.2; }

/* ---------- Footer ---------- */
.store-footer { padding: 1rem 1.25rem 1.6rem; text-align: center; color: var(--ink-soft); font-size: .9rem; }
.store-footer p { margin: 0 0 .35rem; }
.footer-credit a { color: var(--orange); font-weight: 700; }

/* ---------- Detail popup ---------- */
.detail-overlay { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 1rem; background: rgba(41, 31, 25, .6); }
.detail-overlay.show { display: flex; }
.detail-card { position: relative; width: 100%; max-width: 420px; max-height: calc(100vh - 2rem); overflow-y: auto; padding: 1.25rem; background: #fff; border-radius: 18px; animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.close-detail { position: absolute; top: .75rem; right: .75rem; z-index: 1; width: 38px; height: 38px; padding: 9px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.detail-image-wrapper { display: grid; place-items: center; aspect-ratio: 4/3; margin-bottom: 1rem; border-radius: 12px; background: var(--peach); color: var(--orange); }
.detail-image-wrapper img { width: 100%; height: 100%; object-fit: contain; padding: .75rem; }
.detail-image-wrapper > svg { width: 30%; height: 30%; opacity: .8; }
.detail-name { margin: 0; font-family: var(--font-display); font-size: 1.7rem; line-height: 1.15; }
.detail-category { display: inline-block; margin-top: .4rem; padding: .05rem .7rem; border-radius: 999px; background: var(--peach); color: var(--orange); font-size: .85rem; font-weight: 700; }
.detail-price { margin-top: .6rem; display: inline-block; padding: .1rem 1.1rem; border-radius: 999px; background: var(--orange-2); color: #fff; font-weight: 800; font-size: 1.6rem; }
.detail-description { margin: .7rem 0 0; color: var(--ink-soft); }
.back-to-store { display: flex; align-items: center; justify-content: center; gap: .4rem; width: 100%; padding: .75rem 1rem; border: 0; border-radius: 999px; background: var(--orange); color: #fff; font-weight: 800; }
.back-to-store:hover { filter: brightness(.92); }
.back-to-store svg { width: 18px; height: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .category-nav { flex-direction: row; flex-wrap: wrap; gap: .35rem; }
  .category-btn { width: auto; font-size: 1rem; padding: .4rem .8rem; border: 2px solid #eee; border-radius: 999px; }
  .category-btn svg { width: 22px; height: 22px; }
  .category-btn.active { box-shadow: none; border-color: var(--orange); }
}
@media (max-width: 760px) {
  .main-nav { position: static; height: auto; flex-wrap: wrap; padding: .6rem 1rem; font-size: .95rem; }
  .nav-search { flex: 1 1 100%; margin: 0; }
}
@media (max-width: 420px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
