*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #090d16;
  --bg-surface: #121826;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #ffffff;
  --btn-bg: rgba(255, 255, 255, 0.12);
  --btn-border: rgba(255, 255, 255, 0.22);
  --primary: #22c55e;
  --primary-hover: #16a34a;
  --accent-blue: #0ea5e9;
  --accent-blue-hover: #0284c7;
  --glass: rgba(18, 24, 38, 0.85);
  --radius: 999px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  
  /* Safe area insets for mobile notches / home bars */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

html, body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

/* The storefront is a single full-screen stage; only it locks page scrolling. */
html.storefront,
html.storefront body {
  height: 100%;
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Visible keyboard focus everywhere (mouse clicks keep the clean look). */
:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* Modal open body lock */
body.modal-open {
  overflow: hidden;
}

/* ========== TOP BAR ========== */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(0.9rem + var(--sat)) calc(1.2rem + var(--sar)) 0.9rem calc(1.2rem + var(--sal));
  background: linear-gradient(to bottom, rgba(9, 13, 22, 0.75) 0%, rgba(9, 13, 22, 0.2) 60%, transparent 100%);
  pointer-events: none;
  transition: all 0.3s ease;
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.95;
  pointer-events: auto;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  user-select: none;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: auto;
}

.top-support-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
}

.top-support-btn:hover,
.top-support-btn:active {
  background: rgba(14, 165, 233, 0.3);
  border-color: rgba(14, 165, 233, 0.6);
  color: #fff;
  transform: translateY(-1px);
}

.menu-wrapper {
  position: relative;
  pointer-events: auto;
}

.menu-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.menu-btn:hover,
.menu-btn:active {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.04);
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  max-width: calc(100vw - 2rem);
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 0.6rem 0;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 20px -5px rgba(14, 165, 233, 0.2);
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 120;
}

.dropdown.hidden {
  display: none;
}

.dropdown a,
.dropdown button.menu-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  min-height: 44px;
}

.dropdown a:hover,
.dropdown a:active,
.dropdown button.menu-item-btn:hover,
.dropdown button.menu-item-btn:active {
  background: rgba(255, 255, 255, 0.08);
  color: #38bdf8;
}

.dropdown .dropdown-icon {
  font-size: 1.05rem;
  opacity: 0.9;
  width: 20px;
  text-align: center;
}

.socials {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1.25rem 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0.35rem;
}

.dropdown .socials a {
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  opacity: 0.85;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.socials a:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.admin-link {
  font-size: 0.82rem !important;
  color: #94a3b8 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0.35rem;
}

/* ========== PRODUCT STAGE ========== */
.product-stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #090d16;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(9, 13, 22, 0.92) 0%,
    rgba(9, 13, 22, 0.65) 22%,
    rgba(9, 13, 22, 0.15) 55%,
    transparent 80%
  );
  pointer-events: none;
}

.product-meta {
  position: absolute;
  bottom: calc(6.5rem + var(--sab));
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 calc(1.5rem + var(--sal)) 0 calc(1.5rem + var(--sar));
  z-index: 10;
  transition: bottom 0.3s ease;
}

