/* ==========================================================================
   TASWEEQA MARKETPLACE COMPONENTS
   Egyptian Local Commerce & Delivery Platform (https://tasweeqa.store)
   Phase B: Marketplace-specific UI components
   ========================================================================== */

/* --------------------------------------------------------------------------
   SKELETON LOADING SHIMMER
   -------------------------------------------------------------------------- */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg,#f0f0f0 25%,#e8e8e8 50%,#f0f0f0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
.skeleton-card { background: white; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-subtle); }
.skeleton-img  { height: 160px; width: 100%; }
.skeleton-line { height: 14px; margin: 8px 12px; width: 80%; }
.skeleton-line.short  { width: 50%; }
.skeleton-line.xshort { width: 30%; }

/* --------------------------------------------------------------------------
   CART COUNT BADGE IN HEADER
   -------------------------------------------------------------------------- */
.cart-btn-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.header-cart-count,
#header-cart-count,
.cart-count-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--c-orange-accent);
  color: white;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  display: none;
  border: 2px solid white;
  z-index: 2;
}
html[dir="rtl"] .header-cart-count,
html[dir="rtl"] #header-cart-count,
html[dir="rtl"] .cart-count-badge {
  left: auto;
  right: -6px;
}
.nav-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--c-slate-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--trans-fast);
  color: var(--c-slate-700);
}
.nav-cart-btn:hover {
  background: var(--c-green-subtle);
  border-color: var(--c-green-primary);
  color: var(--c-green-primary);
}

/* --------------------------------------------------------------------------
   FLOATING CART BAR (mobile)
   -------------------------------------------------------------------------- */
.cart-fab {
  position: fixed;
  bottom: calc(16px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  background: var(--c-green-primary);
  color: white;
  border-radius: var(--radius-full);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-base);
  box-shadow: 0 8px 24px rgba(11,102,35,0.4);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--trans-base);
  min-width: 200px;
  justify-content: space-between;
}
.cart-fab:hover { background: var(--c-green-dark); transform: translateX(-50%) translateY(-2px); color: white; }
.cart-fab.hidden { display: none !important; }
.cart-fab-left { display: flex; align-items: center; gap: 8px; }
.cart-fab-count {
  background: white;
  color: var(--c-green-dark);
  border-radius: var(--radius-full);
  width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 768px) { .cart-fab { display: none; } }

/* --------------------------------------------------------------------------
   TOAST NOTIFICATIONS
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: calc(80px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
  min-width: 280px;
  max-width: 400px;
  width: 90vw;
}
.toast {
  background: var(--c-slate-900);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-xl);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.16,1,0.3,1) forwards;
}
.toast.toast-success { background: var(--c-green-primary); }
.toast.toast-error   { background: #dc2626; }
.toast.toast-warn    { background: var(--c-orange-accent); }
.toast.toast-out     { animation: toastOut 0.3s forwards; }
@keyframes toastIn  { from{opacity:0;transform:translateY(-12px)} to{opacity:1;transform:translateY(0)} }
@keyframes toastOut { from{opacity:1;transform:translateY(0)} to{opacity:0;transform:translateY(-12px)} }

/* --------------------------------------------------------------------------
   SEARCH AUTOCOMPLETE DROPDOWN
   -------------------------------------------------------------------------- */
.search-autocomplete-wrap { position: relative; flex: 1; }
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 40px rgba(15,23,42,0.12);
  border: 1px solid var(--c-slate-200);
  overflow: hidden;
  z-index: 500;
  display: none;
  max-height: 380px;
  overflow-y: auto;
}
.autocomplete-dropdown.open { display: block; }
.autocomplete-group-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--c-slate-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 16px 4px;
}
.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background var(--trans-fast);
}
.autocomplete-item:hover,
.autocomplete-item.focused { background: var(--c-green-subtle); }
.autocomplete-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  background: var(--c-slate-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.autocomplete-text { flex: 1; min-width: 0; }
.autocomplete-text strong {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--c-slate-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.autocomplete-text span { font-size: 11px; color: var(--c-slate-500); }
.autocomplete-type-badge {
  font-size: 10px; padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--c-slate-100); color: var(--c-slate-600);
  font-weight: 600; flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   SEARCH RESULTS LAYOUT
   -------------------------------------------------------------------------- */
.search-page-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  padding-block: var(--space-6);
}
@media (min-width: 1024px) {
  .search-page-layout { grid-template-columns: 280px 1fr; gap: var(--space-8); align-items: start; }
  html[dir="rtl"] .search-page-layout { grid-template-columns: 1fr 280px; }
}
.search-meta-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-4);
}
.search-meta-query { font-family: var(--font-heading); font-size: var(--text-lg); font-weight: 700; color: var(--c-slate-900); }
.search-result-count { font-size: var(--text-sm); color: var(--c-slate-500); }

