/* ============================================================================
   Maria's Honey — storefront styles
   Theme: black + gold (as requested), Arabic RTL, mobile-first & responsive
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

:root {
  --gold: #d4a93a;
  --gold-light: #f0c869;
  --black: #0e0e0e;
  --black-soft: #171717;
  --black-card: #1c1c1c;
  --cream: #faf6ee;
  --text: #f3f0e8;
  --text-dim: #b8b2a4;
  --danger: #e05252;
  --success: #4caf7d;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0,0,0,0.35);
  --max-width: 1160px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--black);
  color: var(--text);
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  text-align: right;
  min-height: 100%;
}

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- Header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14,14,14,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(212,169,58,0.25);
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--gold-light);
}

.brand img { height: 40px; width: 40px; border-radius: 50%; object-fit: cover; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 600;
  font-size: 15px;
}

.nav-links a { color: var(--text-dim); transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--gold-light); }

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-badge {
  background: var(--gold);
  color: var(--black);
  font-size: 12px;
  font-weight: 800;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 18px;
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border-bottom: 1px solid rgba(212,169,58,0.25);
    background: var(--black-soft);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    display: none;
    gap: 20px;
    font-size: 17px;
  }
  .nav-links.open { display: flex; }
  .menu-toggle { display: inline-block; }
}

/* ---- Hero ---- */

.hero {
  background: linear-gradient(180deg, rgba(212,169,58,0.10), transparent 60%);
  padding: 48px 16px 24px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(26px, 5vw, 40px);
  margin: 0 0 10px;
  color: var(--gold-light);
  font-weight: 800;
}

.hero p {
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.7;
}

/* ---- Product grid ---- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  padding: 24px 0 48px;
}

.product-card {
  background: var(--black-card);
  border: 1px solid rgba(212,169,58,0.15);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}

.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.product-card .thumb {
  aspect-ratio: 1 / 1;
  background: #111 center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 13px;
}

.product-card .body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-card h3 { margin: 0; font-size: 17px; font-weight: 700; }
.product-card .unit { color: var(--text-dim); font-size: 13px; }
.product-card .price { color: var(--gold-light); font-weight: 800; font-size: 18px; margin-top: auto; }

.out-of-stock-tag {
  display: inline-block;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 8px;
  width: fit-content;
}

/* ---- Buttons & forms ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--gold);
  color: var(--black);
  font-weight: 800;
  font-size: 15px;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}

.btn:hover { background: var(--gold-light); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--gold-light); border: 1px solid var(--gold); }
.btn.secondary:hover { background: rgba(212,169,58,0.1); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.block { width: 100%; }

.form-field { margin-bottom: 16px; }
.form-field label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 14px; color: var(--text-dim); }

input, select, textarea {
  width: 100%;
  background: var(--black-soft);
  border: 1px solid rgba(212,169,58,0.25);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 15px;
}

select {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-left: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23d4a93a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
  background-size: 16px;
}
select option { background: var(--black-soft); color: var(--text); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.radio-row { display: flex; gap: 14px; flex-wrap: wrap; }
.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--black-soft);
  border: 1px solid rgba(212,169,58,0.25);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  flex: 1;
  min-width: 160px;
}
.radio-option input { width: auto; }

.card {
  background: var(--black-card);
  border: 1px solid rgba(212,169,58,0.15);
  border-radius: var(--radius);
  padding: 20px;
}

.error-msg { color: var(--danger); font-size: 14px; margin-top: 8px; }
.success-msg { color: var(--success); font-size: 14px; margin-top: 8px; }
.hint { color: var(--text-dim); font-size: 13px; margin-top: 4px; }

/* ---- Cart / checkout ---- */

.cart-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(212,169,58,0.12);
}

.cart-row img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: #111;
}

.cart-row .info { flex: 1; }
.cart-row .info h4 { margin: 0 0 4px; font-size: 15px; }
.cart-row .info .unit-price { color: var(--text-dim); font-size: 13px; }

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty-control button {
  background: var(--black-soft);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 15px;
  color: var(--text-dim);
}
.summary-row.total {
  color: var(--gold-light);
  font-weight: 800;
  font-size: 20px;
  border-top: 1px solid rgba(212,169,58,0.2);
  margin-top: 8px;
  padding-top: 12px;
}

/* ---- Order status badges ---- */

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.status-pending   { background: rgba(212,169,58,0.2); color: var(--gold-light); }
.status-confirmed { background: rgba(76,175,125,0.2); color: var(--success); }
.status-shipped   { background: rgba(90,160,220,0.2); color: #7ab8ec; }
.status-delivered { background: rgba(76,175,125,0.3); color: var(--success); }
.status-cancelled { background: rgba(224,82,82,0.2); color: var(--danger); }

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid rgba(212,169,58,0.15);
  padding: 28px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 40px;
}

.site-footer a { color: var(--gold-light); }

/* ---- Utility ---- */

