/* Gizmora theme — matches Ecommerce7 assets/css/style.css + Laravel helpers */

body {
  font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Scroll-reveal */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].revealed { opacity: 1; transform: none; }

/* Product card hover */
.card-hover { transition: transform .25s ease, box-shadow .25s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(15, 23, 42, .28); }

/* Tabs — Ecommerce7 */
.tab-active { color: #2540e0; border-color: #2540e0; }

/* Hero slider — track styles live below */
.hero-dot { transition: width .3s ease, background-color .3s ease; }

.hero-slide__shade {
  pointer-events: none;
  background: linear-gradient(
    105deg,
    color-mix(in srgb, var(--brand, #2540e0) 76%, #000) 0%,
    color-mix(in srgb, var(--brand-700, var(--brand, #2540e0)) 40%, transparent) 38%,
    transparent 58%
  );
}

/* Category pill scroller */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Marquee */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee { overflow: hidden; }
.marquee__track { display: flex; width: max-content; animation: marquee 22s linear infinite; }

/* Gentle float */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.floaty { animation: floaty 5s ease-in-out infinite; }

/* Shimmer badge */
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.shimmer { background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.4) 50%, rgba(255,255,255,0) 100%); background-size: 200% 100%; animation: shimmer 2.2s infinite; }

/* Back to top */
[data-back-top], #backToTop { transition: opacity .3s ease; }

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body.no-scroll { overflow: hidden; }
/* Children use pointer-events:auto — must disable them too or they steal taps over the drawer footer */
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;
}

/* 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;
}
.product-card .product-img,
.product-img,
#heroSlider [data-slide] img,
.hero-slide img {
  max-width: none;
  width: 100%;
  height: 100%;
}


/* Sticky phone taskbar */
.site-header {
  overflow: visible;
  transition: box-shadow .3s ease;
}
.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(15, 23, 42, .35); }

/* ---------- Account dropdown ---------- */
.account-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  width: min(18rem, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
  z-index: 60;
}

/* ---------- Hero slider (swipe / drag track — DP-Site style) ---------- */
.hero-slider {
  position: relative;
  touch-action: pan-y pinch-zoom;
  cursor: grab;
  min-height: 360px;
  height: 360px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(90deg, #0f172a, #2540e0);
}
.hero-side-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 360px;
  height: 360px;
  align-self: stretch;
  min-width: 0;
}
.hero-side-card {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  background-size: cover;
  background-position: center;
}
.hero-side-card__title {
  line-height: 1.15;
  max-width: 92%;
}
@media (min-width: 1024px) {
  .hero-slider {
    min-height: 480px;
    height: 480px;
  }
  .hero-side-stack {
    min-height: 480px;
    height: 480px;
  }
}
.hero-slider.is-grabbing { cursor: grabbing; }
.hero-track {
  display: flex;
  height: 100%;
  min-height: 100%;
  transition: transform .5s cubic-bezier(.25, .46, .45, .94);
  will-change: transform;
}
.hero-track.is-dragging { transition: none; }
.hero-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/* ---------- Hot Deal bar (phone-first) ---------- */
.gz-hot-deal-unit {
  display: inline-grid;
  place-items: center;
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.45rem;
  border-radius: 0.5rem;
  background: #eef1fd;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.gz-hot-deal-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1b2bb0;
}
@media (min-width: 640px) {
  .gz-hot-deal-unit {
    min-width: 0;
    min-height: 0;
    padding: 0.25rem 0.4rem;
    border-radius: 0.25rem;
  }
  .gz-hot-deal-label {
    font-size: inherit;
    color: inherit;
  }
}
@media (max-width: 639px) {
  .gz-hot-deal-bar {
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  }
  .gz-hot-deal-timer {
    width: 100%;
    justify-content: space-between;
    max-width: 20rem;
  }
}

.product-card { min-width: 0; width: 100%; }
.product-img { display: block; max-width: none; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 0.375rem;
  row-gap: 0.5rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.product-grid > * {
  min-width: 0;
  max-width: 100%;
}
@media (min-width: 640px) {
  .product-grid {
    gap: 1rem;
    align-items: stretch;
  }
}
@media (min-width: 1024px) {
  .product-grid { gap: 1.25rem; }
}

/* Star ratings */
.stars { color: #facc15; letter-spacing: 0.02em; }
.stars .empty, .stars-empty { color: #e5e7eb; }

.mobile-menu { transition: transform .3s cubic-bezier(.4, 0, .2, 1); }

.cart-count.bump { animation: bump .4s ease; }
@keyframes bump { 0%{transform:scale(1)} 50%{transform:scale(1.4)} 100%{transform:scale(1)} }

/* ---------- Shop filters ---------- */
:root {
  --brand: #2540e0;
  --brand-700: #1b2bb0;
  --ink: #0f172a;
}

.filter-panel { transition: transform .4s cubic-bezier(.4, 0, .2, 1); }

.acc-body { overflow: hidden; transition: max-height .35s ease; }

/* ---------- Subcategory collapse ---------- */
[data-subcat-panel] {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
[data-subcat-toggle] [data-subcat-chevron] {
  transition: transform .25s ease;
}
[data-subcat-group].is-open [data-subcat-toggle] [data-subcat-chevron] {
  transform: rotate(180deg);
}

@media (min-width: 1024px) {
  .site-header [data-desktop-cats] [data-subcat-panel] {
    max-height: none;
    overflow: visible;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s ease, visibility .15s ease;
  }
  .site-header [data-desktop-cats] [data-subcat-group].is-open [data-subcat-panel],
  .site-header [data-desktop-cats] [data-subcat-group]:hover [data-subcat-panel] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

input[type="range"].brand-range {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dbe2fb, #c7d2f7);
  outline: none;
}
input[type="range"].brand-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand);
  cursor: pointer;
  box-shadow: 0 0 0 5px rgba(37, 64, 224, .18), 0 2px 6px rgba(15, 23, 42, .15);
}
input[type="range"].brand-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: var(--brand);
  cursor: pointer;
}

.shop-filter-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  transition: background-color .15s ease, color .15s ease;
}
.shop-filter-item:hover {
  background: #f1f5f9;
  color: var(--ink);
}
.shop-filter-item.is-active {
  background: #eef1fd;
  color: var(--brand-700);
  font-weight: 600;
}
.shop-filter-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  position: relative;
  background: #fff;
}
.shop-filter-item.is-active .shop-filter-dot {
  border-color: var(--brand);
}
.shop-filter-item.is-active .shop-filter-dot::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  background: var(--brand);
}
.shop-filter-count {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  min-width: 1.5rem;
  text-align: center;
}
.shop-filter-item.is-active .shop-filter-count {
  background: #dbe2fb;
  color: var(--brand-700);
}

.shop-check-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.5rem 0.7rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.shop-check-item:hover { background: #f1f5f9; color: var(--ink); }
.shop-check-item.is-active { background: #eef1fd; color: var(--brand-700); }

.shop-check,
.shop-radio {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

/* BijliMart-style checkbox look for category links */
.shop-box {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.2rem;
  background: #fff;
  position: relative;
  display: inline-grid;
  place-items: center;
}
.shop-box.is-checked {
  border-color: var(--brand);
  background: var(--brand);
}
.shop-box.is-checked::after {
  content: "";
  width: 4px;
  height: 7px;
  margin-top: -1px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

@media (max-width: 767px) {
  img, video, svg, iframe { max-width: 100%; height: auto; }
  .hero-slide h1,
  .hero-slide h2 { word-break: break-word; }
}

@media (max-width: 640px) {
  .hero-slider { min-height: 320px; height: 320px; }
  .hero-side-stack { min-height: 320px; height: auto; }
  .hero-side-card { flex: 1 1 auto; min-height: 140px; }
  .hero-slide > div { padding: 1.25rem; }
}

/* 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: nowrap;
  align-items: baseline;
  column-gap: 0.375rem;
  row-gap: 0.125rem;
  min-height: 1.25rem;
}
@media (max-width: 640px) {
  .product-card-price > span {
    white-space: nowrap !important;
    display: inline !important;
    max-width: none !important;
  }
  .product-card-price > span:first-child {
    font-size: 0.8125rem;
    flex: 0 0 auto;
  }
  .product-card-price > span:last-child:not(:only-child) {
    font-size: 0.6875rem;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}

@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;
    margin-top: 0 !important;
    z-index: 60 !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;
  }
}

/* ---------- 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, #2540e0);
}

#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;
}

/* Hero photo-only — hide shade + copy in stylesheet (head load, no flicker) */
body.banner-hide-btn-hero #heroSlider .hero-slide__shade,
body.banner-hide-btn-hero .hero-slide__shade {
  display: none !important;
}
body.banner-hide-btn-hero #heroSlider .hero-slide__content,
body.banner-hide-btn-hero .hero-slide__content,
body.banner-hide-btn-hero .hero-slide__inner {
  display: none !important;
}
body.banner-hide-btn-hero #heroSlider .hero-slider__dots,
body.banner-hide-btn-hero #heroSlider [data-hero-dots] {
  display: flex !important;
  pointer-events: none;
  z-index: 20;
}
body.banner-hide-btn-hero #heroSlider [data-dot] {
  pointer-events: auto;
}
body.banner-hide-btn-hero #heroSlider .hero-slide[data-banner-link],
body.banner-hide-btn-hero .hero-slide[data-banner-link] {
  cursor: pointer;
}
body.banner-hide-btn-hero .hero-slide::before {
  display: none !important;
}
body.banner-hide-btn-hero .hero-slide__img,
body.banner-hide-btn-hero .hero-slide > img,
body.banner-hide-btn-hero #heroSlider .hero-slide__img {
  object-fit: cover !important;
  object-position: center center !important;
  opacity: 1 !important;
}

.prose img[data-align="left"],
.rich-text-display img[data-align="left"] {
  float: left;
  margin: 0 1rem 0.75rem 0;
}
.prose img[data-align="right"],
.rich-text-display img[data-align="right"] {
  float: right;
  margin: 0 0 0.75rem 1rem;
}
.prose img[data-align="center"],
.rich-text-display img[data-align="center"] {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.prose strong,
.prose b,
.rich-text-display strong,
.rich-text-display b {
  font-weight: 700;
}
.prose em,
.prose i,
.rich-text-display em,
.rich-text-display i {
  font-style: italic;
}

.prose .rich-text-media,
.rich-text-display .rich-text-media {
  max-width: 100%;
}
.prose .rich-text-media iframe,
.prose .rich-text-media video,
.rich-text-display .rich-text-media iframe,
.rich-text-display .rich-text-media video {
  max-width: 100%;
}
.prose::after,
.rich-text-display::after {
  content: "";
  display: table;
  clear: both;
}
