/* ========================================
   Rawhaniyat Store App - Standalone CSS
   Independent store with app-like feel
   ======================================== */

/* ---------- CSS Variables (shared brand) ---------- */
:root {
  --primary-purple: #D6B25C;
  --deep-purple: #C49E47;
  --light-purple: #DFBF6A;
  --accent-green: #8B9F7A;
  --deep-green: #5C6B4E;
  --light-green: #A3B592;
  --accent-blue: #6E5BA8;
  --deep-blue: #2D1B46;
  --light-blue: #8048DA;
  --neon-purple: #8048DA;
  --neon-blue: #6E5BA8;
  --neon-green: #8B9F7A;
  --dark-bg: #0D0A18;
  --darker-bg: #0A0610;
  --card-bg: rgba(19, 15, 33, 0.6);
  --card-border: rgba(214, 178, 92, 0.2);
  --text-light: #F4EEFF;
  --text-muted: #B8B0C8;
  --gold: #D6B25C;
  --gradient-main: linear-gradient(135deg, #2D1B46, #0D0A18, #1A0F2E);
  --gradient-card: linear-gradient(145deg, rgba(214, 178, 92, 0.15), rgba(128, 72, 218, 0.1));
  --gradient-btn: linear-gradient(135deg, #D6B25C, #DFBF6A);
  --gradient-btn-hover: linear-gradient(135deg, #DFBF6A, #E8CC7A);
  --shadow-glow: 0 0 30px rgba(214, 178, 92, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --glass-bg: rgba(13, 10, 24, 0.55);
  --glass-border: rgba(214, 178, 92, 0.12);
  --glass-blur: 20px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-ar: 'Aref Ruqaa', 'Amiri', serif;
  --font-en: 'Cormorant Garamond', 'Inter', serif;
  --font-body-ar: 'Noto Naskh Arabic', 'Tajawal', sans-serif;
  --font-body-en: 'Inter', 'Poppins', sans-serif;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 56px;
  --search-h: 52px;
  --cat-h: 48px;
  --sort-h: 40px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-ar);
  background: var(--dark-bg);
  color: var(--text-light);
  direction: rtl;
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body[lang="en"] {
  font-family: var(--font-en);
  direction: ltr;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Store App Header ---------- */
.store-app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 9, 8, 0.88);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border-bottom: 1px solid var(--glass-border);
  padding: 0 16px;
  padding-top: env(safe-area-inset-top, 0);
  transition: box-shadow 0.3s ease;
}

.store-app-header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.store-app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.store-app-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(214, 178, 92, 0.12);
  border: 1px solid var(--glass-border);
  font-size: 1.1rem;
  color: var(--neon-purple);
  transition: var(--transition);
}

.store-app-back:hover {
  background: rgba(214, 178, 92, 0.25);
  transform: scale(1.06);
}

.store-app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.store-app-logo { font-size: 1.4rem; }

.store-app-name {
  font-size: 1.05rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.store-app-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-toggle-mini {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(214, 178, 92, 0.1);
  border: 1px solid rgba(214, 178, 92, 0.15);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

.lang-toggle-mini:hover {
  background: rgba(214, 178, 92, 0.25);
}

.store-app-cart-btn {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--gradient-btn);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

.store-app-cart-btn:hover {
  transform: scale(1.05);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #EF4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-family: var(--font-en);
}

body[lang="en"] .cart-badge {
  right: auto;
  left: -4px;
}

/* ---------- Search Bar ---------- */
.store-app-search-bar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 90;
  height: var(--search-h);
  background: rgba(10, 9, 8, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 8px 16px;
  display: flex;
  align-items: center;
}

.store-app-search {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.store-app-search .search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  pointer-events: none;
}

body[lang="en"] .store-app-search .search-icon {
  right: auto;
  left: 14px;
}

.store-app-search input {
  width: 100%;
  height: 36px;
  background: rgba(214, 178, 92, 0.1);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0 16px 0 40px;
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  direction: inherit;
}

body[lang="en"] .store-app-search input {
  padding: 0 40px 0 16px;
}

.store-app-search input:focus {
  border-color: var(--neon-purple);
  box-shadow: 0 0 12px rgba(214, 178, 92, 0.2);
}

.store-app-search input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* ---------- Category Strip ---------- */
.store-app-categories {
  position: fixed;
  top: calc(var(--header-h) + var(--search-h));
  left: 0;
  right: 0;
  z-index: 80;
  height: var(--cat-h);
  background: rgba(10, 9, 8, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 6px 12px;
  gap: 8px;
  border-bottom: 1px solid rgba(214, 178, 92, 0.1);
}

.store-app-categories::-webkit-scrollbar { display: none; }

.store-app-cat {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 14px;
  border-radius: 20px;
  background: rgba(214, 178, 92, 0.06);
  border: 1px solid rgba(214, 178, 92, 0.1);
  white-space: nowrap;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}

.store-app-cat:hover,
.store-app-cat.active {
  background: rgba(214, 178, 92, 0.18);
  border-color: var(--neon-purple);
  color: var(--text-light);
  box-shadow: 0 2px 12px rgba(214, 178, 92, 0.15);
}

.store-app-cat .cat-icon { font-size: 0.9rem; }

.store-app-cat .cat-count {
  font-size: 0.65rem;
  background: rgba(214, 178, 92, 0.3);
  padding: 1px 6px;
  border-radius: 8px;
  font-family: var(--font-en);
}

.store-app-cat.active .cat-count {
  background: var(--neon-purple);
  color: #fff;
}

/* ---------- Sort Bar ---------- */
.store-app-sort-bar {
  position: fixed;
  top: calc(var(--header-h) + var(--search-h) + var(--cat-h));
  left: 0;
  right: 0;
  z-index: 70;
  height: var(--sort-h);
  background: rgba(10, 9, 8, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  max-width: 100%;
  border-bottom: 1px solid rgba(214, 178, 92, 0.08);
}

.store-app-sort-bar .store-product-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.store-app-sort-bar select {
  background: transparent;
  border: 1px solid rgba(214, 178, 92, 0.2);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  direction: inherit;
}

.store-app-sort-bar select option {
  background: var(--dark-bg);
  color: var(--text-light);
}

/* ---------- Main Content Area ---------- */
.store-app-main {
  padding-top: calc(var(--header-h) + var(--search-h) + var(--cat-h) + var(--sort-h) + 12px);
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: 80px;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 1240px;
  margin: 0 auto;
}

/* ---------- Products Grid ---------- */
.store-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ---------- Product Cards ---------- */
.product-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease, border-color 0.4s ease;
  position: relative;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 178, 92, 0.2), transparent);
  z-index: 1;
}

.product-card:hover {
  border-color: rgba(214, 178, 92, 0.3);
  box-shadow: 0 16px 50px rgba(214, 178, 92, 0.22), 0 0 30px rgba(214, 178, 92, 0.06);
  transform: translateY(-6px);
}

.product-image {
  position: relative;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(214, 178, 92, 0.08), transparent 70%);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

.product-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(10, 9, 8, 0.8), transparent);
  pointer-events: none;
}

.product-image .product-emoji {
  font-size: 3.5rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--gradient-btn);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  z-index: 2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(214, 178, 92, 0.3);
}

