/* ============================================================
   Foodie Multi-Vendor Marketplace — RVP Connect
   Inspired by Swiggy / Zomato — Orange & Red color scheme
   ============================================================ */

:root {
  --fd-orange:       #f97316;
  --fd-orange-dark:  #c2410c;
  --fd-orange-light: #ffedd5;
  --fd-red:          #ef4444;
  --fd-red-dark:     #dc2626;
  --fd-yellow:       #fbbf24;
  --fd-green:        #22c55e;
  --fd-bg:           #fff7ed;
  --fd-card:         #ffffff;
  --fd-border:       #fed7aa;
  --fd-text:         #1e293b;
  --fd-muted:        #64748b;
  --fd-radius:       12px;
  --fd-shadow:       0 2px 12px rgba(249,115,22,.12), 0 1px 4px rgba(0,0,0,.06);
}

/* ── Foodie Header ───────────────────────────────────── */
.fd-header {
  position: sticky; top: var(--header-h, 60px); z-index: 900;
  background: #fff; border-bottom: 2px solid var(--fd-orange);
  padding: 0; box-shadow: 0 2px 12px rgba(249,115,22,.15);
}
.fd-header-inner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; max-width: 1280px; margin: 0 auto;
}
.fd-logo {
  font-weight: 900; font-size: .95rem; white-space: nowrap; flex-shrink: 0;
  background: linear-gradient(135deg,#f97316,#ef4444);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.fd-logo span { display: block; font-size: .6rem; font-weight: 600; color: #64748b; -webkit-text-fill-color: #64748b; }
.fd-location {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
  font-size: .72rem; color: var(--fd-muted); cursor: pointer;
  background: var(--fd-bg); padding: 6px 10px; border-radius: 10px;
  border: 1px solid var(--fd-border);
}
.fd-location svg { color: var(--fd-orange); flex-shrink: 0; }
.fd-location-text { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.fd-search-wrap { flex: 1; position: relative; }
.fd-search {
  width: 100%; border: 1.5px solid var(--fd-border); border-radius: 10px;
  padding: 8px 36px 8px 12px; font-size: .82rem; outline: none;
  background: var(--fd-bg); transition: border-color .15s;
}
.fd-search:focus { border-color: var(--fd-orange); background: #fff; }
.fd-search-icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--fd-orange); pointer-events: none; }
.fd-header-actions { display: flex; gap: 8px; flex-shrink: 0; }
.fd-cart-btn, .fd-wish-btn {
  position: relative; width: 38px; height: 38px; border-radius: 10px;
  background: var(--fd-orange-light); display: flex; align-items: center; justify-content: center;
  color: var(--fd-orange-dark); font-size: 1.1rem; text-decoration: none; flex-shrink: 0; cursor: pointer;
  border: none; transition: background .15s;
}
.fd-cart-btn:hover, .fd-wish-btn:hover { background: var(--fd-orange); color: #fff; }
.fd-cart-count {
  position: absolute; top: -5px; right: -5px; background: var(--fd-red);
  color: #fff; font-size: .62rem; font-weight: 800; min-width: 18px; height: 18px;
  border-radius: 100px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; line-height: 1; box-shadow: 0 2px 6px rgba(239,68,68,.5);
}

/* ── Search Results ──────────────────────────────────── */
.fd-search-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff;
  border: 1.5px solid var(--fd-border); border-radius: var(--fd-radius); z-index: 999;
  box-shadow: 0 8px 32px rgba(0,0,0,.12); max-height: 320px; overflow-y: auto; display: none;
}
.fd-search-results.open { display: block; }
.fd-search-result-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  cursor: pointer; transition: background .12s; border-bottom: 1px solid var(--fd-border);
}
.fd-search-result-item:last-child { border-bottom: none; }
.fd-search-result-item:hover { background: var(--fd-bg); }
.fd-search-result-item img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.fd-sri-name { font-size: .82rem; font-weight: 600; }
.fd-sri-vendor { font-size: .72rem; color: var(--fd-muted); }
.fd-sri-price { font-size: .75rem; color: var(--fd-orange-dark); font-weight: 700; }

/* ── Banner Slider ───────────────────────────────────── */
.fd-banner-section { padding: 12px 0; background: #fff; }
.fd-banner-swiper { border-radius: var(--fd-radius); overflow: hidden; margin: 0 14px; }
.fd-banner-slide { position: relative; border-radius: var(--fd-radius); overflow: hidden; }
.fd-banner-slide a { display: block; }
.fd-banner-slide img { width: 100%; height: 160px; object-fit: cover; display: block; }
@media (min-width: 768px) { .fd-banner-slide img { height: 240px; } }

/* ── Category Section ────────────────────────────────── */
.fd-categories { padding: 16px 0; background: #fff; border-bottom: 1px solid var(--fd-border); }
.fd-cat-title { font-size: .8rem; font-weight: 800; color: var(--fd-muted); text-transform: uppercase; letter-spacing: .08em; padding: 0 14px; margin-bottom: 10px; }
.fd-cat-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 0 14px 4px; scrollbar-width: none; }
.fd-cat-scroll::-webkit-scrollbar { display: none; }
.fd-cat-item { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; flex-shrink: 0; }
.fd-cat-icon {
  width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--fd-orange-light), #fcd9b6);
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
  border: 2.5px solid transparent; transition: border-color .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(249,115,22,.15);
}
.fd-cat-item.active .fd-cat-icon,
.fd-cat-item:hover .fd-cat-icon {
  border-color: var(--fd-orange); transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(249,115,22,.3);
}
.fd-cat-label { font-size: .65rem; font-weight: 700; color: var(--fd-text); text-align: center; max-width: 64px; line-height: 1.2; }

/* ── Vendor Scroll ───────────────────────────────────── */
.fd-vendor-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 0 14px 8px; scrollbar-width: none; }
.fd-vendor-scroll::-webkit-scrollbar { display: none; }
.fd-vendor-card {
  flex-shrink: 0; width: 130px; background: #fff; border-radius: var(--fd-radius);
  border: 1.5px solid var(--fd-border); padding: 12px 8px; text-align: center;
  box-shadow: var(--fd-shadow); cursor: pointer; transition: transform .2s, box-shadow .2s;
}
.fd-vendor-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(249,115,22,.2); }
.fd-vendor-img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin: 0 auto 6px; display: block; }
.fd-vendor-avatar {
  width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg,var(--fd-orange),var(--fd-red));
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
  font-weight: 900; color: #fff; margin: 0 auto 6px;
}
.fd-vendor-name { font-size: .75rem; font-weight: 800; margin-bottom: 3px; line-height: 1.2; }
.fd-vendor-cuisine { font-size: .62rem; color: var(--fd-muted); margin-bottom: 4px; }
.fd-vendor-rating { font-size: .65rem; color: var(--fd-orange-dark); font-weight: 700; margin-bottom: 6px; }
.fd-vendor-wa {
  display: inline-block; background: #25d366; color: #fff;
  font-size: .62rem; font-weight: 700; padding: 3px 8px; border-radius: 6px;
  text-decoration: none;
}