/* FILTER SIDEBAR */
.filter-sidebar {
  background: white; border-radius: var(--radius-xl);
  border: 1px solid var(--c-warm-border); padding: var(--space-5);
  position: sticky; top: 80px; display: none;
}
@media (min-width: 1024px) { .filter-sidebar { display: block; } }
.filter-sidebar-title {
  font-family: var(--font-heading); font-size: var(--text-base); font-weight: 800;
  color: var(--c-slate-900); margin-bottom: var(--space-4);
  padding-bottom: var(--space-3); border-bottom: 1px solid var(--c-warm-border);
  display: flex; align-items: center; justify-content: space-between;
}
.filter-section { margin-bottom: var(--space-5); }
.filter-section-label {
  font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 700;
  color: var(--c-slate-700); margin-bottom: var(--space-3); display: block;
}
.filter-checkbox-item {
  display: flex; align-items: center; gap: var(--space-2); padding: 6px 0;
  cursor: pointer; font-size: var(--text-sm); color: var(--c-slate-700);
  transition: color var(--trans-fast);
}
.filter-checkbox-item:hover { color: var(--c-green-primary); }
.filter-checkbox-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--c-green-primary); cursor: pointer; }
.filter-price-row { display: flex; gap: var(--space-2); align-items: center; }
.filter-price-input {
  flex: 1; padding: 8px 10px; border: 1px solid var(--c-slate-300);
  border-radius: var(--radius-md); font-family: var(--font-heading);
  font-size: var(--text-sm); color: var(--c-slate-800);
  direction: ltr; text-align: center; min-width: 0;
}
.filter-price-input:focus { border-color: var(--c-green-primary); outline: none; }
.filter-actions {
  display: flex; gap: var(--space-2); margin-top: var(--space-4);
  padding-top: var(--space-4); border-top: 1px solid var(--c-warm-border);
}

/* SORT BAR */
.sort-bar { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-4); flex-wrap: wrap; }
.sort-btn {
  padding: 6px 14px; border-radius: var(--radius-full);
  border: 1.5px solid var(--c-slate-200); background: white;
  font-family: var(--font-heading); font-size: var(--text-xs); font-weight: 700;
  color: var(--c-slate-600); cursor: pointer; transition: all var(--trans-fast); white-space: nowrap;
}
.sort-btn:hover { border-color: var(--c-green-primary); color: var(--c-green-primary); }
.sort-btn.active { background: var(--c-green-primary); border-color: var(--c-green-primary); color: white; }

/* MOBILE FILTER BAR */
.mobile-filter-bar {
  display: flex; gap: var(--space-2); margin-bottom: var(--space-4);
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px;
}
.mobile-filter-bar::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .mobile-filter-bar { display: none; } }
.mobile-filter-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
  border-radius: var(--radius-full); border: 1.5px solid var(--c-slate-200);
  background: white; font-family: var(--font-heading); font-size: var(--text-sm);
  font-weight: 700; color: var(--c-slate-700); cursor: pointer; white-space: nowrap;
  transition: all var(--trans-fast); flex-shrink: 0;
}
.mobile-filter-btn.active { border-color: var(--c-green-primary); color: var(--c-green-primary); background: var(--c-green-subtle); }