body[lang="en"] .product-badge {
  right: auto;
  left: 10px;
}

.product-badge--sale { background: linear-gradient(135deg, #EF4444, #DC2626); }
.product-badge--new { background: linear-gradient(135deg, var(--accent-green), var(--neon-green)); }

.product-actions {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  opacity: 0;
  transform: translateY(-8px);
  transition: var(--transition);
}

body[lang="en"] .product-actions {
  left: auto;
  right: 10px;
}

.product-card:hover .product-actions {
  opacity: 1;
  transform: translateY(0);
}

.product-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(10, 9, 8, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.product-action-btn:hover {
  background: var(--primary-purple);
  border-color: var(--neon-purple);
}

.product-info {
  padding: 12px;
}

.product-category-label {
  display: inline-block;
  font-size: 0.65rem;
  color: var(--neon-purple);
  background: rgba(214, 178, 92, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
  font-weight: 500;
}

.product-info h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-info .product-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 4px;
}

.product-info .price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--neon-green);
  font-family: var(--font-en);
}

.product-stock {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 500;
}

.product-stock--in { color: var(--neon-green); background: rgba(139, 159, 122, 0.1); }
.product-stock--low { color: var(--gold); background: rgba(214, 178, 92, 0.1); }
.product-stock--out { color: #EF4444; background: rgba(239, 68, 68, 0.1); }

.product-info .btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 0;
  background: var(--gradient-btn);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.product-info .btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.product-info .btn:hover::after {
  opacity: 1;
}

.product-info .btn:hover {
  box-shadow: 0 4px 20px rgba(214, 178, 92, 0.4);
  transform: translateY(-1px);
}

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

.product-info .btn .btn-icon { font-size: 0.9rem; }

/* ---------- Store Empty ---------- */
.store-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

.store-empty .empty-icon { font-size: 3rem; margin-bottom: 16px; }
.store-empty h3 { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 8px; }
.store-empty p { color: var(--text-muted); font-size: 0.85rem; opacity: 0.7; }

/* ---------- Trust Badges (compact) ---------- */
.store-app-trust {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 28px 16px;
  border-top: 1px solid var(--glass-border);
  margin-top: 32px;
  position: relative;
}

.store-app-trust::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 178, 92, 0.2), transparent);
}

