:root {
  --bg: #070b14;
  --bg-elevated: #0d1321;
  --card: #111827;
  --card-hover: #1a2332;
  --border: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --gold: #f59e0b;
  --gold-dark: #d97706;
  --primary: #f59e0b;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.shop-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 26, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.shop-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shop-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shop-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 2px solid var(--gold);
}

.shop-brand h1 {
  font-size: 1.2rem;
  color: var(--gold);
}

.shop-brand p {
  font-size: 0.8rem;
  color: var(--muted);
}

.cart-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0f1a;
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
}

.shop-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.shop-hero {
  text-align: center;
  margin-bottom: 16px;
}

.shop-hero h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.shop-hero p {
  color: var(--muted);
}

.shop-ads {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.shop-ads.hidden {
  display: none;
}

.shop-ad-item {
  display: block;
  background: linear-gradient(135deg, #1a2744 0%, #2a3f66 100%);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.shop-ad-slide {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.shop-ad-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
}

.shop-ad-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.shop-ad-text {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.shop-ad-text strong {
  color: #e8c547;
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.shop-ad-text p {
  margin: 0;
  color: #c8d0e0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.shop-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.shop-filters input,
.shop-filters select {
  flex: 1;
  min-width: 160px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
}

.shop-status {
  text-align: center;
  color: var(--muted);
  padding: 40px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.product-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.product-card.in-cart {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.15);
}

.product-card .product-cat {
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 999px;
  align-self: flex-start;
}

.product-card h3 {
  font-size: 0.95rem;
  line-height: 1.35;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-brand {
  font-size: 0.78rem;
  color: var(--muted);
}

.shop-ads {
  margin-bottom: 12px;
}

.shop-global-discount-banner {
  margin: 0 0 16px;
}

.shop-global-discount-banner.hidden {
  display: none;
}

.shop-global-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1.5px solid rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(245, 158, 11, 0.08));
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.1);
  text-align: center;
}

.sgb-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.sgb-title {
  font-size: 1.05rem;
  color: #fca5a5;
  font-weight: 700;
}

.sgb-sub {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.product-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gold);
  margin-top: auto;
}

.product-price-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}

.product-price-original {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.product-price-sale {
  font-size: 1.08rem;
  color: #f87171;
}

.product-sale-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.product-card.on-sale {
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.08);
}

.product-sale-ribbon {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.product-img-btn {
  position: relative;
}

.product-stock {
  font-size: 0.72rem;
  color: var(--success);
}

.product-stock.low { color: #fbbf24; }
.product-stock.out { color: var(--danger); }

.product-return-badge {
  font-size: 0.68rem;
  color: var(--gold);
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  align-self: flex-start;
}

.btn-add {
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0f1a;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  font-size: 0.88rem;
  transition: transform 0.15s, opacity 0.15s;
}

.btn-add:active { transform: scale(0.97); }
.btn-add:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-add.in-cart-btn {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.btn-add-secondary {
  margin-top: 4px;
  padding: 6px;
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
  border-radius: 8px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
}

.product-img-btn {
  border: none;
  background: var(--bg);
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-img-placeholder {
  font-size: 2.5rem;
}

.product-img-count {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
}

.gallery-panel {
  background: var(--card);
  border-radius: 16px;
  max-width: 520px;
  width: 92%;
  margin: 40px auto;
  max-height: 85vh;
  overflow: auto;
  padding: 16px;
}

.gallery-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.gallery-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gallery-hint {
  margin: 0;
  text-align: center;
  color: var(--muted, #666);
  font-size: 0.9rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.gallery-pick {
  border: 3px solid transparent;
  border-radius: 12px;
  padding: 0;
  background: var(--bg);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s;
}

.gallery-pick.selected {
  border-color: #c9a227;
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.35);
}

.gallery-pick img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.gallery-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.gallery-foot.hidden {
  display: none;
}

.gallery-add-btn {
  width: 100%;
}

.gallery-body img {
  width: 100%;
  border-radius: 10px;
  object-fit: contain;
  max-height: 360px;
  background: var(--bg);
}

.shop-no-img {
  font-size: 4rem;
  text-align: center;
  padding: 40px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-item-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--bg);
}

.shop-footer {
  text-align: center;
  padding: 28px 20px 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  background: linear-gradient(180deg, transparent, rgba(7, 11, 20, 0.6));
}

.shop-footer-title,
.shop-footer-msg {
  margin: 0 0 14px;
  color: #cbd5e1;
  font-size: 0.95rem;
  font-weight: 600;
}

.shop-footer-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.shop-footer-contacts.hidden {
  display: none;
}

.footer-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  min-width: 148px;
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}

.footer-contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.footer-contact-btn:active {
  transform: scale(0.98);
}

.footer-contact-btn.call:hover { border-color: rgba(59, 130, 246, 0.5); }
.footer-contact-btn.wa:hover { border-color: rgba(34, 197, 94, 0.5); }
.footer-contact-btn.ig:hover { border-color: rgba(236, 72, 153, 0.5); }

.fcb-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
}

.footer-contact-btn.call .fcb-icon { background: rgba(59, 130, 246, 0.12); }
.footer-contact-btn.wa .fcb-icon { background: rgba(34, 197, 94, 0.12); }
.footer-contact-btn.ig .fcb-icon { background: rgba(236, 72, 153, 0.12); }

.fcb-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: right;
}

.fcb-text strong {
  font-size: 0.82rem;
  color: var(--text);
}

.fcb-text span {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 768px) {
  .shop-footer {
    padding: 24px 12px calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .shop-footer-contacts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    justify-content: stretch;
  }

  .footer-contact-btn {
    min-width: 0;
    width: 100%;
    flex-direction: column;
    align-items: center;
    padding: 12px 6px;
    gap: 8px;
  }

  .fcb-text {
    align-items: center;
    text-align: center;
  }

  .fcb-text span {
    font-size: 0.65rem;
    line-height: 1.3;
  }

  .nf-shop-mobile .shop-contact-fab,
  .nf-shop-native .shop-contact-fab {
    display: none;
  }
}

.shop-footer .muted {
  margin-top: 4px;
  font-size: 0.75rem;
}

.shop-footer a {
  color: var(--primary);
  text-decoration: none;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.overlay.hidden { display: none; }

.cart-panel {
  background: var(--card);
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cart-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 12px;
  -webkit-overflow-scrolling: touch;
}

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 12px;
  flex-shrink: 0;
}

.cart-checkout-sticky {
  flex-shrink: 0;
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, var(--card) 20%);
}

.btn-order-sticky {
  width: 100%;
  margin: 0;
  font-size: 1.05rem;
  padding: 14px 20px;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  max-height: min(36vh, 280px);
  overflow-y: auto;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: var(--bg);
  border-radius: 8px;
  gap: 8px;
}

.cart-item-info strong {
  display: block;
  font-size: 0.9rem;
}

.cart-item-info span {
  font-size: 0.8rem;
  color: var(--muted);
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-qty button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

.cart-total {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  margin-bottom: 12px;
}

.checkout-form .form-group {
  margin-bottom: 12px;
}

.error-msg {
  color: #ef4444;
  font-size: 0.85rem;
  min-height: 20px;
  margin-bottom: 8px;
}

.btn-order {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0f1a;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.success-box {
  background: var(--card);
  padding: 32px 24px;
  border-radius: 16px;
  text-align: center;
  max-width: 360px;
  margin: auto;
  border: 1px solid var(--border);
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.order-ref {
  margin: 12px 0 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-cart {
  text-align: center;
  color: var(--muted);
  padding: 24px;
}

@media (min-width: 640px) {
  .overlay {
    align-items: center;
  }
  .cart-panel {
    border-radius: 16px;
  }
}

/* حساب المشتري */
.shop-brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.shop-top-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold);
  border-color: var(--border);
}

.account-main {
  max-width: 560px;
  margin: 0 auto;
}

.account-panel {
  animation: accountPanelIn 0.45s ease backwards;
}

.account-panel.account-panel-in {
  animation: accountPanelIn 0.4s ease;
}

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

.card-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.card-panel.hidden {
  display: none;
}

.account-card-head {
  text-align: center;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.account-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.account-card-head h2 {
  color: var(--gold);
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.account-card-head .muted {
  margin-bottom: 0;
}

.card-panel h2 {
  color: var(--gold);
  margin-bottom: 6px;
}

.account-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.account-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.account-benefits li span:first-child {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.form-section {
  margin-bottom: 22px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(7, 11, 20, 0.55);
  border: 1px solid var(--border);
  transition: border-color 0.25s;
}

.form-section:focus-within {
  border-color: rgba(245, 158, 11, 0.25);
}

.form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.form-section-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #0a0f1a;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  flex-shrink: 0;
}

.form-section-head h3 {
  font-size: 0.98rem;
  margin-bottom: 2px;
  color: var(--text);
}

.form-section-head p {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

.account-form .field-box,
.checkout-form .field-box,
.shop-form .field-box {
  margin-bottom: 14px;
}

.account-form .field-box-full,
.checkout-form .field-box-full,
.shop-form .field-box-full {
  margin-bottom: 0;
}

.account-form .field-box label,
.checkout-form .field-box label,
.shop-form .field-box label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.account-form .field-input-wrap,
.checkout-form .field-input-wrap,
.shop-form .field-input-wrap,
.coupon-input-wrap {
  display: flex;
  align-items: center;
  min-height: 50px;
  background: var(--bg-elevated, #0d1321);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  overflow: hidden;
}

.account-form .field-input-wrap:hover,
.checkout-form .field-input-wrap:hover,
.shop-form .field-input-wrap:hover,
.coupon-input-wrap:hover {
  border-color: rgba(245, 158, 11, 0.35);
}

.account-form .field-input-wrap:focus-within,
.checkout-form .field-input-wrap:focus-within,
.shop-form .field-input-wrap:focus-within,
.coupon-input-wrap:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
  transform: translateY(-1px);
}

.account-form .field-icon,
.checkout-form .field-icon,
.shop-form .field-icon,
.coupon-input-wrap .field-icon {
  padding: 0 12px 0 14px;
  font-size: 1rem;
  opacity: 0.75;
  flex-shrink: 0;
  user-select: none;
}

.account-form input,
.account-form select,
.checkout-form input,
.checkout-form select,
.shop-form input,
.shop-form select,
.coupon-input-wrap input {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 14px 14px 14px 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.account-form .field-select-wrap select,
.checkout-form .field-select-wrap select,
.shop-form .field-select-wrap select {
  padding: 14px 12px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-left: 32px;
}

.account-form input::placeholder,
.checkout-form input::placeholder,
.shop-form input::placeholder,
.coupon-input-wrap input::placeholder {
  color: #64748b;
  font-size: 0.88rem;
}

.account-form input:-webkit-autofill,
.account-form input:-webkit-autofill:hover,
.account-form input:-webkit-autofill:focus,
.checkout-form input:-webkit-autofill,
.checkout-form input:-webkit-autofill:hover,
.checkout-form input:-webkit-autofill:focus,
.shop-form input:-webkit-autofill,
.shop-form input:-webkit-autofill:hover,
.shop-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-elevated, #0d1321) inset;
  transition: background-color 5000s ease-in-out 0s;
}

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.76rem;
  color: var(--muted);
}

.btn-account-submit {
  margin-top: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.3);
}

.btn-account-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.4);
}

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

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

.muted {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.form-row-2,
.checkout-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row-2 .field-box {
  margin-bottom: 0;
}

.form-row-2 + .field-box,
.field-box + .form-row-2 {
  margin-top: 14px;
}

@media (max-width: 520px) {
  .form-row-2,
  .checkout-row {
    grid-template-columns: 1fr;
  }
}

.checkout-form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

.switch-tab {
  text-align: center;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.link-btn-inline {
  background: none;
  border: none;
  color: var(--gold);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.profile-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.profile-user {
  color: var(--muted);
  margin-bottom: 12px;
}

.buyer-id-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  margin-bottom: 8px;
}

.buyer-id-label {
  color: var(--muted);
  font-size: 0.85rem;
}

#profileBuyerCode {
  font-family: ui-monospace, monospace;
  font-size: 1.1rem;
  color: var(--primary, #2563eb);
  letter-spacing: 0.5px;
}

.buyer-id-hint {
  font-size: 0.82rem;
  margin-bottom: 20px;
}

.success-msg {
  color: #22c55e;
  font-size: 0.85rem;
  min-height: 20px;
}

.btn-outline-sm {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  cursor: pointer;
}

.btn-outline-full {
  display: block;
  text-align: center;
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

/* طلباتي — تتبع الحالة */
.my-orders-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.my-orders-section h3 {
  margin-bottom: 4px;
}

.my-orders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.buyer-order-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.buyer-order-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.buyer-order-ref {
  font-size: 0.85rem;
  color: var(--muted);
}

.buyer-order-total {
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

.buyer-order-items {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.order-track {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
}

.order-track-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  padding-bottom: 16px;
}

.order-track-step:last-child {
  padding-bottom: 0;
}

.order-track-step:not(:last-child)::before {
  content: '';
  position: absolute;
  right: 11px;
  top: 24px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.order-track-step.done:not(:last-child)::before {
  background: var(--gold);
}

.order-track-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  z-index: 1;
}

.order-track-step.done .order-track-dot {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.15);
}

.order-track-step.active .order-track-dot {
  border-color: var(--gold);
  background: var(--gold);
  color: #111;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}

.order-track-label {
  font-size: 0.92rem;
  padding-top: 2px;
  color: var(--muted);
}

.order-track-step.done .order-track-label,
.order-track-step.active .order-track-label {
  color: var(--text);
  font-weight: 500;
}

.order-track-step.active .order-track-label {
  color: var(--gold);
}

.order-status-banner {
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 12px;
}

.order-status-banner.pending { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.order-status-banner.confirmed { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.order-status-banner.with_courier { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.order-status-banner.delivered { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.order-status-banner.cancelled { background: rgba(239, 68, 68, 0.12); color: #f87171; }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.cart-total-row.final-row {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 1.05rem;
}

.cart-total-row.discount-row {
  color: #4ade80;
}

.coupon-box {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  align-items: stretch;
}

.coupon-input-wrap {
  flex: 1;
  min-height: 48px;
}

.coupon-input-wrap input {
  padding: 12px 12px 12px 0;
  text-transform: uppercase;
}

.btn-coupon {
  flex-shrink: 0;
  padding: 0 18px;
  border-radius: 12px;
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}

.btn-coupon:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--gold);
}

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

.coupon-msg {
  min-height: 20px;
  font-size: 0.85rem;
  margin-top: 8px;
}

.coupon-msg.success { color: #4ade80; }
.coupon-msg.error { color: #f87171; }

/* ═══ تطبيق أندرويد — واجهة تفاعلية ═══ */

.shop-app-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: radial-gradient(ellipse at 50% 30%, #1a2744 0%, #0a0f1a 55%);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.shop-app-splash.splash-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-logo {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  border: 3px solid var(--gold);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.25);
  animation: splashPulse 1.6s ease-in-out infinite;
}

.shop-app-splash h2 {
  color: var(--gold);
  font-size: 1.5rem;
  margin-top: 8px;
}

.shop-app-splash p {
  color: var(--muted);
  font-size: 0.95rem;
}

.splash-spinner {
  width: 36px;
  height: 36px;
  margin-top: 12px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes splashPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

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

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

.card-enter {
  animation: cardEnter 0.35s ease backwards;
}

.shop-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 0;
  margin-bottom: 18px;
  background: linear-gradient(145deg, #1a2744 0%, #0f172a 50%, #111827 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  box-shadow: var(--shadow);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 24px 20px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.shop-hero h2 {
  font-size: 1.45rem;
  margin-bottom: 8px;
  color: var(--text);
}

.shop-hero p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  top: -80px;
  left: -40px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 70%);
  pointer-events: none;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 160px;
}

.search-wrap .search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.7;
}

.search-wrap input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
}

.category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-chips::-webkit-scrollbar { display: none; }

.category-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}

.category-chip:active {
  transform: scale(0.96);
}

.category-chip.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0f1a;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.skeleton-card { pointer-events: none; }

.skeleton-img,
.skeleton-line,
.skeleton-btn {
  background: linear-gradient(90deg, #1a2234 25%, #243049 50%, #1a2234 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 10px;
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 10px;
}

.skeleton-line {
  height: 12px;
  margin-bottom: 8px;
}

.skeleton-line.w60 { width: 60%; }
.skeleton-line.w90 { width: 90%; }
.skeleton-line.w40 { width: 40%; }

.skeleton-btn {
  height: 38px;
  margin-top: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.shop-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: rgba(17, 24, 39, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
  align-items: stretch;
  gap: 4px;
}

.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  border: none;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-family: inherit;
  font-size: 0.72rem;
  border-radius: 12px;
  transition: color 0.15s, background 0.15s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bn-item:active {
  background: rgba(255, 255, 255, 0.05);
}

.bn-item.active {
  color: var(--gold);
}

.bn-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.bn-icon-wrap {
  position: relative;
  display: inline-block;
}

.bn-badge {
  position: absolute;
  top: -6px;
  left: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bn-badge.hidden { display: none; }

.cart-btn-header {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.show-on-native { display: none; }
.hide-on-native { }

.nf-shop-native .show-on-native,
.nf-shop-mobile .show-on-native {
  display: inline-flex;
}

.nf-shop-native .hide-on-native,
.nf-shop-mobile .hide-on-native {
  display: none !important;
}

.nf-shop-native .shop-bottom-nav,
.nf-shop-mobile .shop-bottom-nav {
  display: flex;
}

.nf-shop-native .shop-main,
.nf-shop-mobile .shop-main {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.nf-shop-native .account-main,
.nf-shop-mobile .account-main {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.nf-shop-native .shop-header,
.nf-shop-mobile .shop-header {
  padding-top: env(safe-area-inset-top, 0px);
}

.nf-shop-native .category-select-desktop,
.nf-shop-mobile .category-select-desktop {
  display: none;
}

.nf-shop-native .product-grid,
.nf-shop-mobile .product-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.nf-shop-native .product-card,
.nf-shop-mobile .product-card {
  padding: 12px;
  border-radius: 16px;
}

.nf-shop-native .product-card:active,
.nf-shop-mobile .product-card:active {
  transform: scale(0.98);
}

.nf-shop-native .btn-add:active,
.nf-shop-mobile .btn-add:active {
  transform: scale(0.97);
}

.nf-shop-native body,
.nf-shop-mobile body {
  overscroll-behavior-y: contain;
}

@media (min-width: 769px) {
  .category-chips {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .shop-bottom-nav {
    display: none !important;
  }

  .nf-shop-mobile .shop-main {
    padding-bottom: 60px;
  }
}

@media (min-width: 640px) {
  .overlay {
    align-items: center;
  }
  .cart-panel {
    border-radius: 16px;
  }
}

/* محفظة المشتري */
.wallet-card {
  margin: 20px 0 24px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(17, 24, 39, 0.95));
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.wallet-label { color: var(--muted); font-size: 0.9rem; }
.wallet-balance { font-size: 1.75rem; font-weight: 800; color: var(--gold); margin-top: 4px; }
.wallet-tx-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; max-height: 280px; overflow-y: auto; }
.wallet-tx-item { padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.wallet-tx-item.credit { border-color: rgba(34, 197, 94, 0.35); }
.wallet-tx-item.debit { border-color: rgba(239, 68, 68, 0.25); }
.wallet-tx-main { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wallet-tx-amount { font-weight: 700; white-space: nowrap; }
.wallet-tx-item.credit .wallet-tx-amount { color: #4ade80; }
.wallet-tx-item.debit .wallet-tx-amount { color: #f87171; }
.wallet-tx-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 0.78rem; margin-top: 6px; }
.wallet-checkout-card {
  margin: 16px 0;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(7, 11, 20, 0.6));
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.wallet-checkout-card:has(.wallet-toggle-input:checked) {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.15);
}

.wallet-toggle-card {
  display: block;
  cursor: pointer;
  position: relative;
}

.wallet-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wallet-toggle-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 2px;
}

.wallet-toggle-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.25);
  flex-shrink: 0;
}

.wallet-toggle-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wallet-toggle-text strong {
  font-size: 0.95rem;
  color: var(--text);
}

.wallet-toggle-text small {
  font-size: 0.8rem;
  color: var(--muted);
}

.wallet-toggle-text small span {
  color: var(--gold);
  font-weight: 700;
}

.wallet-toggle-switch {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  flex-shrink: 0;
  transition: background 0.25s;
}

.wallet-toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s;
}

.wallet-toggle-input:checked ~ .wallet-toggle-inner .wallet-toggle-switch {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
}

.wallet-toggle-input:checked ~ .wallet-toggle-inner .wallet-toggle-switch::after {
  transform: translateX(-20px);
}

.wallet-amount-panel {
  margin-top: 14px;
  animation: walletPanelIn 0.3s ease;
}

.wallet-amount-panel.hidden {
  display: none;
}

.wallet-amount-card {
  padding: 14px;
  border-radius: 12px;
  background: rgba(7, 11, 20, 0.75);
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.wallet-amount-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.wallet-amount-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold);
}

.wallet-amount-max {
  font-size: 0.78rem;
  color: var(--muted);
}

.wallet-amount-max strong {
  color: #fbbf24;
  font-weight: 800;
}

.wallet-amount-field {
  margin-bottom: 12px;
}

.field-input-wrap-amount {
  min-height: 54px;
}

.field-input-wrap-amount input[type="number"] {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  -moz-appearance: textfield;
}

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

.field-suffix {
  padding-left: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

.wallet-quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.wallet-quick-btn {
  padding: 10px 6px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-elevated, #0d1321);
  color: var(--text);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s, background 0.2s, color 0.2s;
}

.wallet-quick-btn:hover {
  border-color: rgba(245, 158, 11, 0.45);
  color: var(--gold);
}

.wallet-quick-btn:active {
  transform: scale(0.96);
}

.wallet-quick-btn.wallet-quick-full {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold);
  font-weight: 700;
}

.wallet-quick-btn.wallet-quick-full:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--gold);
}

@media (max-width: 420px) {
  .wallet-quick-amounts {
    grid-template-columns: repeat(2, 1fr);
  }
}

.shop-form input[type="number"],
.checkout-form input[type="number"],
.account-form input[type="number"] {
  background: transparent !important;
  color: var(--text) !important;
  -moz-appearance: textfield;
}

.shop-form input[type="number"]::-webkit-outer-spin-button,
.shop-form input[type="number"]::-webkit-inner-spin-button,
.checkout-form input[type="number"]::-webkit-outer-spin-button,
.checkout-form input[type="number"]::-webkit-inner-spin-button,
.account-form input[type="number"]::-webkit-outer-spin-button,
.account-form input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

@keyframes walletPanelIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.wallet-checkout-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.5;
  text-align: center;
}

.form-section-head.compact {
  margin-bottom: 14px;
}

.checkout-form-section {
  margin: 18px 0;
  padding: 16px;
  border-radius: 14px;
  background: rgba(7, 11, 20, 0.55);
  border: 1px solid var(--border);
  transition: border-color 0.25s;
}

.checkout-form-section:focus-within {
  border-color: rgba(245, 158, 11, 0.25);
}

.pay-option-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pay-option-card {
  display: block;
  cursor: pointer;
  position: relative;
}

.pay-option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pay-option-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-elevated, #0d1321);
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.pay-option-card:hover .pay-option-inner {
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

.pay-option-card input:checked + .pay-option-inner {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.pay-option-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.pay-option-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pay-option-text strong {
  font-size: 0.92rem;
  color: var(--text);
}

.pay-option-text small {
  font-size: 0.76rem;
  color: var(--muted);
}

.pay-option-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: transparent;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.pay-option-card input:checked + .pay-option-inner .pay-option-check {
  border-color: var(--gold);
  background: var(--gold);
  color: #0a0f1a;
  font-weight: 800;
}

.delivery-card-hint {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  line-height: 1.5;
  animation: walletPanelIn 0.3s ease;
}

.delivery-card-hint.hidden {
  display: none;
}

.cart-total-row.wallet-pay-row { color: #60a5fa; }
.cart-total-row.cod-row { color: var(--muted); font-size: 0.9rem; }
.shop-buyer-kpi.wallet .kpi-val { color: #fbbf24; }
.btn-wallet-refund { border-color: rgba(245, 158, 11, 0.5) !important; color: var(--gold) !important; }

.shop-header-actions { display: none; align-items: center; gap: 8px; }
.nf-shop-native .shop-header-actions, .nf-shop-mobile .shop-header-actions { display: flex; }
.header-wallet-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
  border-radius: 999px; border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.1); color: var(--gold); font-family: inherit; cursor: pointer;
}
.header-wallet-btn.hidden { display: none !important; }
.header-wallet-btn:active { transform: scale(0.97); }
.hw-icon { font-size: 1.1rem; }
.hw-text { display: flex; flex-direction: column; line-height: 1.2; }
.hw-label { font-size: 0.65rem; color: var(--muted); }
.hw-balance { font-size: 0.82rem; font-weight: 800; color: var(--gold); }
.wallet-modal-overlay { align-items: flex-end; }
.wallet-modal-panel {
  width: 100%; max-width: 480px; max-height: 88vh; background: var(--card);
  border-radius: 20px 20px 0 0; border: 1px solid var(--border); padding: 18px 16px 24px;
  display: flex; flex-direction: column; overflow: hidden;
}
.wallet-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.wallet-modal-head h3 { margin: 0; color: var(--gold); }
.wallet-modal-balance { margin: 4px 0 0; font-size: 1.5rem; font-weight: 800; }
.wallet-modal-body { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.wallet-tx-desc strong { display: block; font-size: 0.9rem; line-height: 1.45; }
.wallet-tx-type { font-size: 0.75rem; display: block; margin-top: 2px; }
.wallet-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
@media (min-width: 640px) {
  .wallet-modal-overlay { align-items: center; }
  .wallet-modal-panel { border-radius: 16px; max-height: 80vh; }
}

.shop-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.shop-empty-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
  opacity: 0.85;
}

.shop-empty-state p {
  margin-bottom: 14px;
}

.btn-outline-sm {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

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

.shop-toast {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 200;
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #86efac;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: var(--shadow);
}

.shop-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.shop-toast.error {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.shop-login-overlay {
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.shop-login-box {
  position: relative;
  background: var(--card);
  padding: 32px 24px 24px;
  border-radius: 18px;
  text-align: center;
  max-width: 380px;
  width: 100%;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  animation: cardEnter 0.3s ease;
}

.shop-login-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: color 0.2s, border-color 0.2s;
}

.shop-login-close:hover {
  color: var(--text);
  border-color: var(--gold);
}

.shop-login-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.shop-login-box h3 {
  color: var(--gold);
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.shop-login-msg {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

a.shop-login-btn {
  display: block;
  text-decoration: none;
  margin-bottom: 12px;
  text-align: center;
}

.shop-login-skip {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px 12px;
}

.shop-login-skip:hover {
  color: var(--text);
  text-decoration: underline;
}

body.shop-login-open {
  overflow: hidden;
}

.nf-shop-native .shop-toast,
.nf-shop-mobile .shop-toast {
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

/* زر تواصل عائم */
.shop-contact-fab {
  position: fixed;
  z-index: 90;
  right: 16px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.nf-shop-native .shop-contact-fab,
.nf-shop-mobile .shop-contact-fab {
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

.shop-contact-fab-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fabMenuIn 0.25s ease;
}

.shop-contact-fab-menu.hidden {
  display: none;
}

@keyframes fabMenuIn {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.fab-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s, border-color 0.2s;
}

.fab-action:hover {
  transform: translateX(-4px);
}

.fab-action:active {
  transform: scale(0.97);
}

.fab-action.fab-call:hover { border-color: rgba(59, 130, 246, 0.5); }
.fab-action.fab-wa:hover { border-color: rgba(34, 197, 94, 0.5); }

.fab-action-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.fab-call .fab-action-icon { background: rgba(59, 130, 246, 0.15); }
.fab-wa .fab-action-icon { background: rgba(34, 197, 94, 0.15); }

.shop-contact-fab-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(34, 197, 94, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.shop-contact-fab-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(34, 197, 94, 0.35);
  animation: fabPulse 2s ease-out infinite;
  pointer-events: none;
}

.shop-contact-fab.open .shop-contact-fab-btn::before {
  animation: none;
  opacity: 0;
}

@keyframes fabPulse {
  0% { transform: scale(1); opacity: 0.7; }
  70% { transform: scale(1.2); opacity: 0; }
  100% { transform: scale(1.2); opacity: 0; }
}

.shop-contact-fab-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 28px rgba(34, 197, 94, 0.55);
}

.shop-contact-fab-btn:active {
  transform: scale(0.96);
}

.shop-contact-fab.open .shop-contact-fab-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.45);
}

.fab-btn-icon {
  line-height: 1;
}

.fab-btn-icon.hidden {
  display: none;
}