/* FILTER BOTTOM SHEET */
.filter-sheet-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,0.5);
  z-index: 800; display: none;
}
.filter-sheet-backdrop.open { display: block; }
.filter-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: white; border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
  z-index: 801; max-height: 85vh; overflow-y: auto;
  transform: translateY(100%); transition: transform var(--trans-base);
  padding-bottom: var(--safe-bottom);
}
.filter-sheet.open { transform: translateY(0); }
.filter-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-5) var(--space-5) var(--space-3);
  border-bottom: 1px solid var(--c-warm-border);
  position: sticky; top: 0; background: white; z-index: 1;
}
.filter-sheet-body { padding: var(--space-4) var(--space-5); }
.filter-sheet-footer {
  padding: var(--space-4) var(--space-5); border-top: 1px solid var(--c-warm-border);
  background: white; display: flex; gap: var(--space-2); position: sticky; bottom: 0;
}
@media (min-width: 1024px) { .filter-sheet-backdrop,.filter-sheet { display: none !important; } }

/* --------------------------------------------------------------------------
   PRODUCT CARDS
   -------------------------------------------------------------------------- */
.product-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--space-3); }
@media (min-width: 640px)  { .product-grid { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4,1fr); gap: var(--space-4); } }
@media (min-width: 1280px) { .product-grid { grid-template-columns: repeat(5,1fr); } }

.product-card {
  background: white; border-radius: var(--radius-xl);
  border: 1px solid var(--c-warm-border); overflow: hidden;
  display: flex; flex-direction: column;
  transition: all var(--trans-base); position: relative;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-elevated); border-color: var(--c-slate-200); }
.product-img-wrap {
  position: relative; width: 100%; padding-top: 80%;
  background: var(--c-slate-50); overflow: hidden;
}
.product-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform var(--trans-slow);
}
.product-card:hover .product-img { transform: scale(1.04); }
.product-img-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,var(--c-green-soft) 0%,var(--c-warm-bg) 100%);
  color: var(--c-green-primary); font-size: 2.5rem;
}
.product-body { padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-1); flex: 1; }
.product-name {
  font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 700;
  color: var(--c-slate-900); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-store-name { font-size: 11px; color: var(--c-slate-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-price-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-2); margin-top: auto; padding-top: var(--space-2);
}
.product-price { font-family: var(--font-heading); font-size: var(--text-base); font-weight: 800; color: var(--c-green-dark); }
.product-add-btn {
  width: 32px; height: 32px; border-radius: var(--radius-full);
  background: var(--c-green-primary); color: white; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; transition: all var(--trans-fast); flex-shrink: 0; line-height: 1;
}
.product-add-btn:hover { background: var(--c-green-dark); transform: scale(1.1); }
.product-add-btn:disabled { background: var(--c-slate-300); cursor: not-allowed; transform: none; }

/* --------------------------------------------------------------------------
   STORES DISCOVERY GRID
   -------------------------------------------------------------------------- */
.stores-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--space-4); }
@media (min-width: 768px)  { .stores-grid { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 1280px) { .stores-grid { grid-template-columns: repeat(4,1fr); } }

.store-open-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; font-family: var(--font-heading); padding: 3px 8px; border-radius: var(--radius-full); }
.store-open-badge.open   { background: var(--c-green-soft); color: var(--c-green-dark); }
.store-open-badge.closed { background: var(--c-slate-100); color: var(--c-slate-500); }
.store-open-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.store-verified-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; color: var(--c-green-dark); background: var(--c-green-soft); padding: 2px 7px; border-radius: var(--radius-full); border: 1px solid rgba(11,102,35,0.15); }

/* --------------------------------------------------------------------------
   STORE PAGE HERO
   -------------------------------------------------------------------------- */