.trust-item-mini {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 6px 14px;
  background: rgba(214, 178, 92, 0.05);
  border: 1px solid rgba(214, 178, 92, 0.08);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.trust-item-mini:hover {
  background: rgba(214, 178, 92, 0.1);
  border-color: var(--glass-border);
}

.trust-item-mini span:first-child { font-size: 1rem; }

/* ---------- Store App Footer ---------- */
.store-app-footer {
  text-align: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid rgba(214, 178, 92, 0.08);
}

.store-app-powered {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.6;
  transition: opacity 0.3s;
}

.store-app-powered:hover { opacity: 1; }
.store-app-powered strong { color: var(--neon-purple); }

/* ---------- Cart Drawer ---------- */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.cart-drawer-overlay.open { opacity: 1; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 340px;
  max-width: 90vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(7, 7, 16, 0.96);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-left: 1px solid var(--glass-border);
  z-index: 210;
  display: flex;
  flex-direction: column;
  transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overscroll-behavior: contain;
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
}

body[lang="en"] .cart-drawer {
  right: auto;
  left: -100%;
  border-left: none;
  border-right: 1px solid var(--glass-border);
  transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 10px 0 50px rgba(0, 0, 0, 0.5);
}

.cart-drawer.open { right: 0; }
body[lang="en"] .cart-drawer.open { left: 0; }

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
}

.cart-drawer-header h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-drawer-header .cart-item-count {
  background: var(--neon-purple);
  color: #fff;
  font-size: 0.7rem;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  font-family: var(--font-en);
}

.cart-drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #EF4444;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cart-drawer-close:hover {
  background: rgba(239, 68, 68, 0.2);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  overscroll-behavior: contain;
}

.cart-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--card-border);
  display: none;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
}

.cart-drawer-footer.has-items { display: block; }

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

.cart-subtotal .cart-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.cart-subtotal .cart-amount {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--neon-green);
  font-family: var(--font-en);
}

.cart-checkout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 0;
  background: var(--gradient-btn);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.cart-checkout-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 60%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transform: skewX(-20deg);
  animation: shimmer 3s infinite;
}

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

.cart-checkout-btn:hover {
  box-shadow: 0 6px 25px rgba(214, 178, 92, 0.45);
  transform: translateY(-1px);
}

/* Cart items */
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(214, 178, 92, 0.1);
}

.cart-item:last-child { border-bottom: none; }

.cart-item-emoji {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

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

.cart-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 0.78rem;
  color: var(--neon-green);
  font-family: var(--font-en);
  font-weight: 600;
  margin-top: 2px;
}

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

.cart-qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(214, 178, 92, 0.15);
  border: 1px solid rgba(214, 178, 92, 0.2);
  color: var(--text-light);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cart-qty-btn:hover {
  background: rgba(214, 178, 92, 0.3);
}

.cart-qty-value {
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  font-family: var(--font-en);
}

.cart-item-remove {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: #EF4444;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cart-item-remove:hover { background: rgba(239, 68, 68, 0.2); }

/* Cart empty */
.cart-empty {
  text-align: center;
  padding: 40px 16px;
}

.cart-empty .empty-cart-icon { font-size: 2.5rem; margin-bottom: 12px; }
.cart-empty p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }

