@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600&family=Inter:wght@400;500;600&display=swap");

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

:root {
  --primary: #aec597;
  --text: #101214;
  --muted: rgba(16, 18, 20, 0.65);
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --border: rgba(76, 76, 76, 0.16);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.08);
  --radius: 18px;
  --radius-sm: 14px;
  --maxw: 1100px;
}

body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: start;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background: radial-gradient(1200px 800px at 10% 0%, rgba(174, 197, 151, 0.35), transparent 55%),
              radial-gradient(900px 600px at 90% 15%, rgba(255, 132, 132, 0.18), transparent 55%),
              linear-gradient(180deg, #f5f6f7 0%, #e8e9ea 55%, #e2e2e2 100%);
  color: #111111;
}

button {
  border: none;
  background-color: transparent;
  cursor: pointer;
  text-align: left;
}

.hide-scrollbar {
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

#preloader {
  position: fixed;
  z-index: 9999999;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: #aec597;
  transition: 0.3s;
}
#preloader.done {
  opacity: 0;
  pointer-events: none;
}
#preloader .logo {
  position: absolute;
  width: 50px;
  aspect-ratio: 1/1;
  -o-object-fit: contain;
     object-fit: contain;
  -o-object-position: center center;
     object-position: center center;
}
#preloader .loading-animate {
  width: 100px;
}

header {
  position: sticky;
  top: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  /* Let the safe-area padding actually increase the header height on iOS.
     Using a fixed height can cause downstream "double safe-area" spacing bugs. */
  min-height: 60px;
  padding: 10px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background-color: #aec597;
  border-bottom: 2px solid #4c4c4c;
}
header a img {
  width: 150px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  width: 100%;
  padding: 10px;
  /* Reserve space for the in-grid title bar.
     iOS Safari can render position:sticky titles on top of cards.
     Fixed title + reserved padding avoids the overlap. */
  padding-top: calc(12px + var(--titlebar-height, 56px));
  background-color: #e2e2e2;
  align-content: start;
  justify-items: stretch;
  overflow: auto;
}

.grid.hidden {
  display: none;
}


/* ---
   Image consistency tweaks
   - Keep all category/subcategory cards visually equal
   - Prevent wildly different source image ratios from affecting layout
   --- */


.grid .card {
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 2px solid #4c4c4c;
  background: #f4f4f4;
}

.grid .card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.grid .title {
  grid-column: 1 / -1;
  /* Use a fixed title bar to avoid iOS sticky overlap glitches */
  position: fixed;
  /* IMPORTANT: header height already includes safe-area padding.
     Adding env(safe-area-inset-top) here causes the title to slide DOWN
     into the first row of cards on iPhone (seen in screenshots). */
  top: var(--header-height, 60px);
  left: 0;
  right: 0;
  z-index: 50;
  width: 100%;
  height: var(--titlebar-height, 56px);
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(226, 226, 226, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(76, 76, 76, 0.18);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  padding: 0 10px;
}
.grid .title button {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #4c4c4c;
  border-radius: 5px;
  background-color: #aec597;
  color: #4c4c4c;
}

.grid .title h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #111;
}
.grid .card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
  border: 1px solid #4c4c4c;
}
.grid .card.hidden {
  pointer-events: none;
  opacity: 0;
}
.grid .card img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: center center;
     object-position: center center;
  filter: brightness(0.85) contrast(1.1);
}
.grid .card .gloss {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 30%, transparent 70%);
  pointer-events: none;
}
.grid .card .content {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 16px;
  color: white;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
}

