/* Meili Home ── Shop List Page Styles
   Mobile-responsive additions are at the bottom of this file */

/* ── Page Header ──────────────────────────────────────── */
.shop-page-header {
  background: var(--bg);
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--header-border);
}

.shop-page-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--side-pad);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-page-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.15;
}

.shop-page-header p {
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-muted);
}

/* ── Filter Bar ───────────────────────────────────────── */
.shop-filter-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--header-border);
  position: sticky;
  top: 64px;
  z-index: 50;
}

.shop-filter-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--side-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.shop-filter-tabs {
  display: flex;
  gap: 0;
}

.shop-filter-tab {
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.shop-filter-tab:hover { color: var(--ink); }

.shop-filter-tab--active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 500;
}

.shop-count {
  font-size: 12px;
  font-weight: 300;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* ── Product Grid ─────────────────────────────────────── */
.shop-grid-sec {
  background: var(--bg);
  padding: 24px 0 80px;
}

.shop-grid-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--side-pad);
}

/* ── Pagination ───────────────────────────────────────── */
.shop-pagination {
  background: var(--bg);
  padding: 0 0 80px;
}

.shop-pagination-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--side-pad);
  display: flex;
  justify-content: center;
}

.pg-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pg-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.pg-item:hover {
  color: var(--ink);
}

.pg-item--active {
  color: var(--ink);
  font-weight: 500;
  border-bottom-color: var(--ink);
}

.pg-item--arrow {
  color: var(--ink-muted);
  border-bottom: none;
}

.pg-item--arrow:hover {
  color: var(--ink);
}

.pg-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 13px;
  font-weight: 300;
  color: var(--ink-muted);
  user-select: none;
}

/* ── Category Banner (living / pet-living) ───────────── */
.cat-banner-wrap {
  max-width: var(--max-w);
  margin: 16px auto 16px;
  padding: 0 var(--side-pad);
  box-sizing: border-box;
}

.cat-banner {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  background: #c8c0b4 center / cover no-repeat;
  display: block;
}

.cat-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cat-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,  rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 50%),
    linear-gradient(to right, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 55%);
  z-index: 1;
}

.cat-banner-body {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px 36px;
  gap: 8px;
  color: #fff;
}

.cat-banner-body h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.5vw, 52px);
  font-weight: 400;
  line-height: 1.15;
}

.cat-banner-body p {
  font-size: 14px;
  font-weight: 300;
  opacity: 0.88;
  max-width: 380px;
}


/* ══════════════════════════════════════════════════════
   Shop Page — Mobile Responsive  ≤ 768px
   ══════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Page Header ── */
  .shop-page-header {
    padding: 28px 0 20px;
  }

  /* ── Filter Bar ──
     Mobile header height is 56px (vs 64px desktop),
     so adjust the sticky offset accordingly.           */
  .shop-filter-bar {
    top: 56px;
  }

  .shop-filter-inner {
    gap: 12px;
    padding: 0 var(--side-pad);
    /* allow the tabs to scroll if they overflow */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;       /* Firefox */
  }

  .shop-filter-inner::-webkit-scrollbar {
    display: none;               /* Chrome/Safari */
  }

  /* Shrink tab padding so all 4 tabs fit on a 390px screen */
  .shop-filter-tab {
    padding: 14px 14px;
    font-size: 12px;
  }

  /* ── Product grid section ── */
  .shop-grid-sec {
    padding: 24px 0 48px;
  }

  /* ── Pagination ── */
  .shop-pagination {
    padding: 0 0 48px;
  }

  /* Make pagination touch-friendly */
  .pg-item {
    width: 44px;
    height: 44px;
    font-size: 14px;
  }

  .pg-ellipsis {
    width: 24px;
    font-size: 14px;
  }

  /* ── Category Banner (living / pet-living pages) ── */
  .cat-banner-wrap {
    padding: 0;
    margin: 0;
    max-width: 100%;
  }

  .cat-banner {
    height: 240px;
  }

  .cat-banner-body {
    padding: 20px 20px;
  }

  .cat-banner-body h1 {
    font-size: clamp(22px, 7vw, 36px);
  }

  .cat-banner-body p {
    font-size: 13px;
  }
}

/* ── 极小屏（≤ 390px）filter tab 再缩一档 ── */
@media (max-width: 390px) {
  .shop-filter-tab {
    padding: 14px 10px;
    font-size: 11px;
  }
}
