/* =========================================================
   Trestop — Premium E-commerce Stylesheet
   Author: Trestop
   Sections:
   1. Design Tokens & Reset
   2. Typography
   3. Layout & Utilities
   4. Buttons & Form Controls
   5. Header / Navigation
   6. Announcement Bar
   7. Hero
   8. Categories
   9. Product Cards & Grids
   10. Promotional Banner
   11. Best Sellers Slider
   12. Why Shop With Us
   13. Testimonials
   14. Newsletter
   15. Footer
   16. Cart / Wishlist / Checkout
   17. Product Detail Page
   18. Toast & Modals
   19. Scroll To Top / Loader
   20. Animations
   21. Responsive (mobile / tablet / laptop / desktop)
   ========================================================= */

/* ---------- 1. Design Tokens & Reset ---------- */
:root {
  --bg: #FFFFFF;
  --bg-2: #F8F9FA;
  --primary: #111827;
  --accent: #2563EB;
  --accent-soft: #EFF4FF;
  --text: #1F2937;
  --text-2: #6B7280;
  --border: #E5E7EB;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 20px 50px rgba(17, 24, 39, 0.12);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 16px;
  --container: 1280px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 72px;
  --ann-h: 40px;
}

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

* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

ul { list-style: none; }

input, select, textarea { font-family: inherit; font-size: 1rem; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- 2. Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--primary);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { color: var(--text-2); }

.section { padding: 96px 0; }
.section--alt { background: var(--bg-2); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section__head .eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section__head p { margin-top: 14px; font-size: 1.02rem; }

/* ---------- 3. Layout & Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- 4. Buttons & Form Controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s;
  background: #F97316;
  color: #fff;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--primary { background: #F97316; }
.btn--primary:hover { background: #EA580C; }
.btn--ghost { background: transparent; color: #F97316; border: 1.5px solid #F97316; }
.btn--ghost:hover { border-color: #EA580C; background: #F97316; color: #fff; box-shadow: none; }
.btn--block { width: 100%; }
.btn--lg { padding: 16px 34px; font-size: 1rem; }

/* Ripple effect */
.btn .ripple {
  position: absolute; border-radius: 50%;
  transform: scale(0); background: rgba(255,255,255,0.45);
  animation: ripple .6s linear; pointer-events: none;
}
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.input, .select, textarea.input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: #F97316;
  box-shadow: 0 0 0 4px #FFF1E6;
}
.input--error { border-color: #dc2626; }
.field .error { color: #dc2626; font-size: 0.8rem; min-height: 1em; }

/* ---------- 5. Header / Navigation ---------- */
/* Wrapper uses display:contents so the sticky header's containing
   block is the body (full document height), keeping it pinned. */
#site-header { display: contents; }

.announcement {
  background: var(--primary);
  color: #fff;
  height: var(--ann-h);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; letter-spacing: 0.02em;
  overflow: hidden; position: relative; z-index: 60;
}
.announcement__track { display: flex; gap: 60px; white-space: nowrap; animation: marquee 28s linear infinite; }
.announcement:hover .announcement__track { animation-play-state: paused; }
.announcement__track span { opacity: .92; }
@keyframes marquee { to { transform: translateX(-50%); } }

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s var(--ease), border-color .3s;
}
.header.is-scrolled { box-shadow: var(--shadow-sm); border-color: var(--border); }
.nav {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { display: flex; align-items: center; gap: 10px; font-family: 'Poppins'; font-weight: 700; font-size: 1.4rem; color: var(--primary); }
.logo svg { width: 30px; height: 30px; }
.logo b { color: #F97316; }

.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
  font-weight: 500; font-size: 0.95rem; color: var(--text);
  position: relative; padding: 6px 0; transition: color .2s;
}
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: #F97316; transition: width .3s var(--ease);
}
.nav__links a:hover, .nav__links a.active { color: var(--primary); }
.nav__links a:hover::after, .nav__links a.active::after { width: 100%; }

.nav__actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--primary); position: relative; transition: background .2s, transform .2s;
}
.icon-btn:hover { background: var(--bg-2); transform: translateY(-1px); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn .badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: #F97316; color: #fff; border-radius: 10px;
  font-size: 0.68rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  transform: scale(0); transition: transform .3s var(--ease);
}
.icon-btn .badge.show { transform: scale(1); }
.icon-btn .badge.pop { animation: badgePop .4s var(--ease); }
@keyframes badgePop { 0%{transform:scale(1)} 40%{transform:scale(1.5)} 100%{transform:scale(1)} }

