/* Cart modal — supplements Tailwind utilities used inline in the markup. */

/* ------------------------------------------------------------------ */
/* Shared modal shell (matches the dashboard "media library" modal):  */
/*   - White rounded panel with subtle 1px border + drop shadow        */
/*   - Blurred dark backdrop with pop-in animation                     */
/*   - Plain white header (no colored bar) + clean footer              */
/* Applied to cart modal AND product modal so both modals look the     */
/* same as the dashboard media library modal.                          */
/* ------------------------------------------------------------------ */

.shell-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: shell-fade-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.shell-modal.is-open {
  display: flex;
}

.shell-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.shell-modal__panel {
  position: relative;
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100vh - 40px);
  animation: shell-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: inherit;
  /* `direction` is inherited from the modal wrapper which is set
     server-side based on is_rtl(). */
}

.shell-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  background: #ffffff;
  flex-shrink: 0;
}

.shell-modal__title {
  font-size: 17px;
  font-weight: 900;
  color: #111827;
  margin: 0;
}

.shell-modal__close {
  background: transparent;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}
.shell-modal__close:hover {
  background: #f3f4f6;
  color: #374151;
}

.shell-modal__body {
  flex: 1;
  overflow-y: auto;
  background: #ffffff;
  padding: 20px;
  min-height: 0;
}

.shell-modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #f3f4f6;
  background: #ffffff;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Shared modal buttons (mirror dashboard .btn variants). */
.shell-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  font-family: inherit;
  line-height: 1.2;
  white-space: nowrap;
}
.shell-btn--primary {
  background: var(--primary, #d97706);
  color: #ffffff;
  border-color: var(--primary, #d97706);
}
.shell-btn--primary:hover:not(:disabled) {
  background: var(--primary-hover, #b45309);
  border-color: var(--primary-hover, #b45309);
}
.shell-btn--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.shell-btn--ghost {
  background: #ffffff;
  color: #374151;
  border-color: #d1d5db;
}
.shell-btn--ghost:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}
.shell-btn--danger-ghost {
  background: #ffffff;
  color: #ef4444;
  border-color: #fecaca;
}
.shell-btn--danger-ghost:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #ef4444;
}
.shell-btn--danger {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}
.shell-btn--danger:hover:not(:disabled) {
  background: #b91c1c;
  border-color: #b91c1c;
}
.shell-btn--block {
  width: 100%;
}

/* Sticky quick cart bar, shown only while the cart has items. */
.quick-cart-bar {
  position: fixed;
  left: 50%;
  inset-block-end: calc(14px + env(safe-area-inset-bottom));
  z-index: 2147483639;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: min(760px, calc(100vw - 28px));
  padding: 6px;
  background: #2f2b2b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.quick-cart-bar.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
html.cart-open .quick-cart-bar,
html.no-scroll .quick-cart-bar {
  display: none;
}
.quick-cart-bar__summary,
.quick-cart-bar__checkout {
  appearance: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
.quick-cart-bar__summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  padding: 6px 10px;
  background: #c8efd7;
  color: #1f2937;
  border-radius: 7px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}
.quick-cart-bar__cart-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  flex: 0 0 auto;
}
.quick-cart-bar__cart-icon svg {
  width: 20px;
  height: 20px;
}
.quick-cart-bar__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.quick-cart-bar__text strong {
  color: #047857;
  margin-inline-start: 4px;
}
.quick-cart-bar__checkout {
  position: relative;
  overflow: hidden;
  min-height: 34px;
  padding: 6px 12px;
  background: #16a34a;
  color: #ffffff;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 0 0 0 rgba(22, 163, 74, 0.48);
  animation: quick-cart-checkout-pulse 1.8s ease-in-out infinite;
}
.quick-cart-bar__checkout::after {
  content: "";
  position: absolute;
  inset-block: -40%;
  inset-inline-start: -70%;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-18deg);
  animation: quick-cart-checkout-shine 2.6s ease-in-out infinite;
  pointer-events: none;
}
.quick-cart-bar__summary:hover,
.quick-cart-bar__summary:focus-visible {
  background: #d8f7e3;
  outline: none;
}
.quick-cart-bar__checkout:hover,
.quick-cart-bar__checkout:focus-visible {
  background: #15803d;
  outline: none;
}

@keyframes quick-cart-checkout-pulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 0 0 0 rgba(22, 163, 74, 0.46);
  }
  50% {
    transform: translateY(-1px) scale(1.035);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 0 0 7px rgba(22, 163, 74, 0);
  }
}

