/* Product listing — filters, drawers, search, mega-menu. */

.shop-page { background: var(--bg); min-height: 100vh; }
.shop-page .wrap { overflow: visible; }

.shop-crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--muted); margin: 22px 0 10px;
}
.shop-crumbs a:hover { color: var(--navy); }
.shop-title {
  font-family: var(--font-serif); font-weight: 600; font-size: 32px;
  margin: 0 0 22px; color: var(--navy);
}

.shop-layout { display: flex; gap: 32px; align-items: flex-start; padding-bottom: 48px; }
.shop-filters {
  width: 260px; flex-shrink: 0;
  position: sticky; top: 92px;
}
.shop-filters-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.shop-filters-head h2 {
  font-family: var(--font-serif); font-size: 18px; font-weight: 600; margin: 0;
}
.shop-filters-head .clear {
  background: none; border: 0; color: var(--amber); font-size: 12.5px; font-weight: 700;
}
.filter-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  margin-bottom: 10px; overflow: hidden;
}
.filter-card > button {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: none; border: 0;
  font-size: 13.5px; font-weight: 700; color: var(--navy); text-align: left;
}
.filter-card > button svg { width: 16px; height: 16px; color: var(--muted); transition: transform 0.15s; }
.filter-card > button.is-open svg { transform: rotate(180deg); }
.filter-body { padding: 0 16px 16px; }
.filter-body label {
  display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 6px;
}
.filter-body select,
.filter-body input[type="number"],
.filter-body input[type="text"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--white); font-size: 13px; font-weight: 600; color: var(--navy);
  outline: none;
}
.filter-body select:focus,
.filter-body input:focus { border-color: var(--lime); }
.filter-row { display: flex; align-items: center; gap: 8px; }
.filter-hint { font-size: 10.5px; color: var(--muted); margin: 8px 0 0; }
.filter-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; cursor: pointer; gap: 12px;
}
.filter-toggle p { margin: 0; font-size: 13.5px; font-weight: 700; }
.filter-toggle span { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.switch {
  width: 40px; height: 22px; border-radius: 99px; background: var(--line);
  position: relative; flex-shrink: 0; transition: background 0.15s;
}
.switch.is-on { background: var(--lime); }
.switch i {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--white);
  box-shadow: 0 1px 4px rgba(21, 44, 70, 0.2);
  transition: transform 0.15s;
}
.switch.is-on i { transform: translateX(18px); }

.choice-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-pill {
  background: var(--white); border: 1px solid var(--line); color: var(--navy);
  font-size: 12px; font-weight: 600; padding: 7px 12px; border-radius: 99px;
}
.choice-pill.is-on {
  background: var(--navy); color: var(--white); border-color: transparent;
}
.choice-pill.is-lime.is-on { background: var(--lime); color: var(--navy-deep); }

.shop-main { flex: 1; min-width: 0; }
.shop-toolbar {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; margin-bottom: 18px;
}
.shop-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.chip-off {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--lime-tint); border: 1px solid var(--lime-line);
  color: var(--navy); font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: 99px;
}
.chip-off svg { width: 11px; height: 11px; }
.shop-chips .clear { background: none; border: 0; color: var(--amber); font-size: 12.5px; font-weight: 700; }
.shop-toolbar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.shop-count { font-size: 13.5px; color: var(--muted); flex: 1; }
.shop-count b { color: var(--navy); }
.sort-wrap { position: relative; }
.sort-btn,
.view-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 11px; padding: 8px 12px;
  font-size: 13px; font-weight: 600; color: var(--navy);
}
.sort-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 20;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-card); min-width: 230px; padding: 6px;
}
.sort-menu button {
  width: 100%; text-align: left; background: none; border: 0;
  padding: 10px 12px; border-radius: 10px;
}
.sort-menu button:hover,
.sort-menu button.is-on { background: var(--lime-tint); }
.sort-menu b { display: block; font-size: 13px; color: var(--navy); }
.sort-menu span { font-size: 11.5px; color: var(--muted); }
.view-toggle { padding: 0; overflow: hidden; }
.view-toggle button {
  width: 36px; height: 34px; border: 0; background: none;
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
}
.view-toggle button.is-on { background: var(--navy); color: var(--white); }