.product-meta h1 {
  font-size: clamp(1.4rem, 4.5vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
  line-height: 1.2;
}

.product-meta p {
  font-size: clamp(1rem, 3.2vw, 1.25rem);
  color: #cbd5e1;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

.product-price-tag {
  font-weight: 600;
  color: #38bdf8 !important;
}

.time-left {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding: 0.3rem 0.8rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  font-size: 0.85rem !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #e2e8f0 !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.time-left::before {
  content: "⚡";
  font-size: 0.8rem;
}

/* Floating buttons */
.floating-actions {
  position: absolute;
  bottom: calc(1.8rem + var(--sab));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.85rem;
  width: calc(100% - 2.5rem);
  max-width: 420px;
  z-index: 20;
}

.btn {
  border: none;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  padding: 0.88rem 1.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.97);
}

.btn-ghost {
  background: rgba(18, 24, 38, 0.7);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-primary {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px -4px rgba(16, 185, 129, 0.45);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  box-shadow: 0 10px 28px -4px rgba(16, 185, 129, 0.6);
}

.btn.full {
  width: 100%;
  margin-top: 1.2rem;
}

/* ========== MODALS (RESPONSIVE SHEETS ON MOBILE) ========== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #111a2d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
  max-width: 440px;
  width: 100%;
  position: relative;
  max-height: calc(90vh - var(--sat) - var(--sab));
  max-height: calc(90dvh - var(--sat) - var(--sab));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 40px -10px rgba(14, 165, 233, 0.2);
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Sheet pull indicator for mobile */
.sheet-handle {
  display: none;
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  margin: -0.75rem auto 1rem;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #cbd5e1;
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
  z-index: 10;
  touch-action: manipulation;
}

.close-btn:hover,
.close-btn:active {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.06);
}

.modal-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
  padding-right: 2.2rem;
  color: #fff;
}

.modal-content p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.94rem;
}

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.1rem 0 0.8rem;
}

.specs span {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: #e2e8f0;
  font-weight: 500;
}

.modal-price {
  font-size: 1.35rem !important;
  color: #38bdf8 !important;
  font-weight: 700;
  margin-top: 0.6rem;
}

/* ========== CHECKOUT & PAYMENT MODAL ========== */
.payment-card-modal {
  max-width: 460px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 50px -10px rgba(14, 165, 233, 0.25), 0 25px 40px -10px rgba(0, 0, 0, 0.7);
  padding: 1.6rem 1.6rem;
}

.checkout-header {
  text-align: center;
  margin-bottom: 1rem;
}