/* ── Section Headers ─────────────────────────────────── */
.fd-section { padding: 16px 0; }
.fd-section-header { display: flex; align-items: center; justify-content: space-between; padding: 0 14px; margin-bottom: 12px; }
.fd-section-title { font-size: 1rem; font-weight: 800; color: var(--fd-text); }
.fd-view-all { font-size: .72rem; color: var(--fd-orange-dark); font-weight: 700; padding: 5px 12px; background: var(--fd-orange-light); border-radius: 20px; white-space: nowrap; text-decoration: none; cursor: pointer; }
.fd-view-all:hover { background: var(--fd-orange); color: #fff; }

/* ── Deal Scroll ─────────────────────────────────────── */
.fd-deal-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 0 14px 8px; scrollbar-width: none; }
.fd-deal-scroll::-webkit-scrollbar { display: none; }
.fd-deal-card {
  flex-shrink: 0; width: 148px; background: #fff; border-radius: var(--fd-radius);
  border: 1.5px solid var(--fd-border); box-shadow: var(--fd-shadow); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.fd-deal-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(249,115,22,.2); }
.fd-deal-img { width: 100%; height: 100px; object-fit: cover; }
.fd-deal-body { padding: 8px; }
.fd-deal-vendor { font-size: .6rem; color: var(--fd-orange-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.fd-deal-name { font-size: .75rem; font-weight: 700; line-height: 1.2; margin-bottom: 4px; }
.fd-deal-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.fd-deal-price { font-size: .88rem; font-weight: 800; color: var(--fd-orange-dark); }
.fd-deal-old-price { font-size: .7rem; text-decoration: line-through; color: var(--fd-muted); margin-bottom: 6px; }
.fd-discount-badge {
  background: var(--fd-red); color: #fff; font-size: .6rem; font-weight: 800;
  padding: 2px 6px; border-radius: 4px;
}
.fd-discount-tag {
  position: absolute; top: 8px; left: 8px; background: var(--fd-red);
  color: #fff; font-size: .62rem; font-weight: 800; padding: 3px 7px; border-radius: 6px;
}

/* ── Product Grid ────────────────────────────────────── */
.fd-product-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; padding: 0 14px; }
@media (min-width: 768px) { .fd-product-grid { grid-template-columns: repeat(3,1fr); gap: 14px; } }
@media (min-width: 1024px){ .fd-product-grid { grid-template-columns: repeat(4,1fr); } }

.fd-product-card {
  background: var(--fd-card); border-radius: var(--fd-radius);
  border: 1.5px solid var(--fd-border); overflow: hidden;
  box-shadow: var(--fd-shadow); transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.fd-product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(249,115,22,.2); }
.fd-product-img-wrap { position: relative; overflow: hidden; }
.fd-product-img { width: 100%; height: 120px; object-fit: cover; }
@media (min-width:768px) { .fd-product-img { height: 150px; } }
.fd-out-of-stock-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
}
.fd-product-body { padding: 10px; flex: 1; display: flex; flex-direction: column; }
.fd-product-vendor { font-size: .6rem; color: var(--fd-orange-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1px; }
.fd-product-cat { font-size: .6rem; color: var(--fd-muted); font-weight: 600; margin-bottom: 3px; }
.fd-product-name { font-size: .8rem; font-weight: 700; line-height: 1.2; margin-bottom: 3px; color: var(--fd-text); }
.fd-product-desc { font-size: .68rem; color: var(--fd-muted); margin-bottom: 6px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fd-price-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; margin-top: auto; }
.fd-price { font-size: .9rem; font-weight: 800; color: var(--fd-orange-dark); }
.fd-price-old { font-size: .72rem; text-decoration: line-through; color: var(--fd-muted); }

/* ── Add to Cart Button ──────────────────────────────── */
.fd-add-btn {
  width: 100%; padding: 8px; border: 2px solid var(--fd-orange); background: #fff;
  color: var(--fd-orange-dark); font-weight: 700; font-size: .78rem;
  border-radius: 10px; cursor: pointer; transition: all .15s; text-align: center;
}
.fd-add-btn:hover { background: var(--fd-orange); color: #fff; }
.fd-add-btn.added { background: var(--fd-orange); color: #fff; }

/* ── Cart Page ───────────────────────────────────────── */
.fd-cart-page { background: var(--fd-bg); min-height: 100vh; padding-bottom: 120px; }
.fd-cart-item {
  background: #fff; border-radius: var(--fd-radius); padding: 12px 14px;
  margin: 10px 14px 0; border: 1.5px solid var(--fd-border);
  display: flex; gap: 12px; align-items: center; box-shadow: var(--fd-shadow);
}
.fd-cart-item img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.fd-cart-item-info { flex: 1; min-width: 0; }
.fd-cart-item-name { font-size: .82rem; font-weight: 700; margin-bottom: 2px; }
.fd-cart-item-vendor { font-size: .68rem; color: var(--fd-orange-dark); font-weight: 700; margin-bottom: 2px; }
.fd-cart-item-price { font-size: .82rem; font-weight: 700; color: var(--fd-orange-dark); margin-top: 4px; }
.fd-cart-item-actions { display: flex; align-items: center; }
.fd-cart-qty-btn {
  background: var(--fd-orange-light); border: none; color: var(--fd-orange-dark);
  width: 28px; height: 28px; border-radius: 8px; font-size: 1rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .12s;
}
.fd-cart-qty-btn:hover { background: var(--fd-orange); color: #fff; }
.fd-cart-qty-val { width: 32px; text-align: center; font-weight: 700; font-size: .85rem; }
.fd-cart-remove { background: none; border: none; color: var(--fd-muted); font-size: 1rem; cursor: pointer; padding: 4px; margin-left: 6px; }
.fd-cart-remove:hover { color: var(--fd-red); }

.fd-order-summary {
  background: #fff; margin: 12px 14px 0; border-radius: var(--fd-radius);
  border: 1.5px solid var(--fd-border); padding: 14px;
}
.fd-order-summary h3 { font-size: .85rem; font-weight: 800; margin-bottom: 12px; color: var(--fd-text); }
.fd-summary-row { display: flex; justify-content: space-between; font-size: .8rem; padding: 6px 0; border-bottom: 1px dashed var(--fd-border); }
.fd-summary-row:last-child { border-bottom: none; }
.fd-summary-row.total { font-weight: 800; font-size: .9rem; color: var(--fd-text); padding-top: 10px; }
.fd-summary-row.discount { color: var(--fd-orange-dark); }

.fd-checkout-btn-sticky {
  position: fixed; bottom: 70px; left: 0; right: 0; padding: 10px 14px; z-index: 800;
}
.fd-checkout-btn {
  width: 100%; padding: 14px; background: linear-gradient(135deg,var(--fd-orange),var(--fd-red)); color: #fff;
  font-weight: 800; font-size: .95rem; border: none; border-radius: 14px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(249,115,22,.4); transition: opacity .15s;
  display: flex; align-items: center; justify-content: space-between;
}
.fd-checkout-btn:hover { opacity: .9; }
.fd-checkout-btn span { font-size: .8rem; font-weight: 600; opacity: .85; }

.fd-empty-cart { text-align: center; padding: 60px 20px; }
.fd-empty-icon { font-size: 4rem; margin-bottom: 16px; display: block; }
.fd-empty-cart p { color: var(--fd-muted); margin-bottom: 20px; font-size: .9rem; }

/* ── Checkout Page ───────────────────────────────────── */
.fd-checkout-page { background: var(--fd-bg); min-height: 100vh; padding-bottom: 120px; }
.fd-checkout-section {
  background: #fff; margin: 10px 14px 0; border-radius: var(--fd-radius);
  border: 1.5px solid var(--fd-border); padding: 16px;
}
.fd-checkout-section h3 { font-size: .85rem; font-weight: 800; margin-bottom: 12px; color: var(--fd-text); }
.fd-layout { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 768px) { .fd-layout { grid-template-columns: 1fr 380px; gap: 20px; } }
.fd-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fd-form-field { display: flex; flex-direction: column; gap: 5px; }
.fd-form-field.full { grid-column: 1/-1; }
.fd-form-field label { font-size: .72rem; font-weight: 700; color: var(--fd-muted); }
.fd-form-input, .fd-form-textarea {
  padding: 10px 12px; border: 1.5px solid var(--fd-border); border-radius: 10px;
  font-size: .82rem; outline: none; background: #fff; width: 100%; font-family: inherit;
}
.fd-form-input:focus, .fd-form-textarea:focus { border-color: var(--fd-orange); }
.fd-form-textarea { resize: vertical; min-height: 64px; }

.fd-payment-options { display: flex; flex-direction: column; gap: 8px; }
.fd-payment-option {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1.5px solid var(--fd-border); border-radius: 10px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.fd-payment-option:has(input:checked) { border-color: var(--fd-orange); background: var(--fd-orange-light); }
.fd-payment-option input { accent-color: var(--fd-orange); width: 16px; height: 16px; }
.fd-payment-label { font-size: .82rem; font-weight: 600; flex: 1; }
.fd-payment-icon { font-size: 1.1rem; }
.fd-payment-badge { font-size: .65rem; background: var(--fd-orange-light); color: var(--fd-orange-dark); padding: 2px 8px; border-radius: 4px; font-weight: 700; }

.fd-place-order-btn { position: fixed; bottom: 70px; left: 0; right: 0; padding: 10px 14px; z-index: 800; }
.fd-place-order-btn button {
  width: 100%; padding: 14px; background: linear-gradient(135deg,var(--fd-orange),var(--fd-red)); color: #fff;
  font-weight: 800; font-size: .95rem; border: none; border-radius: 14px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(249,115,22,.4); transition: opacity .15s;
}
.fd-place-order-btn button:hover { opacity: .9; }
.fd-place-order-btn button:disabled { opacity: .6; cursor: not-allowed; }

/* ── Toast Notification ──────────────────────────────── */
.fd-toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1e293b; color: #fff; padding: 10px 20px; border-radius: 10px;
  font-size: .82rem; font-weight: 600; z-index: 9999; opacity: 0;
  transition: all .25s ease; pointer-events: none; white-space: nowrap;
}
.fd-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.fd-toast.success { background: #1e293b; }
.fd-toast.error   { background: #dc2626; }