.cart-empty .continue-shopping {
  background: rgba(214, 178, 92, 0.15);
  border: 1px solid rgba(214, 178, 92, 0.2);
  color: var(--neon-purple);
  padding: 8px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.cart-empty .continue-shopping:hover {
  background: rgba(214, 178, 92, 0.3);
}

/* ---------- Checkout Modal ---------- */
.checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 220;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.checkout-overlay.open { display: flex; }

.checkout-card {
  background: rgba(7, 7, 16, 0.96);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(214, 178, 92, 0.1);
  animation: checkoutSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.checkout-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #EF4444;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 2;
}

body[lang="en"] .checkout-close {
  right: auto;
  left: 14px;
}

.checkout-close:hover { background: rgba(239, 68, 68, 0.2); }

.checkout-step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-light);
}

.checkout-step .checkout-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.checkout-form { display: flex; flex-direction: column; gap: 14px; }

.checkout-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.checkout-field input,
.checkout-field textarea {
  width: 100%;
  background: rgba(214, 178, 92, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  direction: inherit;
}

.checkout-field input:focus,
.checkout-field textarea:focus {
  border-color: var(--neon-purple);
  box-shadow: 0 0 0 3px rgba(214, 178, 92, 0.1), 0 0 12px rgba(214, 178, 92, 0.12);
}

.checkout-field textarea { resize: vertical; }

.checkout-submit-btn {
  width: 100%;
  padding: 12px;
  background: var(--gradient-btn);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 4px;
}

.checkout-submit-btn:hover {
  background: var(--gradient-btn-hover);
  box-shadow: 0 4px 20px rgba(214, 178, 92, 0.4);
}

.whatsapp-send-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.whatsapp-send-btn:hover {
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transform: translateY(-1px);
}

/* ---------- WhatsApp Float ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 50;
  transition: transform 0.3s;
}

.whatsapp-float::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.25);
  animation: waPulse 2.5s ease-in-out infinite;
  z-index: -1;
}

@keyframes waPulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.3); opacity: 0; }
}

body[lang="en"] .whatsapp-float { left: auto; right: 20px; }

.whatsapp-float:hover { transform: scale(1.1); }

/* ---------- Responsive ---------- */
@media (min-width: 600px) {
  .store-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .product-image { height: 180px; }
}

@media (min-width: 900px) {
  .store-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
  .product-image { height: 200px; }
  .store-app-main { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 400px) {
  .store-grid { gap: 8px; }
  .product-info { padding: 10px; }
  .product-info h3 { font-size: 0.82rem; }
  .product-info .price { font-size: 1rem; }
  .product-image { height: 130px; }
  .product-image .product-emoji { font-size: 2.8rem; }
}

/* Touch device tweaks */
@media (hover: none) {
  .product-card:hover { transform: none; box-shadow: none; }
  .product-card:hover .product-image img { transform: none; }
  .product-actions { opacity: 1; transform: none; }
}

/* ---------- Added-to-cart feedback ---------- */
.product-card.added {
  border-color: var(--neon-green);
  box-shadow: 0 0 25px rgba(139, 159, 122, 0.25);
  animation: addedPulse 0.4s ease;
}

@keyframes addedPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.add-to-cart-btn.added-to-cart {
  background: linear-gradient(135deg, var(--accent-green), var(--neon-green)) !important;
}

/* ---------- Product card entrance stagger ---------- */
.store-grid .product-card {
  opacity: 0;
  transform: translateY(20px);
  animation: cardFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.store-grid .product-card:nth-child(1) { animation-delay: 0s; }
.store-grid .product-card:nth-child(2) { animation-delay: 0.06s; }
.store-grid .product-card:nth-child(3) { animation-delay: 0.12s; }
.store-grid .product-card:nth-child(4) { animation-delay: 0.18s; }
.store-grid .product-card:nth-child(5) { animation-delay: 0.24s; }
.store-grid .product-card:nth-child(6) { animation-delay: 0.3s; }
.store-grid .product-card:nth-child(7) { animation-delay: 0.36s; }
.store-grid .product-card:nth-child(8) { animation-delay: 0.42s; }
.store-grid .product-card:nth-child(n+9) { animation-delay: 0.45s; }

@keyframes cardFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
