/* =========================================================
   SIN STORE – Shopee Affiliate Storefront
   Theme: Shopee Orange · Responsive · Modern
   ========================================================= */

:root {
  --primary: #ee4d2d;
  --primary-dark: #d73211;
  --primary-light: #ff6f52;
  --accent: #f69113;
  --bg: #f5f5f5;
  --card: #ffffff;
  --text: #222222;
  --text-soft: #757575;
  --text-mute: #9e9e9e;
  --line: #ececec;
  --star: #ffce3d;
  --green: #26aa99;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, .06);
  --shadow-hover: 0 10px 28px rgba(238, 77, 45, .18);
  --header-h: 62px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Announcement marquee ---------- */
.topbar {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--accent));
  color: #fff;
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
}
.topbar .track {
  display: inline-block;
  padding: 7px 0;
  animation: marquee 22s linear infinite;
}
.topbar .track span { margin: 0 28px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  height: var(--header-h);
}
.logo { display: flex; align-items: center; gap: 10px; color: #fff; flex-shrink: 0; }
.logo .mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: #fff; color: var(--primary);
  display: grid; place-items: center; font-size: 22px; font-weight: 900;
  box-shadow: 0 3px 8px rgba(0,0,0,.15);
}
.logo .name { font-size: 20px; font-weight: 800; letter-spacing: .5px; line-height: 1; }
.logo .tag { font-size: 10px; opacity: .9; font-weight: 400; }

.search {
  flex: 1; display: flex; background: #fff; border-radius: 4px;
  overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.1); max-width: 640px;
}
.search input { flex: 1; border: 0; padding: 11px 14px; font-size: 14px; outline: none; }
.search button {
  border: 0; background: var(--primary-dark); color: #fff;
  padding: 0 20px; cursor: pointer; font-size: 16px; transition: background .15s;
}
.search button:hover { background: #b92a0d; }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-store {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: var(--primary); font-weight: 700; font-size: 13px;
  padding: 9px 16px; border-radius: 22px; white-space: nowrap;
  transition: transform .12s, box-shadow .12s;
}
.btn-store:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.2); }

/* ---------- Hero / Storefront banner ---------- */
.hero {
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.18), transparent 55%),
    linear-gradient(120deg, var(--primary), var(--primary-light) 60%, var(--accent));
  color: #fff; position: relative; overflow: hidden;
}
.hero-inner { display: flex; align-items: center; gap: 30px; padding: 42px 16px; }
.hero-store {
  display: flex; align-items: center; gap: 18px; flex-shrink: 0;
}
.hero-avatar {
  width: 92px; height: 92px; border-radius: 50%;
  background: #fff; color: var(--primary); display: grid; place-items: center;
  font-size: 40px; font-weight: 900; box-shadow: 0 8px 24px rgba(0,0,0,.22);
  border: 4px solid rgba(255,255,255,.5);
}
.hero-text h1 { font-size: 30px; font-weight: 800; line-height: 1.15; }
.hero-text .verify {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.2); padding: 3px 10px; border-radius: 20px;
  font-size: 12px; margin-top: 8px; backdrop-filter: blur(4px);
}
.hero-stats { display: flex; gap: 26px; margin-top: 14px; }
.hero-stats div { font-size: 13px; opacity: .95; }
.hero-stats b { display: block; font-size: 19px; font-weight: 800; }
.hero-cta { margin-left: auto; text-align: center; }
.hero-cta .btn-primary {
  background: #fff; color: var(--primary); font-weight: 800; font-size: 16px;
  padding: 14px 30px; border-radius: 30px; display: inline-block;
  box-shadow: 0 10px 26px rgba(0,0,0,.25); transition: transform .15s;
}
.hero-cta .btn-primary:hover { transform: translateY(-3px) scale(1.02); }
.hero-cta small { display: block; margin-top: 10px; font-size: 12px; opacity: .9; }