.store-hero-banner { width: 100%; height: 180px; object-fit: cover; background: linear-gradient(135deg,var(--c-green-soft) 0%,var(--c-warm-bg) 100%); display: block; }
@media (min-width: 768px) { .store-hero-banner { height: 240px; } }
.store-logo-circle { width: 80px; height: 80px; border-radius: var(--radius-xl); border: 3px solid white; background: white; object-fit: cover; box-shadow: var(--shadow-card); flex-shrink: 0; }
.store-logo-placeholder { width: 80px; height: 80px; border-radius: var(--radius-xl); background: linear-gradient(135deg,var(--c-green-primary) 0%,var(--c-green-dark) 100%); display: flex; align-items: center; justify-content: center; font-size: 2rem; border: 3px solid white; box-shadow: var(--shadow-card); flex-shrink: 0; }
@media (min-width: 768px) { .store-logo-circle,.store-logo-placeholder { width: 96px; height: 96px; } }
.store-hero-info { padding: var(--space-5) 0 var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
@media (min-width: 768px) { .store-hero-info { flex-direction: row; align-items: flex-start; gap: var(--space-6); } }
.store-name-block { flex: 1; min-width: 0; }
.store-hero-name { font-family: var(--font-heading); font-size: clamp(1.35rem,3.5vw,1.75rem); font-weight: 900; color: var(--c-slate-950); line-height: 1.2; }
.store-hero-meta { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-top: var(--space-2); }
.store-meta-pill { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); color: var(--c-slate-600); background: white; border: 1px solid var(--c-warm-border); border-radius: var(--radius-full); padding: 4px 10px; font-family: var(--font-heading); font-weight: 600; }
.store-category-tabs { display: flex; gap: var(--space-2); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px; margin-bottom: var(--space-5); }
.store-category-tabs::-webkit-scrollbar { display: none; }
.store-cat-tab { padding: 8px 18px; border-radius: var(--radius-full); border: 1.5px solid var(--c-slate-200); background: white; font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 700; color: var(--c-slate-600); cursor: pointer; white-space: nowrap; transition: all var(--trans-fast); flex-shrink: 0; }
.store-cat-tab:hover  { border-color: var(--c-green-primary); color: var(--c-green-primary); }
.store-cat-tab.active { background: var(--c-green-primary); border-color: var(--c-green-primary); color: white; }

/* --------------------------------------------------------------------------
   PRODUCT DETAIL PAGE
   -------------------------------------------------------------------------- */
