/* ── Reset & Base ── */
[x-cloak] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #111827; }
::-webkit-scrollbar-thumb { background: #374151; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #4B5563; }

/* ── Hero ── */
.hero-bg {
  background-color: #0d1117;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(245,158,11,0.18), transparent 65%),
    linear-gradient(135deg, rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(45deg,  rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 100% 100%, 60px 60px, 60px 60px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.3);
  color: #FCD34D;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* ── Product Cards ── */
.product-card {
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(0,0,0,0.14);
  border-color: rgba(245,158,11,0.35) !important;
}

.product-img-wrap {
  position: relative;
  overflow: hidden;
  background: #f8f8f8;
  height: 240px;
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform 0.45s ease;
}
.product-card:hover .product-img-wrap img {
  transform: scale(1.07);
}
.product-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #9CA3AF;
}

/* Hover overlay — only shown on devices that support real hover (not touch).
   pointer-events: none until hovered so card clicks always reach openModal(). */
.img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,24,39,0.88) 0%, rgba(17,24,39,0.18) 55%, transparent 75%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  z-index: 5;
}
@media (hover: hover) {
  .product-card:hover .img-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

.quick-add {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.18s ease;
  font-family: inherit;
}
.product-card:hover .quick-add {
  transform: translateY(0);
  opacity: 1;
}
.quick-add.in-cart  { background: #22C55E; color: #fff; }
.quick-add.not-cart { background: #F59E0B; color: #111827; }
.quick-add.not-cart:hover { background: #FBBF24; }
.quick-add.in-cart:hover  { background: #16A34A; }

/* ── Category Filter Chips ── */
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  white-space: nowrap;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 2px solid #E5E7EB;
  background: white;
  color: #374151;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}
.filter-chip:hover { border-color: #F59E0B; color: #92400E; }
.filter-chip.active {
  background: #111827;
  border-color: #111827;
  color: #F59E0B;
}

/* ── Category Cards ── */
.cat-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.10);
}

/* ── Cart Drawer ── */
.cart-drawer {
  box-shadow: -4px 0 40px rgba(0,0,0,0.4);
}

/* ── WhatsApp Float ── */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  cursor: pointer;
  border: none;
  outline: none;
  transition: background 0.18s ease, transform 0.18s ease;
  animation: wa-pulse 2.5s ease-in-out infinite;
}
.wa-float:hover {
  background: #22C35E;
  transform: scale(1.08);
  animation: none;
  box-shadow: 0 6px 28px rgba(37,211,102,0.55);
}

@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.45); }
  50%       { box-shadow: 0 4px 30px rgba(37,211,102,0.70), 0 0 0 8px rgba(37,211,102,0.12); }
}

/* ── Trust Badges ── */
.trust-bar {
  background: linear-gradient(90deg, #D97706, #F59E0B, #FBBF24, #F59E0B, #D97706);
  background-size: 200% 100%;
  animation: trust-shine 4s linear infinite;
}
@keyframes trust-shine {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: #F59E0B;
  color: #111827;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  text-decoration: none;
}
.btn-primary:hover {
  background: #FBBF24;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245,158,11,0.35);
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.35);
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
  transform: translateY(-2px);
}