.center { text-align: center; }
.muted { color: var(--text-dim); }
.spacer-lg { height: 40px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.narrow { max-width: 480px; margin: 0 auto; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---- Preview / environment banners ---- */

.preview-banner {
  background: rgba(212,169,58,0.15);
  color: var(--gold-light);
  border-bottom: 1px solid rgba(212,169,58,0.4);
  padding: 10px 16px;
  font-size: 14px;
  text-align: center;
  line-height: 1.7;
}
.preview-banner.error {
  background: rgba(224,82,82,0.15);
  color: #ff9d9d;
  border-bottom-color: rgba(224,82,82,0.5);
}
.preview-banner code {
  background: rgba(0,0,0,0.4);
  padding: 2px 6px;
  border-radius: 4px;
  direction: ltr;
  display: inline-block;
}

/* ---- Small phones: 2-column product grid ---- */
@media (max-width: 560px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card .body { padding: 10px; gap: 4px; }
  .product-card h3 { font-size: 14px; }
  .product-card .price { font-size: 15px; }
  .product-card .btn { padding: 9px 8px; font-size: 13px; }
  .hero { padding: 32px 16px 12px; }
}

/* ============================================================================
   Mobile polish
   ============================================================================ */

/* Prices/amounts never break across lines */
.summary-row { gap: 12px; }
.summary-row span:last-child { white-space: nowrap; }
#instapayNote { margin: -6px 0 16px; line-height: 1.7; }

@media (max-width: 560px) {
  /* 16px inputs stop iPhones from zooming the page when a field is tapped */
  input, select, textarea { font-size: 16px; }

  /* Bigger touch targets for quantity buttons */
  .qty-control button { width: 38px; height: 38px; font-size: 18px; }
  .qty-control span { min-width: 22px; text-align: center; }

  /* Cart row: image + name on top, quantity + delete underneath */
  .cart-row { flex-wrap: wrap; gap: 10px 12px; }
  .cart-row .info { flex: 1 1 calc(100% - 80px); min-width: 0; }
  .cart-row .qty-control { margin-inline-start: 76px; }
  .cart-row > .btn { margin-inline-start: auto; }

  .radio-option { min-width: 100%; }
  h1 { font-size: 26px; }
}

/* ============================================================================
   Weight chips, in-cart stepper, toast
   ============================================================================ */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.chip {
  background: transparent;
  border: 1px solid rgba(212,169,58,0.35);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 4px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--gold); color: var(--gold-light); }
.chip.active { background: var(--gold); border-color: var(--gold); color: var(--black); }
.chips.big { gap: 8px; margin: 8px 0 4px; }
.chips.big .chip { padding: 8px 16px; font-size: 15px; display: flex; flex-direction: column; align-items: center; line-height: 1.3; min-width: 84px; }
.chips.big .chip small { font-size: 12px; font-weight: 600; opacity: .85; }

.card-action { margin-top: 8px; }
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--gold);
  border-radius: 10px;
  overflow: hidden;
  background: var(--black-soft);
}
.stepper button {
  background: transparent;
  border: none;
  color: var(--gold-light);
  width: 40px;
  height: 40px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}
.stepper button:hover { background: rgba(212,169,58,0.12); }
.stepper span { min-width: 30px; text-align: center; font-weight: 800; font-size: 16px; color: var(--text); }
.in-cart { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.in-cart .stepper { flex: 1; justify-content: space-between; max-width: 150px; }
.in-cart-label { color: var(--success); font-weight: 700; font-size: 13px; }
.in-cart.big { justify-content: flex-start; gap: 16px; margin-top: 20px; }
.in-cart.big .stepper { flex: 0 0 auto; }
.in-cart.big .in-cart-label { font-size: 15px; }

.cart-badge.bump { animation: badge-bump .45s ease; }
@keyframes badge-bump { 0%{transform:scale(1)} 35%{transform:scale(1.45)} 100%{transform:scale(1)} }

.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  /* hidden: faded out and invisible (sliding off-screen isn't enough on
     phones, where the toast sits above the floating buttons) */
  transform: translate(-50%, 16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: var(--black-card);
  border: 1px solid var(--gold);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  z-index: 200;
  width: max-content;
  max-width: calc(100vw - 24px);
  font-size: 14px;
  transition: transform .3s ease, opacity .25s ease, visibility 0s linear .3s;
}
.cart-toast.show {
  transform: translate(-50%, 0); opacity: 1; visibility: visible; pointer-events: auto;
  transition: transform .3s ease, opacity .25s ease, visibility 0s;
}
.cart-toast a { color: var(--gold-light); font-weight: 800; white-space: nowrap; }

/* ============================================================================
   Product image: hover zoom + full-screen viewer
   ============================================================================ */
.zoom-frame {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 1 / 1;
  background: #111;
  cursor: zoom-in;
}
.zoom-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.zoom-hint {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.55);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  pointer-events: none;
  transition: opacity .2s;
}
@media (hover: hover) {
  .zoom-frame:hover img { transform: scale(1.08); }
  .zoom-frame:hover .zoom-hint { opacity: 0; }
}
.zoom-frame:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity .25s ease, background-color .2s;
  cursor: zoom-out;
}
.lightbox.open { opacity: 1; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  transform: scale(.92);
  transition: transform .25s ease;
  cursor: default;
  touch-action: pinch-zoom;
}
.lightbox.open img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(212,169,58,0.3); }

@media (max-width: 560px) {
  .product-card .chips .chip { padding: 3px 9px; font-size: 12px; }
  .in-cart .in-cart-label { font-size: 12px; }
  .stepper button { width: 36px; height: 38px; }
}
@media (max-width: 560px) {
  .cart-row .stepper { margin-inline-start: 76px; }
}

/* Card: stepper takes the full width of the button it replaces */
.card-action .in-cart { flex-direction: column-reverse; align-items: stretch; gap: 4px; }
.card-action .in-cart .stepper { max-width: none; width: 100%; }
.card-action .in-cart-label { text-align: center; }
.product-card .price { margin-top: auto; }

/* ============================================================================
   Icons, weight capsule, refined zoom badge
   ============================================================================ */
.icon { display: block; flex-shrink: 0; }

/* Weight capsule: [ − | 1 كجم | + ] */
.weight-capsule {
  display: inline-flex;
  align-items: stretch;
  height: 38px;
  border: 1px solid rgba(212,169,58,0.45);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(212,169,58,0.10), rgba(212,169,58,0.03));
  overflow: hidden;
  user-select: none;
}
.weight-capsule button {
  width: 38px;
  border: none;
  background: transparent;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.weight-capsule button:hover:not(:disabled) { background: rgba(212,169,58,0.18); }
.weight-capsule button:active:not(:disabled) { background: rgba(212,169,58,0.3); }
.weight-capsule button:disabled { color: rgba(240,200,105,0.25); cursor: not-allowed; }
.weight-capsule .wc-value {
  min-width: 78px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  border-inline: 1px solid rgba(212,169,58,0.25);
  font-variant-numeric: tabular-nums;
}
.weight-capsule.big { height: 48px; }
.weight-capsule.big button { width: 48px; }
.weight-capsule.big .wc-value { min-width: 110px; font-size: 18px; }

.product-card .weight-capsule { width: 100%; margin: 6px 0 2px; }
.product-card .weight-capsule button { flex: 0 0 36px; width: 36px; }
.product-card .weight-capsule .wc-value { flex: 1; min-width: 0; font-size: 14px; }

.weight-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 18px 0 6px; }
.weight-row .field-label { margin: 0; }
.weight-row .hint { margin: 0; }
.per-kg { font-size: 14px; margin-top: -4px; }
.add-big { margin-top: 16px; min-width: 240px; padding: 14px 22px; font-size: 16px; }