.shop-empty {
  background: var(--white); border: 1px solid var(--line); border-radius: 18px;
  text-align: center; padding: 72px 24px;
}
.shop-empty h3 { font-family: var(--font-serif); font-size: 22px; margin: 0 0 8px; }
.shop-empty p { color: var(--muted); margin: 0 0 20px; }

.prod-list { display: flex; flex-direction: column; gap: 12px; }
.pcard-row {
  display: flex; background: var(--white); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden; cursor: pointer;
}
.pcard-row:hover { box-shadow: var(--shadow-card); }
.pcard-row .thumb {
  width: 160px; height: auto; min-height: 140px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; position: relative;
  background: var(--white);
}
.pcard-row .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 10px; display: block; }
.pcard-row .thumb svg,
.pcard-row .thumb .thumb-ph { width: 64px; height: 64px; color: var(--navy); flex-shrink: 0; }
.pcard-row .info { flex: 1; padding: 18px 20px; }
.pcard-row .side {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  padding: 18px 20px;
  min-width: 200px;
  flex-shrink: 0;
}
.pcard-row .side .buy-now,
.pcard-row .side .btn-navy,
.pcard-row .side .qty-step { width: 100%; margin-top: 0; }
.pcard-row .side .pill-action { align-self: flex-end; }
.sheet-ft-buy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 16px 20px;
  padding-bottom: max(env(safe-area-inset-bottom), 16px);
  border-top: 1px solid var(--line);
}
.sheet-ft-buy .buy-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}
.sheet-ft-buy .buy-actions .btn-navy,
.sheet-ft-buy .buy-actions .btn-lime,
.sheet-ft-buy .buy-actions .qty-step {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.sheet-ft-buy .buy-actions .qty-step {
  height: 44px;
  padding: 0;
  min-width: 0;
  justify-content: space-between;
}
.sheet-ft-buy .buy-actions .qty-step button {
  flex: 1;
  width: auto;
  font-size: 18px;
}
.sheet-ft-buy .buy-actions .qty-step .n {
  flex: 1;
  min-width: 0;
  font-size: 15px;
}
.sheet-ft-buy .buy-actions .btn-lime:disabled,
.sheet-ft-buy .buy-actions .btn-navy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.shop-more { text-align: center; padding: 28px 0 8px; font-size: 13px; color: var(--muted); }

/* Mega menu */
.shop-subnav {
  display: flex; align-items: center; gap: 4px;
  border-top: 1px solid var(--line);
  max-width: var(--wrap); margin: 0 auto; padding: 0 40px;
}
.mega-trigger { position: relative; flex-shrink: 0; }
.mega-btn {
  height: 42px; padding: 0 10px; background: none; border: 0;
  font-size: 13px; font-weight: 600; color: var(--navy);
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.mega-btn:hover,
.mega-trigger.menu-open .mega-btn { color: var(--lime); }
.mega-panel {
  position: absolute; top: 100%; left: 0; z-index: 40;
  width: min(920px, calc(100vw - 48px));
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-card); padding: 16px;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.mega-panel.right { left: auto; right: 0; }
.mega-panel.center { left: 50%; transform: translateX(-50%); }
.mega-trigger.menu-open .mega-panel,
.mega-trigger:hover .mega-panel,
.mega-trigger:focus-within .mega-panel {
  opacity: 1; pointer-events: auto;
}
.mega-panel .label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--muted); margin: 0 0 12px; text-transform: uppercase;
}
.mega-grid { display: grid; gap: 10px; max-height: 360px; overflow-y: auto; }
.mega-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.mega-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.mega-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.mega-item {
  display: block; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; font-size: 13px; font-weight: 600;
}
.mega-item:hover { border-color: var(--lime-line); background: var(--lime-tint); }
.mega-group { padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.mega-group a.head { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.mega-group a.sub { display: block; font-size: 12.5px; color: var(--muted); padding: 3px 0; }
.mega-group a.sub:hover { color: var(--navy); }

/* Search dropdown */
.search-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 50;
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-card); overflow: hidden; max-height: 70vh; overflow-y: auto;
}
.search-panel .hd { padding: 16px 18px 8px; font-family: var(--font-serif); font-size: 22px; margin: 0; }
.search-panel .row {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: none; border: 0; border-top: 1px solid var(--line);
  text-align: left;
}
.search-panel .row:hover { background: var(--bg); }
.search-panel .thumb-sm {
  width: 36px; height: 36px; border-radius: 8px; background: var(--bg);
  overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.search-panel .thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.search-panel .muted { font-size: 12px; color: var(--muted); padding: 12px 16px; }
.search-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }

