/* DigiNest — TargetSite-aligned styles (original slate / teal brand) */
:root {
  --dn-brand: #0f766e;
  --dn-brand-dark: #0b4f4a;
  --dn-brand-soft: #e6f3f1;
  --dn-ink: #0f172a;
  --dn-muted: #64748b;
  --dn-line: #e2e8f0;
  --dn-surface: #f8fafc;
  --dn-gold: #d4af37;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', 'Hind Siliguri', system-ui, sans-serif;
  color: var(--dn-ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  max-width: 100%;
}

/* hostfix: match Tailwind preflight so cards don't blow out if CDN fails */
img, video { max-width: 100%; height: auto; }
/* UI icons: never force height:auto — it overrides Tailwind h-* after CDN and collapses phone nav icons */
svg {
  max-width: none;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.dn-card-media img,
.dn-cat-circle img,
.dn-hero-banner img,
#heroSlider [data-slide] img,
.hero-slide img {
  max-width: none;
  width: 100%;
  height: 100%;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

body.no-scroll {
  overflow: hidden;
  touch-action: none;
}
body.cart-drawer-open .floating-chat,
body.cart-drawer-open .floating-chat * {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
body.cart-drawer-open #backToTop {
  opacity: 0 !important;
  pointer-events: none !important;
}

.dn-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  border: 1px solid var(--dn-line);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.dn-card:hover {
  border-color: #99f6e4;
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.12);
}

.dn-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--dn-brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
}
.dn-badge-sale {
  background: #059669;
}

.dn-card-media {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(145deg, #ecfeff, #f1f5f9);
  padding: 12px;
}
.dn-card-media img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  background: #0f172a;
  display: block;
}

.dn-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  flex: 1;
}

.dn-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--dn-ink);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.dn-card-title:hover { color: var(--dn-brand); }

.dn-card-price {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 1.5rem;
}
.dn-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--dn-brand);
}
.dn-price-was {
  font-size: 13px;
  color: #94a3b8;
  text-decoration: line-through;
}