/* ── Qty Stepper (product card) ── */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  background: #111827;
  border-radius: 12px;
  overflow: hidden;
}
.qty-stepper button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease;
  border: none;
  cursor: pointer;
  background: transparent;
}
.qty-stepper .minus { color: #F87171; }
.qty-stepper .minus:hover { background: #DC2626; color: #fff; }
.qty-stepper .plus  { color: #FBBF24; }
.qty-stepper .plus:hover  { background: #F59E0B; color: #111827; }
.qty-stepper .count {
  color: #fff;
  font-weight: 900;
  font-size: 0.9rem;
  min-width: 28px;
  text-align: center;
  font-family: inherit;
}

/* ── Card Stepper (product card – full-width, replaces inline qty-stepper) ── */
.card-stepper {
  display: flex;
  align-items: center;
  width: 100%;
  background: #111827;
  border-radius: 12px;
  overflow: hidden;
}
.card-stepper button {
  height: 40px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.card-stepper .minus       { color: #F87171; }
.card-stepper .minus:hover { background: #DC2626; color: #fff; }
.card-stepper .plus        { color: #FBBF24; }
.card-stepper .plus:hover  { background: #F59E0B; color: #111827; }
.card-stepper .count {
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
  min-width: 36px;
  text-align: center;
  font-family: inherit;
}

/* ── Product Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 16px;
  }
}
@media (min-width: 1024px) {
  .modal-backdrop { padding: 32px; }
}

.modal-box {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 900px;
  height: 92vh;
  height: 92svh; /* iOS Safari: svh = small viewport (address bar visible), prevents overflow */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  border-radius: 20px 20px 0 0;
}
@media (min-width: 640px) {
  .modal-box {
    border-radius: 20px;
    height: 88vh;
    height: 88svh;
  }
}

/* Left image panel */
.modal-img-panel {
  background: #F9FAFB;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  max-height: 44vh;
}
@media (min-width: 640px) {
  .modal-img-panel { width: 44%; max-height: none; }
}

.modal-main-img {
  flex: 1;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
@media (min-width: 640px) {
  .modal-main-img { min-height: 360px; }
}

.modal-main-img img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  transition: opacity 0.2s ease;
  display: block;
}
@media (min-width: 640px) {
  .modal-main-img img { max-height: 380px; }
}

/* Nav arrows */
.modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  z-index: 5;
}
.modal-arrow:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.28); transform: translateY(-50%) scale(1.08); }
.modal-arrow.left  { left: 10px; }
.modal-arrow.right { right: 10px; }

/* Dot indicators */
.modal-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px 14px;
}
.modal-dot {
  height: 7px;
  border-radius: 999px;
  background: #D1D5DB;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
  width: 7px;
}
.modal-dot.active { background: #F59E0B; width: 22px; }

/* Thumbnail strip */
.modal-thumbs {
  display: flex;
  gap: 8px;
  padding: 8px 16px 12px;
  overflow-x: auto;
  border-top: 1px solid #F3F4F6;
  scrollbar-width: none;
}
.modal-thumbs::-webkit-scrollbar { display: none; }
.modal-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid transparent;
  cursor: pointer;
  background: #F3F4F6;
  transition: border-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.modal-thumb.active  { border-color: #F59E0B; }
.modal-thumb img     { width: 100%; height: 100%; object-fit: contain; }

/* Panels wrapper — replaces the display:contents hack */
.modal-panels {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
@media (min-width: 640px) {
  .modal-panels { flex-direction: row; }
}

/* Right info panel */
.modal-info-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
@media (min-width: 640px) {
  .modal-info-panel { padding: 28px 28px 24px; }
}

/* Modal qty stepper */
.modal-qty-wrap {
  display: inline-flex;
  align-items: center;
  background: #F3F4F6;
  border-radius: 14px;
  overflow: hidden;
}
.modal-qty-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #374151;
  transition: background 0.15s ease;
}
.modal-qty-btn:hover { background: #E5E7EB; }
.modal-qty-count {
  font-weight: 900;
  font-size: 1.1rem;
  min-width: 44px;
  text-align: center;
  color: #111827;
  font-family: inherit;
}

/* ── Misc ── */
.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #F59E0B;
}

/* ── Missing Tailwind utilities (not in production build) ── */
.line-through         { text-decoration-line: line-through; }
.text-red-500         { color: rgb(239 68 68); }
.text-red-600         { color: rgb(220 38 38); }
.text-red-700         { color: rgb(185 28 28); }
.text-green-600       { color: rgb(22 163 74); }
.text-gray-800        { color: rgb(31 41 55); }
.bg-red-50            { background-color: rgb(254 242 242); }
.bg-red-500           { background-color: rgb(239 68 68); }
.border-red-200       { border-color: rgb(254 202 202); }
.w-2                  { width: 0.5rem; }
.h-2                  { height: 0.5rem; }
.w-1\.5               { width: 0.375rem; }
.h-1\.5               { height: 0.375rem; }
.py-0\.5              { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.mt-0\.5              { margin-top: 0.125rem; }
.cursor-not-allowed   { cursor: not-allowed; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #9CA3AF;
}
