:root {
  --bg: #0c0c0e;
  --surface: #16161a;
  --black: #f4f4f6;
  --gold: #d4af37;
  --gold-hover: #e6c34d;
  --muted: #9ca3af;
  --border: rgba(212, 175, 55, 0.22);
  --danger: #b91c1c;
  --radius: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Cairo", system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  background: #0c0c0e;
  background-color: #0c0c0e;
  color: #f4f4f6;
}

body {
  min-height: 100vh;
  color: #f4f4f6;
  line-height: 1.6;
  background:
    radial-gradient(ellipse at 85% 10%, rgba(212, 175, 55, 0.08) 0%, transparent 45%),
    radial-gradient(ellipse at 15% 60%, rgba(56, 70, 95, 0.14) 0%, transparent 50%),
    linear-gradient(180deg, #111216 0%, #16181f 50%, #0f1014 100%);
  background-attachment: scroll;
  background-color: #0c0c0e;
}

section,
main,
.products-section,
.featured-section,
.slider-section,
.showcase-section,
.featured-auto-section {
  background: transparent;
  background-color: transparent;
  color: #f4f4f6;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 12px;
}

.hidden {
  display: none !important;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--gold-hover);
  outline-offset: 3px;
}

.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ui-icon {
  width: 1.15em;
  height: 1.15em;
  display: inline-block;
  flex: 0 0 auto;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.18em;
}

/* شريط الأدمن */
.admin-toolbar {
  padding: 8px 0;
  color: #f4f4f6;
  background: linear-gradient(90deg, #181920 0%, #111217 100%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
}

.admin-toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-badge {
  color: #e6c34d;
  font-size: 0.85rem;
  font-weight: 700;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* الهيدر الزجاجي الضبابي الفاخر */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 12, 14, 0.82);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  transform: translateZ(0);
  will-change: transform;
  transition: all 0.3s ease;
}

.nav-top {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
}

.logo {
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-decoration: none;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
}

.search-box input {
  width: 100%;
  padding: 9px 36px 9px 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  outline: none;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.search-box:focus-within {
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.16), 0 0 18px rgba(212, 175, 55, 0.14);
}

.search-box input::placeholder {
  color: #9ca3af;
}

.search-box input:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

.search-icon {
  position: absolute;
  right: 12px;
  color: #9ca3af;
  font-size: 0.85rem;
  pointer-events: none;
}