.dn-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--dn-brand-dark);
  background: var(--dn-brand-soft);
  padding: 8px 10px;
  border-radius: 8px;
}
.dn-view-btn:hover { background: #ccfbf1; }

.dn-add-btn {
  margin-top: auto;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dn-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.dn-add-btn:hover { background: var(--dn-brand); }

.dn-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  flex: 1 1 0;
  min-width: 88px;
  max-width: 120px;
}
.dn-cat-circle {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  border: 2px solid var(--dn-brand);
  background: #fff;
  overflow: hidden;
  padding: 0;
  display: block;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.dn-cat-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dn-cat:hover .dn-cat-circle {
  transform: translateY(-4px);
  border-color: #0b4f4a;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}
.dn-cat span {
  font-size: 13px;
  font-weight: 700;
  color: var(--dn-brand-dark);
  line-height: 1.25;
}
.dn-cats-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 12px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

/* Hero banner — phone: show full artwork (no crop); desktop: wide frame */
.dn-hero-banner {
  display: block;
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0f172a;
}
.dn-hero-banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
}
.dn-hero-banner--copy {
  min-height: 240px;
}
.dn-hero-copy {
  padding: 1.25rem 1.25rem 1.5rem;
  box-sizing: border-box;
}
.dn-hero-title {
  font-size: clamp(1.25rem, 6vw, 2.25rem);
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.dn-hero-sub {
  font-size: 0.875rem;
  line-height: 1.45;
}

@media (min-width: 640px) {
  .dn-hero-banner {
    aspect-ratio: 1200 / 440;
    min-height: 260px;
  }
  .dn-hero-banner img {
    height: 100%;
    object-fit: cover;
  }
  .dn-hero-banner--copy {
    aspect-ratio: 1200 / 440;
    min-height: 260px;
  }
  .dn-hero-copy {
    padding: 2rem 2.5rem;
  }
  .dn-hero-title {
    font-size: 2.25rem;
  }
  .dn-hero-sub {
    font-size: 1rem;
  }
  .dn-cats-row {
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .dn-cat {
    min-width: 76px;
    max-width: 88px;
  }
  .dn-cat-circle {
    width: 72px;
    height: 72px;
  }
  .dn-cat span {
    font-size: 12px;
  }
  .dn-card-body {
    padding: 10px;
    gap: 6px;
  }
  .dn-card-title {
    font-size: 13px;
    min-height: 2.5em;
  }
  .dn-price {
    font-size: 14px;
  }
  .dn-add-btn {
    font-size: 12px;
    padding: 9px 10px;
  }
  /* DigiNest cards stay center-aligned even with global price stack rules */
  .dn-card .dn-card-price.product-card-price {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
  }
  .dn-page-title {
    padding: 1.5rem 1rem;
  }
  .dn-page-title h1 {
    font-size: 1.5rem;
  }
  .site-header .max-w-7xl {
    min-width: 0;
  }
}

.dn-page-title {
  background: linear-gradient(180deg, #e6f3f1, #fff);
  text-align: center;
  padding: 2.25rem 1rem;
}
.dn-page-title h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--dn-ink);
}

.variant-chip {
  border: 1px solid var(--dn-line);
  background: #fff;
  color: var(--dn-ink);
  font-weight: 600;
  font-size: 13px;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
}
.variant-chip.is-active,
.variant-chip.active {
  background: var(--dn-brand);
  border-color: var(--dn-brand);
  color: #fff;
}

[data-cart-drawer] { will-change: transform; }
[data-cart-drawer].is-open { transform: translateX(0) !important; }
[data-drawer-overlay].is-open { display: block !important; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dn-ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Price: never split currency from digits; keep card rows aligned on phone */
.product-card-price,
.product-card .pc-price,
.product-card .pc-price-was,
.product-card .dn-price,
.product-card .dn-price-was,
.product-card .sh-price,
.product-card .sh-price-was,
.product-card .dm-price,
.product-card .dm-price-was,
.product-card .fk-price,
.product-card .fk-price-was,
.product-card .rw-price,
.product-card .rw-price-was,
.product-card .hl-price,
.product-card .hl-price-was,
.product-card .nr-price,
.product-card .nr-price-was,
.product-card .tz-price {
  white-space: nowrap !important;
  word-break: keep-all;
  overflow-wrap: normal;
}
.product-card-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.375rem;
  row-gap: 0.125rem;
  min-height: 1.5rem;
}
@media (max-width: 640px) {
  .product-card-price,
  .sh-card-price,
  .dm-card-price,
  .fk-card-price,
  .nr-card-price,
  .rw-card-price,
  .hl-card-price,
  .tz-price {
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 0.125rem;
  }
  /* DigiNest cards: keep prices in row */
  .dn-card-price,
  .product-card .dn-card-price {
    flex-direction: row !important;
    flex-wrap: nowrap;
    justify-content: center !important;
    align-items: baseline;
  }
  .product-card-price > span,
  .sh-card-price > span,
  .dm-card-price > span,
  .fk-card-price > span,
  .dn-card-price > span,
  .nr-card-price > span,
  .hl-card-price > span,
  .tz-price > span {
    white-space: nowrap !important;
    display: inline-block;
    max-width: 100%;
  }
  .product-card-price > span:first-child {
    font-size: 0.9rem;
  }
  /* 16px inputs on phone */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="search"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* WaveSeller developer credit — high visibility strip */
.ws-dev-credit {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.95rem 1rem;
  background: #020617;
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  border-top: 3px solid #38bdf8;
}
.ws-dev-credit strong {
  color: #38bdf8;
  font-weight: 800;
  font-size: 1.05rem;
  margin-left: 0.25rem;
  letter-spacing: 0.02em;
}
@media (max-width: 640px) {
  .ws-dev-credit {
    font-size: 0.9rem;
    padding: 1rem 0.75rem;
  }
  .ws-dev-credit strong {
    font-size: 1rem;
  }
}

/* Product grid — 2-col phone, 3 md, 4 lg */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 0.5rem;
  row-gap: 0.625rem;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.product-grid > * {
  min-width: 0;
  max-width: 100%;
}
@media (min-width: 640px) {
  .product-grid { gap: 0.75rem; }
}
@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Flash row — horizontal scroll phone, 5-col grid ≥640px */
.flash-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  align-items: stretch;
}
.flash-row__item {
  flex: 0 0 calc((100% - 0.5rem) / 2.15);
  min-width: 0;
  max-width: 11.5rem;
  scroll-snap-align: start;
  display: flex;
}
.flash-row__item > .dn-card,
.flash-row__item > .product-card {
  height: 100%;
  width: 100%;
}
@media (min-width: 640px) {
  .flash-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    overflow-x: visible;
    scroll-snap-type: none;
  }
  .flash-row__item {
    flex: none;
    width: auto;
    max-width: none;
  }
}

/* Account dropdown — fixed inset ≤1023px */
.account-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  width: min(18rem, calc(100vw - 1.5rem));
}
@media (max-width: 1023px) {
  .account-dropdown,
  [data-account-dropdown] {
    position: fixed !important;
    left: 0.75rem !important;
    right: 0.75rem !important;
    top: calc(4.75rem + env(safe-area-inset-top, 0px)) !important;
    width: auto !important;
    max-width: none !important;
  }
}

/* Hero slider — swipe track CSS for #heroSlider */
#heroSlider {
  touch-action: pan-y pinch-zoom;
  cursor: grab;
  position: relative;
  width: 100%;
  min-width: 100%;
  overflow: hidden;
  background: #0f172a;
  border-radius: 0.875rem;
  user-select: none;
  -webkit-user-select: none;
}
#heroSlider.is-grabbing { cursor: grabbing; }
.hero-track {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: inherit;
  transition: transform .5s cubic-bezier(.25, .46, .45, .94);
  will-change: transform;
  touch-action: pan-y;
}
.hero-track.is-dragging { transition: none; }
.hero-slide,
#heroSlider [data-slide] {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  min-height: inherit;
  height: 100%;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.hero-slide img,
