/* ================= Motion & new sections ================= */

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 3px;
  z-index: 70;
  background: var(--gold-grad);
  transform: scaleX(0);
  transform-origin: right center;
  pointer-events: none;
}

/* ---------- reveal (stagger) ---------- */
.reveal {
  transition-delay: var(--stagger, 0ms);
}

/* ---------- hero entrance ---------- */
.line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.anim-line {
  display: inline-block;
  transform: translateY(105%);
}

.anim-rise {
  display: block;
  opacity: 0;
  transform: translateY(18px);
}

.anim-zoom {
  opacity: 0;
  transform: scale(0.94);
}

.is-ready .anim-line {
  animation: line-up 0.9s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 110ms);
}

.is-ready .anim-rise {
  animation: rise 0.8s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 110ms);
}

.is-ready .anim-zoom {
  animation: zoom-in 1.1s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 110ms);
}

.no-js .anim-line,
.no-js .anim-rise,
.no-js .anim-zoom {
  opacity: 1;
  transform: none;
}

@keyframes line-up {
  to { transform: translateY(0); }
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@keyframes zoom-in {
  to { opacity: 1; transform: none; }
}

.logo-stage {
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  transform-style: preserve-3d;
}

/* ---------- button shine ---------- */
.btn-shine {
  position: relative;
  overflow: hidden;
}

.btn-shine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(120%);
  animation: shine 4.5s ease-in-out infinite 1.5s;
  pointer-events: none;
}

@keyframes shine {
  0%, 70% { transform: translateX(120%); }
  100% { transform: translateX(-120%); }
}

.btn-lg {
  --h: 3.5rem;
  font-size: 1.05rem;
  padding-inline: 2rem;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ---------- ken burns ---------- */
.kenburns {
  animation: kenburns 22s ease-in-out infinite alternate;
  transform-origin: center;
}

@keyframes kenburns {
  from { transform: scale(1.02); }
  to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); }
}

/* ================= Full-bleed hero ================= */
.hero-full {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  margin-top: -5rem; /* slide under the floating nav */
  padding-block: 8rem 5rem;
}

.hero-full-media {
  position: absolute;
  inset: -6% 0 0;
  z-index: -2;
  will-change: transform;
  transform: scale(1.06);
}

.hero-full-media video,
.hero-full-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-full-fallback {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(50rem 30rem at 70% 30%, rgba(214, 168, 79, 0.45), transparent 60%),
    radial-gradient(40rem 30rem at 10% 90%, rgba(168, 119, 45, 0.35), transparent 60%),
    #0b0b0c;
}

.hero-full-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to left, rgba(9, 9, 11, calc(var(--overlay) + 0.15)) 0%, rgba(9, 9, 11, var(--overlay)) 45%, rgba(9, 9, 11, calc(var(--overlay) * 0.4)) 100%),
    linear-gradient(to top, rgba(9, 9, 11, 0.55), transparent 40%);
}

.hero-full-inner {
  position: relative;
  width: 100%;
}

.hero-copy-light {
  max-width: 44rem;
}

.hero-copy-light .display {
  color: #fff;
  font-size: clamp(2.5rem, 6.5vw, 5rem);
}

.hero-copy-light .lead {
  color: rgba(255, 255, 255, 0.86);
}

.hero-copy-light .pill {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
  color: #f5dc97;
}

