/* ===========================================
   Livo — Front Page Styles
=========================================== */

/* ── Hero — Figma: light gray bg, 65/35 layout, white widget cards ── */
.hs { background: #F5F5F7; }
.hi {
  max-width: var(--livo-max-w, 1440px);
  margin: 0 auto;
  padding: 20px var(--livo-px, 24px);
}
.hg {
  display: flex;
  gap: 16px;
  height: 540px;
}
.hb {
  position: relative;
  flex: 0 0 65%;
  border-radius: var(--livo-radius-xl, 20px);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
}
.hb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ho {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(0,0,0,.78) 0%,
    rgba(0,0,0,.60) 35%,
    rgba(0,0,0,.20) 60%,
    transparent 75%
  );
}

/* Content wrapper — full overlay, flex column, left-aligned */
.hc {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 36px;
}

/* Timer — top row */
.htimer {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
}

/* Text block — vertically centered, max-width so it doesn't overlap camera */
.htext {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.htag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--acc, #FF4A00);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: .4px;
}

.timer { display: flex; align-items: center; gap: 10px; }
.tl { font-size: 11px; color: rgba(255,255,255,.5); }
.tbs { display: flex; align-items: center; gap: 3px; }
.tb2 {
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  min-width: 36px;
  text-align: center;
}
.ts { color: rgba(255,255,255,.5); font-weight: 700; }

/* Badge */
.hbadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,74,0,.18);
  border: 1px solid rgba(255,74,0,.35);
  color: #FF7A3D;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  letter-spacing: .2px;
}

/* H1 */
.hh1 {
  font-size: 40px;
  font-weight: 900;
  color: #fff;
  line-height: 1.12;
  letter-spacing: -1.2px;
  margin: 0 0 14px;
}

/* Description */
.hd {
  font-size: 14.5px;
  color: rgba(255,255,255,.7);
  line-height: 1.65;
  margin: 0 0 20px;
}

/* Price block */
.hprice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.hprice-now {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
}
.hprice-old {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  text-decoration: line-through;
}
.hprice-disc {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--acc, #FF4A00);
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: .2px;
}