#heroSlider [data-slide] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}
.hero-slide a,
#heroSlider [data-slide] a {
  -webkit-user-drag: none;
}
#heroSlider [data-slide].is-hidden { opacity: 0; pointer-events: none; }
#heroSlider [data-slide].is-active { opacity: 1; }

/* Phone: 16/9 aspect; desktop ~1200/440 or 21/9 */
@media (max-width: 767px) {
  #heroSlider {
    aspect-ratio: 16 / 9;
    max-height: none;
    min-height: 0;
  }
  #heroSlider .hero-slide > div {
    min-height: 0 !important;
    height: 100%;
    padding: 0.75rem 1rem 1.75rem !important;
    justify-content: center;
  }
  #heroSlider h1 {
    font-size: 1.15rem !important;
    line-height: 1.25 !important;
  }
  #heroSlider p {
    font-size: 0.75rem !important;
    margin-top: 0.35rem !important;
  }
  #heroSlider a.inline-flex,
  #heroSlider span.inline-flex {
    margin-top: 0.5rem !important;
    padding: 0.4rem 0.9rem !important;
    font-size: 0.75rem !important;
  }
  /* Hide hero arrows on phone */
  [data-hero-next],
  [data-hero-prev] {
    display: none !important;
  }
}
@media (min-width: 768px) {
  #heroSlider {
    aspect-ratio: 21 / 9;
    min-height: 280px;
    max-height: 480px;
  }
}

/* Hero dots */
.hero-dots,
#heroSlider .hero-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 6px;
  pointer-events: none;
}
.hero-dot {
  width: 28px;
  height: 4px;
  border: 0;
  border-radius: 2px;
  background: rgba(255,255,255,.45);
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
  transition: background .2s ease, width .2s ease;
}
.hero-dot.is-on,
.hero-dot.is-active {
  background: var(--dn-gold);
  width: 36px;
}


