@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;700;800&family=DM+Sans:wght@400;500&display=swap');

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

:root {
  --sf:     #FF6B00;
  --sf-lt:  #FFF3E8;
  --sf-dk:  #C44E00;
  --nv:     #0D0D2B;
  --gr:     #138808;
  --bg:     #FAFAF8;
  --white:  #ffffff;
  --border: #E8E5E0;
  --text:   #1A1A2E;
  --muted:  #888888;
  --danger: #E63946;
  --gold:   #D4A017;
  --wa:     #25D366;
}

body   { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
a      { color: inherit; text-decoration: none; }
button { font-family: 'DM Sans', sans-serif; }

/* ── HERO ─────────────────────────────────────────────────── */
.hero { background: var(--nv); padding: 2rem 1.25rem 1.25rem; text-align: center; position: relative; }
.hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg,#FF6B00 0%,#138808 50%,#FF6B00 100%); }
.hero-badge { display: inline-block; background: rgba(255,107,0,.15); border-radius: 20px;
  padding: 3px 14px; font-size: .7rem; color: var(--sf); font-weight: 500; margin-bottom: .6rem; letter-spacing: .06em; }
.logo { font-family: 'Syne', sans-serif; font-size: clamp(1.6rem,5vw,2.8rem); font-weight: 800;
  color: #fff; letter-spacing: -.02em; line-height: 1.1; }
.logo span { color: var(--sf); }
.hero-sub { color: rgba(255,255,255,.5); font-size: .82rem; margin-top: .4rem; }
.stats-row { display: flex; justify-content: center; gap: 2rem; margin-top: 1rem; flex-wrap: wrap; }
.stat .sn { font-family: 'Syne', sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--sf); }
.stat .sl { font-size: .7rem; color: rgba(255,255,255,.4); }

/* ── TOP BAR ──────────────────────────────────────────────── */
.top-bar { background: #fff; border-bottom: 1px solid var(--border); padding: .6rem 1rem;
  display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 100; flex-wrap: wrap; }
.cat-scroll { display: flex; gap: 6px; flex: 1; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-btn { padding: 5px 14px; border-radius: 20px; border: 1px solid var(--border); background: #fff;
  font-size: .75rem; cursor: pointer; color: #555; white-space: nowrap; transition: all .15s; display: inline-block; }
.cat-btn.on { background: var(--nv); color: #fff; border-color: var(--nv); }
.top-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-outline { padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border); background: #fff;
  font-size: .78rem; cursor: pointer; color: var(--text); transition: all .15s; display: inline-block; }
.btn-outline:hover { border-color: var(--sf); color: var(--sf); }
.btn-claim { background: var(--sf); color: #fff; border: none; padding: 6px 16px; border-radius: 20px;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: .78rem; cursor: pointer; transition: opacity .15s; }
.btn-claim:hover { opacity: .88; }

/* ── GRID ─────────────────────────────────────────────────── */
.grid-section { padding: .75rem; }
.grid-info { text-align: center; font-size: .75rem; color: var(--muted); margin-bottom: .5rem; padding: .25rem; }
.box-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px,1fr)); gap: 3px; }

.pbox { position: relative; overflow: hidden; cursor: pointer; border-radius: 4px; aspect-ratio: 1; background: #EEEBE4; }
.pbox img.box-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.pbox:hover img.box-img { transform: scale(1.08); }
.ov { position: absolute; inset: 0; background: rgba(0,0,0,0); transition: background .2s;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 6px; }
.pbox:hover .ov { background: rgba(0,0,0,.52); }
.ov-name  { color: #fff; font-size: .68rem; font-weight: 500; opacity: 0; transform: translateY(4px);
  transition: all .2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-price { color: var(--sf); font-size: .62rem; opacity: 0; transform: translateY(4px); transition: all .2s .03s; }
.pbox:hover .ov-name, .pbox:hover .ov-price { opacity: 1; transform: translateY(0); }

.sponsor-box { outline: 2px solid var(--gold); }
.sponsor-box::after { content: '★'; position: absolute; top: 3px; left: 3px; font-size: .58rem;
  color: var(--gold); background: rgba(0,0,0,.6); border-radius: 3px; padding: 1px 3px; }

.empty-box { background: #EEEBE4; }
.empty-box:hover { background: #FFE8D0; outline: 1.5px solid var(--sf); }
.empty-inner { display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 2px; }
.empty-plus { font-size: .9rem; color: #BBA; line-height: 1; }
.empty-num  { font-size: .52rem; color: #CCC; }

.box-num-tag { position: absolute; top: 3px; right: 3px; background: rgba(0,0,0,.5);
  color: rgba(255,255,255,.8); font-size: .52rem; padding: 1px 4px; border-radius: 2px; pointer-events: none; }
.live-dot { position: absolute; bottom: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--gr); }

.btn-load { padding: 10px 28px; border: 1.5px solid var(--border); border-radius: 20px; background: #fff;
  cursor: pointer; font-size: .85rem; color: var(--text); transition: all .15s; }
.btn-load:hover { border-color: var(--sf); color: var(--sf); }

/* ── MODALS ───────────────────────────────────────────────── */
.modal-wrap { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 200;
  align-items: flex-start; justify-content: center; padding: 1rem; overflow-y: auto; }
.modal-wrap.on { display: flex; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 520px;
  position: relative; padding: 1.75rem; margin: auto; }
.modal-sm { max-width: 400px; }
.modal-pd { max-width: 460px; }
.mclose { position: absolute; top: 1rem; right: 1rem; width: 30px; height: 30px;
  border: none; background: #f2f2f2; border-radius: 50%; cursor: pointer; font-size: .9rem;
  display: flex; align-items: center; justify-content: center; }
.mclose:hover { background: #e0e0e0; }
.mh2 { font-family: 'Syne', sans-serif; font-size: 1.2rem; font-weight: 700;
  margin-bottom: 1.25rem; color: var(--nv); }
.mh2 span { color: var(--sf); }

/* ── STEPS ────────────────────────────────────────────────── */
.steps { display: flex; border-bottom: 1.5px solid #eee; margin-bottom: 1.25rem; }
.stp { flex: 1; text-align: center; padding: .45rem .25rem; font-size: .72rem; color: #aaa;
  border-bottom: 2px solid transparent; margin-bottom: -1.5px; }
.stp.on { color: var(--sf); border-bottom-color: var(--sf); font-weight: 500; }

/* ── FORMS ────────────────────────────────────────────────── */
.fg { margin-bottom: .9rem; }
.fg label { display: block; font-size: .75rem; color: #666; margin-bottom: .3rem; font-weight: 500; }
.fg input, .fg select, .fg textarea {
  width: 100%; padding: .6rem .8rem; border: 1.5px solid #DDD; border-radius: 8px;
  font-size: .875rem; font-family: 'DM Sans', sans-serif; outline: none;
  color: var(--text); background: #fff; transition: border-color .15s; }
.fg input:focus, .fg select:focus, .fg textarea:focus { border-color: var(--sf); }
.fg textarea { resize: vertical; min-height: 72px; }
.row2 { display: flex; gap: 10px; }
.row2 .fg { flex: 1; min-width: 0; }
.fnote { font-size: .7rem; color: #999; margin-top: 3px; }

/* INPUT WITH FLAG / ICON */
.input-prefix { display: flex; align-items: center; border: 1.5px solid #DDD; border-radius: 8px; overflow: hidden; background: #fff; transition: border-color .15s; }
.input-prefix:focus-within { border-color: var(--sf); }
.input-prefix .pfx { padding: 0 .65rem; background: #f5f5f5; font-size: .78rem; color: #555; border-right: 1.5px solid #DDD; height: 100%; display: flex; align-items: center; white-space: nowrap; min-height: 40px; }
.input-prefix input { border: none; flex: 1; padding: .6rem .8rem; font-family: 'DM Sans', sans-serif; font-size: .875rem; outline: none; }

/* ── UPLOAD ZONE ──────────────────────────────────────────── */
.upzone { border: 2px dashed #DDD; border-radius: 10px; padding: 1.1rem; text-align: center;
  cursor: pointer; color: #AAA; font-size: .8rem; transition: all .15s; }
.upzone:hover, .upzone.ok { border-color: var(--sf); background: var(--sf-lt); }
.upzone input[type=file] { display: none; }

/* ── BOX COUNT ────────────────────────────────────────────── */
.cnt-row { display: flex; align-items: center; gap: 10px; margin-bottom: .5rem; }
.cbtn { width: 34px; height: 34px; border: 1.5px solid #DDD; border-radius: 8px; background: #fff;
  cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
  color: var(--text); transition: all .15s; }
.cbtn:hover { border-color: var(--sf); color: var(--sf); }
.cdis { font-family: 'Syne', sans-serif; font-size: 1.2rem; font-weight: 700; min-width: 40px; text-align: center; color: var(--nv); }
.cprice { margin-left: auto; background: var(--sf-lt); color: var(--sf); font-weight: 700;
  padding: 4px 14px; border-radius: 8px; font-size: .9rem; }

/* ── PAYMENT TABS ─────────────────────────────────────────── */
.ptabs { display: flex; gap: 6px; margin-bottom: .75rem; flex-wrap: wrap; }
.ptab { flex: 1; padding: 6px; border: 1.5px solid #DDD; border-radius: 8px; text-align: center;
  font-size: .75rem; cursor: pointer; color: #666; transition: all .15s; background: #fff; min-width: 70px; }
.ptab.on { border-color: var(--sf); background: var(--sf-lt); color: var(--sf); font-weight: 500; }

/* ── FEE BOX ──────────────────────────────────────────────── */
.fee-box { background: var(--sf-lt); border-radius: 10px; padding: .9rem 1rem; margin-bottom: .9rem;
  font-size: .78rem; color: #7A3200; border: 1px solid rgba(255,107,0,.2); }
.fee-box strong { color: #A04000; }

/* ── SPONSOR TOGGLE ───────────────────────────────────────── */
.sponsor-toggle { background: #FFF8E6; border: 1px solid var(--gold); border-radius: 10px;
  padding: .85rem 1rem; margin-bottom: .9rem; cursor: pointer; display: flex; align-items: center; gap: .75rem; }
.sponsor-toggle input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--gold); flex-shrink: 0; }
.sponsor-info strong { color: #7A5000; display: block; margin-bottom: 2px; font-size: .8rem; }
.sponsor-info span   { color: #999; font-size: .73rem; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.sbtn { width: 100%; background: var(--sf); color: #fff; border: none; padding: .8rem;
  border-radius: 10px; font-family: 'Syne', sans-serif; font-weight: 700; font-size: .95rem;
  cursor: pointer; margin-top: .75rem; transition: opacity .15s; }
.sbtn:hover { opacity: .88; }
.sbtn:disabled { opacity: .5; cursor: not-allowed; }
.bbtn { width: 100%; background: none; border: 1.5px solid #DDD; color: #666; padding: .65rem;
  border-radius: 10px; font-size: .85rem; cursor: pointer; margin-top: .5rem; }
.sbtn-gold { background: var(--gold); }

/* WhatsApp button */
.wa-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--wa); color: #fff;
  border: none; padding: .65rem 1.1rem; border-radius: 10px; font-size: .84rem; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: opacity .15s; }
.wa-btn:hover { opacity: .88; }
.wa-btn svg { width: 16px; height: 16px; fill: #fff; flex-shrink: 0; }

/* Call button */
.call-btn { display: inline-flex; align-items: center; gap: 6px; background: #f0f0f0; color: var(--nv);
  border: 1.5px solid var(--border); padding: .65rem 1.1rem; border-radius: 10px; font-size: .84rem;
  cursor: pointer; text-decoration: none; transition: all .15s; }
.call-btn:hover { border-color: var(--sf); color: var(--sf); }
.call-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── PRODUCT MODAL SPECIFIC ───────────────────────────────── */
.pd-img-wrap { width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 12px; margin-bottom: 1rem; background: #eee; }
.pd-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-name { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--nv); }
.pd-meta { display: flex; align-items: center; gap: .5rem; margin: .3rem 0 .6rem; flex-wrap: wrap; }
.pd-cat-tag { background: #f0f0f0; color: #555; font-size: .7rem; padding: 3px 10px; border-radius: 12px; }
.pd-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gr); display: inline-block; }
.pd-live-lbl { font-size: .7rem; color: var(--gr); font-weight: 500; }
.pd-expire  { font-size: .68rem; color: var(--muted); }
.pd-price   { font-size: 1.5rem; font-weight: 700; color: var(--sf); font-family: 'Syne', sans-serif; margin: .4rem 0; }
.pd-desc    { font-size: .84rem; color: #555; line-height: 1.55; margin-bottom: .9rem; }
.pd-box-id  { font-size: .68rem; color: #bbb; font-family: monospace; margin-bottom: .5rem; }

/* Share row */
.share-row { display: flex; gap: 8px; margin-bottom: .9rem; align-items: center; }
.share-url { flex: 1; font-size: .7rem; color: #666; background: #f5f5f5; border: 1px solid #eee;
  border-radius: 6px; padding: 5px 8px; word-break: break-all; }
.copy-btn { background: var(--nv); color: #fff; border: none; padding: 5px 12px; border-radius: 6px;
  font-size: .7rem; cursor: pointer; white-space: nowrap; transition: background .15s; }
.copy-btn:hover { background: var(--sf); }

/* Pay methods */
.pay-methods { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: .75rem; }
.pay-pill { background: var(--sf-lt); color: #A04000; font-size: .72rem; padding: 3px 10px; border-radius: 12px; font-weight: 500; }

/* Contact buttons row */
.contact-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: .9rem; }

/* Sponsor badge */
.sponsor-badge { display: inline-flex; align-items: center; gap: 4px; background: #FFF8E6;
  border: 1px solid var(--gold); color: #7A5000; font-size: .68rem; font-weight: 700;
  padding: 3px 8px; border-radius: 12px; margin-bottom: .5rem; }

/* Action buttons */
.pd-btns { display: flex; gap: 8px; margin-top: .75rem; flex-wrap: wrap; }
.pd-btn-main { flex: 1; min-width: 100px; background: var(--sf); color: #fff; border: none; padding: .65rem;
  border-radius: 10px; font-family: 'Syne', sans-serif; font-weight: 700; font-size: .82rem; cursor: pointer; transition: opacity .15s; }
.pd-btn-main:hover { opacity: .88; }
.pd-btn-sec { flex: 1; min-width: 100px; background: #fff; color: var(--text); border: 1.5px solid #DDD;
  padding: .65rem; border-radius: 10px; font-size: .82rem; cursor: pointer; transition: all .15s; }
.pd-btn-sec:hover { border-color: var(--sf); }

/* ── REVIEWS ──────────────────────────────────────────────── */
.reviews-section { margin-top: 1.1rem; border-top: 1px solid #eee; padding-top: 1rem; }
.reviews-title { font-size: .85rem; font-weight: 500; margin-bottom: .75rem; color: var(--nv); }
.star    { font-size: 1rem; color: #DDD; cursor: pointer; }
.star.on { color: #FFBF00; }
.review-card { border: 1px solid #eee; border-radius: 8px; padding: .7rem .85rem; margin-bottom: .5rem; }
.rv-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .3rem; }
.rv-user   { font-size: .78rem; font-weight: 500; color: var(--nv); }
.rv-date   { font-size: .65rem; color: var(--muted); }
.rv-comment{ font-size: .8rem; color: #555; line-height: 1.5; margin-top: 3px; }
.review-form textarea { width: 100%; border: 1.5px solid #DDD; border-radius: 8px; padding: .6rem .8rem;
  font-size: .82rem; resize: vertical; min-height: 60px; font-family: 'DM Sans', sans-serif; }
.review-form textarea:focus { border-color: var(--sf); outline: none; }

/* ── AUTH MODAL ───────────────────────────────────────────── */
.auth-tabs { display: flex; border-bottom: 1.5px solid #eee; margin-bottom: 1.25rem; }
.auth-tab  { flex: 1; text-align: center; padding: .55rem; font-size: .82rem; color: #aaa;
  border-bottom: 2px solid transparent; margin-bottom: -1.5px; cursor: pointer; }
.auth-tab.on { color: var(--sf); border-bottom-color: var(--sf); font-weight: 500; }

/* ── SUCCESS SCREEN ───────────────────────────────────────── */
.succ { text-align: center; padding: 1rem 0; }
.succ-ic { width: 60px; height: 60px; border-radius: 50%; background: #E8F5E9;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin: 0 auto .9rem; }
.succ h3 { font-family: 'Syne', sans-serif; font-size: 1.2rem; margin-bottom: .5rem; color: var(--nv); }
.succ p  { color: #666; font-size: .82rem; line-height: 1.6; }
.link-badge { display: block; background: var(--nv); color: var(--sf); font-family: monospace;
  font-size: .72rem; border-radius: 6px; padding: 8px 12px; margin: .75rem 0; word-break: break-all; text-align: left; }
.pending-notice { background: #FFF8E6; border: 1px solid #E8CC80; border-radius: 10px;
  padding: .85rem 1rem; font-size: .8rem; color: #7A5800; text-align: left; margin-top: .75rem; }

/* ── TOAST ────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  background: var(--nv); color: #fff; padding: 10px 22px; border-radius: 20px;
  font-size: .82rem; opacity: 0; transition: opacity .3s; pointer-events: none;
  z-index: 9999; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; }

/* ── ADMIN / PAGE ─────────────────────────────────────────── */
.page-wrap  { max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem; }
.page-title { font-family: 'Syne', sans-serif; font-size: 1.4rem; font-weight: 700; margin-bottom: 1.25rem; color: var(--nv); }
.card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; margin-bottom: 1rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .83rem; }
th    { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--border); color: var(--muted); font-weight: 500; white-space: nowrap; }
td    { padding: .6rem .8rem; border-bottom: 1px solid #f5f5f5; vertical-align: middle; }
tr:last-child td { border-bottom: none; }

.badge          { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: .68rem; font-weight: 500; }
.badge-pending  { background: #FFF3CD; color: #856404; }
.badge-active   { background: #D1E7DD; color: #0A3622; }
.badge-expired  { background: #f0f0f0; color: #888; }
.badge-rejected { background: #F8D7DA; color: #842029; }
.badge-sponsor  { background: #FFF8E6; color: #7A5000; border: 1px solid var(--gold); }

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer { background: var(--nv); color: rgba(255,255,255,.5); padding: 1.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .78rem; margin-top: 2rem; }
.footer-links { display: flex; gap: 1rem; }
.footer-links a { color: rgba(255,255,255,.4); }
.footer-links a:hover { color: var(--sf); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .box-grid { grid-template-columns: repeat(auto-fill, minmax(36px,1fr)); }
  .stats-row { gap: 1.2rem; }
  .row2 { flex-direction: column; gap: 0; }
  .pd-btns { flex-direction: column; }
  .contact-row { flex-direction: column; }
  .wa-btn, .call-btn { justify-content: center; }
}