.product-detail-layout { display: grid; grid-template-columns: 1fr; gap: var(--space-6); padding-block: var(--space-6); }
@media (min-width: 768px)  { .product-detail-layout { grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: start; } }
@media (min-width: 1024px) { .product-detail-layout { grid-template-columns: 1fr 1.1fr; } }
.product-detail-img-wrap { border-radius: var(--radius-2xl); overflow: hidden; background: var(--c-slate-50); aspect-ratio: 1; }
.product-detail-img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-info { display: flex; flex-direction: column; gap: var(--space-4); }
.product-detail-name { font-family: var(--font-heading); font-size: clamp(1.3rem,3.5vw,1.75rem); font-weight: 900; color: var(--c-slate-950); line-height: 1.25; }
.product-detail-price { font-family: var(--font-heading); font-size: clamp(1.4rem,4vw,2rem); font-weight: 900; color: var(--c-green-dark); }
.product-detail-desc { font-size: var(--text-base); color: var(--c-slate-600); line-height: 1.7; }
.qty-control { display: inline-flex; align-items: center; border: 1.5px solid var(--c-slate-200); border-radius: var(--radius-xl); overflow: hidden; }
.qty-btn { width: 44px; height: 44px; background: var(--c-slate-50); border: none; cursor: pointer; font-size: 1.2rem; font-weight: 700; color: var(--c-slate-700); transition: background var(--trans-fast); display: flex; align-items: center; justify-content: center; }
.qty-btn:hover { background: var(--c-slate-100); }
.qty-value { width: 50px; text-align: center; font-family: var(--font-heading); font-size: var(--text-base); font-weight: 800; color: var(--c-slate-900); border: none; background: white; direction: ltr; }
.add-to-cart-btn-lg { width: 100%; padding: 16px; background: var(--c-green-primary); color: white; border: none; border-radius: var(--radius-xl); font-family: var(--font-heading); font-size: var(--text-lg); font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: var(--space-2); transition: all var(--trans-base); min-height: 54px; }
.add-to-cart-btn-lg:hover { background: var(--c-green-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(11,102,35,0.3); }
.add-to-cart-btn-lg:disabled { background: var(--c-slate-300); cursor: not-allowed; transform: none; box-shadow: none; }

/* --------------------------------------------------------------------------
   CART PAGE
   -------------------------------------------------------------------------- */
.cart-layout { display: grid; grid-template-columns: 1fr; gap: var(--space-6); padding-block: var(--space-6); align-items: start; }
@media (min-width: 1024px) {
  .cart-layout { grid-template-columns: 1fr 380px; }
  html[dir="rtl"] .cart-layout { grid-template-columns: 380px 1fr; }
}
.cart-item { display: flex; gap: var(--space-3); padding: var(--space-4); background: white; border-radius: var(--radius-xl); border: 1px solid var(--c-warm-border); align-items: center; transition: box-shadow var(--trans-fast); margin-bottom: var(--space-3); }
.cart-item:hover { box-shadow: var(--shadow-subtle); }
.cart-item-img { width: 72px; height: 72px; border-radius: var(--radius-lg); object-fit: cover; background: var(--c-slate-100); flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 700; color: var(--c-slate-900); margin-bottom: 2px; }
.cart-item-store { font-size: 11px; color: var(--c-slate-500); }
.cart-item-price { font-family: var(--font-heading); font-size: var(--text-base); font-weight: 800; color: var(--c-green-dark); margin-top: 4px; }
.cart-summary-card { background: white; border-radius: var(--radius-xl); border: 1px solid var(--c-warm-border); padding: var(--space-5); position: sticky; top: 80px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: var(--text-sm); color: var(--c-slate-600); }
.summary-row.total { border-top: 2px solid var(--c-warm-border); margin-top: var(--space-2); padding-top: var(--space-3); font-family: var(--font-heading); font-size: var(--text-lg); font-weight: 900; color: var(--c-slate-950); }

/* Cart conflict modal */
.cart-conflict-modal { position: fixed; inset: 0; background: rgba(15,23,42,0.6); backdrop-filter: blur(4px); z-index: 2000; display: none; align-items: center; justify-content: center; padding: var(--space-4); }
.cart-conflict-modal.open { display: flex; }
.cart-conflict-box { background: white; border-radius: var(--radius-2xl); padding: var(--space-6); max-width: 420px; width: 100%; box-shadow: 0 24px 48px rgba(0,0,0,0.2); text-align: center; }
.conflict-icon { font-size: 2.5rem; margin-bottom: var(--space-3); }
.conflict-title { font-family: var(--font-heading); font-size: var(--text-xl); font-weight: 800; color: var(--c-slate-900); margin-bottom: var(--space-2); }
.conflict-desc { font-size: var(--text-sm); color: var(--c-slate-600); line-height: 1.6; margin-bottom: var(--space-5); }
.conflict-actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   CHECKOUT PAGE
   -------------------------------------------------------------------------- */
.checkout-layout { display: grid; grid-template-columns: 1fr; gap: var(--space-6); padding-block: var(--space-6); align-items: start; }
@media (min-width: 1024px) {
  .checkout-layout { grid-template-columns: 1fr 380px; }
  html[dir="rtl"] .checkout-layout { grid-template-columns: 380px 1fr; }
}
.checkout-steps { display: flex; align-items: center; gap: 0; margin-bottom: var(--space-6); overflow-x: auto; scrollbar-width: none; }
.checkout-steps::-webkit-scrollbar { display: none; }
.checkout-step { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.step-num { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--c-slate-300); font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 800; display: flex; align-items: center; justify-content: center; color: var(--c-slate-400); flex-shrink: 0; }
.step-num.active { border-color: var(--c-green-primary); background: var(--c-green-primary); color: white; }
.step-num.done   { border-color: var(--c-green-primary); background: var(--c-green-soft); color: var(--c-green-dark); }
.step-label { font-family: var(--font-heading); font-size: var(--text-xs); font-weight: 700; color: var(--c-slate-400); white-space: nowrap; }
.step-label.active { color: var(--c-green-dark); }
.step-divider { width: 32px; height: 2px; background: var(--c-slate-200); flex-shrink: 0; }
.step-divider.done { background: var(--c-green-primary); }
.checkout-section { background: white; border-radius: var(--radius-xl); border: 1px solid var(--c-warm-border); padding: var(--space-5); margin-bottom: var(--space-4); }
.checkout-section-title { font-family: var(--font-heading); font-size: var(--text-lg); font-weight: 800; color: var(--c-slate-900); margin-bottom: var(--space-4); padding-bottom: var(--space-3); border-bottom: 1px solid var(--c-warm-border); }

/* --------------------------------------------------------------------------
   ORDER STATUS PILLS & TIMELINE
   -------------------------------------------------------------------------- */
.order-status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--radius-full); font-family: var(--font-heading); font-size: 11px; font-weight: 700; }
.order-status-pill.placed          { background: #eff6ff; color: #1d4ed8; }
.order-status-pill.accepted        { background: #f0fdf4; color: #166534; }
.order-status-pill.preparing       { background: #fef9c3; color: #713f12; }
.order-status-pill.ready_for_pickup{ background: #fff7ed; color: #9a3412; }
.order-status-pill.out_for_delivery{ background: var(--c-orange-soft); color: var(--c-orange-dark); }
.order-status-pill.delivered       { background: var(--c-green-soft); color: var(--c-green-dark); }
.order-status-pill.cancelled       { background: #fef2f2; color: #991b1b; }

.order-timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-step { display: flex; gap: var(--space-4); position: relative; padding-bottom: var(--space-4); }
.timeline-step:last-child { padding-bottom: 0; }
.timeline-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--c-slate-300); background: white; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--c-slate-400); flex-shrink: 0; position: relative; z-index: 1; }
.timeline-dot.done   { border-color: var(--c-green-primary); background: var(--c-green-primary); color: white; }
.timeline-dot.active { border-color: var(--c-orange-accent); background: var(--c-orange-soft); color: var(--c-orange-dark); }
.timeline-step:not(:last-child) .timeline-dot::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: 2px; height: calc(var(--space-4) * 1.5); background: var(--c-slate-200); }
.timeline-step.done:not(:last-child) .timeline-dot::after { background: var(--c-green-primary); }
.timeline-content { flex: 1; min-width: 0; }
.timeline-title { font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 700; color: var(--c-slate-700); }
.timeline-title.active { color: var(--c-slate-900); }
.timeline-title.done   { color: var(--c-green-dark); }
.timeline-time { font-size: 11px; color: var(--c-slate-400); margin-top: 2px; }

/* --------------------------------------------------------------------------
   EMPTY STATES
   -------------------------------------------------------------------------- */
.empty-state { text-align: center; padding: var(--space-16) var(--space-4); display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.empty-state-icon { width: 80px; height: 80px; background: var(--c-green-soft); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.empty-state-title { font-family: var(--font-heading); font-size: clamp(1.1rem,3vw,1.35rem); font-weight: 800; color: var(--c-slate-800); }
.empty-state-desc  { font-size: var(--text-sm); color: var(--c-slate-500); max-width: 380px; line-height: 1.6; }

/* --------------------------------------------------------------------------
   PHONE GATE MODAL
   -------------------------------------------------------------------------- */
.phone-gate-modal { position: fixed; inset: 0; background: rgba(15,23,42,0.7); backdrop-filter: blur(4px); z-index: 3000; display: none; align-items: center; justify-content: center; padding: var(--space-4); }
.phone-gate-modal.open { display: flex; }
.phone-gate-box { background: white; border-radius: var(--radius-2xl); padding: var(--space-6); max-width: 420px; width: 100%; box-shadow: 0 24px 48px rgba(0,0,0,0.2); }

/* --------------------------------------------------------------------------
   BREADCRUMB
   -------------------------------------------------------------------------- */
.breadcrumb { display: flex; align-items: center; gap: var(--space-1); flex-wrap: wrap; padding-block: var(--space-3); }
.breadcrumb-item { font-size: var(--text-xs); color: var(--c-slate-500); }
.breadcrumb-item a { color: var(--c-slate-500); text-decoration: none; transition: color var(--trans-fast); }
.breadcrumb-item a:hover { color: var(--c-green-primary); }
.breadcrumb-item.current { color: var(--c-slate-800); font-weight: 600; }
.breadcrumb-sep { color: var(--c-slate-300); font-size: 10px; }

/* --------------------------------------------------------------------------
   STORE SEARCH INPUT
   -------------------------------------------------------------------------- */
.store-search-wrap { position: relative; margin-bottom: var(--space-5); }
.store-search-input { width: 100%; padding: 12px 48px 12px 16px; border: 1.5px solid var(--c-slate-200); border-radius: var(--radius-full); font-family: var(--font-heading); font-size: var(--text-base); color: var(--c-slate-800); background: white; transition: border-color var(--trans-fast); }
html[dir="rtl"] .store-search-input { padding: 12px 16px 12px 48px; }
.store-search-input:focus { border-color: var(--c-green-primary); outline: none; box-shadow: 0 0 0 3px rgba(11,102,35,0.08); }
.store-search-icon { position: absolute; top: 50%; transform: translateY(-50%); right: 16px; color: var(--c-slate-400); pointer-events: none; }
html[dir="rtl"] .store-search-icon { right: auto; left: 16px; }

/* --------------------------------------------------------------------------
   ADDRESS CARD
   -------------------------------------------------------------------------- */
.address-card { background: white; border-radius: var(--radius-xl); border: 1.5px solid var(--c-warm-border); padding: var(--space-4); cursor: pointer; transition: all var(--trans-fast); }
.address-card:hover,
.address-card.selected { border-color: var(--c-green-primary); background: var(--c-green-subtle); }

/* --------------------------------------------------------------------------
   TRUST STRIP
   -------------------------------------------------------------------------- */
.trust-strip { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; padding: var(--space-5) 0; }
.trust-item { display: flex; align-items: center; gap: 8px; font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 700; color: var(--c-slate-700); }
.trust-item-icon { width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--c-green-soft); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   SECTION HEADER
   -------------------------------------------------------------------------- */
.marketplace-section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); flex-wrap: wrap; }
.marketplace-section-title { font-family: var(--font-heading); font-size: clamp(1.15rem,3vw,1.5rem); font-weight: 800; color: var(--c-slate-900); line-height: 1.25; }
.marketplace-section-link { font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 700; color: var(--c-green-primary); text-decoration: none; white-space: nowrap; transition: color var(--trans-fast); }
.marketplace-section-link:hover { color: var(--c-green-dark); }

/* --------------------------------------------------------------------------
   COD BADGE
   -------------------------------------------------------------------------- */
.cod-badge { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: linear-gradient(135deg,#f0fdf4,#dcfce7); border: 1px solid rgba(11,102,35,0.2); border-radius: var(--radius-lg); font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 700; color: var(--c-green-dark); }

/* --------------------------------------------------------------------------
   RESPONSIVE UTILS & ANIMATIONS
   -------------------------------------------------------------------------- */
.hide-desktop { display: block; }
.show-desktop { display: none; }
@media (min-width: 1024px) { .hide-desktop { display: none; } .show-desktop { display: block; } }
.w-full { width: 100%; }
@keyframes fadeIn  { from{opacity:0} to{opacity:1} }
@keyframes slideUp { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }

/* Header search bar (marketplace pages) */
.nav-search-wrap {
  flex: 1;
  max-width: 500px;
  position: relative;
  display: none;
}
@media (min-width: 768px) { .nav-search-wrap { display: block; } }
.nav-search-input {
  width: 100%; padding: 9px 44px 9px 16px;
  border: 1.5px solid var(--c-slate-200); border-radius: var(--radius-full);
  font-family: var(--font-heading); font-size: var(--text-sm); color: var(--c-slate-800);
  background: var(--c-slate-50); transition: all var(--trans-fast);
}
html[dir="rtl"] .nav-search-input { padding: 9px 16px 9px 44px; }
.nav-search-input:focus { border-color: var(--c-green-primary); background: white; outline: none; box-shadow: 0 0 0 3px rgba(11,102,35,0.08); }
.nav-search-submit { position: absolute; top: 50%; transform: translateY(-50%); right: 12px; background: none; border: none; cursor: pointer; color: var(--c-slate-400); display: flex; }
html[dir="rtl"] .nav-search-submit { right: auto; left: 12px; }
.nav-search-submit:hover { color: var(--c-green-primary); }
