/* ==========================================================================
   ShopAtHome.pk — Design System
   Original identity: warm coral/orange brand on deep ink neutrals.
   Built on top of Bootstrap 5 grid/utilities; components below are custom.
   ========================================================================== */

:root {
  --sah-brand: #ff5a1f;
  --sah-brand-dark: #e2450e;
  --sah-brand-light: #fff1ea;
  --sah-accent: #0f9d58;
  --sah-ink: #14141f;
  --sah-ink-soft: #4a4a5a;
  --sah-muted: #8a8a9a;
  --sah-border: #eceaf3;
  --sah-bg: #faf9fc;
  --sah-surface: #ffffff;
  --sah-warn: #f5a623;
  --sah-danger: #e5484d;
  --sah-radius-sm: 8px;
  --sah-radius: 14px;
  --sah-radius-lg: 22px;
  --sah-shadow-sm: 0 1px 3px rgba(20,20,31,.06);
  --sah-shadow: 0 8px 24px rgba(20,20,31,.08);
  --sah-shadow-lg: 0 20px 48px rgba(20,20,31,.14);
  --sah-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--sah-font);
  color: var(--sah-ink);
  background: var(--sah-bg);
  -webkit-font-smoothing: antialiased;
}

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

.container-sah {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: -0.02em; color: var(--sah-ink); }