/* ---------- Flash sale bar ---------- */
.flash-bar {
  background: linear-gradient(90deg, #ff424f, var(--primary));
  color: #fff; margin-top: 18px; border-radius: var(--radius);
  display: flex; align-items: center; gap: 16px; padding: 14px 20px;
  box-shadow: var(--shadow);
}
.flash-bar .fx { font-size: 22px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.flash-bar .lbl { font-size: 13px; opacity: .95; }
.countdown { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.countdown .box {
  background: rgba(0,0,0,.28); border-radius: 6px; min-width: 38px; text-align: center;
  padding: 6px 4px; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums;
}
.countdown .sep { font-weight: 800; font-size: 18px; }
.countdown small { display: block; font-size: 9px; font-weight: 400; opacity: .8; }

/* ---------- Vouchers ---------- */
.vouchers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.voucher {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: stretch; box-shadow: var(--shadow);
  border: 1px dashed var(--line); position: relative;
}
.voucher .vc-left {
  width: 76px; flex-shrink: 0; color: #fff; display: grid; place-items: center;
  font-size: 26px; position: relative;
}
.voucher .vc-left::after, .voucher .vc-left::before {
  content: ''; position: absolute; right: -7px; width: 14px; height: 14px;
  background: var(--card); border-radius: 50%;
}
.voucher .vc-left::before { top: -7px; }
.voucher .vc-left::after { bottom: -7px; }
.voucher .vc-body { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; }
.voucher .vc-code { font-weight: 800; font-size: 16px; color: var(--primary); }
.voucher .vc-desc { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.voucher .vc-copy {
  align-self: flex-start; margin-top: 8px; border: 1px solid var(--primary);
  color: var(--primary); background: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 14px; cursor: pointer; transition: all .15s;
}
.voucher .vc-copy:hover { background: var(--primary); color: #fff; }

/* ---------- Section header ---------- */
.section { margin-top: 26px; }
.section-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  border-left: 4px solid var(--primary); padding-left: 12px;
}
.section-head h2 { font-size: 20px; font-weight: 800; }
.section-head .sub { font-size: 13px; color: var(--text-soft); margin-left: 4px; }

/* ---------- Category chips ---------- */
.cats { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--text-soft);
  padding: 9px 18px; border-radius: 24px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 4px 12px rgba(238,77,45,.3); }

/* ---------- Product grid ---------- */
.grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(6, 1fr);
}
.card {
  background: var(--card); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow); position: relative; display: flex; flex-direction: column;
  transition: transform .16s, box-shadow .16s; border: 1px solid transparent;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary-light); }
