/* Gluto Online Shop — main page. Uses tokens from style.css. */

.shop-page {
  color: var(--color-text);
  background: linear-gradient(165deg, #f0fdfa 0%, #f8fffe 35%, #f0fdf4 60%, #ffffff 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* ---------- Hero + search ---------- */
.shop-hero {
  background: linear-gradient(160deg, var(--color-primary-light), #ffffff 70%);
  border-bottom: 1px solid var(--color-border);
  padding: 2.5rem 1.25rem 2rem;
}
.shop-hero-inner { max-width: 880px; margin: 0 auto; text-align: center; }
.shop-hero-kicker {
  text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.78rem;
  font-weight: 700; color: var(--color-primary); margin: 0 0 0.5rem;
}
.shop-hero-title { font-size: 2.1rem; font-weight: 800; margin: 0 0 0.5rem; line-height: 1.15; }
.shop-hero-sub { color: var(--color-text-secondary); font-size: 1.02rem; margin: 0 auto 1.5rem; max-width: 620px; }

.shop-search {
  display: flex; align-items: stretch; gap: 0;
  background: #fff; border: 1.5px solid var(--color-border);
  border-radius: 999px; padding: 0.35rem 0.4rem 0.35rem 1rem;
  box-shadow: 0 10px 30px rgba(13,148,136,0.08);
  max-width: 720px; width: 100%; margin: 0 auto;
}
.shop-search:focus-within { border-color: var(--color-primary); }
.shop-search-icon {
  font-size: 1.05rem; opacity: 0.55; flex: 0 0 auto;
  display: flex; align-items: center; padding-right: 0.35rem;
}
/* Override global style.css `button[type="submit"] { width: 100% }` */
.shop-search .shop-search-input,
.shop-search input[type="search"] {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
  border: 0;
  outline: 0;
  font-size: 1rem;
  font-family: inherit;
  background: transparent;
  color: var(--color-text);
  padding: 0.65rem 0.5rem 0.65rem 0;
  box-shadow: none;
}
.shop-search .shop-search-input:focus,
.shop-search input[type="search"]:focus {
  border: 0;
  box-shadow: none;
}
.shop-search .shop-search-btn,
.shop-search button[type="submit"] {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 0;
  border: 0;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.shop-search .shop-search-btn:hover,
.shop-search button[type="submit"]:hover {
  background: var(--color-primary-hover);
}

.shop-quick-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 1rem; }
.shop-chip {
  border: 1px solid var(--color-border); background: #fff; color: var(--color-text-secondary);
  font-size: 0.82rem; font-weight: 600; padding: 0.4rem 0.85rem; border-radius: 999px;
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.shop-chip:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ---------- Layout ---------- */
.shop-main {
  max-width: 1280px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem;
  display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 1.75rem; align-items: start;
}

/* ---------- Filter rail ---------- */
.shop-filters {
  position: sticky; top: 1rem;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 16px; padding: 1.25rem; max-height: calc(100vh - 2rem); overflow-y: auto;
}
.shop-filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.shop-filters-title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.shop-filters-clear {
  border: 0; background: none; color: var(--color-primary); font-weight: 600;
  font-size: 0.82rem; cursor: pointer; font-family: inherit; padding: 0;
}
.shop-filter-group { border-top: 1px solid var(--color-border); padding: 0.9rem 0; }
.shop-filter-group:first-of-type { border-top: 0; padding-top: 0; }
.shop-filter-heading { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); margin: 0 0 0.6rem; }
.shop-filter-options { display: flex; flex-direction: column; gap: 0.4rem; }

.shop-check {
  display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem;
  color: var(--color-text-secondary); cursor: pointer; line-height: 1.3;
}
.shop-check input { accent-color: var(--color-primary); width: 15px; height: 15px; flex: 0 0 auto; }
.shop-check .cnt { margin-left: auto; color: var(--color-text-muted); font-size: 0.78rem; }
.shop-check:hover { color: var(--color-text); }

/* Aisle tree */
.shop-aisle-tree { max-height: 320px; overflow-y: auto; }
.shop-aisle-row { display: flex; align-items: center; gap: 0.3rem; }
.shop-aisle-toggle {
  border: 0; background: none; cursor: pointer; color: var(--color-text-muted);
  font-size: 0.7rem; width: 16px; padding: 0; font-family: inherit;
}
.shop-sub-list { margin: 0.2rem 0 0.4rem 1.4rem; display: none; flex-direction: column; gap: 0.3rem; }
.shop-sub-list.is-open { display: flex; }
.shop-sub-list .shop-check { font-size: 0.84rem; }

.shop-brand-search {
  width: 100%; border: 1px solid var(--color-border); border-radius: 8px;
  padding: 0.45rem 0.6rem; font-size: 0.85rem; font-family: inherit; margin-bottom: 0.6rem;
}
.shop-brand-list { max-height: 240px; overflow-y: auto; }

/* ---------- Results ---------- */
.shop-results-bar {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.shop-active-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.shop-active-pill {
  display: inline-flex; align-items: center; gap: 0.35rem; background: var(--color-primary-light);
  color: var(--color-primary); border: 1px solid rgba(13,148,136,0.2); border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; padding: 0.3rem 0.7rem;
}
.shop-active-pill button { border: 0; background: none; cursor: pointer; color: inherit; font-size: 0.9rem; line-height: 1; padding: 0; }
.shop-results-controls { display: flex; align-items: center; gap: 1rem; }
.shop-results-count { font-size: 0.88rem; color: var(--color-text-secondary); }
.shop-sort { font-size: 0.85rem; color: var(--color-text-muted); display: flex; align-items: center; gap: 0.4rem; }
.shop-sort select {
  font-family: inherit; font-size: 0.85rem; border: 1px solid var(--color-border);
  border-radius: 8px; padding: 0.4rem 0.5rem; background: #fff; color: var(--color-text);
}

.shop-section-title { font-size: 1.3rem; font-weight: 800; margin: 0 0 1rem; color: var(--color-text); }
.shop-section-title--picks { margin-top: 2.25rem; }
.shop-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1rem; }
.shop-section-hint { font-size: 0.82rem; color: var(--color-text-muted); font-weight: 600; }

/* Aisle tiles — 2-row horizontal scroller with larger cards */
.shop-aisle-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  grid-auto-columns: 168px;
  gap: 0.9rem;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 1rem;
  margin: 0 -0.25rem 1rem;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.shop-aisle-scroller::-webkit-scrollbar { height: 8px; }
.shop-aisle-scroller::-webkit-scrollbar-thumb { background: rgba(13,148,136,0.25); border-radius: 999px; }
.shop-aisle-tile {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 18px;
  padding: 1.15rem 1rem; cursor: pointer; text-align: center; font-family: inherit;
  transition: all 0.18s; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  box-shadow: 0 4px 14px rgba(13,148,136,0.05);
}
.shop-aisle-tile:hover { border-color: var(--color-primary); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(13,148,136,0.14); }
.shop-aisle-icon {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2rem; margin-bottom: 0.55rem;
}
.shop-aisle-tile .nm { font-weight: 700; font-size: 0.95rem; color: var(--color-text); line-height: 1.25; }
.shop-aisle-tile .ct { font-size: 0.78rem; color: var(--color-text-muted); }

/* Product grid */
.shop-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem;
}
.shop-card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.shop-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(13,148,136,0.1); border-color: rgba(13,148,136,0.3); }
.shop-card-imgwrap {
  position: relative;
  height: 200px;            /* fixed, equal box for every card */
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 0.9rem;
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}
.shop-card-imgwrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  display: block;
}
.shop-card-verdict {
  position: absolute; top: 0.6rem; left: 0.6rem; font-size: 0.72rem; font-weight: 700;
  padding: 0.25rem 0.55rem; border-radius: 999px; display: inline-flex; align-items: center; gap: 0.3rem;
}
.shop-card-verdict--safe { background: rgba(22,163,74,0.12); color: #15803d; }
.shop-card-verdict--caution { background: rgba(234,179,8,0.16); color: #a16207; }
.shop-card-body { padding: 0.85rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.shop-card-brand { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }
.shop-card-title { font-size: 0.92rem; font-weight: 600; line-height: 1.35; color: var(--color-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-card-meta { display: flex; align-items: center; gap: 0.5rem; margin-top: auto; padding-top: 0.5rem; }
.shop-card-rating { font-size: 0.82rem; color: #b45309; font-weight: 600; }
.shop-card-rating .star { color: #f59e0b; }
.shop-card-price { margin-left: auto; font-weight: 700; font-size: 1rem; }
.shop-card-cta { font-size: 0.82rem; font-weight: 700; color: var(--color-primary); margin-top: 0.5rem; }

.shop-empty { text-align: center; color: var(--color-text-muted); padding: 3rem 1rem; }
.shop-loadmore-wrap { text-align: center; margin-top: 1.75rem; }
.shop-loadmore {
  border: 1.5px solid var(--color-primary); background: #fff; color: var(--color-primary);
  font-weight: 700; font-family: inherit; font-size: 0.95rem; padding: 0.7rem 1.8rem;
  border-radius: 10px; cursor: pointer; transition: all 0.15s;
}
.shop-loadmore:hover { background: var(--color-primary); color: #fff; }

.shop-footnote {
  max-width: 1280px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem;
  font-size: 0.8rem; color: var(--color-text-muted); line-height: 1.6; border-top: 1px solid var(--color-border);
}

.shop-filter-toggle {
  display: none; border: 1.5px solid var(--color-border); background: #fff; color: var(--color-text);
  font-weight: 700; font-family: inherit; font-size: 0.9rem; padding: 0.6rem 1rem; border-radius: 10px;
  cursor: pointer; margin-bottom: 1rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .shop-main { grid-template-columns: 1fr; }
  .shop-filter-toggle { display: block; }
  .shop-filters {
    position: fixed; inset: 0 auto 0 0; z-index: 60; width: 300px; max-width: 85vw;
    border-radius: 0; max-height: 100vh; transform: translateX(-100%); transition: transform 0.25s;
    box-shadow: 0 0 40px rgba(0,0,0,0.15);
  }
  .shop-filters.is-open { transform: translateX(0); }
  .shop-hero-title { font-size: 1.6rem; }
}
@media (max-width: 520px) {
  .shop-grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .shop-card-title { font-size: 0.84rem; }
}
