/* Extracted styles from detail_shop_new.html */
:root {
  --primary: #19bfd3;
  --accent: #ff5333;
  --success: #66b766;
  --ink: #0c0f14;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #fff;
  --bg-muted: #f6f7f9;
  --radius: 16px;
  --shadow-1: 0 8px 24px rgba(2, 6, 23, 0.06);
  --shadow-2: 0 12px 32px rgba(2, 6, 23, 0.08);
}
.shop-detail {
  direction: rtl;
  background: radial-gradient(
      1200px 400px at 100% -100px,
      #e7fbff 0%,
      transparent 60%
    ),
    var(--bg-muted);
}
.shop-detail .container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* ===== Global link reset (scoped) ===== */
.shop-detail a {
  color: inherit;
  text-decoration: none !important;
  border-bottom: 0 !important;
  -webkit-tap-highlight-color: transparent;
}
.shop-detail a:hover {
  text-decoration: none;
}
.shop-detail a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  text-decoration: none;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  color: #fff;
}
.hero-cover {
  position: relative;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  background: transparent; /* moved from inline */
}
.hero-cover .bg {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: 220px;
  background-size: cover;
  background-position: center;
}
.hero-cover .bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.55));
  z-index: -1;
}
.hero-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
}
@media (max-width: 720px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}
.hero .logo {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #fff;
  box-shadow: var(--shadow-2);
}
.hero .logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero .h-meta {
  display: grid;
  gap: 10px;
}
.hero .h-title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}
.hero .stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hero .chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 13px;
}
.hero .chip b {
  font-weight: 900;
}

@media (max-width: 720px) {
  .hero-cover .bg {
    min-height: 180px;
  }
  .hero .logo {
    width: 68px;
    height: 68px;
  }
  .hero .h-title {
    font-size: 20px;
  }
}
@media (max-width: 420px) {
  .hero-cover .bg {
    min-height: 160px;
  }
  .hero .logo {
    width: 56px;
    height: 56px;
  }
  .hero .h-title {
    font-size: 18px;
  }
}

.info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
@media (max-width: 720px) {
  .info-row {
    grid-template-columns: 1fr;
  }
}
.info-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 10px;
}

/* ===== Layout ===== */
.page {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  padding: 20px 0;
}
/* Filters head */
.filters-head {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.btn-open-filters,
.btn-clear-all {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.active-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.chip-filter .x {
  cursor: pointer;
}
@media (max-width: 980px) {
  .page {
    grid-template-columns: 1fr;
  }
}

/* ===== Filters ===== */
.filters {
  position: sticky;
  top: 12px;
}
/* Drawer behavior */
@media (max-width: 980px) {
  .filters-head {
    display: flex;
  }
  .page {
    grid-template-columns: 1fr;
  }
  .filters {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(92vw, 360px);
    transform: translateX(110%);
    transition: transform 0.25s ease;
    background: var(--bg);
    z-index: 1000;
    box-shadow: var(--shadow-2);
    padding: 14px;
    overflow-y: auto;
  }
  .filters.open {
    transform: translateX(0);
  }
  .filters::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    transform: translateX(-100%);
  }
  .filters.open::before {
    transform: translateX(0);
  }
}
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.panel + .panel {
  margin-top: 12px;
}
.panel h3 {
  margin: 0;
  padding: 12px 14px;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
}
.panel .body {
  padding: 12px 14px;
}
.search-in {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 10px;
  margin-bottom: 10px;
}
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}
.checklist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.checklist input {
  width: 18px;
  height: 18px;
}
.shop-detail .muted {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .filters {
    position: static;
  }
  .checklist {
    max-height: 220px;
  }
}
@media (max-width: 560px) {
  .checklist {
    max-height: 200px;
  }
}

/* ===== Sort + Grid ===== */
.sortbar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-1);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.sortbar .links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.sortbar a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #111;
  text-decoration: none;
}
.sortbar a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

@media (max-width: 720px) {
  .sortbar {
    padding: 10px;
  }
  .sortbar .links {
    width: 100%;
  }
  .sortbar .links a {
    flex: 1;
    justify-content: center;
  }
}

/* Extra small devices optimizations */
@media (max-width: 480px) {
  .search-in {
    height: 38px;
    font-size: 13px;
  }
  .panel h3 {
    font-size: 14px;
  }
  .checklist li {
    gap: 6px;
  }
  .chip {
    padding: 5px 8px;
    font-size: 12px;
  }
  .sortbar .links {
    gap: 8px;
  }
  .sortbar .links a {
    flex: 1 1 calc(50% - 8px);
    padding: 0 10px;
    font-size: 13px;
    height: 34px;
  }
  .price .now {
    font-size: 13px;
  }
  .price .real {
    font-size: 11px;
  }
}

.grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}
@media (max-width: 820px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}
@media (max-width: 520px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 360px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
}
.thumb {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
}
.first-image,
.second-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.25s ease;
}
.second-image {
  opacity: 0;
}
.card:hover .second-image {
  opacity: 1;
}
.first-image img,
.second-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: opacity, transform;
}
.card h3 {
  margin: 10px 10px 6px;
  font-size: 14px;
  line-height: 1.6;
  height: 44px;
  overflow: hidden;
  word-break: break-word;
}
@media (max-width: 560px) {
  .card h3 {
    height: auto;
  }
}
.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px 12px;
}
.price .real {
  color: #6b7280;
  text-decoration: line-through;
  font-size: 12px;
}
.price .now {
  font-weight: 900;
}

/* ===== Pagination ===== */
.pagination {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}
.pagination ul {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: #111;
}
@media (max-width: 480px) {
  .pagination ul {
    gap: 6px;
  }
  .pagination a,
  .pagination span {
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }
}

/* ===== Utilities ===== */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ===== Page Assets ===== */
.hero .bg {
  background-image: url("/static/img/samples/shops/bgstore-pamisha.jpg");
}