.gold-text-light {
  background: linear-gradient(135deg, #fbe6ad 0%, #e2b85f 50%, #c9973a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.scroll-cue {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.scroll-cue span {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: #fff;
  animation: cue 1.8s ease-in-out infinite;
}

@keyframes cue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* nav floats over the full hero until scrolled */
.has-full-hero .nav-wrap {
  position: sticky;
}

.has-full-hero:not(.is-scrolled) .nav {
  background: rgba(9, 9, 11, 0.25);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.has-full-hero:not(.is-scrolled) .nav .brand-name b,
.has-full-hero:not(.is-scrolled) .nav-links a {
  color: rgba(255, 255, 255, 0.9);
}

.has-full-hero:not(.is-scrolled) .nav-links a[aria-current="page"],
.has-full-hero:not(.is-scrolled) .nav-links a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.has-full-hero:not(.is-scrolled) .brand-name small {
  color: rgba(255, 255, 255, 0.6);
}

.has-full-hero:not(.is-scrolled) .cart-btn,
.has-full-hero:not(.is-scrolled) .menu-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.nav {
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

/* ================= Marquee ================= */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: #fff;
  padding-block: 0.9rem;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  gap: 2.5rem;
  padding-inline-end: 2.5rem;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}

.marquee-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

@keyframes marquee {
  to { transform: translateX(50%); }
}

/* ================= Banner sections ================= */
.banner-section {
  padding-block: 2rem;
}

.banner-section.is-full {
  padding-block: 0;
}

.banner-section.is-full + .section {
  padding-top: 5rem;
}

.banner-slider.is-full {
  border-radius: 0;
  border-inline: 0;
  box-shadow: none;
}

.banner-slider.h-sm .banner-slide { min-height: 260px; }
.banner-slider.h-md .banner-slide { min-height: 380px; }
.banner-slider.h-lg .banner-slide { min-height: 540px; }

@media (min-width: 768px) {
  .banner-slider.is-full.h-md .banner-slide { min-height: 460px; }
  .banner-slider.is-full.h-lg .banner-slide { min-height: 640px; }
}

.banner-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.banner-slide {
  overflow: hidden;
}

/* ================= Product card ================= */
.product-media.has-alt img.alt {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s var(--ease), transform 0.8s var(--ease);
}

.product-card:hover .product-media.has-alt img.alt {
  opacity: 1;
}

.badges {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  z-index: 2;
}

.badges .badge-sale,
.badges .badge-out,
.badges .badge-new {
  position: static;
}

.badge-new {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-head);
  background: #18181b;
  color: #fff;
}

.quick-view {
  position: absolute;
  inset-inline: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.4rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.product-card:hover .quick-view {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .quick-view {
    display: none;
  }
}

/* ================= Shop page ================= */
.shop-hero {
  padding-block: 3rem 1.5rem;
}

.shop-hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1rem;
}

.shop-hero-row .search-field {
  flex: 1;
  min-width: 16rem;
  max-width: 24rem;
}

.cat-pills {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-top: 1.5rem;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.cat-pills::-webkit-scrollbar {
  display: none;
}

.cat-pills .filter-chip {
  white-space: nowrap;
}

.shop-section {
  padding-top: 1.5rem !important;
}

.shop-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .shop-layout {
    grid-template-columns: 260px 1fr;
    gap: 2rem;
  }
  .shop-aside {
    position: sticky;
    top: 6.5rem;
  }
}

.filters-toggle {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}

.filters-toggle > summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  font-family: var(--font-head);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.filters-toggle > summary::-webkit-details-marker {
  display: none;
}

.filters-toggle > summary svg {
  color: var(--gold);
}

.count-dot {
  margin-inline-start: auto;
  min-width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background: var(--gold-grad);
  color: #1a1305;
  font-size: 0.75rem;
  display: grid;
  place-items: center;
}

@media (min-width: 1024px) {
  .filters-toggle > summary {
    pointer-events: none;
  }
}

.shop-filters {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.filter-block {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.filter-block h3 {
  font-size: 0.85rem;
  color: var(--faint);
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}

.cat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-2);
  transition: background 0.15s, color 0.15s;
}

.cat-list a:hover {
  background: var(--bg-2);
  color: var(--text);
}

.cat-list a[aria-current] {
  background: rgba(214, 168, 79, 0.14);
  color: var(--gold-deep);
  font-weight: 700;
}

.cat-list small {
  min-width: 1.6rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--faint);
  background: var(--bg-2);
  border-radius: 999px;
  padding: 0 0.4rem;
}

.cat-list li.sub a {
  padding-inline-start: 1.5rem;
  font-size: 0.86rem;
}

.price-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-range input {
  width: 100%;
  min-width: 0;
  height: 2.5rem;
  padding: 0.4rem 0.7rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border-strong);
  background: #fff;
  font: inherit;
  color: var(--text);
}

.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-block: 0.3rem;
  font-size: 0.92rem;
  cursor: pointer;
}

.check input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--gold);
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
}

.filter-actions .btn {
  flex: 1;
}

.shop-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.results b {
  color: var(--text);
}

.sort-form label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.sort-form select {
  height: 2.5rem;
  padding-inline: 0.8rem 2rem;
  border-radius: 0.7rem;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text);
  font: inherit;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(214, 168, 79, 0.12);
  color: var(--gold-deep);
  font-size: 0.82rem;
  font-weight: 700;
}

.active-filter svg {
  width: 0.85rem;
  height: 0.85rem;
}

.shop-main .product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .shop-main .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ================= Checkout ================= */
.steps {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  counter-reset: step;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--faint);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  font-size: 0.78rem;
}

.steps li + li::after {
  content: none;
}

