/* ─────────────────────────────────────────────
   SHOP — ໜ້າສິນຄ້າທັງໝົດ (/shop/)
   Reuses .industrial-* components from home.css; adds
   search/filter/pagination chrome on top of base tokens.
   ───────────────────────────────────────────── */

.shop-header { padding: 48px 0 8px; }
.shop-header h1 { margin-top: 6px; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; }
.shop-header p { margin-top: 10px; max-width: 62ch; color: var(--text-2); }

.shop-section { padding-top: 28px; }

.shop-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.shop-search { position: relative; flex: 1 1 260px; min-width: 220px; }
.shop-search svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; stroke: var(--text-2); fill: none; stroke-width: 2;
  pointer-events: none;
}
.shop-search input {
  width: 100%; height: 46px; padding: 0 14px 0 40px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); color: var(--text); font-size: 14px;
}
.shop-search input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-tint); }

.shop-instock { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); white-space: nowrap; cursor: pointer; user-select: none; }
.shop-instock input { accent-color: var(--red); width: 16px; height: 16px; }

.shop-sort {
  height: 46px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer;
}

.shop-toolbar .industrial-button { min-height: 46px; padding-inline: 24px; }

.shop-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.shop-chip {
  height: 36px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); border-radius: var(--r-full);
  color: var(--text-2); font-size: 13px; font-weight: 600; background: var(--bg);
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.shop-chip:hover { border-color: var(--red); color: var(--red); }
.shop-chip.is-active { background: var(--red); border-color: var(--red); color: #fff; }

/* ຈຳນວນສິນຄ້າໃນໝວດ — ບອກເຫດຜົນຂອງລຳດັບ ແລະ ກັນກົດເຂົ້າໄປພົບໜ້າວ່າງ */
.shop-chip__count {
  min-width: 20px; padding: 1px 6px; border-radius: var(--r-full);
  background: var(--surface); color: var(--text-2);
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  text-align: center;
}
.shop-chip:hover .shop-chip__count { background: var(--red-tint); color: var(--red-ink); }
.shop-chip.is-active .shop-chip__count { background: rgba(255,255,255,.22); color: #fff; }

/* ໝວດທີ່ພັບໄວ້ — checkbox ຢູ່ກ່ອນໜ້າ nav ເປັນຄົນເປີດ (ບໍ່ໃຊ້ JavaScript) */
.shop-cats__switch { position: absolute; width: 1px; height: 1px; opacity: 0; }
.shop-chip--rest { display: none; }
.shop-cats__switch:checked + .shop-chips .shop-chip--rest { display: inline-flex; }
.shop-chip--more { cursor: pointer; border-style: dashed; color: var(--red-ink); border-color: color-mix(in srgb, var(--red) 45%, var(--border)); }
.shop-chip--more:hover { background: var(--red-tint); }
.shop-chip__more-close { display: none; }
.shop-cats__switch:checked + .shop-chips .shop-chip__more-open { display: none; }
.shop-cats__switch:checked + .shop-chips .shop-chip__more-close { display: inline; }
.shop-cats__switch:focus-visible + .shop-chips .shop-chip--more {
  outline: 3px solid color-mix(in srgb, var(--red) 45%, transparent); outline-offset: 2px;
}

/* ມືຖື: ໝວດເລື່ອນຂວາງແຖວດຽວ ດີກວ່າພັບເປັນ 6 ແຖວຈົນສິນຄ້າຖືກຍູ້ຕົກຈໍ */
@media (max-width: 720px) {
  .shop-chips {
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity;
    margin-bottom: 24px; padding-bottom: 6px;
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .shop-chips::-webkit-scrollbar { display: none; }
  .shop-chip { flex: 0 0 auto; scroll-snap-align: start; }
}

.industrial-stock-badge--out { background: rgba(60,60,62,.88); }
/* ລົດຈັກ: ປຸ່ມເປັນລິ້ງໄປໜ້າລຸ້ນ (ເລືອກສີກ່ອນ) ບໍ່ແມ່ນ submit — ຈຶ່ງບໍ່ມີ
   ຄ່າ default ຂອງ <button> ຕ້ອງຈັດ icon ໃຫ້ຢູ່ກາງເອງ */
.industrial-cart-button--link { text-decoration: none; }
.industrial-cart-button--disabled { background: var(--border); color: var(--text-2); cursor: not-allowed; pointer-events: none; }
.industrial-cart-button--disabled:hover { background: var(--border); transform: none; }

.shop-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 44px; }
.shop-pagination a, .shop-pagination__disabled {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 50%; color: var(--text);
  transition: border-color .2s ease, color .2s ease;
}
.shop-pagination a:hover { border-color: var(--red); color: var(--red); }
.shop-pagination__disabled { color: var(--border); }
.shop-pagination__count { font-size: 13px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .shop-toolbar { flex-direction: column; align-items: stretch; }
  .shop-search { flex: none; min-width: 0; }
  .shop-toolbar .industrial-button { width: 100%; }
}