/* Mini cart */
.overlay { position: fixed; inset: 0; z-index: 80; }
.overlay-bg { position: absolute; inset: 0; background: rgba(21, 44, 70, 0.45); }
.drawer {
  position: absolute; top: 0; right: 0; height: 100%; width: min(400px, 100%);
  background: var(--white); display: flex; flex-direction: column;
}
.drawer-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.drawer-hd h2 { font-family: var(--font-serif); font-size: 20px; margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-ft { padding: 16px 20px; border-top: 1px solid var(--line); }
.mini-item {
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 10px;
}
.mini-item .thumb { width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0; padding: 0; }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  width: 240px; background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-card); padding: 8px;
}
.user-menu a, .user-menu button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  padding: 9px 12px; border-radius: 10px; font-size: 13.5px; color: var(--navy);
}
.user-menu a:hover, .user-menu button:hover { background: var(--bg); }
.user-menu .out { color: #b4533a; font-weight: 700; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 99px; padding: 4px 10px 4px 4px;
}
.user-chip .av {
  width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--white);
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}

/* Modal / sheets */
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-card {
  position: relative; z-index: 1; background: var(--white); border-radius: 22px;
  width: 100%; max-width: 480px; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 48px rgba(21, 44, 70, 0.22);
}
.modal-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 12px; }
.modal-hd h3 { font-family: var(--font-serif); font-size: 20px; margin: 4px 0 0; }
.modal-body { flex: 1; overflow-y: auto; padding: 12px 24px 20px; }
.modal-ft { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.modal-ft.sheet-ft-buy {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
  padding: 16px 24px 20px;
}
.opt-btn {
  display: inline-flex; flex-direction: column; align-items: center;
  min-width: 72px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--white); color: var(--navy);
}
.opt-btn.is-on { background: var(--navy); color: var(--white); border-color: transparent; }
.opt-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.opt-btn b { font-size: 13.5px; }
.opt-btn span { font-size: 11px; color: var(--muted); }
.opt-btn.is-on span { color: rgba(247, 249, 251, 0.7); }
.opt-group { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.opt-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 10px;
}

/* Mobile listing */
.shop-mobile .phone { overflow: visible; }
.shop-sticky {
  position: sticky; z-index: 20; background: var(--bg);
  top: calc(60px + env(safe-area-inset-top));
}
.shop-pills {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px 8px; scrollbar-width: none;
}
.shop-pills::-webkit-scrollbar { display: none; }
.shop-pills .choice-pill { flex-shrink: 0; }
.shop-actions {
  display: flex; align-items: center; gap: 8px;
  padding: 0 16px 10px; border-bottom: 1px solid var(--line);
}
.shop-actions .shop-count { font-size: 12.5px; }
.shop-grid { padding: 12px 16px 24px; }
.shop-grid .prod-grid { gap: 12px; }
.search-full {
  position: fixed; inset: 0; z-index: 80; background: var(--bg);
  display: flex; flex-direction: column; padding-top: env(safe-area-inset-top);
}
.search-full .bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: var(--white); border-bottom: 1px solid var(--line);
}
.search-full .bar input {
  flex: 1; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 16px; outline: none;
}
.search-full .bar input:focus { border-color: var(--lime); }
.search-full .cancel { background: none; border: 0; font-weight: 700; color: var(--navy); }
.search-full .body { flex: 1; overflow-y: auto; padding: 16px; -webkit-overflow-scrolling: touch; }
.search-full .body .muted { font-size: 13px; color: var(--muted); padding: 4px 0 12px; margin: 0; }