/* ---------- Floating chat + back-to-top (DP-Site method) ---------- */
:root {
  --floating-action-right: max(1.25rem, env(safe-area-inset-right, 0px));
  --floating-action-bottom: max(1.125rem, env(safe-area-inset-bottom, 0px));
  --floating-action-size: 3.25rem;
  --floating-action-gap: 0.75rem;
  --floating-action-shadow: 0 18px 40px -14px rgba(20, 20, 20, 0.4);
  --floating-chat-brand: var(--brand, #0f766e);
}

/* FAB positioning — no bottom-nav offset, use safe-area-inset on phone */
@media (max-width: 767px) {
  :root {
    --floating-action-bottom: max(1.125rem, env(safe-area-inset-bottom, 0px));
  }
}
#backToTop {
  transition: opacity .2s ease, background .15s ease, bottom .2s ease, right .2s ease, width .2s ease, height .2s ease !important;
}
.floating-chat {
  position: fixed;
  right: var(--floating-action-right);
  bottom: var(--floating-action-bottom);
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.625rem;
  pointer-events: none;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.floating-chat__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.85) translateY(0.5rem);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}
.floating-chat__actions.is-open {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}
.floating-chat__btn,
.floating-chat__trigger {
  display: grid;
  place-items: center;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  pointer-events: auto;
  color: #fff;
  box-shadow: var(--floating-action-shadow);
  transition: transform .15s ease, filter .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.floating-chat__btn {
  width: 3rem;
  height: 3rem;
  min-width: 44px;
  min-height: 44px;
}
.floating-chat__trigger {
  width: var(--floating-action-size);
  height: var(--floating-action-size);
  min-width: 48px;
  min-height: 48px;
  background: var(--floating-chat-brand);
}
.floating-chat__btn--whatsapp { background: #16a34a; }
.floating-chat__btn--messenger { background: #2563eb; }
@media (hover: hover) {
  .floating-chat__btn:hover,
  .floating-chat__trigger:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
  }
}
.floating-chat__icon { grid-area: 1 / 1; }
.floating-chat__icon--close { display: none; }
.floating-chat__trigger[aria-expanded="true"] .floating-chat__icon--open { display: none; }
.floating-chat__trigger[aria-expanded="true"] .floating-chat__icon--close { display: block; }

body.has-floating-chat #backToTop {
  right: var(--floating-action-right) !important;
  bottom: calc(var(--floating-action-bottom) + var(--floating-action-size) + var(--floating-action-gap)) !important;
  width: var(--floating-action-size) !important;
  height: var(--floating-action-size) !important;
  z-index: 36 !important;
}
body.floating-chat-open #backToTop {
  opacity: 0 !important;
  pointer-events: none !important;
}
@media (max-width: 480px) {
  :root {
    --floating-action-right: max(1rem, env(safe-area-inset-right, 0px));
    --floating-action-size: 3.125rem;
  }
  .floating-chat__btn { width: 2.75rem; height: 2.75rem; }
  .floating-chat__btn svg { width: 1.25rem; height: 1.25rem; }
}

/* Mobile nav drawer — category / UI glyphs stay visible on phone */
#mobileMenu .nav-drawer-icon,
.mobile-menu .nav-drawer-icon {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  min-height: 1.25rem;
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  line-height: 1;
  font-size: 1rem;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", emoji, sans-serif;
}
#mobileMenu .nav-drawer-icon img,
.mobile-menu .nav-drawer-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: none;
}
#mobileMenu .nav-drawer-icon svg,
.mobile-menu .nav-drawer-icon svg {
  width: 1rem;
  height: 1rem;
  max-width: none;
}
#mobileMenu a.nav-drawer-link,
.mobile-menu a.nav-drawer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