.search-clear {
  position: absolute;
  left: 10px;
  border: none;
  color: var(--muted);
  background: none;
  font-weight: 800;
  cursor: pointer;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-categories {
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cat-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 12px;
}

.cat-tab {
  padding: 6px 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.cat-tab:hover {
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(212, 175, 55, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 4px 14px rgba(212, 175, 55, 0.14);
  transform: translateY(-1px);
}

.cat-tab:hover:not(.active) {
  color: #f4f4f6;
}

.cat-tab.active {
  border: 1px solid #e6c34d;
  color: #09090b;
  background: linear-gradient(135deg, #d4af37 0%, #b59024 100%);
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

/* الأزرار */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 14px;
  border: none;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary,
.btn-gold,
.drawer-footer .btn,
.add-to-cart-btn {
  border: none;
  color: #09090b;
  background: linear-gradient(135deg, #d4af37 0%, #b59024 100%);
  font-weight: 800;
}

.btn-primary:hover,
.btn-gold:hover,
.drawer-footer .btn:hover {
  color: #09090b;
  background: linear-gradient(135deg, #d4af37 0%, #b59024 100%);
  box-shadow: 0 8px 20px rgba(198, 161, 91, 0.32);
  transform: translateY(-2px);
}

.btn-outline {
  padding: 8px 14px;
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  color: #e6c34d;
  background: rgba(255, 255, 255, 0.06);
  transition: all 0.25s ease;
}

.btn-outline:hover {
  border-color: #d4af37;
  color: #09090b;
  background: linear-gradient(135deg, #d4af37 0%, #b59024 100%);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.25);
  transform: translateY(-2px);
}

.btn-outline-light {
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-outline-light:hover {
  border-color: #d4af37;
  color: #09090b;
  background: #d4af37;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 11px 26px;
  font-size: 0.98rem;
}

.btn-block {
  width: 100%;
}

.nav-actions .btn,
.cart-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-actions .btn:hover,
.cart-btn:hover {
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(212, 175, 55, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 5px 16px rgba(212, 175, 55, 0.14);
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 9px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.badge {
  padding: 1px 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
}

/* البانر الفاخر */
.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  color: #fff;
  background: radial-gradient(circle at 50% 35%, rgba(212, 175, 55, 0.14) 0%, rgba(24, 26, 32, 0.85) 55%, #111216 100%);
  text-align: center;
}

.hero-tag {
  padding: 3px 12px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.hero h1 {
  margin: 12px 0 8px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hero p {
  max-width: 560px;
  margin: 0 auto 20px;
  color: #d4d4d8;
  font-size: 0.96rem;
}

/* قسم المنتجات */
.featured-auto-section {
  padding: 26px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(212, 175, 55, 0.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.products-section {
  padding: 38px 12px 30px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.section-header h2,
h1,
h2,
h3,
p,
span {
  color: #f4f4f6;
}

.section-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #d6c17c;
}

.view-controls {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.view-btn {
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-btn.active {
  border-color: #d4af37;
  color: #09090b;
  background: #d4af37;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.products-wrapper {
  position: relative;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.products-grid.slider-mode {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-behavior: smooth;
}

.products-grid.slider-mode .product-card {
  min-width: 220px;
  max-width: 220px;
  flex-shrink: 0;
}

.slider-arrow,
.carousel-arrow,
.scroll-btn,
.slider-btn,
button[class*="arrow"],
button[class*="prev"],
button[class*="next"] {
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  color: #e6c34d;
  background: rgba(18, 19, 24, 0.85);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: all 0.25s ease;
}

.slider-arrow {
  position: absolute;
  top: 40%;
  z-index: 20;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.slider-arrow.prev {
  right: -6px;
}

.slider-arrow.next {
  left: -6px;
}

.slider-arrow:hover,
.carousel-arrow:hover,
.scroll-btn:hover,
.slider-btn:hover,
button[class*="arrow"]:hover,
button[class*="prev"]:hover,
button[class*="next"]:hover {
  border-color: #d4af37;
  color: #09090b;
  background: linear-gradient(135deg, #d4af37 0%, #b59024 100%);
  transform: scale(1.08);
}

.slider-arrow:hover {
  transform: translateY(-50%) scale(1.08);
}

/* كارت المنتج */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: 16px;
  color: #f4f4f6;
  background: linear-gradient(155deg, #202127 0%, #17181d 56%, #121317 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 10px 24px rgba(0, 0, 0, 0.28);
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  border-color: rgba(230, 195, 77, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 30px rgba(0, 0, 0, 0.38), 0 0 18px rgba(212,  175, 55, 0.1);
  transform: translateY(-3px);
}

.card-admin-controls {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 10;
  display: flex;
  gap: 4px;
}

.icon-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
}

.edit-icon-btn {
  color: var(--gold);
  background: var(--black);
}

.delete-icon-btn {
  color: #fff;
  background: var(--danger);
}

.product-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(212, 175, 55, 0.08), transparent 58%),
    linear-gradient(145deg, #202127, #121317);
  cursor: pointer;
}

.product-img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 10px;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.product-card:hover .product-img {
  transform: scale(1.025);
}

.product-quick-add {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 10px;
  color: #e6c34d;
  background: rgba(16, 17, 21, 0.94);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.product-quick-add:hover {
  border-color: var(--gold-hover);
  color: #111216;
  background: linear-gradient(135deg, #e6c34d, #b59024);
}

.product-quick-add:disabled,
#detailAddToCartButton:disabled {
  cursor: wait;
}

.add-cart-wave {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: currentColor;
}

.add-cart-wave span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff2b0, #d4af37 70%);
  box-shadow: 0 0 9px rgba(230, 195, 77, 0.65);
  animation: add-cart-wave 0.72s cubic-bezier(0.35, 0, 0.2, 1) infinite;
}

.add-cart-wave span:nth-child(2) {
  animation-delay: 0.12s;
}

.add-cart-wave span:nth-child(3) {
  animation-delay: 0.24s;
}

.is-loading {
  opacity: 1;
}

.btn-primary.is-loading {
  border: 1px solid rgba(230, 195, 77, 0.62);
  color: var(--gold-hover);
  background: linear-gradient(145deg, #27252b, #15161a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 16px rgba(212, 175, 55, 0.12);
}

@keyframes add-cart-wave {
  0%, 60%, 100% {
    opacity: 0.55;
    transform: translateY(3px) scale(0.82);
  }
  30% {
    opacity: 1;
    transform: translateY(-5px) scale(1.18);
  }
}

.product-image-dots {
  position: absolute;
  right: 50%;
  bottom: 14px;
  z-index: 2;
  display: flex;
  gap: 5px;
  transform: translateX(50%);
}

.product-image-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(244, 244, 246, 0.48);
  cursor: pointer;
}

.product-image-dot.selected {
  background: var(--gold-hover);
  box-shadow: 0 0 8px rgba(230, 195, 77, 0.55);
}

.zoom-hint {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 7px;
  border-radius: 5px;
  color: #fff;
  background: rgba(10, 10, 10, 0.75);
  font-size: 0.7rem;
}

.card-ribbon {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  padding: 2px 8px;
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: var(--gold);
  background: var(--black);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.product-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 75%);
}

.product-cat,
.muted {
  color: #d3b75b;
  font-size: 0.72rem;
  font-weight: 800;
}

.product-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.5em;
  margin: 4px 0 8px;
  color: #f4f4f6;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-price {
  margin-bottom: 8px;
  color: var(--gold-hover);
  font-size: 1.05rem;
  font-weight: 800;
}

.price-display {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.price-current {
  color: var(--gold-hover);
  font-weight: 800;
}

.price-old {
  color: #9ca3af;
  font-size: 0.78em;
  font-weight: 600;
  text-decoration: line-through;
}

.discount-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 999px;
  color: #e6c34d;
  background: rgba(212, 175, 55, 0.12);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.auto-mini-price {
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 800;
}

.related-product-price {
  margin-top: 4px;
  font-size: 0.78rem;
}

.detail-price {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.cart-item-price {
  font-size: 0.88rem;
}

.discount-preview {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.discount-preview .price-old {
  margin-inline: 3px;
}

.size-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.selected-size-display {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  color: #d4d4d8;
  background: rgba(212, 175, 55, 0.08);
  font-size: 0.82rem;
}

.selected-size-display strong {
  color: var(--gold-hover);
}

.size-btn {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-card .size-btn {
  border-color: rgba(255, 255, 255, 0.14);
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.055);
}

.product-card .size-btn.selected {
  border-color: rgba(230, 195, 77, 0.75);
  color: #f7e7a5;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(181, 144, 36, 0.12));
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

.size-btn:hover {
  border-color: #c6a15b;
}

.size-btn.active,
.size-btn.selected {
  border-color: rgba(255, 255, 255, 0.12);
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.product-body .btn-primary {
  margin-top: auto;
  padding: 9px 14px;
  border: none;
  border-radius: 999px;
  color: #09090b;
  background: linear-gradient(135deg, #d4af37 0%, #b59024 100%);
  box-shadow: 0 4px 12px rgba(10, 10, 10, 0.14);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  transition: all 0.25s ease;
}

.product-body .btn-primary:hover {
  border-color: #c6a15b;
  color: #ffffff;
  background: linear-gradient(135deg, #c6a15b 0%, #a8833e 100%);
  box-shadow: 0 6px 16px rgba(198, 161, 91, 0.35);
}

#loadMoreBtn {
  padding: 11px 32px;
  border: 1.5px solid #c6a15b;
  border-radius: 999px;
  color: #c6a15b;
  background: #0a0a0a;
  box-shadow: 0 6px 18px rgba(10, 10, 10, 0.12);
  font-size: 0.92rem;
  font-weight: 800;
  transition: all 0.25s ease;
}

#loadMoreBtn:hover {
  color: #ffffff;
  background: #c6a15b;
  transform: translateY(-2px);
}

.auto-slider-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.auto-slider-track::-webkit-scrollbar {
  display: none;
}

.auto-mini-card {
  min-width: 190px;
  max-width: 190px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(20, 22, 28, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 12px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.auto-mini-card:hover {
  border-color: rgba(212, 175, 55, 0.55);
  transform: translateY(-4px);
}

.auto-mini-card img {
  display: block;
  width: 100%;
  height: 218px;
  padding: 6px;
  object-fit: contain;
  background: #141416;
}

/* السلة والنوافذ المنبثقة */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.55);
}

.cart-drawer {
  position: fixed;
  top: 0;
  left: -400px;
  z-index: 250;
  width: 350px;
  max-width: 90vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(212, 175, 55, 0.25);
  color: #f4f4f6;
  background: #141418;
  transition: left 0.25s ease;
}

.cart-drawer.open {
  left: 0;
}

.drawer-header,
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.drawer-header {
  flex: 0 0 auto;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
}

.close-btn {
  border: none;
  color: var(--muted);
  background: none;
  font-size: 1.2rem;
  cursor: pointer;
}

.drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px;
}

.cart-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.cart-item img {
  width: 54px;
  height: 64px;
  border-radius: 7px;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
}

.drawer-footer {
  flex: 0 0 auto;
  padding: 14px 18px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  color: #f4f4f6;
  background: #141418;
}

.total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.65);
}

#addToCartPrompt {
  position: fixed;
  inset: 0;
  z-index: 400;
  padding: 0;
  background: rgba(5, 6, 9, 0.72);
  backdrop-filter: blur(5px);
}

.cart-confirmation-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(430px, 100%);
  height: 100%;
  padding: 24px 20px;
  border-left: 1px solid rgba(212, 175, 55, 0.35);
  color: #f4f4f6;
  background: linear-gradient(160deg, #1d1e24 0%, #141519 55%, #101115 100%);
  box-shadow: -16px 0 42px rgba(0, 0, 0, 0.45);
  animation: cart-confirmation-enter 0.25s ease-out;
}

.cart-confirmation-product {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.cart-confirmation-product img {
  width: 68px;
  height: 78px;
  flex: 0 0 auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #101115;
  object-fit: contain;
}

.cart-confirmation-product h3 {
  margin-bottom: 4px;
  color: var(--gold-hover);
  font-size: 1rem;
}

.cart-confirmation-product p,
.cart-confirmation-message {
  color: #d4d4d8;
  font-size: 0.88rem;
}

.cart-confirmation-message {
  margin: 14px 0 22px;
}

.cart-confirmation-actions {
  display: grid;
  gap: 10px;
}

.cart-confirmation-actions .btn {
  width: 100%;
  min-height: 46px;
}

@keyframes cart-confirmation-enter {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.modal-box {
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 18px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 14px;
  color: #f4f4f6;
  background: #141418;
}

.modal-lg {
  max-width: 650px;
}

.modal-xl {
  max-width: 800px;
}

.demo-hint {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--gold);
  border-radius: 9px;
  color: #f4f4f6;
  background: #fafafa;
  font-size: 0.82rem;
}

.form-group {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
  font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea,
.modal-box input,
.modal-box select,
.modal-box textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #ffffff;
  background: #1f1f25;
  font-size: 0.9rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sizes-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 84px));
  gap: 8px;
  direction: ltr;
}

.product-image-slot {
  position: relative;
  min-width: 0;
  direction: rtl;
}

.product-image-label {
  display: block;
  margin-bottom: 5px;
  color: #e6c34d;
  font-size: 0.72rem;
  text-align: center;
  white-space: nowrap;
}

.product-image-picker {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1.5px dashed rgba(212, 175, 55, 0.55);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.product-image-picker:hover {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.08);
}

.product-image-plus {
  color: #e6c34d;
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1;
}

.product-image-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image-remove {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 3;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(10, 10, 12, 0.88);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.switch-auth {
  margin-top: 10px;
  text-align: center;
  font-size: 0.85rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 12px;
}

.detail-main-img {
  width: 100%;
  height: 320px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  object-fit: contain;
  background:
    radial-gradient(circle at 50% 40%, rgba(212, 175, 55, 0.08), transparent 58%),
    linear-gradient(145deg, #202127, #121317);
  touch-action: pan-y;
}

.detail-image-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 9px;
}

.detail-image-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #71717a;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.detail-image-dot.selected {
  background: var(--gold);
  transform: scale(1.3);
}

.detail-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 8px;
}

.detail-thumb {
  width: 56px;
  height: 64px;
  border: 2px solid transparent;
  border-radius: 7px;
  object-fit: cover;
  cursor: pointer;
}

.detail-thumb.selected {
  border-color: var(--gold);
}

.footer {
  margin-top: 36px;
  padding: 26px 0;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  color: #fff;
  background: linear-gradient(180deg, rgba(17, 18, 22, 0) 0%, #0a0b0e 100%);
  text-align: center;
}

.footer-note {
  margin-top: 4px;
  color: var(--gold);
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .logo {
    font-size: 1rem;
    letter-spacing: 0.5px;
  }

  .cat-bar-inner {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
    gap: 5px;
    padding: 8px 6px;
  }

  .cat-tab {
    min-width: 0;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
  }

  .hero {
    padding: 34px 0;
  }

  .hero h1 {
    font-size: 1.45rem;
  }

  .products-grid:not(.slider-mode) {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .products-grid:not(.slider-mode) .product-img {
    height: 100%;
  }

  .products-grid:not(.slider-mode) .product-img-wrap {
    min-height: 0;
  }

  .products-grid:not(.slider-mode) .product-body {
    padding: 8px;
  }

  .products-grid:not(.slider-mode) .product-cat {
    font-size: 0.62rem;
  }

  .products-grid:not(.slider-mode) .product-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 0.74rem;
    line-height: 1.25;
  }

  .products-grid:not(.slider-mode) .product-price {
    margin-bottom: 4px;
    font-size: 0.88rem;
  }

  .products-grid:not(.slider-mode) .size-btn {
    padding: 2px 5px;
    border-radius: 5px;
    font-size: 0.65rem;
  }

  .product-card {
    border-radius: 14px;
  }
}

@media (max-width: 650px) {
  .detail-grid,
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
  }
}
/* =========================================================
   UNIVERSAL SPEED ENGINE CSS (أقصى نعومة على أي متصفح)
   ========================================================= */
.product-card,
.auto-mini-card {
  content-visibility: auto;
  contain-intrinsic-size: 260px 360px;
}

html.turbo-lite body {
  background: #0c0c0e !important;
}

html.turbo-lite .navbar,
html.turbo-lite .search-box input,
html.turbo-lite .cat-tab:not(.active),
html.turbo-lite .nav-actions .btn,
html.turbo-lite .cart-btn,
html.turbo-lite #addToCartPrompt {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(18, 19, 24, 0.97) !important;
}

html.turbo-lite .cat-tab.active {
  background: linear-gradient(135deg, #d4af37 0%, #b59024 100%) !important;
  color: #09090b !important;
  border-color: #e6c34d !important;
}

html.turbo-lite .hero,
html.turbo-lite .product-img-wrap,
html.turbo-lite .product-card,
html.turbo-lite .auto-mini-card {
  background: #16171c !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22) !important;
  will-change: auto !important;
  transition: none !important;
  transform: none !important;
}

html.turbo-lite * {
  scroll-behavior: auto !important;
}