.checkout-header .brand-icon {
  width: 42px;
  height: 42px;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0ea5e9;
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.checkout-header h2 {
  font-size: 1.28rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
  padding-right: 0;
}

.checkout-header p.subtitle {
  color: #94a3b8;
  font-size: 0.82rem;
}

/* Cart Summary */
.cart-summary {
  background: rgba(9, 13, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.cart-item {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.cart-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: #111a2d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.cart-details {
  flex: 1;
  min-width: 0;
}

.cart-details h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-specs {
  font-size: 0.76rem !important;
  color: #94a3b8 !important;
  margin-top: 2px;
}

/* Stepper Quantity Control for Mobile */
.cart-qty-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #cbd5e1;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: 8px;
  overflow: hidden;
}

.qty-stepper-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.qty-stepper-btn:hover,
.qty-stepper-btn:active {
  background: rgba(255, 255, 255, 0.15);
}

.qty-stepper input[type="number"] {
  width: 48px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  -moz-appearance: textfield;
}

.qty-stepper input[type="number"]::-webkit-inner-spin-button,
.qty-stepper input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.modal-content .cart-unit {
  font-size: 0.82rem;
  color: #38bdf8;
  font-weight: 600;
  margin-top: 2px;
}

.modal-content .qty-hint {
  font-size: 0.76rem;
  color: #94a3b8;
  text-align: right;
  margin-top: 0.3rem;
}

.qty-stepper-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cart-total-row {
  margin-top: 0.65rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.cart-total-row span {
  color: #94a3b8;
}

.cart-total-row strong {
  font-size: 1.05rem;
  color: #22c55e;
  font-weight: 700;
}

/* Form controls */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-group {
  margin-bottom: 0.85rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.35rem;
}

/* 16px font-size to avoid iOS Safari disruptive auto-zoom */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: 10px;
  color: #f8fafc;
  font-size: 16px; /* Critical for iOS input focus without zoom */
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
  min-height: 44px;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
  background: #0f172a;
}

.error-alert {
  display: none;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  font-size: 0.84rem;
  margin-bottom: 0.85rem;
  line-height: 1.4;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.btn-submit {
  width: 100%;
  padding: 0.85rem 1.4rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #0369a1 0%, #2563eb 50%, #4f46e5 100%);
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 8px 24px -4px rgba(14, 165, 233, 0.5);
  transition: all 0.2s ease;
  margin-top: 0.4rem;
  min-height: 48px;
  touch-action: manipulation;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(14, 165, 233, 0.7);
}

.btn-submit:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.footer-note {
  text-align: center;
  margin-top: 0.85rem;
  font-size: 0.76rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

/* ========== CUSTOMER SUPPORT MODAL & STYLES ========== */
.support-card-modal {
  max-width: 480px;
}

.support-channels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.2rem 0;
}

.support-channel-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0.8rem;
  background: rgba(9, 13, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: #f8fafc;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 80px;
  justify-content: center;
}

.support-channel-btn:hover,
.support-channel-btn:active {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.4);
  transform: translateY(-2px);
}

.support-channel-btn.whatsapp {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.08);
}
.support-channel-btn.whatsapp:hover,
.support-channel-btn.whatsapp:active {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
}

.support-channel-icon {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.support-channel-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #fff;
}

.support-channel-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* Support Form Section */
.support-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 1.2rem 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.faq-item {
  background: rgba(9, 13, 22, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-question {
  width: 100%;
  padding: 0.8rem 1rem;
  background: none;
  border: none;
  color: #e2e8f0;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: inherit;
}

.faq-question::after {
  content: "+";
  font-size: 1.1rem;
  color: #38bdf8;
  transition: transform 0.2s;
}

.faq-item.active .faq-question::after {
  content: "−";
}

.faq-answer {
  display: none;
  padding: 0 1rem 0.85rem;
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.5;
}

.faq-item.active .faq-answer {
  display: block;
}

.support-success-msg {
  display: none;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
  text-align: center;
}

/* ========== RESPONSIVE BREAKPOINTS ========== */
@media (max-width: 640px) {
  .top-bar {
    padding: calc(0.75rem + var(--sat)) calc(0.9rem + var(--sar)) 0.75rem calc(0.9rem + var(--sal));
  }

  .brand {
    font-size: 1rem;
  }

  .top-support-btn span.label {
    display: none;
  }

  .top-support-btn {
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
  }

  .floating-actions {
    bottom: calc(1.4rem + var(--sab));
    width: calc(100% - 1.8rem);
    gap: 0.6rem;
  }

  .btn {
    flex: 1;
    padding: 0.85rem 1rem;
    font-size: 0.92rem;
  }

  .product-meta {
    bottom: calc(5.8rem + var(--sab));
    padding: 0 calc(1rem + var(--sal)) 0 calc(1rem + var(--sar));
  }

  .product-meta h1 {
    font-size: clamp(1.3rem, 6vw, 1.8rem);
  }

  /* Modals become bottom-sheets on mobile */
  .modal {
    padding: 0;
    align-items: flex-end;
  }

  .modal-content {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    padding: 1.5rem 1.25rem calc(1.5rem + var(--sab));
    max-height: calc(88vh - var(--sat));
    max-height: calc(88dvh - var(--sat));
    width: 100%;
    max-width: 100%;
  }

  .sheet-handle {
    display: block;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .support-channels-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .product-meta h1 {
    font-size: 1.25rem;
  }

  .floating-actions {
    flex-direction: column;
    bottom: calc(1rem + var(--sab));
  }

  .product-meta {
    bottom: calc(9rem + var(--sab));
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========== FINAL UX PASS: states, scarcity, forms, order page ========== */

/* Disabled actions must look unavailable, not like a live green button. */
.btn:disabled,
.btn[aria-disabled="true"] {
  background: rgba(148, 163, 184, 0.16);
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-small {
  min-height: 44px;
  padding: 0.55rem 1.2rem;
  font-size: 0.88rem;
  flex: 0 0 auto !important;
}

/* Current-drop hierarchy: label, name, price + stock, time left. */
.drop-label {
  font-size: 0.74rem !important;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8 !important;
  margin-bottom: 0.35rem;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.product-price-tag {
  font-size: clamp(1.15rem, 4.5vw, 1.45rem);
}

.stock-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.7rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.stock-pill.is-low {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.4);
}
.stock-pill.is-out {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
}
.stock-pill[hidden] { display: none; }

.time-left[hidden],
.drop-label[hidden] { display: none; }

.time-left.is-ended {
  color: #fde68a !important;
  border-color: rgba(245, 158, 11, 0.4);
}

.store-notice {
  margin: 0.75rem auto 0;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.store-notice[hidden] { display: none; }
.store-notice p {
  font-size: 0.9rem !important;
  color: #e2e8f0 !important;
}

/* Product image: no broken-image icon; a calm branded backdrop when there is no usable image. */
.image-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(34, 197, 94, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 80%, rgba(14, 165, 233, 0.12) 0%, transparent 60%),
    #0b1220;
}
.image-fallback span {
  font-size: clamp(4rem, 22vw, 9rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.06);
  transform: translateY(-12%);
  user-select: none;
}
.product-stage.no-image .product-image,
.product-stage.is-loading .product-image { visibility: hidden; }
.product-stage.no-image .image-fallback,
.product-stage.is-loading .image-fallback { display: flex; }
.product-stage.image-pending .product-image { opacity: 0; }
.product-stage.is-loading .product-meta h1 { color: #cbd5e1; }

/* Checkout form */
.modal-content .form-required-note {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 0.6rem;
}
.modal-content .field-hint,
.modal-content .field-error {
  font-size: 0.78rem;
  margin-top: 0.3rem;
  line-height: 1.35;
}
.modal-content .field-hint { color: #94a3b8; }
.modal-content .field-error { color: #fca5a5; }
.modal-content .field-error:empty { display: none; }
.form-group input[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
  border-color: rgba(239, 68, 68, 0.7);
}
.form-group textarea#checkoutAddress { min-height: 64px; }
.modal-content .footer-note { line-height: 1.45; font-size: 0.76rem; color: #94a3b8; }
.footer-note a { color: #38bdf8; text-decoration: none; }
.payment-card-modal .footer-note { text-align: center; display: block; }

/* ========== ORDER STATUS PAGE ========== */
body.page {
  min-height: 100vh;
  min-height: 100dvh;
}
.brand-link {
  text-decoration: none;
  pointer-events: auto;
}
.order-page {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(5.5rem + var(--sat)) calc(16px + var(--sar)) calc(3rem + var(--sab)) calc(16px + var(--sal));
}
.order-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.status-card,
.help-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.status-head {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.status-head h2 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}
.status-message,
.next-steps,
.help-card p {
  color: #cbd5e1;
  line-height: 1.55;
  font-size: 0.94rem;
}
.status-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}
.status-icon.tone-ok { background: rgba(34, 197, 94, 0.16); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }
.status-icon.tone-ok::before { content: "✓"; }
.status-icon.tone-wait { background: rgba(14, 165, 233, 0.14); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.35); }
.status-icon.tone-wait::before { content: "…"; }
.status-icon.tone-stop { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.35); }
.status-icon.tone-stop::before { content: "!"; }
.status-icon.is-busy::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.order-summary {
  margin-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.order-summary[hidden] { display: none; }
.order-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.92rem;
}
.order-summary > div[hidden] { display: none; }
.order-summary dt { color: #94a3b8; flex: 0 0 auto; }
.order-summary dd { text-align: right; color: #f8fafc; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.order-ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; font-weight: 500; }
.next-steps { margin-top: 1rem; }
.next-steps[hidden] { display: none; }
.link-btn {
  background: none;
  border: none;
  color: #38bdf8;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 0.25rem;
  min-height: 44px;
}
.order-actions {
  display: flex;
  gap: 0.75rem;
  margin: 1.1rem 0 1.5rem;
}
.order-actions .btn { flex: 1; text-decoration: none; }
.order-actions .btn[hidden] { display: none; }
.help-card h2 { font-size: 1rem; font-weight: 700; margin-bottom: 0.35rem; }
.help-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.help-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}
.help-links a:hover { border-color: #38bdf8; color: #fff; }
@media (max-width: 380px) {
  .order-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
