/* ===========================
   CSS VARIABLES & RESET
=========================== */
:root {
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-light: #fff7ed;
  --dark: #1e293b;
  --text: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg: #ffffff;
  --bg-light: #f8fafc;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
  --shadow-hover: 0 8px 32px rgba(0,0,0,.14);
  --transition: 0.22s ease;
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

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

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input { font-family: inherit; }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.section { padding-block: 4rem; }

.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; color: var(--dark); margin-bottom: .5rem; }
.section-sub { color: var(--text-muted); font-size: .95rem; }


/* ===========================
   BUTTONS
=========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 16px rgba(249,115,22,.4); }

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.6);
}
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: #fff; }

.btn-add {
  width: 100%;
  background: var(--dark);
  color: #fff;
  padding: .65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  margin-top: .75rem;
  transition: background var(--transition);
}
.btn-add:hover { background: var(--primary); }
.btn--full { width: 100%; }


/* ===========================
   HEADER
=========================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: var(--shadow); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1.5rem;
}

.logo { font-size: 1.3rem; font-weight: 800; display: flex; align-items: baseline; gap: 0; }
.logo-do { color: var(--primary); }
.logo-buy { color: var(--dark); }
.logo-online { color: var(--dark); }
.logo-dot { color: var(--text-muted); font-size: .75rem; }

.nav-links {
  display: none;
  gap: 2rem;
}
.nav-links a {
  font-weight: 500;
  font-size: .9rem;
  color: var(--text);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: .75rem; }

.cart-btn {
  position: relative;
  font-size: 1.3rem;
  padding: .3rem .5rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.cart-btn:hover { background: var(--bg-light); }

.cart-count {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--primary);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: .4rem;
  border-radius: var(--radius-sm);
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* Mobile nav */
.nav-links.open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem;
  gap: 1rem;
  box-shadow: var(--shadow);
}


/* ===========================
   HERO
=========================== */
.hero {
  min-height: 100svh;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e1b4b 100%);
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: 4rem;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(249,115,22,.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  flex: 1;
  padding-block: 2rem;
  max-width: 560px;
}

.hero-badge {
  display: inline-block;
  background: rgba(249,115,22,.15);
  border: 1px solid rgba(249,115,22,.3);
  color: #fdba74;
  font-size: .8rem;
  font-weight: 600;
  padding: .35rem .85rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
  letter-spacing: .03em;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: -.02em;
}