.hbtns { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.hpills { display: flex; gap: 8px; flex-wrap: wrap; }
.hpill {
  padding: 5px 14px;
  background: rgba(10,10,10,.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.hpill:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}

/* Right widgets column — single widget, full height */
.hw {
  flex: 0 0 calc(35% - 16px);
  display: flex;
  flex-direction: column;
}

/* White card — stretches to fill full banner height */
.wg {
  background: #fff;
  border-radius: var(--livo-radius-xl, 20px);
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
}

/* Single full-height hits widget */
.wg-hits { flex: 1; }

.wh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.wt { font-size: 14px; font-weight: 700; color: #111; display: flex; align-items: center; gap: 7px; }
.wlive {
  background: #dc2626;
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .5px;
}
.wa { font-size: 12px; font-weight: 600; text-decoration: none; transition: opacity .12s; }
.wa:hover { opacity: .7; }

/* Items list — fixed gap, no stretching */
.wb {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 8px 0;
  gap: 0;
}

/* Row — hover group */
.wi {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 16px;
  text-decoration: none;
  transition: background .15s;
  border-bottom: 1px solid #f5f5f5;
  position: relative;
}
.wi:last-child { border-bottom: none; }
.wi:hover { background: #fafafa; }

/* Number — plain text, no badge */
.wnum {
  font-size: 18px;
  font-weight: 800;
  color: #ddd;
  flex-shrink: 0;
  width: 28px;
  text-align: right;
  letter-spacing: -1px;
  line-height: 1;
}
.wnum-1 { color: var(--acc, #FF4A00); }

/* Thumbnail — light bg, subtle border */
.wimg {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  object-fit: contain;
  background: #f9f9fb;
  border: 1px solid #ebebeb;
  flex-shrink: 0;
  padding: 4px;
}

.winfo { flex: 1; min-width: 0; }

/* Title — 2 lines */
.wtitle {
  font-size: 12.5px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 5px;
}

/* Price + discount row */
.wprice-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wprice {
  font-size: 15px;
  font-weight: 800;
  color: #111;
  line-height: 1;
}

/* Discount badge — solid accent, white text */
.wch {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--acc, #FF4A00);
  padding: 2px 6px;
  border-radius: 5px;
  flex-shrink: 0;
  letter-spacing: .2px;
}

/* Add-to-cart hover button */
.wadd {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--acc, #FF4A00);
  color: #fff;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(.85);
  transition: opacity .18s, transform .18s;
}
.wi:hover .wadd {
  opacity: 1;
  transform: scale(1);
}

/* ══════════════════════════════════════════
   Front Page — Mobile (≤ 768px)
══════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Hero: banner full-width, widgets below ── */
  .hi { padding: 12px 16px 0; }

  .hg {
    flex-direction: column;
    height: auto;
    gap: 12px;
  }

  /* Banner card */
  .hb {
    flex: none;
    width: 100%;
    height: 340px;
    border-radius: 16px;
  }

  /* Smaller text */
  .hh1 { font-size: 24px; letter-spacing: -.6px; margin-bottom: 10px; }
  .hd  { font-size: 13px; margin-bottom: 14px; }
  .hprice-now { font-size: 24px; }
  .hprice-old { font-size: 13px; }
  .hprice { margin-bottom: 14px; gap: 8px; }
  .hbadge { font-size: 11px; margin-bottom: 10px; }

  .hc { padding: 18px 20px; }
  .htext { max-width: 100%; }

  .timer { flex-wrap: wrap; gap: 6px; }
  .tl    { font-size: 10px; }
  .tb2   { font-size: 14px; min-width: 28px; padding: 3px 6px; }

  .hbtns { gap: 8px; margin-top: 18px; }
  .hbtns .btn-pr,
  .hbtns .btn-gh { padding: 10px 18px; font-size: 13px; }

  .hpills { gap: 6px; }
  .hpill  { padding: 3px 10px; font-size: 11px; }

  /* Right widgets column — single widget below banner */
  .hw {
    flex: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding-bottom: 0;
    overflow: visible;
  }

  .wg {
    width: 100%;
    border-radius: 14px;
    max-height: none;
  }

  /* Smaller thumbnail on mobile */
  .wimg  { width: 56px; height: 56px; }
  .wi    { flex: none; padding: 10px 14px; }
  .wnum  { font-size: 15px; width: 22px; }
  .wtitle { font-size: 12px; }
  .wprice { font-size: 13px; }
  /* Always show add button on touch */
  .wadd  { opacity: 1; transform: scale(1); width: 28px; height: 28px; }

  /* Trust bar handled separately below */

  /* Category bar — already scrolls; tighten up */
  .cb { border-bottom: none; }

  /* ── Category sections ── */
  .cat-sec-i { padding: 24px 16px; }

  .cat-sec-h {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
  }
  .cat-sec-title { font-size: 17px; }
  .cat-sec-ico   { width: 36px; height: 36px; border-radius: 10px; }

  /* Carousel: swipeable horizontal scroll */
  .cat-sec-i > .pg4 {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    grid-template-columns: unset;
  }
  .cat-sec-i > .pg4::-webkit-scrollbar { display: none; }
  .cat-sec-i > .pg4 > .pc {
    flex: 0 0 min(200px, 56vw);
    scroll-snap-align: start;
  }

  /* ── Compatible section ── */
  .compat-i { padding: 28px 16px; }

  .compat-h {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
  }
  .compat-title { font-size: 18px; }
  .compat-sub   { max-width: 100%; font-size: 12px; }

  .compat-i > .pg4 {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    grid-template-columns: unset;
  }
  .compat-i > .pg4::-webkit-scrollbar { display: none; }
  .compat-i > .pg4 > .pc {
    flex: 0 0 min(200px, 56vw);
    scroll-snap-align: start;
  }
}

/* ── Category Sections ── */
.cat-sec {
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.cat-sec + .cat-sec { border-top: none; }
.cat-sec-i {
  max-width: var(--livo-max-w, 1440px);
  margin: 0 auto;
  padding: 32px var(--livo-px, 24px);
}
.cat-sec-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.cat-sec-hd {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cat-sec-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cat-sec-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 3px;
}
.cat-sec-title {
  font-size: 22px;
  font-weight: 800;
  color: #111;
  letter-spacing: -.4px;
  margin: 0;
}

/* ── Guaranteed Compatible Section ── */
.compat-sec {
  background: linear-gradient(135deg, #0f0f14 0%, #1a1025 100%);
  padding: 0;
  /* Remove any gap between this section and the dark footer */
  margin-bottom: 0;
}
.compat-i {
  max-width: var(--livo-max-w, 1440px);
  margin: 0 auto;
  padding: 40px var(--livo-px, 24px) 52px;  /* extra bottom padding before footer strip */
}
.compat-h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 20px;
  flex-wrap: wrap;
}
.compat-hd {
  display: flex;
  align-items: center;
  gap: 14px;
}
.compat-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(124,58,237,.2);
  color: #a78bfa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.compat-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 4px;
}
.compat-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.4px;
  margin: 0;
}
.compat-sub {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  margin: 0;
  max-width: 360px;
  line-height: 1.5;
  align-self: center;
}
/* Dark card overrides inside compat section */
.compat-sec .pc {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.08);
}
.compat-sec .pc-title { color: rgba(255,255,255,.9); }
.compat-sec .pc-price { color: #fff; }
.compat-sec .pc-old   { color: rgba(255,255,255,.4); }
.compat-sec .pc-rc    { color: rgba(255,255,255,.35); }
.compat-sec .pc-btn   { background: rgba(255,74,0,.9); }
.compat-sec .pc-btn:hover { background: var(--acc, #FF4A00); }

/* ── AJAX Cart Button States ── */
.pc-btn {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background .18s, transform .1s, opacity .18s;
}
.pc-btn.loading {
  opacity: .75;
  pointer-events: none;
}
.pc-btn.loading .pc-btn-ico {
  animation: livo-spin .7s linear infinite;
}
@keyframes livo-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.pc-btn.added {
  background: #16a34a !important;
  pointer-events: none;
}
.pc-btn.pc-btn-err {
  background: #dc2626 !important;
  animation: livo-shake .35s;
}
@keyframes livo-shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

/* ── Product card hover actions overlay ── */
.pc-img-w { position: relative; overflow: hidden; }
.pc-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity .18s, transform .18s;
  z-index: 2;
}
.pc:hover .pc-actions {
  opacity: 1;
  transform: translateX(0);
}
.pca-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  transition: background .15s, color .15s, transform .15s;
  backdrop-filter: blur(4px);
}
.pca-btn:hover { background: #fff; color: var(--acc, #FF4A00); transform: scale(1.1); }

/* ── Trust Bar ── */
.tb { background: #fff; border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; margin-top: 32px; margin-bottom: 40px; }
.tbi {
  max-width: var(--livo-max-w, 1440px);
  margin: 0 auto;
  padding: 0 var(--livo-px, 24px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.ti {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-right: 1px solid #f0f0f0;
}
.ti:last-child { border-right: none; }
.ti-ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--livo-accent-light, #FFF3EE);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--acc, #FF4A00);
  flex-shrink: 0;
}
.ti-t { font-size: 12px; font-weight: 600; color: #111; }
.ti-s { font-size: 11px; color: #888; margin-top: 2px; line-height: 1.3; }

/* ── Trust bar: 2×2 grid on tablet + mobile (≤ 1024px) ── */
@media (max-width: 1024px) {
  .tbi {
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    padding: 0;
    background: #ebebeb;
  }
  .ti {
    background: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px 12px;
    gap: 8px;
    border-right: none;
    border-bottom: none;
  }
  .ti-ico {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .ti-ico svg { width: 16px; height: 16px; }
  .ti-t { font-size: 12px; }
  .ti-s { display: none; }
}

/* ── Category Bar ── */
.cb { background: #fff; border-bottom: 1px solid #f0f0f0; }
.cbi {
  max-width: var(--livo-max-w, 1440px);
  margin: 0 auto;
  padding: 0 var(--livo-px, 24px);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.cbi::-webkit-scrollbar { display: none; }

.cba {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 13px;
  color: #555;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 400;
  transition: color .15s, border-color .15s, font-weight .15s, background .15s;
}

.cba-ico {
  display: flex;
  align-items: center;
  color: #aaa;
  transition: color .15s;
  flex-shrink: 0;
}

.cba-sku {
  background: #F5F5F7;
  color: #bbb;
  font-size: 10px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 400;
}

.cba:hover {
  color: #111;
  border-bottom-color: #111;
  font-weight: 600;
  background: #FAFAFA;
}
.cba:hover .cba-ico { color: #555; }

.cba.active { color: #111; border-bottom-color: #111; font-weight: 600; }
.cba.active .cba-ico { color: #555; }