/* Steppers use SVG icons now */
.stepper button { display: flex; align-items: center; justify-content: center; }
.in-cart-label { display: inline-flex; align-items: center; gap: 4px; }

/* Zoom badge: small glassy circle with a line magnifier */
.zoom-hint {
  bottom: 14px;
  left: 14px;
  width: 42px;
  height: 42px;
  font-size: 0;
  color: #fff;
  background: rgba(14,14,14,0.55);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.lightbox-close { display: flex; align-items: center; justify-content: center; font-size: 0; }

/* Header cart icon */
.cart-link .icon { width: 20px; height: 20px; }

@media (max-width: 560px) {
  .weight-capsule.big { height: 46px; }
  .add-big { width: 100%; min-width: 0; }
}
.card-action .in-cart { flex-direction: column; }

/* ============================================================================
   Order confirmation page
   ============================================================================ */
.confirm-card {
  background: var(--black-card);
  border: 1px solid rgba(212,169,58,0.25);
  border-radius: 20px;
  padding: 32px 24px 26px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: confirm-in .5s ease both;
}
@keyframes confirm-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.confirm-card h1 { color: var(--gold-light); font-size: 26px; margin: 14px 0 6px; }
.confirm-thanks { margin: 0 0 18px; }

.confirm-check { width: 84px; height: 84px; margin: 0 auto; }
.confirm-check svg { width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.confirm-check circle {
  stroke: var(--gold); stroke-width: 2.5; fill: rgba(212,169,58,0.10);
  stroke-dasharray: 151; stroke-dashoffset: 151;
  animation: draw .6s .1s ease forwards;
}
.confirm-check path {
  stroke: var(--gold-light); stroke-width: 3.5;
  stroke-dasharray: 36; stroke-dashoffset: 36;
  animation: draw .35s .6s ease forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .confirm-card, .confirm-check circle, .confirm-check path { animation: none; stroke-dashoffset: 0; }
}

.order-no {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--black-soft);
  border: 1px dashed rgba(212,169,58,0.45);
  border-radius: 12px;
  padding: 8px 10px 8px 14px;
  margin-bottom: 20px;
}
.order-no strong { color: var(--gold-light); font-size: 18px; letter-spacing: 1px; direction: ltr; }
.copy-btn {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid rgba(212,169,58,0.35); background: transparent; color: var(--gold-light);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.copy-btn:hover { background: rgba(212,169,58,0.12); }
.copy-btn.done { color: var(--success); border-color: var(--success); }

.wa-note {
  display: flex; gap: 14px; align-items: flex-start; text-align: right;
  background: rgba(37,211,102,0.08);
  border: 1px solid rgba(37,211,102,0.35);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.wa-note .wa-icon { color: #25d366; flex-shrink: 0; margin-top: 2px; }
.wa-note strong { display: block; font-size: 16px; margin-bottom: 4px; }
.wa-note p { margin: 0; color: var(--text-dim); line-height: 1.7; font-size: 14px; }
.wa-contact-btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 12px; padding: 9px 18px;
  background: #25d366; color: #fff; border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none;
  box-shadow: 0 4px 14px rgba(37,211,102,0.28);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.wa-contact-btn:hover { background: #1ebe5a; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37,211,102,0.38); }
.wa-contact-btn:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.wa-contact-btn svg { fill: currentColor; }
.wa-note .phone { color: var(--text); font-weight: 700; direction: ltr; unicode-bidi: isolate; }

.next-steps { list-style: none; padding: 0; margin: 0 0 20px; text-align: right; }
.next-steps li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; color: var(--text-dim); font-size: 14px; line-height: 1.7;
  border-bottom: 1px solid rgba(212,169,58,0.10);
}
.next-steps li:last-child { border-bottom: none; }
.next-steps li span {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(212,169,58,0.15); color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
}

.order-summary {
  text-align: right;
  background: var(--black-soft);
  border: 1px solid rgba(212,169,58,0.15);
  border-radius: 12px;
  padding: 4px 16px;
  margin-bottom: 22px;
}
.order-summary summary { cursor: pointer; padding: 10px 0; font-weight: 700; color: var(--gold-light); }
.order-summary[open] summary { border-bottom: 1px solid rgba(212,169,58,0.12); margin-bottom: 6px; }
.order-summary > div { padding-bottom: 10px; }

.confirm-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.confirm-actions .btn { min-width: 160px; }

@media (max-width: 560px) {
  .confirm-card { padding: 26px 16px 20px; border-radius: 16px; }
  .confirm-card h1 { font-size: 22px; }
  .confirm-actions .btn { flex: 1; min-width: 0; }
}

/* ============================================================================
   Payment page (after checkout): InstaPay details + receipt upload
   ============================================================================ */
.pay-page { text-align: center; }
.pay-page .confirm-check { width: 64px; height: 64px; }
.pay-page h1 { margin-top: 10px; }
.pay-meta { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.pay-meta .order-no { margin-bottom: 0; }

.pay-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; font-weight: 800; font-size: 14px;
}
.pay-status .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.pay-status.waiting { background: rgba(240,160,60,0.14); color: #f0a03c; border: 1px solid rgba(240,160,60,0.4); }
.pay-status.waiting .dot { animation: pay-pulse 1.4s ease-in-out infinite; }
.pay-status.paid { background: rgba(212,169,58,0.16); color: var(--gold-light); border: 1px solid var(--gold); }
@keyframes pay-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

.amount-box {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--black-soft); border: 1px solid rgba(212,169,58,0.2);
  border-radius: 14px; padding: 14px 18px; margin-bottom: 14px; text-align: right;
}
.amount-box span { color: var(--text-dim); font-size: 14px; }
.amount-box strong { color: var(--gold-light); font-size: 26px; font-weight: 800; white-space: nowrap; }

.instapay-card {
  text-align: right; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(212,169,58,0.16), rgba(212,169,58,0.04));
  border: 1px solid rgba(212,169,58,0.45);
  border-radius: 16px; padding: 18px; margin-bottom: 18px;
}
.ip-line { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
.ip-number {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(0,0,0,0.35); border-radius: 12px; padding: 10px 12px;
}
.ip-label { font-weight: 700; flex-basis: 100%; font-size: 14px; color: var(--text-dim); }
.ip-value { direction: ltr; unicode-bidi: isolate; font-size: 24px; font-weight: 800; letter-spacing: 1px; color: var(--gold-light); flex: 1; text-align: right; }
.ip-number .copy-btn { width: 38px; height: 38px; }
.pay-apps-title { margin: 16px 0 8px; font-size: 13px; font-weight: 700; color: var(--text-dim); }
.pay-apps { display: flex; flex-direction: column; gap: 10px; }
.pay-method {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--text);
  background: var(--black-soft);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 12px 14px;
  transition: border-color .18s, background .18s, transform .12s;
}
.pay-method:hover { border-color: rgba(212,169,58,0.6); background: #1f1c16; }
.pay-method:active { transform: scale(.985); }
.pay-method:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.pm-logo {
  position: relative; flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; color: #fff;
}
.pm-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.pay-method.instapay .pm-logo { background: #4b2a82; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); }
.pay-method.vcash .pm-logo { background: #d80000; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); }
.pm-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pm-text strong { font-size: 16px; }
.pm-text small { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }
.pm-chev { flex-shrink: 0; color: var(--gold); transition: transform .18s; }
.pay-method:hover .pm-chev { transform: translateX(-3px); }
.pay-app-note {
  margin: 10px 0 0; padding: 10px 12px; border-radius: 10px;
  background: rgba(0,0,0,0.35); font-size: 13px; line-height: 1.8; color: var(--text);
}
.pay-app-note bdi { direction: ltr; unicode-bidi: isolate; font-weight: 800; color: var(--gold-light); }
@media (max-width: 380px) {
  .pay-apps { grid-template-columns: 1fr; }
}
.ip-policy { margin: 12px 0 0; font-size: 14px; color: var(--text-dim); line-height: 1.7; }

.receipt-box { text-align: right; border-top: 1px solid rgba(212,169,58,0.12); padding-top: 18px; margin-bottom: 20px; }
.receipt-box h2 { font-size: 18px; margin: 0 0 4px; color: var(--gold-light); }
.receipt-box > p { margin: 0 0 14px; font-size: 14px; }
.receipt-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  border: 2px dashed rgba(212,169,58,0.45); border-radius: 16px; padding: 24px 16px;
  cursor: pointer; background: rgba(212,169,58,0.04);
  transition: background .15s, border-color .15s, transform .15s;
}
.receipt-drop:hover, .receipt-drop.over { background: rgba(212,169,58,0.10); border-color: var(--gold); }
.receipt-drop:active { transform: scale(.99); }
.receipt-drop .rd-icon {
  width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(212,169,58,0.15); color: var(--gold-light); margin-bottom: 4px;
}
.receipt-drop strong { font-size: 16px; }
.receipt-drop .muted { font-size: 13px; }
.receipt-preview {
  display: flex; align-items: center; gap: 14px;
  background: var(--black-soft); border: 1px solid rgba(212,169,58,0.25);
  border-radius: 14px; padding: 10px; margin-bottom: 12px;
}
.receipt-preview img { width: 76px; height: 96px; object-fit: cover; border-radius: 10px; background: #000; flex-shrink: 0; }
.rp-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rp-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { background: none; border: none; padding: 0; color: var(--gold-light); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; text-align: right; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:disabled { opacity: .5; cursor: default; }
.upload-progress { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; margin-bottom: 12px; }
.upload-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: inherit; transition: width .25s ease; }

.paid-box {
  display: flex; align-items: center; gap: 14px; text-align: right;
  background: rgba(212,169,58,0.08); border: 1px solid rgba(212,169,58,0.4);
  border-radius: 16px; padding: 14px; margin-bottom: 16px;
  animation: confirm-in .5s ease both;
}
.paid-box img { width: 64px; height: 82px; object-fit: cover; border-radius: 10px; flex-shrink: 0; border: 1px solid rgba(212,169,58,0.4); }
.paid-box strong { display: block; font-size: 16px; margin-bottom: 4px; color: var(--gold-light); }
.paid-box p { margin: 0; font-size: 14px; line-height: 1.7; }
.next-steps li.done { color: var(--text); }
.next-steps li.done span { background: var(--gold); color: var(--black); }
.confirm-card.is-paid { border: 2px solid var(--gold); box-shadow: 0 0 0 1px rgba(212,169,58,0.25), 0 0 28px rgba(212,169,58,0.22); }

.wa-help {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid rgba(212,169,58,0.12); padding: 16px 0 4px; margin-bottom: 16px; text-align: right;
}
.wa-help > span { color: var(--text-dim); font-size: 14px; }
.wa-help .wa-contact-btn { margin-top: 0; }

/* Checkout: single payment method */
.pay-method-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(212,169,58,0.08); border: 1px solid rgba(212,169,58,0.35);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 16px;
}
.pay-method-icon { font-size: 22px; line-height: 1.2; }
.pay-method-card strong { display: block; margin-bottom: 2px; color: var(--gold-light); }
.pay-method-card p { margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.7; }

@media (max-width: 560px) {
  .amount-box strong { font-size: 22px; }
  .ip-value { font-size: 22px; }
  .wa-help { justify-content: center; text-align: center; }
}

/* Order statuses (payment flow) */
.status-awaiting_payment { background: rgba(240,160,60,0.18); color: #f0a03c; }
.card.paid-card { border: 2px solid var(--gold); box-shadow: 0 0 18px rgba(212,169,58,0.18); }
.status-paid { background: rgba(212,169,58,0.25); color: var(--gold-light); }

/* ---- Product photo gallery ---- */
.gallery { min-width: 0; }
.zoom-frame { position: relative; }
.photo-count {
  position: absolute; bottom: 12px; right: 12px; z-index: 2;
  background: rgba(0,0,0,0.6); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; direction: ltr;
}
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.thumb-btn {
  flex-shrink: 0; width: 64px; height: 64px; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; background: var(--black-soft); opacity: .65;
  transition: opacity .15s, border-color .15s;
}
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-btn:hover { opacity: .9; }
.thumb-btn.active { border-color: var(--gold); opacity: 1; }
.thumb-btn:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.5); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lb-nav:hover { background: rgba(0,0,0,0.75); }
.lb-prev { right: 14px; }
.lb-next { left: 14px; }
.lb-count {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 14px; font-weight: 700; background: rgba(0,0,0,0.5);
  padding: 4px 12px; border-radius: 999px; direction: ltr;
}
.lightbox img { transition: transform .2s ease; }

/* ---- Fixed-size items (e.g. olive oil 1 لتر) ---- */
.size-chip {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid rgba(212,169,58,0.45); color: var(--gold-light);
  font-weight: 800; font-size: 15px; background: rgba(212,169,58,0.06);
}
.product-card .size-chip { width: 100%; }
.size-chip.big { height: 48px; font-size: 17px; padding: 0 26px; }

/* ---- Home hero: headline + short line + feature badges ---- */
.hero { padding: 44px 16px 28px; }
.hero h1 { letter-spacing: -0.3px; }
.hero .hero-sub { font-size: 16px; margin: 0 auto 22px; max-width: 460px; }
.hero-features {
  list-style: none; padding: 0; margin: 0 auto; max-width: 620px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.hero-features li {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(212,169,58,0.18);
  border-radius: 14px; padding: 14px 8px 12px;
}
.hf-icon {
  width: 42px; height: 42px; border-radius: 50%; margin-bottom: 4px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(212,169,58,0.12); color: var(--gold-light);
}
.hero-features strong { font-size: 14px; color: var(--text); }
.hero-features small { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

/* ---- Shop toolbar: heading + count + sort, category chips ---- */
.shop-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 8px 0 12px;
}
.shop-heading { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.shop-heading h2 { margin: 0; font-size: 20px; color: var(--gold-light); white-space: nowrap; }
.shop-count { font-size: 13px; color: var(--text-dim); white-space: nowrap; }
.sort-control {
  position: relative; display: flex; align-items: center; flex-shrink: 0;
  color: var(--gold-light);
}
.sort-control > svg { position: absolute; right: 12px; pointer-events: none; }
.sort-control select {
  width: auto; height: 40px; padding: 0 36px 0 38px; border-radius: 999px;
  font-size: 13px; font-weight: 700; background-color: var(--black-card);
  background-position: left 12px center;
}
.category-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; margin-bottom: 4px; scrollbar-width: none; }
.category-chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; height: 36px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(212,169,58,0.3); background: transparent; color: var(--text-dim);
  font: inherit; font-size: 14px; font-weight: 700; transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--gold); color: var(--text); }
.chip.active { background: var(--gold); border-color: var(--gold); color: #1a1407; }
.chip:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 560px) {
  .hero { padding: 30px 14px 20px; }
  .hero .hero-sub { font-size: 14.5px; margin-bottom: 18px; }
  .hero-features { gap: 8px; }
  .hero-features li { padding: 12px 4px 10px; border-radius: 12px; }
  .hf-icon { width: 36px; height: 36px; }
  .hf-icon svg { width: 19px; height: 19px; }
  .hero-features strong { font-size: 12.5px; }
  .hero-features small { font-size: 11px; }
  .shop-heading h2 { font-size: 18px; }
  .sort-control select { height: 38px; font-size: 12.5px; padding: 0 32px 0 34px; }
}

/* ---- Weight options (replaces the − / + capsule) ---- */
.weight-options { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 6px; width: 100%; margin: 6px 0 2px; }
.wopt {
  height: 36px; padding: 0 4px; border-radius: 10px; cursor: pointer; white-space: nowrap;
  border: 1px solid rgba(212,169,58,0.3); background: rgba(255,255,255,0.02);
  color: var(--text-dim); font: inherit; font-size: 13px; font-weight: 700;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.wopt:hover { border-color: var(--gold); color: var(--text); }
.wopt.active {
  background: linear-gradient(135deg, #f3cf72, var(--gold));
  border-color: var(--gold); color: #1a1407; font-weight: 800;
  box-shadow: 0 0 0 3px rgba(212,169,58,0.18), 0 4px 12px rgba(212,169,58,0.25);
}
.wopt:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.weight-options.big { max-width: 420px; gap: 8px; margin: 0; }
.weight-options.big .wopt { height: 46px; font-size: 15px; border-radius: 12px; }
.price .price-for { font-size: .72em; font-weight: 800; color: var(--text); opacity: .85; margin-inline-start: 2px; white-space: nowrap; }
.product-detail .weight-row { flex-wrap: wrap; }
@media (max-width: 560px) {
  .product-card .weight-options { gap: 4px; }
  .product-card .wopt { height: 34px; font-size: 12px; padding: 0 2px; }
  .product-card .price .price-for { font-size: 13px; }
  .weight-options.big .wopt { height: 44px; font-size: 14px; }
}

/* ============================================================================
   Cart page
   ============================================================================ */
.cart-page { padding-bottom: 56px; }
.cart-head { display: flex; align-items: baseline; gap: 12px; margin: 28px 0 18px; }
.cart-head h1 { margin: 0; color: var(--gold-light); font-size: 26px; }
.cart-count { color: var(--text-dim); font-size: 15px; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.cart-items { display: grid; gap: 14px; }

.citem {
  display: flex; gap: 14px; padding: 12px;
  background: var(--black-card); border: 1px solid rgba(212,169,58,0.18); border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.citem-img {
  flex-shrink: 0; width: 96px; height: 96px; border-radius: 12px; overflow: hidden;
  background: var(--black-soft);
}
.citem-img img { width: 100%; height: 100%; object-fit: cover; }
.citem-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.citem-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.citem-name { font-weight: 800; font-size: 16px; line-height: 1.5; color: var(--text); }
.citem-name:hover { color: var(--gold-light); }
.citem-remove {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid rgba(224,82,82,0.35); color: #e88080;
  transition: background .15s, color .15s, border-color .15s;
}
.citem-remove:hover { background: rgba(224,82,82,0.12); border-color: var(--danger); color: #ff9b9b; }
.citem-chip {
  align-self: flex-start; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: rgba(212,169,58,0.1); color: var(--gold-light); border: 1px solid rgba(212,169,58,0.25);
}
.citem-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.citem-stepper { flex: 0 0 auto; }
.citem-stepper button:first-child svg { color: inherit; }
.citem-price { text-align: left; display: flex; flex-direction: column; align-items: flex-end; }
.citem-price strong { color: var(--gold-light); font-size: 17px; white-space: nowrap; }
.citem-price small { color: var(--text-dim); font-size: 12px; white-space: nowrap; }

.cart-summary {
  position: sticky; top: 84px;
  background: var(--black-card); border: 1px solid rgba(212,169,58,0.25); border-radius: 16px;
  padding: 18px 18px 14px; box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.cart-summary h2 { margin: 0 0 10px; font-size: 18px; color: var(--gold-light); }
.cart-summary .btn { margin-top: 14px; }
.continue-link { display: block; text-align: center; margin-top: 10px; color: var(--text-dim); font-size: 14px; font-weight: 700; }
.continue-link:hover { color: var(--gold-light); }

.cart-empty {
  grid-column: 1 / -1; text-align: center; padding: 48px 16px;
  background: var(--black-card); border: 1px dashed rgba(212,169,58,0.3); border-radius: 16px;
}
.cart-empty-icon {
  width: 76px; height: 76px; margin: 0 auto 10px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(212,169,58,0.1); color: var(--gold-light);
}
.cart-empty p { color: var(--text-dim); margin: 0 0 16px; font-size: 16px; }

.undo-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #262015; border: 1px solid rgba(212,169,58,0.45); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 14px; font-size: 14px;
}
.undo-btn {
  flex-shrink: 0; background: none; border: none; cursor: pointer; font: inherit; font-weight: 800;
  color: var(--gold-light); text-decoration: underline; text-underline-offset: 4px; padding: 4px;
}

@media (max-width: 860px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}
@media (max-width: 560px) {
  .cart-head { margin: 20px 0 14px; }
  .cart-head h1 { font-size: 22px; }
  .citem { gap: 12px; padding: 10px; }
  .citem-img { width: 80px; height: 80px; }
  .citem-name { font-size: 15px; }
  .citem-remove { width: 34px; height: 34px; }
  .citem-price strong { font-size: 16px; }
}

/* The HTML "hidden" attribute must always win over display rules above. */
[hidden] { display: none !important; }

/* ============================================================================
   Floating WhatsApp "تواصل معنا" button
   ============================================================================ */
.wa-fab {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 20px 0 16px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.45), 0 0 0 0 rgba(37,211,102,0.5);
  transition: transform .15s ease, background .15s ease;
  animation: wa-pulse 2.8s ease-out 1.5s 2;
}
.wa-fab:hover { background: #1ebe5b; transform: translateY(-2px); color: #fff; }
.wa-fab:active { transform: scale(.97); }
.wa-fab:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; }
@keyframes wa-pulse {
  0%   { box-shadow: 0 8px 22px rgba(0,0,0,0.45), 0 0 0 0 rgba(37,211,102,0.55); }
  70%  { box-shadow: 0 8px 22px rgba(0,0,0,0.45), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 8px 22px rgba(0,0,0,0.45), 0 0 0 0 rgba(37,211,102,0); }
}
@media (prefers-reduced-motion: reduce) { .wa-fab { animation: none; } }

/* ---- Floating "إتمام الطلب" (bottom-right, only when the cart has items) ---- */
.checkout-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 150;
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 12px 0 20px; border-radius: 999px;
  background: linear-gradient(135deg, #f3cf72, var(--gold) 55%, #b88a22);
  color: #1a1407; text-decoration: none;
  box-shadow: 0 8px 22px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.35);
  transform: translateY(140%); opacity: 0; pointer-events: none;
  transition: transform .35s cubic-bezier(.2,.9,.3,1.2), opacity .25s ease, filter .15s;
}
.checkout-fab.show { transform: none; opacity: 1; pointer-events: auto; }
.checkout-fab:hover { filter: brightness(1.06); color: #1a1407; }
.checkout-fab:active { transform: scale(.97); }
.checkout-fab:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; }
.checkout-fab.bump { animation: cf-bump .45s ease; }
@keyframes cf-bump { 0%,100% { transform: none; } 40% { transform: scale(1.08); } }
.cf-icon {
  position: relative; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26,20,7,0.12);
}
.cf-count {
  position: absolute; top: -4px; left: -4px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: #1a1407; color: var(--gold-light);
  font-size: 11px; font-weight: 800; line-height: 19px; text-align: center;
  box-shadow: 0 0 0 2px #e9c160;
}
.cf-text { display: flex; flex-direction: column; line-height: 1.15; }
.cf-text strong { font-size: 15px; font-weight: 800; }
.cf-text small { font-size: 12px; font-weight: 700; opacity: .8; }
@media (prefers-reduced-motion: reduce) { .checkout-fab, .checkout-fab.bump { transition: none; animation: none; } }
body.has-checkout-fab .site-footer { padding-bottom: 90px; }

/* Keep the button from covering the end of the page or the cart toast */
body.has-wa-fab .site-footer { padding-bottom: 90px; }
@media (max-width: 560px) {
  .wa-fab { left: 14px; bottom: 14px; height: 48px; padding: 0 16px 0 13px; font-size: 14px; }
  .cart-toast { bottom: 74px; }
  .checkout-fab { right: 14px; bottom: 14px; height: 48px; padding: 0 10px 0 16px; gap: 8px; }
  .cf-icon { width: 32px; height: 32px; }
  .cf-text strong { font-size: 14px; }
}

/* ============================================================================
   "آراء العملاء" — side tab + reviews viewer (Facebook videos/posts)
   ============================================================================ */
.reviews-tab {
  position: fixed; right: 0; top: 50%; z-index: 140;
  transform: translateY(-50%);
  display: flex; align-items: center; gap: 8px;
  writing-mode: vertical-rl;
  padding: 16px 9px 14px;
  border: 1px solid rgba(255,255,255,0.28); border-right: none;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, #f3cf72, var(--gold) 55%, #b88a22);
  color: #1a1407; font: inherit; font-size: 15px; font-weight: 800; letter-spacing: .3px;
  cursor: pointer;
  box-shadow: -4px 6px 18px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.35);
  animation: rv-tab-in .6s cubic-bezier(.2,.9,.3,1.2) .8s both;
  transition: padding .2s ease, filter .15s;
}
.reviews-tab svg { transform: rotate(90deg); flex-shrink: 0; }
.reviews-tab:hover { filter: brightness(1.06); padding-left: 12px; }
.reviews-tab:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; }
@keyframes rv-tab-in { from { transform: translate(100%, -50%); } to { transform: translate(0, -50%); } }

html.rv-lock, html.rv-lock body { overflow: hidden; }

.rv-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.78);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .2s ease;
}
.rv-overlay[hidden] { display: none; }
.rv-overlay.open { opacity: 1; }
.rv-sheet {
  position: relative; display: flex; flex-direction: column;
  width: min(580px, 94vw); height: min(90vh, 920px);
  background: var(--black-soft); color: var(--text);
  border: 1px solid rgba(212,169,58,0.38); border-radius: 20px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,0,0,0.4);
  transform: translateY(14px) scale(.98); transition: transform .25s ease;
}
.rv-overlay.open .rv-sheet { transform: none; }

.rv-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px 10px 10px; border-bottom: 1px solid rgba(255,255,255,0.07);
}
.rv-head h2 {
  display: flex; align-items: center; gap: 8px; margin: 0; flex: 1; min-width: 0;
  font-size: 19px; color: var(--gold-light);
}
.rv-count {
  font-size: 14px; font-weight: 800; color: var(--text-dim);
  padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,0.06);
  direction: ltr; white-space: nowrap;
}
.rv-close {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text); font-size: 18px; cursor: pointer;
}
.rv-close:hover { background: rgba(255,255,255,0.12); }
.rv-progress { height: 3px; background: rgba(255,255,255,0.06); }
.rv-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #b88a22, var(--gold-light)); transition: width .3s ease; margin-inline-start: 0; }