/* ---------------- Buttons ---------------- */
.btn-sah {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: all .18s ease;
  white-space: nowrap;
}
.btn-sah-primary { background: var(--sah-brand); color: #fff; box-shadow: 0 6px 16px rgba(255,90,31,.28); }
.btn-sah-primary:hover { background: var(--sah-brand-dark); transform: translateY(-1px); color: #fff; }
.btn-sah-outline { background: #fff; color: var(--sah-ink); border-color: var(--sah-border); }
.btn-sah-outline:hover { border-color: var(--sah-brand); color: var(--sah-brand); }
.btn-sah-dark { background: var(--sah-ink); color: #fff; }
.btn-sah-dark:hover { background: #000; color: #fff; }
.btn-sah-whatsapp { background: #25D366; color: #fff; }
.btn-sah-whatsapp:hover { background: #1ebd5a; color: #fff; }
.btn-sah-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-sah-block { width: 100%; }

/* ---------------- Announcement bar ---------------- */
.sah-announce {
  background: var(--sah-ink); color: #fff; font-size: .82rem; text-align: center;
  padding: .5rem 1rem;
}
.sah-announce a { color: var(--sah-brand); font-weight: 600; }

/* ---------------- Header ---------------- */
.sah-header {
  position: sticky; top: 0; z-index: 1000; background: #fff;
  border-bottom: 1px solid var(--sah-border);
}
.sah-header-top {
  display: flex; align-items: center; gap: 1.5rem; padding: .85rem 0;
}
.sah-logo { font-size: 1.5rem; font-weight: 800; color: var(--sah-ink); display: flex; align-items: center; gap: .4rem; }
.sah-logo span { color: var(--sah-brand); }
.sah-location-pill {
  display: flex; align-items: center; gap: .4rem; padding: .5rem .9rem;
  border: 1px solid var(--sah-border); border-radius: 999px; font-size: .85rem; font-weight: 600;
  color: var(--sah-ink-soft); cursor: pointer; white-space: nowrap;
}
.sah-location-pill i { color: var(--sah-brand); }
.sah-search-wrap { flex: 1; position: relative; max-width: 640px; }
.sah-search-input {
  width: 100%; padding: .78rem 1.2rem .78rem 2.8rem; border-radius: 999px;
  border: 1.5px solid var(--sah-border); background: var(--sah-bg); font-size: .95rem;
  transition: border-color .15s;
}
.sah-search-input:focus { outline: none; border-color: var(--sah-brand); background: #fff; }
.sah-search-icon { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); color: var(--sah-muted); }
.sah-search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff;
  border-radius: var(--sah-radius); box-shadow: var(--sah-shadow-lg); border: 1px solid var(--sah-border);
  max-height: 420px; overflow-y: auto; display: none; z-index: 1100;
}
.sah-search-results.show { display: block; }
.sah-search-group-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--sah-muted); font-weight: 700; padding: .8rem 1rem .3rem; }
.sah-search-item { display: flex; align-items: center; gap: .7rem; padding: .55rem 1rem; }
.sah-search-item:hover { background: var(--sah-bg); }
.sah-search-item img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--sah-bg); }
.sah-header-actions { display: flex; align-items: center; gap: .4rem; }
.sah-icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: var(--sah-ink); font-size: 1.05rem; transition: background .15s;
}
.sah-icon-btn:hover { background: var(--sah-bg); }
.sah-icon-badge {
  position: absolute; top: 0; right: 0; background: var(--sah-brand); color: #fff; font-size: .65rem;
  font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* Main nav */
.sah-nav { border-top: 1px solid var(--sah-border); }
.sah-nav-list { display: flex; align-items: center; gap: 1.8rem; list-style: none; margin: 0; padding: .7rem 0; overflow-x: auto; }
.sah-nav-list a { font-weight: 600; font-size: .9rem; color: var(--sah-ink-soft); white-space: nowrap; display: flex; align-items: center; gap: .4rem; }
.sah-nav-list a:hover, .sah-nav-list a.active { color: var(--sah-brand); }

/* ---------------- Hero ---------------- */
.sah-hero { padding: 28px 0; }
.sah-hero-slide {
  position: relative; border-radius: var(--sah-radius-lg); overflow: hidden; min-height: 380px;
  display: flex; align-items: center; background: linear-gradient(120deg, #1a1a2e, #2c2c45);
}
.sah-hero-slide img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.sah-hero-content { position: relative; z-index: 2; padding: 3rem; max-width: 560px; color: #fff; }
.sah-hero-content h1 { font-size: 2.6rem; line-height: 1.1; margin-bottom: .8rem; }
.sah-hero-content p { color: rgba(255,255,255,.85); margin-bottom: 1.5rem; font-size: 1.05rem; }
.swiper-pagination-bullet { background: #fff; opacity: .6; }
.swiper-pagination-bullet-active { background: var(--sah-brand); opacity: 1; }

/* ---------------- Marketplace entry cards ---------------- */
.sah-market-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin: 24px 0; }
.sah-market-card {
  background: var(--sah-surface); border: 1px solid var(--sah-border); border-radius: var(--sah-radius);
  padding: 1.4rem 1rem; text-align: center; transition: all .2s ease; position: relative; overflow: hidden;
}
.sah-market-card:hover { transform: translateY(-4px); box-shadow: var(--sah-shadow-lg); border-color: transparent; }
.sah-market-card .icon-wrap {
  width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto .8rem; font-size: 1.5rem; color: #fff;
}
.sah-market-card h4 { font-size: .95rem; margin-bottom: .2rem; }
.sah-market-card p { font-size: .78rem; color: var(--sah-muted); margin: 0; }
.mc-shop .icon-wrap { background: linear-gradient(135deg,#ff5a1f,#ff8a3d); }
.mc-used .icon-wrap { background: linear-gradient(135deg,#0f9d58,#34c77b); }
.mc-property .icon-wrap { background: linear-gradient(135deg,#3d5aff,#6b8aff); }
.mc-services .icon-wrap { background: linear-gradient(135deg,#a03dff,#c46bff); }
.mc-food .icon-wrap { background: linear-gradient(135deg,#ff3d6a,#ff6b95); }
.mc-rfq .icon-wrap { background: linear-gradient(135deg,#14141f,#4a4a5a); }

/* ---------------- Section header ---------------- */
.sah-section { padding: 32px 0; }
.sah-section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 1.4rem; }
.sah-section-head h2 { font-size: 1.5rem; margin: 0; }
.sah-section-head .sub { color: var(--sah-muted); font-size: .9rem; margin-top: .2rem; }
.sah-section-link { font-weight: 600; font-size: .88rem; color: var(--sah-brand); display: flex; align-items: center; gap: .3rem; }

/* ---------------- Product card ---------------- */
.sah-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.sah-card {
  background: var(--sah-surface); border: 1px solid var(--sah-border); border-radius: var(--sah-radius);
  overflow: hidden; transition: all .2s ease; position: relative; display: flex; flex-direction: column;
}
.sah-card:hover { box-shadow: var(--sah-shadow-lg); transform: translateY(-3px); border-color: transparent; }
.sah-card-media { position: relative; aspect-ratio: 1/1; background: var(--sah-bg); overflow: hidden; }
.sah-card-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.sah-card-media .hover-img { position: absolute; inset: 0; opacity: 0; }
.sah-card:hover .hover-img { opacity: 1; }
.sah-card-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.sah-badge { font-size: .66rem; font-weight: 800; padding: .28rem .55rem; border-radius: 6px; letter-spacing: .03em; color: #fff; }
.badge-new { background: var(--sah-accent); }
.badge-used { background: var(--sah-warn); }
.badge-sale { background: var(--sah-danger); }
.badge-featured { background: var(--sah-ink); }
.badge-default { background: var(--sah-muted); }
.sah-card-wishlist {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center; z-index: 2; color: var(--sah-ink-soft); transition: all .15s;
}
.sah-card-wishlist:hover, .sah-card-wishlist.active { color: var(--sah-brand); }
.sah-card-quickview {
  position: absolute; bottom: 10px; left: 10px; right: 10px; background: rgba(20,20,31,.88); color: #fff;
  text-align: center; padding: .5rem; border-radius: 8px; font-size: .78rem; font-weight: 600;
  opacity: 0; transform: translateY(6px); transition: all .2s;
}
.sah-card:hover .sah-card-quickview { opacity: 1; transform: translateY(0); }
.sah-card-body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.sah-card-cat { font-size: .7rem; color: var(--sah-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.sah-card-title { font-size: .9rem; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }
.sah-card-rating { font-size: .78rem; color: var(--sah-muted); display: flex; align-items: center; gap: .3rem; }
.sah-card-rating i { color: var(--sah-warn); }
.sah-card-price { display: flex; align-items: baseline; gap: .5rem; margin-top: auto; }
.sah-price-current { font-weight: 800; font-size: 1.05rem; color: var(--sah-ink); }
.sah-price-old { font-size: .82rem; color: var(--sah-muted); text-decoration: line-through; }
.sah-card-location { font-size: .76rem; color: var(--sah-muted); display: flex; align-items: center; gap: .3rem; }
.sah-card-cta { margin: .6rem 1rem 1rem; }

/* ---------------- Filters / sidebar ---------------- */
.sah-filter-box { background: #fff; border: 1px solid var(--sah-border); border-radius: var(--sah-radius); padding: 1.2rem; margin-bottom: 1rem; }
.sah-filter-box h6 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--sah-muted); font-weight: 700; margin-bottom: .8rem; }
.sah-filter-box .form-check { margin-bottom: .5rem; font-size: .9rem; }

/* ---------------- Breadcrumb ---------------- */
.sah-breadcrumb { font-size: .82rem; color: var(--sah-muted); padding: 14px 0; }
.sah-breadcrumb a { color: var(--sah-muted); }
.sah-breadcrumb a:hover { color: var(--sah-brand); }
.sah-breadcrumb .sep { margin: 0 .4rem; }

/* ---------------- Pagination ---------------- */
.sah-pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2rem; list-style: none; padding: 0; }
.sah-pagination a, .sah-pagination span { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--sah-border); font-size: .85rem; font-weight: 600; }
.sah-pagination .active { background: var(--sah-brand); color: #fff; border-color: var(--sah-brand); }

/* ---------------- Empty state ---------------- */
.sah-empty { text-align: center; padding: 4rem 1rem; color: var(--sah-muted); }
.sah-empty i { font-size: 3rem; margin-bottom: 1rem; color: var(--sah-border); }
.sah-empty h5 { color: var(--sah-ink); margin-bottom: .4rem; }

/* ---------------- Skeleton loaders ---------------- */
.sah-skel { background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%); background-size: 400% 100%; animation: sah-skel-anim 1.4s ease infinite; border-radius: var(--sah-radius); }
@keyframes sah-skel-anim { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------- Footer ---------------- */
.sah-footer { background: var(--sah-ink); color: rgba(255,255,255,.75); padding: 3.5rem 0 1.5rem; margin-top: 3rem; }
.sah-footer h6 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1rem; }
.sah-footer a { color: rgba(255,255,255,.65); font-size: .88rem; display: block; margin-bottom: .55rem; }
.sah-footer a:hover { color: var(--sah-brand); }
.sah-footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.sah-social { display: flex; gap: .6rem; }
.sah-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; margin: 0; }
.sah-social a:hover { background: var(--sah-brand); }

/* ---------------- WhatsApp float ---------------- */
.sah-whatsapp-float {
  position: fixed; bottom: 90px; right: 20px; width: 56px; height: 56px; border-radius: 50%; background: #25D366;
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: var(--sah-shadow-lg);
  z-index: 900;
}

/* ---------------- Mobile bottom nav ---------------- */
.sah-mobile-nav { display: none; }
@media (max-width: 767px) {
  .sah-mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--sah-border);
    z-index: 950; padding: .5rem 0; box-shadow: 0 -4px 16px rgba(0,0,0,.06);
  }
  .sah-mobile-nav a { flex: 1; text-align: center; font-size: .68rem; color: var(--sah-muted); display: flex; flex-direction: column; align-items: center; gap: .2rem; font-weight: 600; }
  .sah-mobile-nav a.active, .sah-mobile-nav a:hover { color: var(--sah-brand); }
  .sah-mobile-nav i { font-size: 1.15rem; }
  body { padding-bottom: 62px; }
  .sah-whatsapp-float { bottom: 74px; }
}

/* ---------------- Responsive grids ---------------- */
@media (max-width: 1199px) { .sah-market-grid { grid-template-columns: repeat(3, 1fr); } .sah-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 991px) { .sah-grid { grid-template-columns: repeat(3, 1fr); } .sah-hero-content h1 { font-size: 2rem; } }
@media (max-width: 767px) {
  .sah-market-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .sah-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .sah-header-top { flex-wrap: wrap; }
  .sah-search-wrap { order: 3; max-width: 100%; flex-basis: 100%; }
  .sah-nav-list { display: none; }
  .sah-hero-content { padding: 1.8rem; }
  .sah-hero-content h1 { font-size: 1.6rem; }
}

/* ---------------- Misc ---------------- */
.sah-tag-strip { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .3rem; }
.sah-tag-pill { flex: 0 0 auto; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--sah-border); font-size: .85rem; font-weight: 600; color: var(--sah-ink-soft); background: #fff; }
.sah-tag-pill.active, .sah-tag-pill:hover { background: var(--sah-ink); color: #fff; border-color: var(--sah-ink); }
.sah-verified { color: var(--sah-accent); font-size: .78rem; font-weight: 700; display: inline-flex; align-items: center; gap: .25rem; }
.sah-trust-item { text-align: center; padding: 1.2rem; }
.sah-trust-item i { font-size: 1.8rem; color: var(--sah-brand); margin-bottom: .6rem; }
.sah-seller-card { background: #fff; border: 1px solid var(--sah-border); border-radius: var(--sah-radius); padding: 1.4rem; text-align: center; }
.sah-seller-card img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; margin: 0 auto .8rem; border: 3px solid var(--sah-bg); }