.card-imgwrap { position: relative; aspect-ratio: 1/1; background: #f3f3f3; overflow: hidden; }
.card-imgwrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-imgwrap img { transform: scale(1.06); }
.badge-discount {
  position: absolute; top: 0; right: 0; background: rgba(255,212,36,.95);
  color: var(--primary-dark); font-weight: 800; font-size: 12px; text-align: center;
  padding: 4px 4px 6px; border-bottom-left-radius: 4px; line-height: 1.1; min-width: 40px;
}
.badge-discount small { display: block; font-size: 9px; font-weight: 700; }
.badge-hot {
  position: absolute; top: 8px; left: 0; background: var(--primary);
  color: #fff; font-size: 10px; font-weight: 800; padding: 3px 8px 3px 6px;
  border-radius: 0 10px 10px 0; letter-spacing: .5px;
}
.badge-fav {
  position: absolute; bottom: 8px; left: 8px; background: rgba(238,77,45,.9);
  color: #fff; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 3px;
}
.card-body { padding: 8px 9px 10px; display: flex; flex-direction: column; flex: 1; }
.card-title {
  font-size: 13px; color: var(--text); line-height: 1.35; height: 35px;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.card-price { margin-top: 8px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.card-price .now { color: var(--primary); font-weight: 800; font-size: 17px; }
.card-price .now .cur { font-size: 11px; }
.card-price .old { color: var(--text-mute); font-size: 12px; text-decoration: line-through; }
.card-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 11px; color: var(--text-soft); }
.stars { color: var(--star); letter-spacing: -1px; }
.card-meta .sold { margin-left: auto; }
.card-buy {
  margin-top: 9px; display: block; text-align: center;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  color: #fff; font-weight: 700; font-size: 13px; padding: 8px; border-radius: 6px;
  transition: filter .15s, transform .12s;
}
.card-buy:hover { filter: brightness(1.07); transform: scale(1.02); }

/* ---------- Load more / empty ---------- */
.loadmore-wrap { text-align: center; margin-top: 22px; }
.btn-loadmore {
  background: #fff; color: var(--primary); border: 1px solid var(--primary);
  font-weight: 700; font-size: 15px; padding: 11px 40px; border-radius: 26px; cursor: pointer;
  transition: all .15s;
}
.btn-loadmore:hover { background: var(--primary); color: #fff; }
.empty { text-align: center; padding: 50px 0; color: var(--text-mute); font-size: 15px; }

/* ---------- Benefits ---------- */
.benefits { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-top: 30px; }
.benefit {
  background: #fff; border-radius: var(--radius); padding: 20px 16px; text-align: center;
  box-shadow: var(--shadow);
}
.benefit .ic { font-size: 30px; }
.benefit h4 { font-size: 15px; margin-top: 8px; }
.benefit p { font-size: 12px; color: var(--text-soft); margin-top: 3px; }

/* ---------- Footer ---------- */
.footer { background: #fff; margin-top: 40px; border-top: 3px solid var(--primary); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding: 36px 16px; }
.footer h5 { font-size: 14px; text-transform: uppercase; color: var(--text); margin-bottom: 14px; letter-spacing: .5px; }
.footer a, .footer p { font-size: 13px; color: var(--text-soft); display: block; margin-bottom: 8px; }
.footer a:hover { color: var(--primary); }
.footer .brand-name { font-size: 22px; font-weight: 800; color: var(--primary); }
.foot-bottom { border-top: 1px solid var(--line); text-align: center; padding: 16px; font-size: 12px; color: var(--text-mute); }
.foot-bottom a { color: var(--primary); }

/* ---------- Floating buttons ---------- */
.fab {
  position: fixed; right: 18px; z-index: 60; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transition: transform .15s, opacity .2s; border: 0; font-size: 22px;
}
.fab-shop { bottom: 84px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
.fab-top { bottom: 24px; background: #fff; color: var(--primary); opacity: 0; pointer-events: none; }
.fab-top.show { opacity: 1; pointer-events: auto; }
.fab:hover { transform: scale(1.1); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #323232; color: #fff; padding: 12px 22px; border-radius: 24px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) { .grid { grid-template-columns: repeat(4,1fr); } }
@media (max-width: 860px) {
  .hero-inner { flex-wrap: wrap; }
  .hero-cta { margin-left: 0; width: 100%; }
  .vouchers { grid-template-columns: 1fr; }
  .benefits { grid-template-columns: repeat(2,1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
  :root { --header-h: 56px; }
  .btn-store span.t { display: none; }
  .logo .name { font-size: 17px; }
  .hero-text h1 { font-size: 23px; }
  .hero-avatar { width: 70px; height: 70px; font-size: 30px; }
  .grid { grid-template-columns: repeat(2,1fr); }
  .flash-bar { flex-wrap: wrap; }
  .countdown { margin-left: 0; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 8px 0; gap: 8px; }
}

/* ---------- Skeleton loading ---------- */
.skel { background: var(--card); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.skel .sk-img { aspect-ratio: 1/1; background: linear-gradient(90deg,#eee 25%,#f5f5f5 37%,#eee 63%); background-size: 400% 100%; animation: shine 1.3s ease infinite; }
.skel .sk-line { height: 12px; margin: 9px; border-radius: 4px; background: linear-gradient(90deg,#eee 25%,#f5f5f5 37%,#eee 63%); background-size: 400% 100%; animation: shine 1.3s ease infinite; }
.skel .sk-line.short { width: 55%; }
@keyframes shine { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- Status banner ---------- */
.status-banner { display:none; background:#fff3cd; border:1px solid #ffe08a; color:#8a6d00; padding:12px 16px; border-radius:10px; margin-top:16px; font-size:14px; }
.status-banner.show { display:block; }
.status-banner b { color:#7a5c00; }

/* ---------- Sort bar ---------- */
.sortbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:14px; }
.sortbar .lbl { font-size:13px; color:var(--text-soft); }
.sortbar select { border:1px solid var(--line); border-radius:8px; padding:8px 12px; font-size:13px; background:#fff; cursor:pointer; }
