/* =========================================================
   mart.css: tema Pumimart (biru langit + cream, nuansa toko)
   Sengaja berbeda dari Pumiland supaya pengunjung langsung tahu
   sedang berada di toko. Pink tetap dipakai untuk harga & aksen.
   ========================================================= */

:root {
  --bg: #F4F9FF;
  --bg-soft: #E9F3FF;
  --line: #D9E7F5;
  --muted: #6B7A8C;
  --primary: #2B76B9;
  --primary-hover: #1F6099;
  --primary-soft: #DCEEFF;
  --music-on-bg: #DCEEFF; --music-on-line: #9CCBF5; --music-on-ink: #2B76B9; /* tombol musik (music.css) */
  --header-bg: rgba(255, 255, 255, .9);
  --header-line: #D9E7F5;
  --footer-bg: #1E3A5F;
  --footer-ink: #E6F0FB;
  --footer-accent: #9CCBF5;
  --price: #D8536C;
  --premium-bg: #22305E;
}

/* ---------- Topbar & header ---------- */
.mart-topbar { background: var(--primary); color: #fff; font-size: .85rem; font-weight: 700; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 36px; }
.mart-topbar a { text-decoration: none; opacity: .95; }
.mart-topbar a:hover { text-decoration: underline; }
.topbar-note { opacity: .85; }
.mart-topbar .lang-switch { display: none; background: rgba(255, 255, 255, .14); border-color: transparent; padding: 2px; }
.mart-topbar .lang-switch a { color: #fff; opacity: .85; font-size: .75rem; padding: .1rem .5rem; }
.mart-topbar .lang-switch a:hover { background: rgba(255, 255, 255, .18); opacity: 1; }
.mart-topbar .lang-switch a.is-active { background: #fff; color: var(--primary); opacity: 1; }

.site-mart .brand-name span { color: var(--primary); }
.site-mart .site-footer .brand-name span { color: var(--footer-accent); }

.search { flex: 1; display: flex; max-width: 520px; margin-left: auto; position: relative; }
.search input {
  width: 100%; min-height: 44px; padding: .55rem 3rem .55rem 1.1rem;
  border: 2px solid var(--line); border-radius: 999px; background: var(--bg);
}
.search input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px var(--primary-soft); }
.search button {
  position: absolute; right: 4px; top: 4px; bottom: 4px; width: 40px; border-radius: 50%; border: 0;
  background: var(--primary); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.header-actions { display: flex; align-items: center; gap: .75rem; }
.cart-btn {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-soft); color: var(--primary); cursor: not-allowed;
}
.cart-count {
  position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--price); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center;
}

/* ---------- Premium listing: berjalan dari kanan ke kiri ---------- */
.premium-band {
  display: flex; align-items: stretch;
  background:
    radial-gradient(40% 120% at 0% 50%, rgba(155, 140, 230, .45), transparent 70%),
    radial-gradient(30% 120% at 100% 50%, rgba(244, 155, 165, .35), transparent 70%),
    var(--premium-bg);
  color: #fff; overflow: hidden; position: relative;
}
.premium-label {
  flex: 0 0 auto; z-index: 2; display: flex; align-items: center; gap: .6rem; padding: 0 1.5rem 0 max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(90deg, var(--premium-bg) 75%, transparent);
}
.premium-label span { font-size: 1.6rem; color: #FFD27A; animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .45; transform: scale(.85) rotate(20deg); } }
.premium-label h2 { font-size: 1.1rem; margin: 0; line-height: 1.1; letter-spacing: .04em; text-transform: uppercase; color: #FFE7B0; }
.premium-viewport { flex: 1; overflow: hidden; padding: 1rem 0; }
.premium-track { display: flex; gap: 14px; width: max-content; margin: 0; padding: 0; list-style: none; }
.premium-band:hover .premium-track, .premium-band:focus-within .premium-track { animation-play-state: paused; }
.premium-card {
  display: flex; align-items: center; gap: .75rem; width: 260px; padding: .55rem .9rem .55rem .55rem;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 18px;
  text-decoration: none; transition: background-color .2s ease, transform .2s ease;
}
.premium-card:hover { background: rgba(255, 255, 255, .2); transform: translateY(-2px); }
.premium-thumb { flex: 0 0 64px; height: 64px; border-radius: 14px; background: #FFF8F3; display: grid; place-items: center; overflow: hidden; }
.premium-thumb img { width: 100%; height: 100%; object-fit: contain; }
.premium-info { display: grid; min-width: 0; }
.premium-name { font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.premium-price { color: #FFD27A; font-weight: 800; font-size: .9rem; }

/* ---------- Layout toko: menu kiri, produk kanan ---------- */
.shop-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; padding: 2rem 0 4rem; align-items: start; }
.shop-sidebar { position: sticky; top: calc(var(--header-h) + 16px); }
.filter-toggle { display: none; }
.side-group { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem .6rem; margin-bottom: 1rem; }
.side-group h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 .6rem .5rem; }
.side-link {
  display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem; border-radius: 12px;
  text-decoration: none; font-weight: 700; transition: background-color .15s ease;
}
.side-link:hover { background: var(--bg-soft); }
.side-link.is-active { background: var(--primary-soft); color: var(--primary); }
.side-link.compact { padding: .45rem .7rem; font-weight: 600; }
.side-link .count {
  margin-left: auto; font-size: .78rem; font-weight: 800; color: var(--muted);
  background: var(--bg); border-radius: 999px; padding: 0 .5rem;
}
.side-link.is-active .count { background: #fff; color: var(--primary); }
.side-promo {
  border-radius: var(--radius); padding: 1.25rem; text-align: center;
  background: linear-gradient(160deg, #FDE3E4, #EEE7FA);
}
.side-promo img { width: 120px; margin: 0 auto .5rem; mix-blend-mode: multiply; }
.side-promo p { font-size: .9rem; margin-bottom: .5rem; }
.side-promo a { font-weight: 800; color: var(--price); text-decoration: none; }

.shop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.shop-head h1 { font-size: clamp(1.6rem, 2vw + 1rem, 2.2rem); margin: 0; }
.shop-head p { margin: 0; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.1rem; }
.product-card {
  display: flex; flex-direction: column; height: 100%; text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -18px rgba(30, 58, 95, .45); border-color: #BCD6EE; }
.product-thumb { position: relative; aspect-ratio: 1; background: #FFF8F3; display: grid; place-items: center; padding: 1rem; }
.product-thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s ease; }
.product-card:hover .product-thumb img { transform: scale(1.06) rotate(-2deg); }
.tag { position: absolute; top: 10px; left: 10px; padding: .15rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.tag-premium { background: var(--premium-bg); color: #FFD27A; }
.tag-free { background: var(--mint); color: #22603A; left: auto; right: 10px; }
.product-body { display: flex; flex-direction: column; gap: .2rem; padding: .85rem 1rem 1rem; flex: 1; }
.product-cat { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); }
.product-title { font-weight: 800; line-height: 1.3; }
.product-meta { margin-top: auto; padding-top: .5rem; display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.product-price { color: var(--price); font-weight: 800; }
.product-creator { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.empty-state { text-align: center; padding: 3rem 1rem; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius-lg); display: grid; justify-items: center; gap: .5rem; }

/* ---------- Detail produk ---------- */
.product-page { padding: 1.5rem 0 4rem; }
.breadcrumb { font-size: .9rem; color: var(--muted); margin-bottom: 1.25rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumb a { text-decoration: none; font-weight: 700; color: var(--primary); }
.product-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.detail-visual {
  position: relative; aspect-ratio: 1; background: #FFF8F3; border-radius: var(--radius-lg); border: 1px solid var(--line);
  display: grid; place-items: center; padding: 12%; overflow: hidden;
}
.detail-visual img { width: 100%; height: 100%; object-fit: contain; }
.detail-visual .tag { top: 16px; left: 16px; font-size: .8rem; }
.watermark {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font-family: var(--font-head); font-weight: 700; font-size: clamp(1rem, 3vw, 1.6rem); letter-spacing: .2em;
  color: rgba(43, 118, 185, .12); transform: rotate(-24deg);
}
.detail-info h1 { font-size: clamp(1.8rem, 2.5vw + 1rem, 2.6rem); margin: .25rem 0; }
.detail-creator { color: var(--muted); }
.detail-price { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--price); margin: .5rem 0 1rem; }
.detail-specs { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.detail-specs li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.detail-specs span { color: var(--muted); }
.related { margin-top: 4rem; }
.related h2 { font-size: 1.6rem; }

/* ---------- Responsif ---------- */
@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; padding: .6rem 0; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .header-actions { margin-left: auto; }
  .user-chip-name { display: none; }
  .user-chip { padding-right: 3px; }
  .topbar-note { display: none; }
  .mart-topbar .lang-switch { display: inline-flex; }
  .header-actions .lang-switch { display: none; }

  .shop-layout { grid-template-columns: 1fr; gap: 1rem; padding-top: 1rem; }
  .shop-sidebar { position: static; }
  .filter-toggle {
    display: flex; width: 100%; justify-content: space-between; align-items: center;
    min-height: 48px; padding: .6rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--line);
    background: #fff; font-weight: 800; cursor: pointer;
  }
  .js .shop-filters { display: none; margin-top: .75rem; }
  .js .shop-filters.is-open { display: block; }
  .side-promo { display: none; }

  .product-detail { grid-template-columns: 1fr; }
  .premium-label { padding-left: 16px; }
  .premium-label h2 { font-size: .9rem; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .product-body { padding: .7rem .75rem .8rem; }
  .product-title { font-size: .92rem; }
  .product-creator { display: none; }
  .premium-card { width: 220px; }
  .premium-label span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .premium-viewport { overflow-x: auto; }
}


/* =========================================================
   Pack & bundle
   ========================================================= */
.item-count {
  position: absolute; left: 10px; bottom: 10px; padding: .15rem .6rem; border-radius: 999px;
  background: rgba(255, 255, 255, .92); color: var(--ink); font-size: .74rem; font-weight: 800; box-shadow: var(--shadow-sm);
}
.tag-save { left: auto; right: 10px; background: var(--price); color: #fff; }
.tag-free + .tag-save { top: 36px; }
.edition { color: var(--muted); font-weight: 700; text-transform: none; letter-spacing: 0; }
.product-price s, .detail-price s, .bundle-total s { color: var(--muted); font-weight: 600; font-size: .85em; margin-right: .25rem; }
.per-item { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.product-meta { flex-wrap: wrap; }

/* Sampul bundle: tumpukan sampul pack-nya */
.product-card.is-bundle { border-color: #F6C4CF; background: linear-gradient(180deg, #fff 60%, #FFF5F8); }
.bundle-stack { position: relative; width: 100%; height: 100%; display: block; }
.bundle-stack img {
  position: absolute; width: 58%; height: auto; aspect-ratio: 1; object-fit: contain; background: #fff;
  border-radius: 14px; padding: 4px; box-shadow: 0 8px 16px -10px rgba(30, 58, 95, .5); border: 1px solid var(--line);
}
.bundle-stack img:nth-child(1) { left: 2%; top: 4%; transform: rotate(-8deg); }
.bundle-stack img:nth-child(2) { right: 2%; top: 2%; transform: rotate(7deg); }
.bundle-stack img:nth-child(3) { left: 6%; bottom: 2%; transform: rotate(5deg); }
.bundle-stack img:nth-child(4) { right: 6%; bottom: 4%; transform: rotate(-6deg); }
.bundle-stack img:only-child, .bundle-stack img:first-child:nth-last-child(2) { top: 10%; }
.product-card:hover .bundle-stack img { transform: none; }

/* Menu karakter di kiri */
.side-char img { width: 28px; height: 28px; object-fit: contain; border-radius: 50%; background: var(--char-soft); }
.side-char.is-active { background: var(--char-soft); color: var(--char-accent); }
.side-bundle { color: var(--price); }

/* Detail produk */
.detail-sub { color: var(--muted); font-weight: 700; margin-top: -.5rem; }
.tag-inline-save { display: inline-block; vertical-align: middle; margin-left: .4rem; padding: .1rem .6rem; border-radius: 999px; background: var(--price); color: #fff; font-size: .8rem; font-family: var(--font-body); font-weight: 800; }
.char-pill {
  display: inline-flex; align-items: center; gap: .3rem; padding: .05rem .6rem .05rem .2rem; border-radius: 999px;
  background: var(--char-soft); color: var(--char-accent); font-weight: 800; text-decoration: none;
}
.char-pill img { width: 22px; height: 22px; object-fit: contain; border-radius: 50%; background: #fff; }
.pack-contents { margin-top: 3rem; }
.pack-contents h2 { font-size: 1.5rem; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .9rem; }
.pack-grid li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; text-align: center; font-weight: 700; font-size: .85rem; }
.pack-thumb { position: relative; display: block; aspect-ratio: 1; background: #FFF8F3; border-radius: 12px; overflow: hidden; margin-bottom: .45rem; }
.pack-thumb img { width: 100%; height: 100%; object-fit: contain; }
.mini-mark { position: absolute; inset: 0; display: grid; place-items: center; font-size: .65rem; letter-spacing: .2em; color: rgba(43, 118, 185, .16); transform: rotate(-24deg); font-weight: 800; pointer-events: none; }
.bundle-list { display: grid; gap: .6rem; }
.bundle-list a {
  display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem .6rem .6rem; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; transition: border-color .2s ease;
}
.bundle-list a:hover { border-color: #BCD6EE; }
.bundle-list img { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; background: #FFF8F3; }
.bundle-list b { display: block; }
.bundle-list small { color: var(--muted); }
.bundle-price { margin-left: auto; font-weight: 800; color: var(--muted); }
.bundle-total { margin-top: 1rem; font-size: 1.05rem; }
.bundle-total b { color: var(--price); font-size: 1.2rem; }

/* ---------- Pembuka rak, FAQ, cara pakai (SEO/AEO) ---------- */
.shop-intro { max-width: 70ch; margin: -.5rem 0 1.5rem; color: var(--muted); line-height: 1.65; }
.shop-faq { margin-top: 3.5rem; }
.shop-faq h2, .howto h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .7rem; transition: border-color .2s ease; }
.faq-item[open] { border-color: #BCD6EE; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 1rem 3rem 1rem 1.2rem; font-weight: 800; position: relative; line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 1.1rem; top: 50%; translate: 0 -50%;
  width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-weight: 800; transition: rotate .2s ease;
}
.faq-item[open] summary::after { rotate: 45deg; }
.faq-item summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: var(--radius); }
.faq-item p { margin: 0; padding: 0 1.2rem 1.1rem; color: var(--muted); line-height: 1.65; }
.faq-item p a { font-weight: 800; color: var(--primary); text-decoration: none; white-space: nowrap; }
.faq-item p a:hover { text-decoration: underline; }

.howto { margin-top: 3rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem 1.6rem; }
.howto ol { margin: 0 0 1rem; padding-left: 1.3rem; display: grid; gap: .55rem; line-height: 1.6; }
.howto li::marker { color: var(--primary); font-weight: 800; }
.howto-more { font-weight: 800; color: var(--primary); text-decoration: none; }
.howto-more:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .howto { padding: 1.2rem; }
  .faq-item summary { padding: .9rem 2.8rem .9rem 1rem; }
  .faq-item p { padding: 0 1rem 1rem; }
}