.grid .card .content h3 {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

[data-type=subCategory] {
  position: fixed;
  /* Start under the header to avoid content living "behind" it on mobile */
  top: var(--header-height, 60px);
  left: 0;
  width: 100vw;
  height: calc(100dvh - var(--header-height, 60px));
}
[data-type=subCategory].hidden {
  pointer-events: none;
  opacity: 0;
}

.item-list {
  position: fixed;
  top: var(--header-height, 60px);
  left: 0;
  width: 100%;
  height: calc(100dvh - var(--header-height, 60px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  /* Header height already includes safe-area padding; don't add it again */
  padding-top: 10px;
  background-color: #e2e2e2;
  transition: 0.3s;
}
.item-list.hidden {
  opacity: 0;
  pointer-events: none;
}
.item-list .title {
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  background: #e2e2e2;
  padding: 6px 0;
  z-index: 6;
}

/* Small screens */
@media (max-width: 520px) {
  header a img { width: 140px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grid .card { border-radius: 14px; }
  .grid .card .content { padding: 12px; }
  .item-list .list .item img { width: 68px; height: 68px; }
}

/* Very small screens */
@media (max-width: 360px) {
  .grid { grid-template-columns: 1fr; }
}
.item-list .title button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #4c4c4c;
  border-radius: 5px;
  background-color: #aec597;
  color: #4c4c4c;
}
.item-list .list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
}
.item-list .list .item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(76, 76, 76, 0.25);
}
.item-list .list .item img {
  width: 75px;
  height: 75px;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: center;
     object-position: center;
  border-radius: 10px;
}
.item-list .list .item h4 {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-weight: bold;
}
.item-list .list .item h4 span {
  display: flex;
  font-weight: lighter;
  font-size: 0.8rem;
  margin: 0;
}
.item-list .list .item span {
  margin-left: auto;
  font-weight: bolder;
}/*# sourceMappingURL=style.css.map */

/* --- Premium UI overrides (2026) --- */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: calc(var(--header-height, 60px) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 246, 247, 0.72);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
header a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(var(--maxw), 100%);
  padding: 0 14px;
}
header img {
  height: 34px;
  width: auto;
  object-fit: contain;
}

/* Layout container width */
.grid,
.item-list {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

/* Category / subcategory cards */
.grid {
  gap: 14px;
  padding: 14px;
  padding-top: 14px;
  background: transparent;
}
.grid .title {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.grid .title h1 {
  font-size: 1.05rem;
  letter-spacing: 0.2px;
  color: var(--text);
}
.grid .title button {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}
.grid .card {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  overflow: hidden;
  transform: translateZ(0);
}
.grid .card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.02) contrast(1.02);
  transform: scale(1.001);
}
.grid .card .gloss {
  position: absolute;
  inset: 0;
  background: radial-gradient(800px 240px at 15% 5%, rgba(255,255,255,0.40), transparent 55%),
              linear-gradient(180deg, rgba(0,0,0,0.00) 35%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.grid .card .content {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}
.grid .card .content h3 {
  color: rgba(255,255,255,0.96);
  text-shadow: 0 6px 18px rgba(0,0,0,0.45);
  font-size: 1.05rem;
  line-height: 1.15;
  letter-spacing: 0.2px;
}
.grid .card:active {
  transform: scale(0.985);
}
@media (hover:hover) {
  .grid .card:hover { transform: translateY(-2px); }
}

/* Product list */
.item-list {
  background: transparent;
  padding: 14px;
  padding-top: calc(var(--header-height, 60px) + 14px + env(safe-area-inset-top));
}
.item-list .title {
  background: rgba(245, 246, 247, 0.68);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  margin-bottom: 12px;
}
.item-list .title h1 { color: var(--text); font-size: 1.0rem; }
.item-list .title button {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.item-list .list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-list .list .item {
  border-bottom: none;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.78);
  box-shadow: var(--shadow-soft);
  gap: 12px;
}
.item-list .list .item img {
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.04);
}
.item-list .list .item h4 {
  font-size: 0.98rem;
  letter-spacing: 0.15px;
  color: var(--text);
}
.item-list .list .item h4 span {
  color: var(--muted);
  font-size: 0.82rem;
}
.item-list .list .item > span {
  margin-left: auto;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(174, 197, 151, 0.22);
  color: rgba(16, 18, 20, 0.90);
  font-weight: 700;
  white-space: nowrap;
}

/* Better scrolling on iOS */
.grid, .item-list { -webkit-overflow-scrolling: touch; }
.hide-scrollbar::-webkit-scrollbar { width: 0px; height: 0px; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}


/* Mobile: tighter grid so cards look great on iPhone/Android */
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .grid { grid-template-columns: 1fr; }
  .item-list .list .item img { width: 78px; height: 78px; flex-basis: 78px; }
}