.rv-track {
  flex: 1; min-height: 0; display: flex;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior: contain;
  scrollbar-width: none; outline: none;
}
.rv-track::-webkit-scrollbar { display: none; }
.rv-slide {
  flex: 0 0 100%; min-width: 0; height: 100%;
  scroll-snap-align: center; scroll-snap-stop: always;
  overflow-x: hidden; overflow-y: auto;
  overscroll-behavior-x: auto; overscroll-behavior-y: contain; /* sideways swipes pass on to the track */
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 16px 12px 20px;
}
.rv-slide > * { flex-shrink: 0; }
.rv-slide { scrollbar-width: none; }
.rv-slide::-webkit-scrollbar { display: none; }
.rv-embed {
  width: 100%; max-width: 540px; min-height: 240px;
  display: flex; justify-content: center; align-items: flex-start;
}
.rv-embed .fbx-holder { width: 100%; display: flex; justify-content: center; }
.rv-embed iframe { max-width: 100%; border-radius: 10px; background: #fff; }
.fbx-loading {
  align-self: center; display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--text-dim); font-size: 15px; padding: 60px 0;
}
.fbx-spin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(212,169,58,0.25); border-top-color: var(--gold);
  animation: fbx-spin .8s linear infinite;
}
@keyframes fbx-spin { to { transform: rotate(360deg); } }
.fbx-missing {
  display: grid; gap: 6px; text-align: center; padding: 28px 16px; border-radius: 12px;
  border: 1px dashed rgba(224,82,82,0.6); color: var(--text-dim); width: 100%;
}
.fbx-missing strong { color: var(--danger); }
.rv-caption { margin: 0; text-align: center; color: var(--text); font-weight: 700; font-size: 16px; line-height: 1.7; max-width: 500px; }
.rv-open { color: var(--gold-light); font-size: 14px; font-weight: 700; }