/* Mobile search suggestions (do not reuse .search-panel — it is position:absolute for desktop) */
.search-suggest-section { margin-bottom: 20px; }
.search-suggest-section .opt-label { margin-bottom: 8px; }
.search-suggest-list {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden;
}
.search-suggest-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px 14px;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  text-align: left; cursor: pointer; color: inherit;
}
.search-suggest-item:last-child { border-bottom: 0; }
.search-suggest-item:active { background: var(--bg); }
.search-suggest-thumb {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--bg); overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.search-suggest-thumb img { width: 100%; height: 100%; object-fit: contain; }
.search-suggest-thumb .thumb-ph,
.search-panel .thumb-sm .thumb-ph {
  width: 28px; height: 28px; color: var(--navy); opacity: 0.42; flex-shrink: 0;
}
.search-suggest-info { flex: 1; min-width: 0; }
.search-suggest-info b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px; font-weight: 600; color: var(--navy); line-height: 1.35;
}
.search-suggest-info span {
  display: block; font-size: 12px; color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-suggest-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.search-suggest-chip {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px;
  background: var(--white); font-size: 13px; font-weight: 600; color: var(--navy);
}
.search-suggest-chip:active { background: var(--lime-tint); border-color: var(--lime-line); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 85;
  background: var(--white); border-radius: 22px 22px 0 0;
  max-height: 92vh; display: flex; flex-direction: column;
}
.sheet-handle { width: 40px; height: 4px; border-radius: 99px; background: var(--line); margin: 12px auto 0; }
.sheet-hd {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 16px 20px 12px;
}
.sheet-hd h2 { font-family: var(--font-serif); font-size: 20px; margin: 4px 0 0; line-height: 1.3; }
.sheet-body {
  flex: 1; overflow-y: auto;
  padding: 8px 20px 20px;
}
.sheet-body select,
.sheet-body input[type="number"],
.sheet-body input[type="text"],
.sheet-body input[type="search"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--white); font-size: 13px; font-weight: 600; color: var(--navy);
  outline: none; margin-bottom: 4px;
}
.sheet-ft {
  display: flex; gap: 10px; padding: 16px 20px;
  padding-bottom: max(env(safe-area-inset-bottom), 16px);
  border-top: 1px solid var(--line);
}
.sheet-ft .btn-navy { flex: 2; padding: 12px; border-radius: 14px; }
.sheet-ft .ghost {
  flex: 1; background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; font-weight: 700; color: var(--navy);
}

/* Alpine transition helpers (no Tailwind) */
.transition { transition-property: opacity, transform; }
.ease-out { transition-timing-function: cubic-bezier(0, 0, 0.2, 1); }
.ease-in { transition-timing-function: cubic-bezier(0.4, 0, 1, 1); }
.duration-200 { transition-duration: 200ms; }
.duration-150 { transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
.duration-350 { transition-duration: 350ms; }
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }
.translate-y-full { transform: translateY(100%); }
.translate-y-0 { transform: translateY(0); }
.scale-95 { transform: scale(0.95); }
.scale-100 { transform: scale(1); }
.ease-\[cubic-bezier\(\.16\,1\,\.3\,1\)\] { transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }

@media (max-width: 1023px) {
  .shop-filters, .shop-subnav { display: none; }
  .shop-layout { display: block; }
}
@media (min-width: 1024px) {
  .shop-page .prod-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
  .shop-page .prod-grid { grid-template-columns: repeat(4, 1fr); }
}