.hamburger { display: none; width: 42px; height: 42px; border-radius: 10px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.hamburger span { width: 22px; height: 2px; background: var(--primary); border-radius: 2px; transition: .3s; }
.hamburger.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2){ opacity: 0; }
.hamburger.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-menu {
  position: fixed; inset: 0; z-index: 55; background: rgba(17,24,39,.45);
  opacity: 0; visibility: hidden; transition: opacity .3s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu__panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(320px, 84vw);
  background: #fff; padding: 28px 24px; transform: translateX(100%);
  transition: transform .35s var(--ease); overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
}
.mobile-menu.open .mobile-menu__panel { transform: translateX(0); }
.mobile-menu__panel a { padding: 14px 8px; font-weight: 500; border-bottom: 1px solid var(--border); color: var(--text); }
.mobile-menu__panel a:hover { color: var(--accent); }
.mobile-menu__close { align-self: flex-end; margin-bottom: 10px; }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  background: var(--bg-2);
  overflow: hidden;
}
.hero__inner {
  display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 48px;
  padding: 84px 0 96px;
}
.hero__content { max-width: 540px; text-align: left; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 40px;
  padding: 7px 14px; font-size: 0.8rem; font-weight: 600; color: var(--text);
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.hero__badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { margin-bottom: 18px; }
.hero h1 em { color: #F97316; font-style: normal; }
.hero p { font-size: 1.08rem; margin-bottom: 30px; max-width: 460px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-start; }
.hero__stats { display: flex; gap: 36px; margin-top: 46px; justify-content: center; }
.hero__stats .num { font-family: 'Poppins'; font-weight: 700; font-size: 1.6rem; color: var(--primary); }
.hero__stats .lbl { font-size: 0.82rem; color: var(--text-2); }

.hero__media { position: relative; }
.hero__media .frame {
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  background: #fff; aspect-ratio: 4/5; display: flex; align-items: center; justify-content: center;
  transition: transform .4s var(--ease);
}
.hero__media .frame:hover { transform: translateY(-4px); }
.hero__media .frame .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.hero__media .frame:hover .ph { transform: scale(1.04); }
.hero__chip {
  position: absolute; background: #fff; border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 0.86rem;
}
.hero__chip--1 { top: 26px; left: -18px; }
.hero__chip--2 { bottom: 30px; right: -10px; }
.hero__chip .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }

/* ---------- 8. Categories ---------- */
.cat-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-2); aspect-ratio: 3/4; display: block;
  box-shadow: var(--shadow-sm); transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.cat-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.cat-card .ph { width: 100%; height: 100%; transition: transform .6s var(--ease); object-fit: cover; }
.cat-card:hover .ph { transform: scale(1.06); }
.cat-card__overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px; background: linear-gradient(to top, rgba(17,24,39,.55), rgba(17,24,39,0) 55%);
}
.cat-card__overlay h3 { color: #fff; }
.cat-card__overlay span { color: rgba(255,255,255,.85); font-size: 0.85rem; }
.cat-card__arrow {
  position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--primary); display: flex; align-items: center; justify-content: center;
  transform: translateY(-6px); opacity: 0; transition: .3s var(--ease);
}
.cat-card:hover .cat-card__arrow { transform: translateY(0); opacity: 1; }