.rv-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,0.07);
}
.rv-nav {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 46px; padding: 0 16px; border-radius: 12px;
  background: transparent; border: 1.5px solid rgba(212,169,58,0.55);
  color: var(--gold-light); font: inherit; font-weight: 800; font-size: 15px; cursor: pointer;
}
.rv-nav:hover:not(:disabled) { background: rgba(212,169,58,0.12); }
.rv-nav:disabled { opacity: .3; cursor: default; }
.rv-next { background: linear-gradient(135deg, #f3cf72, var(--gold) 55%, #b88a22); color: #1a1407; border-color: transparent; }
.rv-next:hover:not(:disabled) { background: linear-gradient(135deg, #f3cf72, var(--gold) 55%, #b88a22); filter: brightness(1.06); }
.rv-more { flex: 1; text-align: center; color: var(--text-dim); font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.rv-more:hover { color: var(--gold-light); }

@media (max-width: 560px) {
  .reviews-tab { font-size: 13px; padding: 13px 7px 11px; gap: 6px; }
  .reviews-tab svg { width: 14px; height: 14px; }
  .rv-overlay { align-items: stretch; }
  .rv-sheet { width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: none; }
  .rv-head h2 { font-size: 18px; }
  .rv-slide { padding: 12px 5px 18px; }
  .rv-nav { padding: 0 12px; }
  .rv-nav span { display: none; }
  .rv-nav { width: 52px; justify-content: center; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .reviews-tab { animation: none; }
  .rv-story, .rv-ph img { transition: none; }
  .rv-overlay, .rv-sheet, .rv-progress span { transition: none; }
}

/* ---- Reviews viewer: videos | photos tabs ---- */
.rv-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin: 10px 12px 0; padding: 4px; border-radius: 14px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
}
.rv-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; border: none; border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--text-dim); font: inherit; font-weight: 800; font-size: 15px;
  transition: background .2s, color .2s;
}
.rv-tab b {
  min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08); font-size: 12px;
}
.rv-tab[aria-selected="true"] {
  background: linear-gradient(135deg, #f3cf72, var(--gold) 55%, #b88a22); color: #1a1407;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.rv-tab[aria-selected="true"] b { background: rgba(26,20,7,0.16); }
.rv-tab:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }
.rv-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rv-panel[hidden] { display: none; }

/* ---- Photos wall (masonry) ---- */
.rv-photos { overflow-y: auto; overscroll-behavior: contain; padding: 12px 12px 20px; }
.rv-wall-lead { margin: 0 0 12px; text-align: center; color: var(--text-dim); font-size: 14px; }
.rv-wall-lead strong { color: var(--gold-light); font-size: 16px; }
.rv-wall { columns: 2; column-gap: 10px; }
.rv-ph {
  display: block; width: 100%; margin: 0 0 10px; padding: 0; break-inside: avoid;
  border: 1px solid rgba(212,169,58,0.35); border-radius: 12px; overflow: hidden; cursor: zoom-in;
  background: #222; box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  transition: transform .15s ease, border-color .15s;
}
.rv-ph img { display: block; width: 100%; height: auto; min-height: 60px; background: #222; }
.rv-ph:hover { border-color: var(--gold); transform: translateY(-2px); }
.rv-ph:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }
@media (min-width: 561px) { .rv-wall { columns: 3; } }

/* ---- Story-style photo view ---- */
.rv-story {
  position: fixed; inset: 0; z-index: 320;
  display: flex; flex-direction: column;
  background: #050505; color: #fff;
  opacity: 0; transition: opacity .2s ease;
}
.rv-story[hidden] { display: none; }
.rv-story.open { opacity: 1; }
.st-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  padding: calc(10px + env(safe-area-inset-top)) 12px 18px;
  background: linear-gradient(180deg, rgba(0,0,0,0.7), transparent);
}
.st-bar { height: 3px; border-radius: 999px; background: rgba(255,255,255,0.25); overflow: hidden; }
.st-bar span { display: block; height: 100%; width: 0; background: var(--gold-light); }
.st-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.st-count { font-weight: 800; font-size: 14px; direction: ltr; }
.st-paused { font-size: 13px; font-weight: 700; color: var(--gold-light); }
.st-close {
  margin-inline-start: auto; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: none; color: #fff; font-size: 18px; cursor: pointer;
}
.st-stage {
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  padding: calc(70px + env(safe-area-inset-top)) 10px calc(40px + env(safe-area-inset-bottom));
}
.st-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; pointer-events: none; transition: opacity .2s; }
.rv-story.loading .st-img { opacity: .15; }
.st-spin { position: absolute; top: 50%; left: 50%; margin: -17px 0 0 -17px; display: none; }
.rv-story.loading .st-spin { display: block; }
.st-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18); color: #fff;
}
.st-nav:hover:not(:disabled) { background: rgba(212,169,58,0.35); }
.st-nav:disabled { opacity: .25; cursor: default; }
.st-prev { right: 18px; }
.st-next { left: 18px; }
.st-hint {
  position: absolute; bottom: calc(12px + env(safe-area-inset-bottom)); left: 0; right: 0; margin: 0;
  text-align: center; font-size: 13px; color: rgba(255,255,255,0.55); pointer-events: none;
}
/* Phones: tapping the sides is the navigation, so the arrow buttons go. */
@media (hover: none) and (pointer: coarse) { .st-nav { display: none; } }
@media (max-width: 560px) {
  .rv-tabs { margin: 8px 8px 0; }
  .rv-tab { font-size: 14px; gap: 5px; }
  .rv-photos { padding: 10px 8px 18px; }
  .rv-wall { column-gap: 8px; }
  .rv-ph { margin-bottom: 8px; }
}