/* ==========================================================
   Classy header + titles (fixes iOS overlap and "tuhaf" title)
   ========================================================== */

/* Clean, single-source header sizing (avoid double safe-area math) */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: unset;
  height: auto;
  padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: rgba(245, 246, 247, 0.72);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
header a { width: min(var(--maxw), 100%); }
header img { height: 34px; width: auto; }

/* Remove the old fixed titlebar behavior and extra reserved padding */
.grid {
  padding-top: 14px !important;
}
.grid .title { display: none !important; }

/* Shared page title component (main/sub/list) */
.page-title {
  grid-column: 1 / -1;
  width: 100%;
  max-width: var(--maxw);
  margin: 4px auto 6px;
  padding: 10px 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page-title .kicker {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(16, 18, 20, 0.62);
}

.page-title .headline {
  margin-top: 4px;
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: rgba(16, 18, 20, 0.92);
}

.page-title .divider {
  margin-top: 10px;
  height: 1px;
  width: min(220px, 70%);
  background: linear-gradient(90deg, transparent, rgba(16,18,20,0.22), transparent);
}

/* Back button version */
.page-title.has-back {
  position: relative;
  padding-left: 52px;
}
.page-title.has-back .back {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.82);
  box-shadow: var(--shadow-soft);
  color: rgba(16, 18, 20, 0.78);
}

/* Item list: use the same classy title and remove the old sticky bar */
.item-list {
  padding-top: 14px !important;
}
.item-list .title { display: none !important; }

/* Slightly smaller titles on narrow screens */
@media (max-width: 420px) {
  .page-title .headline { font-size: 1.38rem; }
}



/* --- Premium category/subcategory title label (fix ugly text look) --- */
.grid .card .content{
  bottom: 12px;
  left: 12px;
  width: auto;
  max-width: calc(100% - 24px);
  padding: 10px 12px;
  background: rgba(18, 18, 20, 0.46);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

.grid .card .content h3{
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-shadow: none;
  margin: 0;
}

@media (max-width: 520px){
  .grid .card .content{
    bottom: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
    padding: 9px 11px;
    border-radius: 13px;
  }
}



/* ===== Premium topbar (logo removed) ===== */
header.topbar{
  position: sticky;
  top: 0;
  z-index: 9999;
  padding-top: env(safe-area-inset-top);
  background: rgba(245,246,247,0.72);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.topbar-inner{
  min-height: 56px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 10px 14px;
}
.topbar .brand{
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.2px;
  color: var(--text);
}

/* ===== Page titles ===== */
.page-title{
  padding: 18px 16px 10px;
  text-align:center;
}
.page-title .kicker{
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
}
.page-title .subkicker{
  margin-top: 6px;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1.2px;
  color: rgba(16,18,20,0.72);
}
.page-title .headline{
  margin-top: 10px;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 28px;
  letter-spacing: 0.2px;
  color: var(--text);
}
.page-title .divider{
  width: 88px;
  height: 1px;
  margin: 12px auto 0;
  background: rgba(16,18,20,0.22);
}

/* back button refinement */
.page-title.has-back{
  position: relative;
  padding-left: 54px;
  padding-right: 54px;
}
.page-title.has-back .back{
  position:absolute;
  left: 14px;
  top: 18px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.8);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* ===== Category/Subcategory card titles (more delicate) ===== */
.card .content{
  padding: 14px 14px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0,0,0,0));
}
.card .content h3{
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

/* Make long names break nicer */
.card .content h3{
  word-break: break-word;
  hyphens: auto;
}