/* ---------- 9. Product Cards & Grids ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }

.product-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; position: relative; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.product-card__media { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--bg-2); }
.product-card__media .ph { width: 100%; height: 100%; transition: transform .6s var(--ease); object-fit: cover; }
.product-card:hover .product-card__media .ph { transform: scale(1.08); }
.product-card__badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 5px 10px; border-radius: 30px; letter-spacing: .03em;
}
.product-card__badge--sale { background: #dc2626; }
.product-card__wish {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center; color: var(--text);
  box-shadow: var(--shadow-sm); transition: transform .2s, color .2s, background .2s;
}
.product-card__wish:hover { transform: scale(1.08); }
.product-card__wish.active { color: #dc2626; }
.product-card__wish.active svg { fill: #dc2626; }
.product-card__quick {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3;
  background: #fff; color: var(--primary); border-radius: var(--radius-sm);
  padding: 11px; font-weight: 600; font-size: 0.85rem; text-align: center;
  transform: translateY(140%); opacity: 0; transition: .3s var(--ease);
}
.product-card:hover .product-card__quick { transform: translateY(0); opacity: 1; }
.product-card__quick:hover { background: var(--primary); color: #fff; }
.product-card__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card__cat { font-size: 0.74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-2); font-weight: 600; }
.product-card__name { font-family: 'Poppins'; font-weight: 600; font-size: 1rem; color: var(--primary); }
.product-card__name:hover { color: var(--accent); }
.rating { display: flex; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--text-2); }
.rating .stars { color: #F59E0B; letter-spacing: 1px; }
.rating .count { color: var(--text-2); }
.product-card__price { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.product-card__price .now { font-family: 'Poppins'; font-weight: 700; font-size: 1.12rem; color: var(--primary); }
.product-card__price .old { font-size: 0.9rem; color: var(--text-2); text-decoration: line-through; }
.product-card__add {
  margin-top: 12px; width: 100%; padding: 11px; border-radius: var(--radius-sm);
  background: #F97316; color: #fff; font-weight: 600; font-size: 0.88rem;
  transition: background .2s, transform .2s;
}
.product-card__add:hover { background: #EA580C; }
.product-card__add.added { background: #16a34a; }

/* ---------- 10. Promotional Banner ---------- */
.promo {
  background: var(--primary); color: #fff; border-radius: var(--radius-lg);
  padding: 64px 48px; position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 30px;
}
.promo::after {
  content: ''; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px;
  border: 40px solid rgba(255,255,255,.06); border-radius: 50%;
}
.promo .eyebrow { color: #93C5FD; }
.promo h2 { color: #fff; }
.promo p { color: rgba(255,255,255,.8); margin: 14px 0 26px; max-width: 420px; }
.promo__media { display: flex; justify-content: center; }
.promo__media .ph { width: 100%; max-width: 320px; aspect-ratio: 1/1; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }

/* ---------- 11. Best Sellers Slider ---------- */
.slider { position: relative; }
.slider__viewport { overflow: hidden; }
.slider__track { display: flex; gap: 26px; transition: transform .5s var(--ease); }
.slider__track .product-card { min-width: calc((100% - 78px) / 4); }
.slider__nav { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 24px; }
.slider__btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; color: var(--primary);
  transition: background .2s, color .2s, border-color .2s, opacity .2s;
}
.slider__btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.slider__btn:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- 12. Why Shop With Us ---------- */
.feature {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 26px; text-align: center; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.feature__ic {
  width: 60px; height: 60px; border-radius: 16px; margin: 0 auto 18px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.feature__ic svg { width: 28px; height: 28px; }
.feature h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature p { font-size: 0.92rem; }

/* ---------- 13. Testimonials ---------- */
.testimonial {
  background: var(--bg-2); border-radius: var(--radius); padding: 30px 28px;
  border: 1px solid var(--border); transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.testimonial:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.testimonial .stars { color: #F59E0B; letter-spacing: 2px; font-size: 1rem; }
.testimonial__text { color: var(--text); font-size: 0.98rem; margin: 14px 0 20px; line-height: 1.7; }
.testimonial__user { display: flex; align-items: center; gap: 12px; }
.testimonial__avatar {
  width: 46px; height: 46px; border-radius: 50%; color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-family: 'Poppins';
}
.testimonial__name { font-weight: 600; color: var(--primary); }
.testimonial__role { font-size: 0.82rem; color: var(--text-2); }

/* ---------- 14. Newsletter ---------- */
.newsletter { padding: 80px 0; }
.newsletter__box {
  background: var(--bg-2); border-radius: var(--radius-lg); padding: 56px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
}
.newsletter__box h2 { margin-bottom: 12px; }
.newsletter__form { display: flex; gap: 12px; }
.newsletter__form .input { flex: 1; }
.newsletter__note { font-size: 0.82rem; margin-top: 10px; min-height: 1em; }
.newsletter__note.ok { color: #16a34a; }
.newsletter__note.err { color: #dc2626; }

/* ---------- 15. Footer ---------- */
.footer { background: var(--primary); color: #cbd5e1; padding: 64px 0 28px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer .logo { color: #fff; margin-bottom: 16px; }
.footer .logo b { color: #F97316; }
.footer__about p { font-size: 0.9rem; color: #cbd5e1; max-width: 300px; }
.footer__social { display: flex; gap: 12px; margin-top: 20px; }
.footer__social a {
  width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center; color: #fff; transition: background .2s, transform .2s;
}
.footer__social a:hover { background: #FFF1E6; color: #F97316; transform: translateY(-2px); }
.footer__col h4 { color: #fff; font-size: 1rem; margin-bottom: 18px; }
.footer__col a { display: block; padding: 7px 0; font-size: 0.9rem; color: #cbd5e1; transition: color .2s, padding-left .2s; }
.footer__col a:hover { color: #fff; padding-left: 5px; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 48px; padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; color: #94a3b8;
}
/* ---------- Contact split layout ---------- */
.contact-split { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 26px; }
.contact-item:last-child { margin-bottom: 0; }
.contact-ic { width: 46px; height: 46px; border-radius: 12px; background: #FFF1E6; color: #F97316; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-ic svg { width: 22px; height: 22px; }
.contact-label { font-weight: 600; color: var(--primary); }
.contact-text { color: var(--text-2); font-size: 0.92rem; margin-top: 3px; }
.contact-form h3 { margin-bottom: 22px; font-size: 1.4rem; }
.footer__pay { display: flex; gap: 10px; align-items: center; }

/* ---------- 16. Cart / Wishlist / Checkout ---------- */
.page-head { background: var(--bg-2); padding: 48px 0; border-bottom: 1px solid var(--border); }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-head .crumb { font-size: 0.85rem; color: var(--text-2); margin-bottom: 8px; }
.page-head .crumb a:hover { color: var(--accent); }

.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 36px; align-items: start; padding: 56px 0; }
.cart-list { display: flex; flex-direction: column; gap: 18px; }
.cart-item {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 20px; align-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
  transition: box-shadow .3s var(--ease);
}
.cart-item:hover { box-shadow: var(--shadow-sm); }
.cart-item__media { width: 110px; height: 110px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-2); }
.cart-item__media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__name { font-family: 'Poppins'; font-weight: 600; color: var(--primary); }
.cart-item__meta { font-size: 0.82rem; color: var(--text-2); margin-top: 4px; }
.cart-item__price { font-weight: 700; color: var(--primary); font-family: 'Poppins'; }
.cart-item__right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.qty {
  display: inline-flex; align-items: center; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.qty button { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: var(--text); font-size: 1.1rem; }
.qty button:hover { background: var(--bg-2); }
.qty input { width: 44px; height: 34px; text-align: center; border: none; border-left: 1.5px solid var(--border); border-right: 1.5px solid var(--border); font-weight: 600; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.remove-btn { color: var(--text-2); font-size: 0.82rem; display: inline-flex; align-items: center; gap: 5px; transition: color .2s; }
.remove-btn:hover { color: #dc2626; }

.summary {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; position: sticky; top: calc(var(--header-h) + 20px);
}
.summary h3 { margin-bottom: 18px; }
.summary__row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 0.95rem; }
.summary__row.total { border-top: 1.5px solid var(--border); margin-top: 8px; padding-top: 16px; font-size: 1.15rem; font-weight: 700; color: var(--primary); font-family: 'Poppins'; }
.summary__row .muted { color: var(--text-2); }
.coupon { display: flex; gap: 8px; margin: 16px 0; }
.coupon .input { flex: 1; padding: 10px 12px; }
.coupon .btn { padding: 10px 16px; }

.empty-state { text-align: center; padding: 80px 20px; }
.empty-state svg { width: 90px; height: 90px; color: var(--border); margin: 0 auto 20px; }
.empty-state h3 { margin-bottom: 10px; }
.empty-state p { margin-bottom: 22px; }

/* Checkout */
.checkout-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; padding: 56px 0; }
.checkout-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; margin-bottom: 24px; }
.checkout-card h3 { margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.checkout-card h3 .step { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; }
.pay-method { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 16px; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; margin-bottom: 12px; transition: border-color .2s, background .2s; }
.pay-method:hover { border-color: #F97316; }
.pay-method.sel { border-color: #F97316; background: #FFF1E6; }
.pay-method input { margin-top: 3px; accent-color: #F97316; }
.pay-method .pm-title { font-weight: 600; color: var(--primary); }
.pay-method .pm-sub { font-size: 0.82rem; color: var(--text-2); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- 17. Product Detail Page ---------- */
.pdp { padding: 56px 0; }
.pdp__layout { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.pdp__gallery .main-img {
  border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-2);
  aspect-ratio: 1/1; margin-bottom: 16px; border: 1px solid var(--border); cursor: zoom-in;
}
.pdp__gallery .main-img .ph { width: 100%; height: 100%; transition: transform .3s; }
.pdp__gallery .main-img.zoomed .ph { transform: scale(1.8); }
.pdp__thumbs { display: flex; gap: 12px; }
.pdp__thumbs .thumb {
  width: 84px; height: 84px; border-radius: var(--radius-sm); overflow: hidden;
  border: 2px solid transparent; background: var(--bg-2); cursor: pointer; transition: border-color .2s;
}
.pdp__thumbs .thumb.active { border-color: var(--accent); }
.pdp__info .cat { color: var(--accent); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: .1em; }
.pdp__info h1 { margin: 10px 0 12px; }
.pdp__info .rating { margin-bottom: 18px; }
.pdp__info .desc { margin-bottom: 24px; line-height: 1.8; }
.pdp__price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; }
.pdp__price .now { font-family: 'Poppins'; font-weight: 700; font-size: 1.9rem; color: var(--primary); }
.pdp__price .old { color: var(--text-2); text-decoration: line-through; }
.pdp__price .save { color: #dc2626; font-weight: 600; font-size: 0.85rem; }
.selector-block { margin-bottom: 22px; }
.selector-block .label { font-weight: 600; font-size: 0.9rem; margin-bottom: 10px; display: flex; justify-content: space-between; }
.options { display: flex; gap: 10px; flex-wrap: wrap; }
.opt {
  min-width: 46px; height: 46px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; transition: border-color .2s, background .2s, color .2s; background: #fff;
}
.opt:hover { border-color: var(--primary); }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.opt--color { width: 40px; min-width: 40px; height: 40px; border-radius: 50%; position: relative; }
.opt--color.sel::after { content: ''; position: absolute; inset: -5px; border: 2px solid var(--accent); border-radius: 50%; }
.pdp__actions { display: flex; gap: 14px; margin: 26px 0; }
.pdp__actions .qty { height: 52px; }
.pdp__actions .qty button, .pdp__actions .qty input { height: 50px; }
.pdp__wish { width: 52px; height: 52px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text); transition: .2s; }
.pdp__wish:hover, .pdp__wish.active { border-color: #dc2626; color: #dc2626; }
.pdp__wish.active svg { fill: #dc2626; }
.pdp__meta { display: flex; flex-direction: column; gap: 12px; padding-top: 22px; border-top: 1px solid var(--border); font-size: 0.9rem; }
.pdp__meta div { display: flex; gap: 10px; align-items: center; color: var(--text-2); }
.pdp__meta svg { width: 18px; height: 18px; color: var(--accent); }

.related { padding: 24px 0 96px; }

/* Shop filters */
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 36px; padding: 48px 0 96px; align-items: start; }
.filters { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: sticky; top: calc(var(--header-h) + 20px); }
.filters h4 { margin-bottom: 14px; }
.filters__group { padding: 16px 0; border-bottom: 1px solid var(--border); }
.filters__group:last-child { border-bottom: none; }
.filters__label { font-weight: 600; font-size: 0.9rem; margin-bottom: 12px; }
.check { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 0.9rem; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.check .cnt { margin-left: auto; color: var(--text-2); font-size: 0.82rem; }
.shop-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.shop-bar .count { font-size: 0.9rem; color: var(--text-2); }
.shop-bar .select { width: auto; padding: 10px 14px; }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.filter-toggle { display: none; }

/* ---------- 18. Toast & Modals ---------- */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 100; display: flex; flex-direction: column; gap: 12px; }
.toast {
  background: var(--primary); color: #fff; padding: 14px 18px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px; min-width: 260px; max-width: 340px;
  transform: translateX(120%); opacity: 0; animation: toastIn .4s var(--ease) forwards;
}
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast .ic { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toast.ok .ic { background: #16a34a; }
.toast .msg { font-size: 0.9rem; }
.toast .msg b { display: block; font-weight: 600; }
@keyframes toastIn { to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }

.modal { position: fixed; inset: 0; z-index: 90; background: rgba(17,24,39,.55); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity .3s; }
.modal.open { opacity: 1; visibility: visible; }
.modal__box { background: #fff; border-radius: var(--radius-lg); width: min(820px, 100%); max-height: 90vh; overflow: auto; transform: translateY(20px) scale(.98); transition: transform .3s var(--ease); }
.modal.open .modal__box { transform: translateY(0) scale(1); }
.modal__close { position: absolute; top: 16px; right: 16px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.9); display: flex; align-items: center; justify-content: center; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; }
.quick-grid .media { background: var(--bg-2); aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; }
.quick-grid .media .ph { object-fit: cover; }
.quick-grid .info { padding: 34px; display: flex; flex-direction: column; gap: 10px; }
.quick-grid .info h3 { font-size: 1.3rem; }
.quick-grid .info .rating { margin: 4px 0; }

/* Search overlay */
.search-overlay { position: fixed; inset: 0; z-index: 95; background: rgba(17,24,39,.5); opacity: 0; visibility: hidden; transition: opacity .3s; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 20px 20px; }
.search-overlay.open { opacity: 1; visibility: visible; }
.search-box { background: #fff; border-radius: var(--radius-lg); width: min(640px,100%); padding: 22px; box-shadow: var(--shadow-lg); transform: translateY(-20px); transition: transform .3s var(--ease); }
.search-overlay.open .search-box { transform: translateY(0); }
.search-box__input { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--border); padding-bottom: 12px; }
.search-box__input input { flex: 1; border: none; font-size: 1.1rem; }
.search-box__input input:focus { outline: none; }
.search-results { max-height: 50vh; overflow: auto; margin-top: 16px; }
.search-result { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: var(--radius-sm); transition: background .2s; cursor: pointer; }
.search-result:hover { background: var(--bg-2); }
.search-result .ph { width: 52px; height: 52px; border-radius: 10px; background: var(--bg-2); overflow: hidden; flex-shrink: 0; }
.search-result .name { font-weight: 600; color: var(--primary); }
.search-result .price { font-size: 0.85rem; color: var(--text-2); }
.search-empty { padding: 30px; text-align: center; color: var(--text-2); }

/* ---------- 19. Scroll To Top / Loader ---------- */
.scroll-top {
  position: fixed; bottom: 26px; right: 26px; z-index: 60;
  width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: .3s var(--ease);
}
.scroll-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--accent); }

.page-loader { position: fixed; inset: 0; z-index: 200; background: #fff; display: flex; align-items: center; justify-content: center; transition: opacity .4s, visibility .4s; }
.page-loader.done { opacity: 0; visibility: hidden; }
.spinner { width: 46px; height: 46px; border: 4px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 20. Animations ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
.lift { transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.lift:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.fade-up { animation: fadeUp .8s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.zoomable { cursor: zoom-in; }
.ph, svg.ph, .ph svg { width: 100%; height: 100%; display: block; }

/* ---------- 21. Responsive ---------- */
/* Desktop large (1440px+) */
@media (min-width: 1440px) {
  .container { max-width: 1360px; }
  .product-grid { gap: 30px; }
}

/* Laptop (1024px - 1439px) */
@media (max-width: 1200px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .slider__track .product-card { min-width: calc((100% - 52px) / 3); }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
  .section { padding: 72px 0; }
  .hero__inner { grid-template-columns: 1fr; gap: 28px; padding: 56px 0 64px; }
  .hero__media { max-width: 460px; margin: 0 auto; width: 100%; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .summary, .filters { position: static; }
  .pdp__layout { grid-template-columns: 1fr; gap: 32px; }
  .promo { grid-template-columns: 1fr; }
  .promo__media { display: none; }
  .newsletter__box { grid-template-columns: 1fr; padding: 40px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav__links { display: none; }
  .hamburger { display: flex; }
  .shop-layout { grid-template-columns: 1fr; }
  .filters { display: none; }
  .filters.open { display: block; }
  .filter-toggle { display: inline-flex; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-grid .media { aspect-ratio: 16/10; }
}

/* Mobile (320px - 767px) */
@media (max-width: 767px) {
  body { font-size: 14px; }
  .container { padding: 0 18px; }
  .section { padding: 56px 0; }
  .section__head { margin-bottom: 36px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .slider__track .product-card { min-width: calc((100% - 16px) / 2); }
  .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .hero h1 { font-size: 2rem; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  .hero__stats { gap: 22px; flex-wrap: wrap; }
  .hero__chip--1 { left: 0; } .hero__chip--2 { right: 0; }
  .promo { padding: 40px 26px; }
  .newsletter__box { padding: 30px 22px; }
  .newsletter__form { flex-direction: column; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; }
  .cart-item { grid-template-columns: 76px 1fr; gap: 14px; }
  .cart-item__media { width: 76px; height: 76px; }
  .cart-item__right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .two-col { grid-template-columns: 1fr; }
  .pdp__actions { flex-wrap: wrap; }
  .pdp__actions .btn { flex: 1; }
  .contact-split { grid-template-columns: 1fr; gap: 36px; }
  .toast-wrap { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: 100%; }
}

@media (max-width: 420px) {
  .product-grid, .shop-grid { grid-template-columns: 1fr; }
  .slider__track .product-card { min-width: 80%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