@keyframes quick-cart-checkout-shine {
  0%, 45% {
    inset-inline-start: -70%;
  }
  70%, 100% {
    inset-inline-start: 130%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quick-cart-bar__checkout,
  .quick-cart-bar__checkout::after {
    animation: none;
  }
}

@media (max-width: 1023px) {
  .quick-cart-bar {
    inset-block-end: calc(76px + env(safe-area-inset-bottom));
    width: min(680px, calc(100vw - 20px));
  }
  body.has-quick-cart .floating-social-stack,
  body.has-quick-cart > .whatsapp-support-widget {
    bottom: calc(148px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .quick-cart-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
    padding: 5px;
  }
  .quick-cart-bar__summary {
    gap: 5px;
    padding-inline: 6px;
  }
  .quick-cart-bar__text,
  .quick-cart-bar__checkout {
    font-size: 12px;
  }
  .quick-cart-bar__checkout {
    padding-inline: 8px;
  }
}

@keyframes shell-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes shell-pop {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* Cart modal — width tuning on top of the shared shell. */
.cart-modal .shell-modal__panel {
  max-width: 640px;
}

.step-pane.hidden {
  display: none;
}
.cart-modal .hidden {
  display: none !important;
}
.step-pane {
  display: block;
}

html.cart-open,
html.cart-open body {
  overflow: hidden;
}

/* Cart line item row */
.cart-line {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 12px;
  align-items: center;
  background: #f9fafb;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 12px;
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.cart-line--leaving {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}
.cart-line__img {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f4f6;
}
.cart-line__name {
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}
.cart-line__price {
  color: #059669;
  font-weight: 800;
  margin-bottom: 8px;
}
.qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 4px 8px;
  background: #fff;
}
.qty button {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  color: #374151;
}
.qty span {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
}
.qty input[type="number"] {
  width: 44px;
  min-width: 44px;
  border: 0;
  background: transparent;
  text-align: center;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  outline: none;
  -moz-appearance: textfield;
}
.qty input[type="number"]::-webkit-outer-spin-button,
.qty input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ────────────────────────────────────────────────────────────────
 *  Product modal: editable qty input + quick-pick chips
 *
 *  Customers needing 100+ units shouldn't have to:
 *    a) hammer the "+" button 99 times, or
 *    b) guess that the small "1" between +/- is actually typeable.
 *
 *  We solve both:
 *    1.  `.qty--editable` gives the input a subtle field affordance
 *        (light fill + focus ring) so it visibly accepts typing.
 *    2.  `.qty-chip` rows expose one-tap shortcuts (5/10/50/100/MAX),
 *        filtered against the real `max_qty` so we never promise an
 *        amount the store can't fulfil.
 * ──────────────────────────────────────────────────────────────── */
.qty.qty--editable {
  padding: 5px 6px;
}
.qty.qty--editable input[type="number"] {
  width: 64px;
  min-width: 64px;
  padding: 6px 4px;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  background: #f9fafb;
  cursor: text;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.qty.qty--editable input[type="number"]:hover {
  border-color: var(--cart-primary, var(--primary, #d97706));
  background: #fff;
}
.qty.qty--editable input[type="number"]:focus {
  border-style: solid;
  border-color: var(--cart-primary, var(--primary, #d97706));
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cart-primary, var(--primary, #d97706)) 18%, transparent);
}
.qty.qty--cart input[type="number"] {
  width: 54px;
  min-width: 54px;
}

.product-qty-quickpick {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-qty-hint {
  margin: 0;
  font-size: 12.5px;
  color: #6b7280;
  font-weight: 700;
  line-height: 1.5;
}
.product-qty-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.qty-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 44px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-weight: 800;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: all .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.qty-chip:hover {
  border-color: var(--cart-primary, var(--primary, #d97706));
  color: var(--cart-primary, var(--primary, #b45309));
  transform: translateY(-1px);
}
.qty-chip:active { transform: translateY(0); }
.qty-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cart-primary, var(--primary, #d97706)) 28%, transparent);
}
.qty-chip.is-active {
  background: var(--cart-primary, var(--primary, #d97706));
  border-color: var(--cart-primary, var(--primary, #d97706));
  color: #fff;
}
.qty-chip.is-active:hover {
  /* When active, hover should *deepen* the brand color, not invert it
     to white-on-white. */
  background: var(--cart-primary-hover, var(--primary-hover, #b45309));
  border-color: var(--cart-primary-hover, var(--primary-hover, #b45309));
  color: #fff;
}
.qty-chip--max {
  flex-direction: row;
  gap: 6px;
  padding: 6px 14px;
  border-style: dashed;
  font-weight: 700;
}
.qty-chip--max .qty-chip__label {
  font-size: 11.5px;
  letter-spacing: 0.01em;
  font-weight: 700;
  color: inherit;
  opacity: 0.85;
}
.qty-chip--max .qty-chip__value {
  font-size: 13.5px;
  font-weight: 800;
  color: inherit;
}
.qty-chip--max.is-active {
  border-style: solid;
}
.qty-chip--max.is-active .qty-chip__label { opacity: 1; }
.cart-line__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.cart-line__remove {
  color: #ef4444;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.cart-empty-state,
.cart-loading {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 34px 18px;
  text-align: center;
  color: #6b7280;
  background: #fffbeb;
  border: 1px dashed #f3c56b;
  border-radius: 18px;
}
.cart-loading {
  min-height: 140px;
  align-content: center;
  font-weight: 800;
  color: #92400e;
}
.cart-empty-state__icon {
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  color: #d97706;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.cart-empty-state h3 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
}
.cart-empty-state p {
  max-width: 320px;
  margin: 0;
  line-height: 1.7;
}
.cart-empty-state .shell-btn {
  max-width: 260px;
}
.cart-modal #cart-coupon-code {
  font-size: 16px;
}
.shipment-options {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
}
.shipment-options__title {
  margin: 0 0 10px;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
}
.shipment-options__list {
  display: grid;
  gap: 8px;
}
.shipment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.shipment-option.is-selected {
  border-color: var(--primary, #d97706);
  background: #fffbeb;
  box-shadow: 0 12px 28px -24px rgba(217, 119, 6, 0.9);
}
.shipment-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary, #d97706);
  flex-shrink: 0;
}
.shipment-option span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.shipment-option strong {
  color: #111827;
  font-size: 14px;
}
.shipment-option small {
  color: #059669;
  font-size: 13px;
  font-weight: 900;
}

/* Field error visibility helper */
.field-error:not(.hidden) {
  display: block;
}

.checkout-select-wrap {
  position: relative;
}
.checkout-select {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  padding-inline-end: 44px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, color-mix(in srgb, var(--cart-primary, var(--primary, #d97706)) 28%, #e5e7eb), #e5e7eb) border-box;
  color: #111827;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: start;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.checkout-select:hover {
  border-color: color-mix(in srgb, var(--cart-primary, var(--primary, #d97706)) 45%, #d1d5db);
}
.checkout-select:focus {
  border-color: var(--cart-primary, var(--primary, #d97706));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cart-primary, var(--primary, #d97706)) 16%, transparent);
}
.checkout-select-wrap__icon {
  position: absolute;
  inset-inline-end: 14px;
  top: 50%;
  display: inline-flex;
  color: #6b7280;
  pointer-events: none;
  transform: translateY(-50%);
}
.checkout-select:focus + .checkout-select-wrap__icon {
  color: var(--cart-primary, var(--primary, #d97706));
}

@media (max-width: 520px) {
  .cart-modal.shell-modal {
    align-items: flex-end;
    padding: 0;
  }

  .cart-modal .shell-modal__backdrop {
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .cart-modal .shell-modal__panel {
    width: 100%;
    max-width: none;
    max-height: min(86vh, 740px);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -20px 48px -20px rgba(15, 23, 42, 0.42);
    animation: product-sheet-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .cart-modal .shell-modal__panel::before {
    content: "";
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: #d1d5db;
    margin: 8px auto 2px;
    flex-shrink: 0;
  }

  .cart-modal .shell-modal__head {
    padding: 8px 18px 12px;
    border-bottom: 0;
    justify-content: center;
  }

  .cart-modal .shell-modal__title {
    font-size: 16px;
  }

  .cart-modal .shell-modal__close {
    position: absolute;
    inset-inline-end: 14px;
    top: 14px;
    background: #f3f4f6;
  }

  .cart-modal .shell-modal__body {
    padding: 14px 16px;
  }

  .cart-modal [data-step="2"] .grid.grid-cols-2 {
    grid-template-columns: 1fr;
  }

  .checkout-select {
    min-height: 48px;
  }

  .cart-modal .shell-modal__foot {
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  }

  .cart-modal .shell-modal__foot [data-step-actions] {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    justify-content: stretch;
  }

  .cart-modal .shell-modal__foot [data-step-actions].hidden {
    display: none !important;
  }

  .cart-modal .shell-modal__foot .shell-btn {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    white-space: normal;
    padding-inline: 12px;
  }

  .cart-modal [data-step-actions="1"] .shell-btn--primary {
    order: 1;
  }
  .cart-modal [data-step-actions="1"] .shell-btn--ghost {
    order: 2;
  }

  .cart-modal .coupon-block .flex {
    gap: 8px;
  }
  .cart-modal #cart-coupon-apply-btn {
    padding-inline: 12px !important;
    white-space: nowrap;
  }

  .cart-line {
    grid-template-columns: 72px 1fr;
  }
  .cart-line__actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* Micro Loading Spinner */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin-inline-end: 6px;
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ------------------------------------------------------------------ */
/* Optimistic-UI feedback                                              */
/* ------------------------------------------------------------------ */

/* Cart badge "bump" animation when count changes optimistically. */
.cart-count--bump {
  animation: bump 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* Floating "added to cart" flash toast — top-center, non-blocking. */
.flash-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: #111827;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  opacity: 0;
  pointer-events: none;
  z-index: 100000;
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  max-width: calc(100% - 32px);
}
.flash-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.flash-toast--success {
  background: #059669;
}
.flash-toast--error {
  background: #dc2626;
}

/* Add-to-cart button busy state (used by .add_to_cart_button buttons). */
.add_to_cart_button.is-loading,
.product-card__btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}
.add_to_cart_button.is-loading::after,
.product-card__btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Smooth remove animation for cart line items. */
.cart-line {
  transition: opacity 0.18s ease, transform 0.18s ease, max-height 0.18s ease;
  overflow: hidden;
}
.cart-line--leaving {
  opacity: 0;
  transform: translateX(20px);
  max-height: 0;
  padding-block: 0;
  border-width: 0;
}

/* ------------------------------------------------------------------ */
/* Product Card (loop)                                                  */
/* ------------------------------------------------------------------ */

.product-card {
  position: relative;
}

.product-card:hover {
  transform: translateY(-2px);
}

/* Price — use brand primary token so it follows the Customizer color. */
.product-card__price {
  color: var(--primary, #d97706);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.2;
}
.product-card__price .woocommerce-Price-amount {
  color: inherit;
  font-weight: inherit;
}
.product-card__price del {
  color: #9ca3af;
  font-weight: 500;
  margin-inline-end: 6px;
  font-size: 0.85em;
  opacity: 0.8;
}
.product-card__price ins {
  text-decoration: none;
  color: var(--primary, #d97706);
}

/* Add-to-cart button — uses --primary so it follows brand color. */
.product-card__btn {
  background-color: var(--primary, #d97706);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.product-card__btn:hover:not(:disabled) {
  background-color: var(--primary-hover, var(--primary, #b45309));
}
.product-card__btn:active:not(:disabled) {
  background-color: var(--primary-dark, var(--primary, #92400e));
  transform: translateY(1px);
}
.product-card__btn:disabled {
  background-color: #e5e7eb;
  color: #6b7280;
  cursor: not-allowed;
}

/* Title hover follows brand primary. */
.product-card__title a:hover {
  color: var(--primary-hover, var(--primary, #d97706));
}

/* ------------------------------------------------------------------ */
/* Product Card Variation Picker                                      */
/* ------------------------------------------------------------------ */

.variation-picker {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.variation-picker.is-open {
  display: flex;
}
.variation-picker__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.variation-picker__panel {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  border-radius: 24px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 30px 80px -24px rgba(15, 23, 42, 0.55);
}
.variation-picker__content {
  position: relative;
  min-height: 220px;
  padding: 22px;
}
.variation-picker__close {
  position: absolute;
  inset-block-start: 14px;
  inset-inline-start: 14px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.variation-picker__back {
  position: absolute;
  inset-block-start: 16px;
  inset-inline-end: 16px;
  z-index: 3;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  width: 38px;
  height: 38px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.variation-picker__hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #f1f5f9;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff 0%, #fff7ed 100%);
}
.variation-picker__hero-body {
  min-width: 0;
  flex: 1;
}
.variation-picker__hero h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.35;
}
.variation-picker__price {
  color: #16a34a;
  font-size: 18px;
  font-weight: 900;
}
.variation-picker__price del {
  color: #9ca3af;
  font-size: 0.85em;
  margin-inline: 6px;
}
.variation-picker__selected {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 2px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 800;
}
.variation-picker__thumb {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}
.variation-picker__step-title {
  margin: 0 0 8px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #f3f4f6;
  text-align: start;
  color: #1f2937;
  font-size: 17px;
  font-weight: 900;
}
.variation-picker__options {
  display: grid;
  gap: 10px;
}
.variation-picker__option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 76px;
  width: 100%;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 17px;
  font-weight: 900;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.variation-picker__option:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--primary, #d97706) 55%, #e5e7eb);
  background: #fffaf3;
  box-shadow: 0 12px 24px -20px rgba(15, 23, 42, 0.6);
  transform: translateY(-1px);
}
.variation-picker__option img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  order: 0;
}
.variation-picker__option-text {
  order: 1;
  display: grid;
  gap: 4px;
  min-width: 0;
}
.variation-picker__option-text small {
  color: #dc2626;
  font-size: 11px;
  font-weight: 800;
}
.variation-picker__option.is-soldout {
  color: #9ca3af;
  background: #fafafa;
  cursor: not-allowed;
}
.variation-picker__option.is-soldout img {
  filter: grayscale(0.8);
  opacity: 0.62;
}
.variation-picker__final {
  padding-top: 4px;
}
.variation-picker__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  background: var(--primary, #8b451f);
  color: #ffffff;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.variation-picker__add:disabled {
  background: #e5e7eb;
  color: #6b7280;
  cursor: not-allowed;
}
.variation-picker__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 220px;
  color: #6b7280;
  font-weight: 900;
}

@media (max-width: 640px) {
  .variation-picker {
    align-items: flex-end;
    padding: 0;
  }
  .variation-picker__panel {
    width: 100%;
    max-height: min(88vh, 720px);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -20px 48px -20px rgba(15, 23, 42, 0.42);
    animation: product-sheet-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .variation-picker__panel::before {
    content: "";
    display: block;
    width: 44px;
    height: 5px;
    margin: 9px auto 0;
    border-radius: 999px;
    background: #d1d5db;
  }
  .variation-picker__content {
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  }
  .variation-picker__close,
  .variation-picker__back {
    top: 14px;
  }
  .variation-picker__hero {
    margin-top: 18px;
    padding: 12px;
    border-radius: 18px;
  }
  .variation-picker__thumb {
    width: 74px;
    height: 74px;
  }
  .variation-picker__hero h3 {
    font-size: 18px;
  }
  .variation-picker__option {
    min-height: 68px;
    border-radius: 14px;
    font-size: 16px;
  }
  .variation-picker__option img {
    width: 50px;
    height: 50px;
  }
}

/* ------------------------------------------------------------------ */
/* Product Details Modal (uses the shared shell, just wider).          */
/* ------------------------------------------------------------------ */

.product-modal .shell-modal__panel {
  max-width: 1040px;
}

html.product-open,
html.product-open body {
  overflow: hidden;
}

.product-modal .shell-modal__body {
  padding: 0;
}

.product-modal .hidden {
  display: none !important;
}

.product-loading {
  text-align: center;
}
.product-loading .spinner {
  width: 28px;
  height: 28px;
  border-width: 3px;
  display: inline-block;
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(340px, 1.05fr) minmax(360px, 0.95fr);
  gap: 24px;
  padding: 22px;
  background: linear-gradient(135deg, #ffffff 0%, #fffaf3 100%);
}

@media (max-width: 768px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
}

.product-loading,
.product-error {
  padding: 48px 24px;
  text-align: center;
}

/* Gallery */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.product-main-img {
  position: relative;
  background: #f9fafb;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f1f5f9;
  box-shadow: 0 24px 60px -36px rgba(15, 23, 42, 0.75);
}
.product-main-img img,
.product-main-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-main-video {
  background: #111827;
}
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #16a34a;
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  z-index: 2;
  direction: ltr;
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.28);
}
.product-badge--soldout {
  left: auto;
  right: 12px;
  background: #111827;
  direction: rtl;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.28);
}
.product-main-img.is-soldout img {
  filter: grayscale(0.75) saturate(0.7);
}
.product-soldout-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(17,24,39,0.34));
  pointer-events: none;
}
.product-soldout-overlay span {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.86);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.22);
}
.product-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}
.product-thumbs::-webkit-scrollbar {
  display: none;
}
.product-thumb {
  flex: 0 0 68px;
  border: 2px solid transparent;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #f3f4f6;
  padding: 0;
  aspect-ratio: 1 / 1;
}
.product-thumb.is-active {
  border-color: var(--primary, #d97706);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.14);
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-thumb--video {
  position: relative;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #111827, #374151);
  color: #fff;
}
.product-thumb__play {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding-inline-start: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.22);
}

/* Info column */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 2px;
}
.product-cats {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.product-title {
  font-size: 30px;
  font-weight: 900;
  color: #1f2937;
  line-height: 1.3;
  margin: 0;
}
.product-price {
  font-size: 26px;
  font-weight: 800;
  color: #16a34a;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.product-price .woocommerce-Price-amount {
  font-size: inherit;
  font-weight: inherit;
}
.product-price del {
  color: #9ca3af;
  font-weight: 500;
  margin-inline-end: 8px;
  font-size: 0.8em;
  text-decoration-thickness: 2px;
}
.product-price ins {
  color: #16a34a;
  text-decoration: none;
  font-weight: 900;
}
.product-sales-proof {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #dcfce7;
  border-radius: 16px;
  background: #f0fdf4;
  color: #059669;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.5;
}
.product-sales-proof__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 38px;
  padding: 0 10px;
  border-radius: 9px;
  background: #16a34a;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.22);
}
.product-sales-proof__text {
  min-width: 0;
}
.product-short {
  color: #4b5563;
  font-size: 15px;
  line-height: 1.7;
  padding: 12px 14px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
}

/* Attributes (variation selectors) */
.product-attrs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 42px -34px rgba(15, 23, 42, 0.55);
}
.product-attr {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: start;
  gap: 12px;
}
.product-attr__label {
  padding-top: 7px;
  font-weight: 900;
  color: #1f2937;
}
.product-attr__choices {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.product-attr__choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  min-width: 48px;
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.product-attr__choice:hover:not(:disabled),
.product-attr__choice.is-active {
  border-color: color-mix(in srgb, var(--primary, #d97706) 60%, #d1d5db);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #d97706) 14%, transparent);
}
.product-attr__choice.is-active {
  color: var(--primary-dark, #92400e);
}
.product-attr__choice img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 10px;
}
.product-attr__choice.is-soldout {
  position: relative;
  color: #9ca3af;
  background: #f3f4f6;
  cursor: not-allowed;
}
.product-attr__choice.is-soldout::after {
  content: "";
  position: absolute;
  inset-inline: 8px;
  top: 50%;
  border-top: 2px solid rgba(220, 38, 38, 0.68);
  transform: rotate(-16deg);
}

.product-stock {
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  font-weight: 900;
  font-size: 14px;
}
.product-stock.is-instock { color: #059669; }
.product-stock.is-out {
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.product-soldout-note {
  margin-top: -6px;
  padding: 10px 12px;
  border: 1px solid #fee2e2;
  border-radius: 10px;
  background: #fff7ed;
  color: #7f1d1d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.product-buy-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #f1f5f9;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 18px 45px -36px rgba(15, 23, 42, 0.6);
}
.product-buy-box__top {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}
/* Qty selector row */
.product-qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.product-qty-row.is-disabled {
  opacity: 0.48;
  pointer-events: none;
}
.product-qty-label {
  font-weight: 700;
  color: #374151;
  min-width: 60px;
}

/* Add-to-cart CTA */
.product-add-btn {
  width: 100%;
  min-height: 52px;
  padding: 13px 18px;
  background: var(--primary, #d97706);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s, transform 0.16s ease, box-shadow 0.16s ease;
  font-family: inherit;
  box-shadow: 0 14px 28px -18px color-mix(in srgb, var(--primary, #d97706) 70%, #000);
}
.product-add-btn:hover:not(:disabled) {
  background: var(--primary-hover, var(--primary, #b45309));
  transform: translateY(-1px);
}
.product-add-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.product-layout--soldout .product-add-btn:disabled {
  background: #111827;
  color: #ffffff;
  opacity: 0.9;
}

.product-service-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.product-service-points span {
  padding: 9px 10px;
  border-radius: 14px;
  background: #f9fafb;
  border: 1px solid #eef2f7;
  color: #475569;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.45;
}
.product-share-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
}
.product-share-card__qr {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}
.product-share-card__qr img {
  width: 68px;
  height: 68px;
  display: block;
}
.product-share-card__body {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.product-share-card__body strong {
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}
.product-share-card__body span {
  color: #64748b;
  font-size: 12.5px;
  font-weight: 700;
}
.product-share-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.product-mini-action {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #374151;
  font: inherit;
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
}
.product-mini-action--primary {
  border-color: color-mix(in srgb, var(--primary, #d97706) 45%, #e5e7eb);
  color: var(--primary-dark, #92400e);
  background: #fff7ed;
}

/* Long description block */
.product-description {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  margin-top: 4px;
}
.product-description__title {
  font-size: 16px;
  font-weight: 800;
  color: #1f2937;
  margin: 0 0 8px;
}
.product-description__body {
  font-size: 14px;
  line-height: 1.8;
  color: #4b5563;
}
.product-description__body p { margin: 0 0 8px; }
.product-description__body img { max-width: 100%; height: auto; }

.product-sku {
  font-size: 13px;
  color: #6b7280;
}

/* Mobile product details bottom sheet.
 * Desktop keeps the centered modal above. On phones the product modal follows
 * the native commerce pattern from the references: dimmed page, rounded sheet
 * sliding from the bottom, draggable handle, and outside tap via backdrop. */
@media (max-width: 768px) {
  .product-modal.shell-modal {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
  }

  .product-modal .shell-modal__backdrop {
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .product-modal .shell-modal__panel {
    width: 100%;
    max-width: none;
    max-height: min(88vh, 760px);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -20px 48px -20px rgba(15, 23, 42, 0.42);
    transform: translateY(var(--sheet-y, 0));
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    animation: product-sheet-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    touch-action: pan-y;
  }

  .product-modal .shell-modal__panel.is-dragging {
    transition: none;
  }

  .product-modal .shell-modal__panel::before {
    content: "";
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: #d1d5db;
    margin: 8px auto 2px;
    flex-shrink: 0;
  }

  .product-modal .shell-modal__head {
    padding: 8px 18px 12px;
    border-bottom: 0;
    justify-content: center;
    cursor: grab;
    touch-action: none;
  }

  .product-modal .shell-modal__head:active {
    cursor: grabbing;
  }

  .product-modal .shell-modal__title {
    font-size: 16px;
  }

  .product-modal .shell-modal__close {
    position: absolute;
    inset-inline-end: 14px;
    top: 14px;
    background: #f3f4f6;
  }

  .product-modal .shell-modal__body {
    max-height: calc(88vh - 62px);
  }

  .product-layout {
    gap: 14px;
    padding: 14px 16px 18px;
  }

  .product-main-img {
    aspect-ratio: 4 / 3;
    border-radius: 18px;
  }

  .product-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .product-thumbs::-webkit-scrollbar { display: none; }

  .product-thumb {
    flex: 0 0 58px;
  }

  .product-info {
    gap: 10px;
  }

  .product-title {
    font-size: 20px;
    line-height: 1.35;
  }

  .product-price {
    font-size: 20px;
  }

  .product-sales-proof {
    align-items: flex-start;
    font-size: 13px;
    padding: 10px 12px;
  }

  .product-sales-proof__count {
    height: 34px;
    min-width: 26px;
    border-radius: 8px;
  }

  .product-short,
  .product-description__body {
    font-size: 13.5px;
    line-height: 1.65;
  }

  .product-attr {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .product-qty-row {
    justify-content: space-between;
  }

  .product-buy-box {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin-inline: -4px;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -18px 36px -28px rgba(15, 23, 42, 0.5);
  }

  .product-buy-box__top {
    grid-template-columns: 1fr;
  }

  .product-add-btn {
    min-height: 50px;
    border-radius: 14px;
    box-shadow: 0 12px 22px -14px color-mix(in srgb, var(--primary, #d97706) 70%, #000);
  }

  .product-service-points {
    grid-template-columns: 1fr;
  }

  .product-share-card {
    align-items: stretch;
  }

  .product-share-card__qr {
    width: 76px;
    height: 76px;
  }

  .product-share-card__qr img {
    width: 62px;
    height: 62px;
  }
}

@keyframes product-sheet-in {
  from { transform: translateY(100%); }
  to   { transform: translateY(var(--sheet-y, 0)); }
}

/* ============================================================ *
 * Wishlist modal                                                *
 *                                                               *
 *  - Uses the shared .shell-modal chrome (plain white head, *
 *    rounded panel, blurred backdrop) so the wishlist looks     *
 *    identical to the cart + product modals.                    *
 *  - Each row reuses the .cart-line grid layout (image,     *
 *    info, actions) so the visual rhythm matches the cart.      *
 *  - RTL/LTR-safe: all spacing uses logical CSS properties,     *
 *    direction is inherited from the modal wrapper.             *
 * ============================================================ */

/* Wishlist panel width — slightly wider than the cart since rows
   only show one line of info, but kept under product modal width. */
.wishlist-modal .shell-modal__panel {
  max-width: 720px;
}

/* Wishlist line — same grid + styling as .cart-line so users
   get the same visual rhythm across cart and wishlist modals. */
.wishlist-line {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 12px;
  align-items: center;
  background: #f9fafb;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 12px;
  transition: opacity 0.18s ease, transform 0.18s ease, max-height 0.18s ease;
  overflow: hidden;
}
.wishlist-line--leaving {
  opacity: 0;
  transform: translateX(20px);
  max-height: 0;
  padding-block: 0;
  border-width: 0;
}

.wishlist-line__img {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f4f6;
  display: block;
}
.wishlist-line__img-ph {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}
.wishlist-line__img-ph svg {
  width: 28px;
  height: 28px;
}

.wishlist-line__body {
  min-width: 0; /* allow text truncation inside the grid cell */
}
.wishlist-line__name {
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 6px;
  line-height: 1.4;
  display: block;
  text-decoration: none;
}
.wishlist-line__name:hover {
  color: var(--primary, #d97706);
}
.wishlist-line__price {
  color: var(--primary, #d97706);
  font-weight: 800;
}
.wishlist-line__price .woocommerce-Price-amount,
.wishlist-line__price bdi {
  color: inherit;
}
.wishlist-line__price del {
  color: #9ca3af;
  font-weight: 500;
  margin-inline-end: 6px;
  font-size: 0.85em;
  opacity: 0.8;
}

/* Action column — mirrors .cart-line__actions arrangement. */
.wishlist-line__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wishlist-act {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #6b7280;
  position: relative;
}
.wishlist-act svg {
  width: 18px;
  height: 18px;
}
.wishlist-act:hover:not(:disabled) {
  background: #ffffff;
  border-color: #e5e7eb;
}
.wishlist-act--remove {
  color: #ef4444;
}
.wishlist-act--remove:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}
.wishlist-act--cart,
.wishlist-act--options {
  color: var(--primary, #d97706);
}
.wishlist-act--cart:hover:not(:disabled),
.wishlist-act--options:hover:not(:disabled) {
  background: #fff;
  border-color: var(--primary, #fde68a);
}
.wishlist-act.is-loading {
  pointer-events: none;
  opacity: 0.7;
}
.wishlist-act.is-loading svg {
  opacity: 0;
}
.wishlist-act.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}

/* Empty state — vertical spacing only (background comes from modal body). */
.wishlist-empty {
  padding: 24px;
}

.wishlist-clear-confirm {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.wishlist-clear-confirm.hidden {
  display: none !important;
}
.wishlist-clear-confirm__card {
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 18px;
  border: 1px solid #fee2e2;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 24px 70px -28px rgba(15, 23, 42, 0.7);
}
.wishlist-clear-confirm__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #fef2f2;
  color: #dc2626;
  font-weight: 900;
  font-size: 22px;
}
.wishlist-clear-confirm__body {
  display: grid;
  gap: 5px;
}
.wishlist-clear-confirm__body strong {
  color: #111827;
  font-size: 17px;
  font-weight: 900;
}
.wishlist-clear-confirm__body span {
  color: #6b7280;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.6;
}
.wishlist-clear-confirm__actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

/* ----------------------------- Pagination ---------------------------- */
.wishlist-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 4px 4px;
  margin-top: 8px;
  border-top: 1px solid #f3f4f6;
}
.wishlist-page-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.wishlist-page-btn:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}
.wishlist-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.wishlist-page-status {
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
}

/* ============================================================ *
 * Heart icon active state (product cards)                       *
 *                                                                *
 * Uses `var(--primary)` so the heart color is owned by the same  *
 * Customizer / dashboard control as the rest of the brand. The   *
 * destructive trash/remove buttons keep their universal red — we *
 * only re-brand the wishlist "favorite" affordance.              *
 * ============================================================ */
.product-card__fav.is-active {
  color: var(--primary, #d97706);
  background: #fff;
}
.product-card__fav.is-active:hover {
  color: var(--primary-hover, var(--primary, #b45309));
}
.product-card__fav .fav-icon-filled.hidden,
.product-card__fav .fav-icon-outline.hidden {
  display: none;
}

/* Mobile tweaks — collapse to a tighter 2-col layout, mirroring
   how .cart-line collapses on small screens. */
@media (max-width: 520px) {
  .wishlist-modal.shell-modal {
    align-items: flex-end;
    padding: 0;
  }

  .wishlist-modal .shell-modal__backdrop {
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .wishlist-modal .shell-modal__panel {
    width: 100%;
    max-width: none;
    max-height: min(82vh, 720px);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -20px 48px -20px rgba(15, 23, 42, 0.42);
    animation: product-sheet-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .wishlist-modal .shell-modal__panel::before {
    content: "";
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: #d1d5db;
    margin: 8px auto 2px;
    flex-shrink: 0;
  }

  .wishlist-modal .shell-modal__head {
    padding: 8px 18px 12px;
    border-bottom: 0;
    justify-content: center;
  }

  .wishlist-modal .shell-modal__title {
    font-size: 16px;
  }

  .wishlist-modal .shell-modal__close {
    position: absolute;
    inset-inline-end: 14px;
    top: 14px;
    background: #f3f4f6;
  }

  .wishlist-modal .shell-modal__body {
    padding: 14px 16px;
  }

  .wishlist-modal .shell-modal__foot {
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
    justify-content: stretch;
  }

  .wishlist-modal .shell-modal__foot .shell-btn {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
  }

  .wishlist-list-wrap .space-y-3 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .wishlist-line {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    padding: 0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 20px -16px rgba(15, 23, 42, 0.5);
  }
  .wishlist-line > a:first-child {
    display: block;
  }
  .wishlist-line__img,
  .wishlist-line__img-ph {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 16px 16px 0 0;
  }
  .wishlist-line__img {
    object-fit: cover;
  }
  .wishlist-line__img-ph svg {
    width: 42px;
    height: 42px;
  }
  .wishlist-line__body {
    padding: 10px 10px 6px;
    text-align: start;
  }
  .wishlist-line__name {
    min-height: 2.4rem;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .wishlist-line__price {
    font-size: 13px;
  }
  .wishlist-line__actions {
    padding: 8px 10px 10px;
    justify-content: space-between;
    border-top: 1px solid #f3f4f6;
  }
  .wishlist-act {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f9fafb;
  }
}

/* Prevent background scrolling when modals are open */
html.no-scroll,
html.no-scroll body {
  overflow: hidden !important;
  height: 100vh !important;
}

/* ==========================================================================
 *  Orders modal — "My Previous Orders" (guest order lookup)
 *
 *  Three panes inside one modal:
 *
 *    .orders-pane--lookup   = phone form (initial view)
 *    .orders-pane--list     = recent orders as cards
 *    .orders-pane--detail   = single order line-items + totals
 *
 *  Only the active pane is visible; switching is controlled by
 *  [data-orders-view] on the body + .is-active on the pane.
 * ========================================================================== */

.orders-modal .shell-modal__panel {
  max-width: 640px;
}

.orders-modal .shell-modal__body {
  position: relative;
  padding: 18px 18px 22px;
}

.orders-modal .orders-pane {
  display: none;
}
.orders-modal .orders-pane.is-active {
  display: block;
  animation: ordersFadeIn 0.18s ease-out;
}
@keyframes ordersFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===================== Lookup view ===================== */
.orders-lookup {
  max-width: 380px;
  margin: 8px auto;
  text-align: center;
  padding: 12px 4px 8px;
}
.orders-lookup__icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary, #d97706) 12%, #ffffff);
  color: var(--primary, #d97706);
}
.orders-lookup__hint {
  font-size: 0.95rem;
  font-weight: 600;
  color: #4b5563;
  line-height: 1.55;
  margin: 0 0 18px;
}
.orders-lookup__form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  text-align: start;
}
.orders-lookup__label {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1f2937;
  text-align: start;
}
.orders-lookup__input {
  width: 100%;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: #1f2937;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  direction: ltr;
  text-align: start;
}
.orders-lookup__input:focus {
  outline: none;
  border-color: var(--primary, #d97706);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #d97706) 18%, transparent);
}
.orders-lookup__error {
  background: #fee2e2;
  color: #b91c1c;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}
.orders-lookup__error.hidden { display: none; }
.orders-lookup__submit {
  margin-top: 6px;
  width: 100%;
  position: relative;
  min-height: 44px;
}
.orders-lookup__submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.orders-lookup__spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ordersSpin 0.9s linear infinite;
}
.orders-lookup__spinner.hidden { display: none; }
@keyframes ordersSpin {
  to { transform: rotate(360deg); }
}

/* ===================== List view ===================== */
.orders-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 8px 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
.orders-list-head__phone {
  font-size: 0.85rem;
  font-weight: 700;
  color: #4b5563;
  direction: ltr;
  unicode-bidi: isolate;
}
.orders-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--primary, #d97706);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.orders-back:hover {
  background: color-mix(in srgb, var(--primary, #d97706) 10%, #ffffff);
}
.orders-back svg {
  flex-shrink: 0;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.order-card {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  text-align: start;
  cursor: pointer;
  width: 100%;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  color: inherit;
  font-family: inherit;
}
.order-card:hover {
  border-color: var(--primary, #d97706);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -8px rgba(15, 23, 42, 0.12);
}
.order-card__thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: #f3f4f6;
}
.order-card__thumb--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #9ca3af;
}
.order-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.order-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.order-card__row--meta {
  font-size: 0.78rem;
  color: #6b7280;
  font-weight: 600;
}
.order-card__number {
  font-weight: 800;
  font-size: 0.95rem;
  color: #1f2937;
  direction: ltr;
  unicode-bidi: isolate;
}
.order-card__status {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.order-card__total {
  font-weight: 800;
  font-size: 0.9rem;
  color: #1f2937;
}
.order-card__chevron {
  color: #9ca3af;
  flex-shrink: 0;
}
[dir="rtl"] .order-card__chevron {
  transform: scaleX(-1);
}

.orders-empty {
  text-align: center;
  padding: 28px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.orders-empty__icon {
  font-size: 2.5rem;
  margin-bottom: 4px;
}
.orders-empty__title {
  font-weight: 800;
  font-size: 1rem;
  color: #1f2937;
}
.orders-empty__hint {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 600;
  margin: 0;
}

/* ===================== Detail view ===================== */
.order-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.order-detail-head__status {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}

.order-detail-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 14px;
}
.order-detail-summary__label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 700;
  margin-bottom: 2px;
}
.order-detail-summary__value {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1f2937;
  direction: ltr;
  unicode-bidi: isolate;
}

.order-detail-section {
  margin-bottom: 14px;
}
.order-detail-section__title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1f2937;
  margin: 0 0 8px;
}

.order-detail-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px;
  background: #ffffff;
}
.order-detail-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
}
.order-detail-item + .order-detail-item {
  border-top: 1px solid #f1f5f9;
}
.order-detail-item__img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #f3f4f6;
}
.order-detail-item__img--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #9ca3af;
}
.order-detail-item__body {
  min-width: 0;
}
.order-detail-item__name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #1f2937;
  line-height: 1.35;
}
.order-detail-item__meta {
  font-size: 0.78rem;
  color: #6b7280;
  font-weight: 600;
  margin-top: 2px;
}
.order-detail-item__total {
  font-weight: 800;
  font-size: 0.92rem;
  color: #1f2937;
}

.order-detail-totals {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.order-detail-totals__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4b5563;
}
.order-detail-totals__row--total {
  border-top: 1px dashed #d1d5db;
  padding-top: 8px;
  margin-top: 4px;
  font-weight: 900;
  font-size: 1rem;
  color: #1f2937;
}

.order-detail-billing {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.order-detail-billing__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
}
.order-detail-billing__label {
  color: #6b7280;
  font-weight: 700;
  white-space: nowrap;
}
.order-detail-billing__value {
  color: #1f2937;
  font-weight: 700;
  text-align: end;
  word-break: break-word;
}

.order-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.order-detail-action {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
}
.order-detail-action svg { flex-shrink: 0; }

/* ===================== Loading overlay + global error ===================== */
.orders-loading {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 5;
  border-radius: 0 0 14px 14px;
}
.orders-loading.hidden { display: none; }
.orders-loading__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--primary, #d97706);
  border-radius: 50%;
  animation: ordersSpin 0.9s linear infinite;
}
.orders-loading__label {
  font-weight: 700;
  color: #4b5563;
  font-size: 0.9rem;
}
.orders-global-error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
  font-size: 0.85rem;
}
.orders-global-error.hidden { display: none; }

/* ===================== Mobile ===================== */
@media (max-width: 520px) {
  .orders-modal.shell-modal {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
  }
  .orders-modal .shell-modal__backdrop {
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .orders-modal .shell-modal__panel {
    width: 100%;
    max-width: none;
    max-height: min(88vh, 760px);
    border-radius: 20px 20px 0 0;
    animation: product-sheet-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .orders-modal .shell-modal__panel::before {
    content: "";
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: #d1d5db;
    margin: 10px auto 0;
    flex-shrink: 0;
  }
  .orders-modal .shell-modal__head {
    padding: 8px 18px 12px;
    border-bottom: 0;
    justify-content: center;
  }
  .orders-modal .shell-modal__title {
    font-size: 16px;
  }
  .orders-modal .shell-modal__close {
    position: absolute;
    inset-inline-end: 14px;
    top: 14px;
    background: #f3f4f6;
  }
  .orders-modal .shell-modal__body {
    max-height: calc(88vh - 62px);
    padding: 14px 14px calc(16px + env(safe-area-inset-bottom));
  }
  .order-card {
    grid-template-columns: 54px 1fr 18px;
    padding: 10px;
  }
  .order-card__thumb {
    width: 54px;
    height: 54px;
  }
  .order-detail-summary {
    grid-template-columns: 1fr;
  }
  .order-detail-item {
    grid-template-columns: 44px 1fr auto;
  }
  .order-detail-item__img {
    width: 44px;
    height: 44px;
  }
}

.orders-modal .hidden { display: none; }

/* ===================== Scroll Lock ===================== */
html.no-scroll,
html.no-scroll body {
  overflow: hidden !important;
  height: 100vh !important;
}

/* ===================== Floating WhatsApp Widget ===================== */
.whatsapp-support-widget {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  z-index: 999;
  font-family: inherit;
}
.whatsapp-support-widget__bubble {
  width: 56px;
  height: 56px;
  background-color: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  position: relative;
}
.whatsapp-support-widget__bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}
.whatsapp-support-widget__bubble svg {
  animation: wa-shake 3s ease-in-out infinite;
}
.widget-pulse {
  position: absolute;
  inset: -4px;
  border: 2px solid #25D366;
  border-radius: inherit;
  opacity: 0;
  animation: wa-pulse 2s infinite;
  pointer-events: none;
}
@keyframes wa-shake {
  0%, 100% { transform: rotate(0); }
  90% { transform: rotate(0); }
  92% { transform: rotate(-8deg); }
  94% { transform: rotate(8deg); }
  96% { transform: rotate(-8deg); }
  98% { transform: rotate(8deg); }
}
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.3); opacity: 0; }
}

.whatsapp-support-widget__box {
  position: fixed;
  bottom: calc(92px + env(safe-area-inset-bottom));
  right: 24px;
  left: auto;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: wa-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid #e5e7eb;
  z-index: 2147483646;
}
.whatsapp-support-widget.is-open .whatsapp-support-widget__box {
  display: flex;
}

.widget-header {
  background: #097e35;
  color: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}
.widget-header__avatar {
  position: relative;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.avatar-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #22c55e;
  border: 2px solid #097e35;
  border-radius: 50%;
}
.widget-header__info {
  display: flex;
  flex-direction: column;
  text-align: start;
}
.widget-header__title {
  margin: 0;
  font-weight: 800;
  font-size: 14px;
  color: #ffffff;
}
.widget-header__subtitle {
  font-size: 11px;
  opacity: 0.85;
  color: #ffffff;
}
.widget-header__close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  opacity: 0.7;
}
.widget-header__close:hover {
  opacity: 1;
}

.widget-body {
  background: #f0f2f5;
  padding: 20px;
  text-align: start;
}
.widget-body__msg {
  background: #fff;
  padding: 12px 14px;
  border-radius: 0 12px 12px 12px;
  font-size: 13px;
  color: #111827;
  margin: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  line-height: 1.5;
}
[dir="rtl"] .widget-body__msg {
  border-radius: 12px 0 12px 12px;
}

.widget-footer {
  padding: 12px 16px;
  background: #fff;
}
.widget-footer__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  transition: background 0.2s;
}
.widget-footer__btn:hover {
  background: #097e35;
}

@keyframes wa-slide-in {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===================== Flash Sale Countdown Top Banner ===================== */
.flash-sale-banner {
  font-family: inherit;
}

/* ===================== Coupon/Discount Cart Display ===================== */
.coupon-block {
  text-align: start;
}

/* ===================== Floating Multi-Social Chat Stack ===================== */
.floating-social-stack {
  position: fixed;
  bottom: 24px;
  z-index: 2147483642;
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  animation: wa-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.floating-social-stack--right {
  right: 24px;
  left: auto;
  align-items: flex-end;
}
.floating-social-stack--left {
  left: 24px;
  right: auto;
  align-items: flex-start;
}

/* Individual Social Bubble Links */
.floating-social-bubble {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  text-decoration: none;
}
.floating-social-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  color: #ffffff !important;
}
.floating-social-bubble svg {
  width: 24px;
  height: 24px;
}

/* Brand specific gradient backgrounds */
.floating-social-bubble--facebook {
  background: linear-gradient(135deg, #0066ff, #00c6ff);
}
.floating-social-bubble--instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.floating-social-bubble--tiktok {
  background: linear-gradient(135deg, #111111, #000000);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Flow WhatsApp support widget inline inside the stack */
.floating-social-stack .whatsapp-support-widget {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  margin: 0;
  z-index: 1000;
  inset-inline-end: auto !important;
}
body.has-share-fab .floating-social-stack .whatsapp-support-widget {
  inset-inline-end: auto !important;
}

/* Box alignment: box is position:fixed, so we anchor it to the same
   physical edge as the stack. --right stack → box anchored to right edge
   (extends leftward into viewport). --left stack → box anchored to left edge.
   Physical right/left used deliberately here because the stack itself uses
   physical right/left and we must match in both LTR and RTL. */
.floating-social-stack--right .whatsapp-support-widget__box {
  right: 24px !important;
  left: auto !important;
}

.floating-social-stack--left .whatsapp-support-widget__box {
  left: 24px !important;
  right: auto !important;
}

@media (max-width: 1023px) {
  .whatsapp-support-widget,
  .floating-social-stack {
    bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .floating-social-stack--right {
    right: 16px;
    left: auto;
    align-items: flex-end;
  }

  .floating-social-stack--left {
    left: 16px;
    right: auto;
    align-items: flex-start;
  }

  /* On mobile the box becomes a full-width bottom sheet (handled below),
     but keep the desktop anchor updated for tablet sizes in between. */
  .floating-social-stack--right .whatsapp-support-widget__box {
    right: 16px !important;
    left: auto !important;
  }
  .floating-social-stack--left .whatsapp-support-widget__box {
    left: 16px !important;
    right: auto !important;
  }
}

/* WhatsApp Widget text and backdrop support */
.whatsapp-support-widget__backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2147483643 !important;
}
.whatsapp-support-widget.is-open .whatsapp-support-widget__backdrop {
  display: block;
}
@media (min-width: 521px) {
  .whatsapp-support-widget.is-open .whatsapp-support-widget__backdrop {
    display: none;
  }
}

.whatsapp-support-widget {
  display: flex;
  align-items: center;
  gap: 12px;
}
.whatsapp-support-widget__cloud {
  background: #ffffff;
  border: 1.5px solid #25D366;
  border-radius: 12px;
  padding: 8px 16px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  position: relative;
  line-height: 1.2;
  animation: wa-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9;
}
.whatsapp-support-widget__cloud::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  background: #ffffff;
  transform: translateY(-50%) rotate(45deg);
  z-index: 1;
}
.whatsapp-support-widget.is-open .whatsapp-support-widget__cloud {
  display: none !important;
}

/* Right Stack Alignment (Bubble on Right, Cloud on Left) */
.floating-social-stack--right .whatsapp-support-widget {
  flex-direction: row;
}
[dir="rtl"] .floating-social-stack--right .whatsapp-support-widget {
  flex-direction: row-reverse;
}
.floating-social-stack--right .whatsapp-support-widget__cloud::after {
  right: -5px;
  left: auto;
  border-top: 1.5px solid #25D366;
  border-right: 1.5px solid #25D366;
  border-bottom: none;
  border-left: none;
}

/* Left Stack Alignment (Bubble on Left, Cloud on Right) */
.floating-social-stack--left .whatsapp-support-widget {
  flex-direction: row-reverse;
}
[dir="rtl"] .floating-social-stack--left .whatsapp-support-widget {
  flex-direction: row;
}
.floating-social-stack--left .whatsapp-support-widget__cloud::after {
  left: -5px;
  right: auto;
  border-bottom: 1.5px solid #25D366;
  border-left: 1.5px solid #25D366;
  border-top: none;
  border-right: none;
}

@media (max-width: 1023px) {
  .whatsapp-support-widget.is-open {
    z-index: 2147483646 !important;
  }
  
  .whatsapp-support-widget__box {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 24px 24px 0 0 !important;
    z-index: 2147483647 !important;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.15) !important;
    border: none !important;
    animation: product-sheet-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) !important;
    height: auto !important;
    max-height: 80vh !important;
  }

  .whatsapp-support-widget__box::before {
    content: "" !important;
    width: 44px !important;
    height: 5px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.45) !important;
    margin: 8px auto 0 !important;
    flex-shrink: 0 !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 10 !important;
  }
  
  .whatsapp-support-widget__box .widget-header {
    padding-top: 22px !important;
  }

  .whatsapp-support-widget__box .widget-header__close {
    top: 14px !important;
  }

  .whatsapp-support-widget__box .widget-footer {
    padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
  }
}


/* Hide Share FAB when WhatsApp support widget is open to prevent overlap */
body.whatsapp-widget-open .share-fab {
  display: none !important;
}

/* If they are on the same side, lift the Share FAB above the social stack */
/* Desktop: Lift from 24px to 92px */
.floating-social-stack--right ~ .share-fab {
  inset-block-end: 92px !important;
}
[dir="rtl"] .floating-social-stack--left ~ .share-fab,
.floating-social-stack--left[dir="rtl"] ~ .share-fab {
  inset-block-end: 92px !important;
}

/* Mobile/Tablet: Lift from 160px to 224px */
@media (max-width: 1023px) {
  .floating-social-stack--right ~ .share-fab {
    inset-block-end: calc(224px + env(safe-area-inset-bottom)) !important;
  }
  [dir="rtl"] .floating-social-stack--left ~ .share-fab,
  .floating-social-stack--left[dir="rtl"] ~ .share-fab {
    inset-block-end: calc(224px + env(safe-area-inset-bottom)) !important;
  }
}