.highlight {
  background: linear-gradient(135deg, var(--primary), #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: #94a3b8;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 420px;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.stat { color: #fff; }
.stat strong { display: block; font-size: 1.3rem; font-weight: 800; }
.stat span { font-size: .8rem; color: #94a3b8; }
.stat-divider { width: 1px; height: 32px; background: rgba(255,255,255,.15); }

.hero-visual {
  display: none;
  position: relative;
  flex: 1;
  justify-content: center;
  align-items: center;
  min-height: 360px;
}

.hero-card {
  position: absolute;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  color: #fff;
  transition: transform var(--transition);
  min-width: 130px;
}
.hero-card:hover { transform: translateY(-6px); }
.hero-card .product-img {
  width: 70px; height: 70px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin: 0 auto .75rem;
}
.hero-card p { font-size: .8rem; color: #94a3b8; margin-bottom: .25rem; }
.hero-card strong { font-size: 1rem; color: var(--primary); }

.hero-card--1 { top: 10%; left: 5%; }
.hero-card--2 { top: 35%; left: 38%; }
.hero-card--3 { top: 60%; left: 8%; }


/* ===========================
   TRUST BAR
=========================== */
.trust-bar {
  background: var(--dark);
  color: #cbd5e1;
  padding: .875rem 0;
  overflow-x: auto;
}
.trust-bar-inner {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
}
.trust-item span { font-size: 1rem; }


/* ===========================
   CATEGORIES
=========================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  padding: 1.25rem .75rem;
  border-radius: var(--radius);
  background: var(--bg-light);
  border: 1px solid var(--border);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-align: center;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.cat-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--cat-color), color-mix(in srgb, var(--cat-color) 70%, white));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}


/* ===========================
   PRODUCTS
=========================== */
.filter-bar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.filter-btn {
  padding: .45rem 1rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.product-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg);
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.product-card.hidden { display: none; }

.product-img-wrap {
  position: relative;
  overflow: hidden;
}
.product-thumb {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2.5rem, 8vw, 4rem);
  transition: transform .4s ease;
}
.product-card:hover .product-thumb { transform: scale(1.06); }

.badge {
  position: absolute;
  top: .6rem; left: .6rem;
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge--new { background: var(--primary); color: #fff; }
.badge--sale { background: #ef4444; color: #fff; }

.wishlist-btn {
  position: absolute;
  top: .6rem; right: .6rem;
  width: 30px; height: 30px;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  transition: transform var(--transition), color var(--transition);
}
.wishlist-btn:hover { transform: scale(1.15); color: #ef4444; }
.wishlist-btn.active { color: #ef4444; }

.product-info { padding: .875rem; }

.product-category { font-size: .72rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .25rem; }
.product-name { font-size: .9rem; font-weight: 700; color: var(--dark); margin-bottom: .35rem; line-height: 1.3; }
.product-rating { font-size: .8rem; color: #f59e0b; margin-bottom: .5rem; }
.product-rating span { color: var(--text-muted); }

.product-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem; }
.price-current { font-size: 1rem; font-weight: 800; color: var(--dark); }
.price-original { font-size: .8rem; color: var(--text-muted); text-decoration: line-through; }
.price-save { font-size: .7rem; font-weight: 700; color: #22c55e; background: #f0fdf4; padding: .1rem .35rem; border-radius: 4px; }


/* ===========================
   PROMO BANNER
=========================== */
.promo-banner {
  background: linear-gradient(135deg, #1e293b, #312e81);
  color: #fff;
  padding-block: 3.5rem;
  overflow: hidden;
}

.promo-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.promo-label {
  display: inline-block;
  background: rgba(249,115,22,.2);
  border: 1px solid rgba(249,115,22,.4);
  color: #fdba74;
  font-size: .8rem;
  font-weight: 700;
  padding: .3rem .75rem;
  border-radius: 100px;
  margin-bottom: .875rem;
  letter-spacing: .05em;
}

.promo-text h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; margin-bottom: .5rem; }
.promo-text p { color: #94a3b8; margin-bottom: 1.25rem; font-size: .95rem; }
.promo-text strong { color: var(--primary); }

.countdown {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.count-box {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  padding: .6rem .875rem;
  text-align: center;
  min-width: 58px;
}
.count-box span { font-size: 1.5rem; font-weight: 800; display: block; line-height: 1; }
.count-box small { font-size: .65rem; color: #94a3b8; letter-spacing: .06em; text-transform: uppercase; margin-top: .15rem; display: block; }
.count-sep { font-size: 1.4rem; font-weight: 800; color: var(--primary); }

.promo-visual {
  font-size: 8rem;
  filter: drop-shadow(0 0 40px rgba(249,115,22,.35));
  animation: float 3s ease-in-out infinite;
  display: none;
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }


/* ===========================
   WHY US
=========================== */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.feature-icon { font-size: 2rem; margin-bottom: .75rem; }
.feature-card h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: .4rem; }
.feature-card p { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }


/* ===========================
   NEWSLETTER
=========================== */
.newsletter {
  background: linear-gradient(135deg, var(--primary), #f59e0b);
}
.newsletter-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}
.newsletter-text h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 800; color: #fff; margin-bottom: .4rem; }
.newsletter-text p { color: rgba(255,255,255,.85); font-size: .95rem; }

.newsletter-form {
  display: flex;
  gap: .5rem;
  width: 100%;
  max-width: 480px;
  flex-wrap: wrap;
}
.newsletter-input {
  flex: 1;
  min-width: 200px;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  border: none;
  font-size: .95rem;
  outline: none;
  background: rgba(255,255,255,.95);
}
.newsletter-input:focus { background: #fff; }
.newsletter-form .btn-primary {
  background: var(--dark);
  color: #fff;
}
.newsletter-form .btn-primary:hover { background: #0f172a; }


/* ===========================
   FOOTER
=========================== */
.footer { background: var(--dark); color: #cbd5e1; padding-top: 3rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand .logo { margin-bottom: .75rem; }
.footer-brand p { font-size: .875rem; color: #94a3b8; max-width: 280px; line-height: 1.6; margin-bottom: 1rem; }

.social-links { display: flex; gap: .75rem; }
.social-links a {
  font-size: 1.3rem;
  transition: transform var(--transition);
}
.social-links a:hover { transform: scale(1.2); }

.footer-col h4 { font-size: .875rem; font-weight: 700; color: #fff; margin-bottom: .875rem; letter-spacing: .03em; text-transform: uppercase; }
.footer-col ul { display: flex; flex-direction: column; gap: .5rem; }
.footer-col a { font-size: .875rem; color: #94a3b8; transition: color var(--transition); }
.footer-col a:hover { color: var(--primary); }

.footer-bottom { padding-block: 1.25rem; }
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.footer-bottom p { font-size: .8rem; color: #64748b; }
.payment-icons { display: flex; gap: .5rem; font-size: 1.1rem; }


/* ===========================
   TOAST
=========================== */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--dark);
  color: #fff;
  padding: .75rem 1.5rem;
  border-radius: 100px;
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
  z-index: 500;
  transition: transform .3s ease, opacity .3s ease;
  opacity: 0;
  box-shadow: var(--shadow-hover);
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }


/* ===========================
   CART SIDEBAR
=========================== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.cart-overlay.visible { opacity: 1; pointer-events: auto; }

.cart-sidebar {
  position: fixed;
  top: 0; right: 0;
  width: min(380px, 100vw);
  height: 100%;
  background: var(--bg);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s ease;
  box-shadow: -8px 0 32px rgba(0,0,0,.15);
}
.cart-sidebar.open { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.cart-header h2 { font-size: 1.1rem; font-weight: 700; color: var(--dark); }
.cart-close { font-size: 1.2rem; color: var(--text-muted); transition: color var(--transition); }
.cart-close:hover { color: var(--dark); }

.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: .875rem; }
.cart-empty { text-align: center; color: var(--text-muted); font-size: .9rem; margin-top: 2rem; }

.cart-item {
  display: flex;
  gap: .875rem;
  align-items: center;
  padding: .75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-light);
  border: 1px solid var(--border);
}
.cart-item-info { flex: 1; }
.cart-item-name { font-size: .875rem; font-weight: 600; color: var(--dark); margin-bottom: .15rem; }
.cart-item-price { font-size: .85rem; color: var(--primary); font-weight: 700; }
.cart-item-remove { font-size: .85rem; color: var(--text-muted); transition: color var(--transition); padding: .25rem; }
.cart-item-remove:hover { color: #ef4444; }

.cart-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .875rem; }
.cart-total { display: flex; justify-content: space-between; font-size: 1rem; }
.cart-total span { color: var(--text-muted); }
.cart-total strong { font-size: 1.2rem; color: var(--dark); }


/* ===========================
   RESPONSIVE — TABLET (≥640px)
=========================== */
@media (min-width: 640px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }

  .newsletter-inner { flex-direction: row; text-align: left; }
  .newsletter-text { flex: 1; }

  .promo-visual { display: block; }
  .hero-visual { display: flex; }
}


/* ===========================
   RESPONSIVE — DESKTOP (≥1024px)
=========================== */
@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .menu-toggle { display: none; }

  .hero {
    flex-direction: row;
    padding-top: var(--header-h);
    align-items: center;
  }
  .hero .container { display: flex; align-items: center; gap: 3rem; }
  .hero-content { padding-block: 6rem; }

  .category-grid { grid-template-columns: repeat(6, 1fr); }
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .features-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