/* Short (landscape) embeds sit in the middle of the slide; tall ones start at the top. */
.rv-slide::before, .rv-slide::after { content: ""; flex: 1 1 0; min-height: 0; }
.rv-slide::before, .rv-slide::after { flex-shrink: 1; }
.rv-embed { min-height: 200px; transition: height .2s ease; }
.rv-embed .fbx-holder { will-change: transform; }

/* When the browser blocks Facebook (e.g. Brave Shields, ad blockers):
   the Facebook button becomes the main action. */
.rv-blocked { display: none; margin: 0; text-align: center; color: var(--text-dim); font-size: 14px; max-width: 360px; }
.rv-slide:has(.fbx-nosdk) .rv-blocked { display: block; }
.rv-slide:has(.fbx-nosdk) .rv-open {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px;
  border-radius: 12px; font-size: 15px; font-weight: 800; color: #1a1407;
  background: linear-gradient(135deg, #f3cf72, var(--gold) 55%, #b88a22);
}

/* Backup video player (used when Facebook can't play the video) */
.rv-embed.fbx-native { align-items: center; }
.rv-embed video {
  display: block; max-width: 100%; border-radius: 12px; background: #000;
  border: 1px solid rgba(212,169,58,0.35); box-shadow: 0 8px 24px rgba(0,0,0,0.45); object-fit: contain;
}

/* ---- Floating "السلة" button: dark honey-brown (less gold on screen) ---- */
.checkout-fab {
  background: linear-gradient(135deg, #5a3615, #3d2310 60%, #2a170a);
  color: #f6e7c8;
  border: 1px solid rgba(212,169,58,0.45);
  box-shadow: 0 8px 22px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,220,160,0.12);
}
.checkout-fab:hover { color: #fff3dc; filter: brightness(1.12); }
.checkout-fab .cf-icon { background: rgba(240,200,105,0.14); color: var(--gold-light); }
.checkout-fab .cf-count { background: var(--gold-light); color: #2a170a; box-shadow: 0 0 0 2px #3d2310; }
.checkout-fab .cf-text small { color: var(--gold-light); opacity: .95; }

/* ---- Checkout: account note, password field, locked fields ---- */
.account-note {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px;
  margin-bottom: 18px; padding: 10px 14px; border-radius: 12px;
  background: rgba(76,175,125,0.1); border: 1px solid rgba(76,175,125,0.35); font-size: 14px;
}
.account-note[hidden] { display: none; }
.account-note a { color: var(--gold-light); font-weight: 700; }
.account-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.btn-link { margin-inline-start: auto; background: none; border: none; padding: 4px 0; font: inherit; font-size: 13px; color: var(--text-dim); text-decoration: underline; cursor: pointer; }
.btn-link:hover { color: var(--text); }
.label-note { font-weight: 600; color: var(--text-dim); opacity: .8; margin-inline-start: 4px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-left: 76px; }
.pw-toggle {
  position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
  min-height: 34px; padding: 0 10px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: var(--text-dim);
  font: inherit; font-size: 13px; font-weight: 700;
}
#passwordField .hint a { color: var(--gold-light); font-weight: 700; }
input.locked { opacity: .75; cursor: not-allowed; background: rgba(255,255,255,0.03); }
.locked-hint { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.account-note.other { background: rgba(240,160,60,0.1); border-color: rgba(240,160,60,0.4); }
.account-note.other .account-dot { background: #f0a03c; }
.recog { color: var(--success); font-weight: 800; }
.form-field.is-recognized input { opacity: .6; }
.form-field.is-recognized input::placeholder { color: var(--text-dim); }