.steps li.done::before {
  content: "✓";
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.steps li.current {
  color: var(--text);
  font-weight: 700;
}

.steps li.current::before {
  background: var(--gold-grad);
  border-color: transparent;
  color: #1a1305;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.step-n {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-inline-end: 0.5rem;
  border-radius: 50%;
  background: rgba(214, 168, 79, 0.16);
  color: var(--gold-deep);
  font-size: 0.85rem;
}

.pay-options {
  display: grid;
  gap: 0.6rem;
}

.pay-opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.pay-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem 0.9rem 1rem;
  padding-inline-start: 2.75rem;
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: 0.9rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.pay-box::before {
  content: "";
  position: absolute;
  inset-inline-start: 1rem;
  top: 1.05rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: #fff;
}

.pay-opt input:checked + .pay-box {
  border-color: var(--gold);
  background: rgba(214, 168, 79, 0.06);
  box-shadow: 0 0 0 3px rgba(214, 168, 79, 0.15);
}

.pay-opt input:checked + .pay-box::before {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 3px #fff;
  background: var(--gold);
}

.pay-opt input:focus-visible + .pay-box {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.pay-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.pay-head small {
  color: var(--gold-deep);
  font-weight: 700;
}

.pay-note {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.coupon-row {
  display: flex;
  gap: 0.5rem;
}

.coupon-row input {
  flex: 1;
  min-width: 0;
  height: 3rem;
  padding: 0.6rem 0.95rem;
  border-radius: 0.8rem;
  border: 1px dashed var(--gold);
  background: #fff;
  font: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.coupon-msg {
  font-size: 0.88rem;
  color: #b91c1c;
}

.coupon-msg.ok {
  color: #15803d;
}

.summary-rows .is-discount dd,
.summary-rows .is-discount dt {
  color: #15803d;
}

[data-cart-summary].is-loading {
  opacity: 0.55;
  transition: opacity 0.2s;
}

/* ================= Reduced motion ================= */
@media (prefers-reduced-motion: reduce) {
  .anim-line,
  .anim-rise,
  .anim-zoom {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .marquee-track,
  .kenburns,
  .btn-shine::after,
  .scroll-cue span {
    animation: none !important;
  }
}

/* fixes */
.filters-toggle > summary svg,
.active-filter svg,
.quick-view svg {
  flex-shrink: 0;
}

.filters-toggle > summary svg {
  width: 1.15rem;
  height: 1.15rem;
}

.quick-view svg {
  width: 1rem;
  height: 1rem;
}

.shop-main,
.shop-aside {
  min-width: 0;
}

.breadcrumb.anim-rise {
  display: flex;
}

.shop-hero-row > div {
  min-width: 0;
}

@media (max-width: 480px) {
  .shop-hero-row .search-field {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
  .shop-toolbar-row {
    flex-wrap: wrap;
  }
}

/* ---------- related products rail ---------- */
.product-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 1rem) / 2);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 0.75rem;
  scrollbar-width: none;
}

.product-rail::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .product-rail {
    grid-auto-columns: calc((100% - 2.5rem) / 3);
    gap: 1.25rem;
  }
}

@media (min-width: 1100px) {
  .product-rail {
    grid-auto-columns: calc((100% - 3.75rem) / 4);
  }
}

.rail-item {
  scroll-snap-align: start;
  display: flex;
}

.rail-item > .product-card {
  flex: 1;
}

.rail-nav {
  display: flex;
  gap: 0.5rem;
}

.rail-btn {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
}

.rail-btn:hover:not(:disabled) {
  background: var(--gold-grad);
  border-color: transparent;
  color: #1a1305;
}

.rail-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.rail-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.rail-btn .flip {
  transform: scaleX(-1);
}

/* grid children may shrink below their content width (fixes sideways scroll on phones) */
.checkout-layout > *,
.checkout-form,
.checkout-form > .card,
.form-card,
.coupon-row,
.pay-options,
.pay-box {
  min-width: 0;
}

.steps {
  flex-wrap: wrap;
}

/* iPhone zooms into fields smaller than 16px — keep them at 16px on touch screens */
@media (max-width: 1024px), (hover: none) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* very small phones: the brand name must never run under the header buttons */
.nav .brand {
  flex: 1;
  min-width: 0;
}

.nav .brand-name b {
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-actions {
  flex-shrink: 0;
}

@media (max-width: 360px) {
  .nav .brand-name b {
    font-size: 0.82rem;
  }
  .nav {
    gap: 0.5rem;
  }
}

/* "الأكثر طلبًا" category tabs */
.best-tabs {
  margin: 0 0 1.5rem;
}
.best-panel[hidden] {
  display: none;
}
