/**
 * The Pond — Marketplace Page Styles
 * Hero, filters (two-layer), product grid, product detail, sell CTA
 */

/* =============================
   Hero
   ============================= */

.pond-hero {
  background: linear-gradient(135deg, var(--color-yellow) 0%, #fce97c 100%);
  padding: 72px 0 64px;
  text-align: center;
}

.pond-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--color-amber);
  margin-bottom: 12px;
  line-height: 1.15;
}

.pond-hero .pond-tagline {
  font-size: 18px;
  color: #6b4800;
  margin-bottom: 32px;
  opacity: 0.85;
}

.pond-search-wrap {
  display: flex;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  border-radius: 40px;
  padding: 8px 8px 8px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  gap: 8px;
}

.pond-search-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  background: transparent;
  color: var(--color-text);
}

.pond-search-wrap input::placeholder {
  color: var(--color-muted);
}

.pond-search-btn {
  background: var(--color-amber);
  border: none;
  border-radius: 32px;
  padding: 10px 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.pond-search-btn:hover {
  background: #8a5200;
}

/* =============================
   Filter Bar (sticky)
   ============================= */

.pond-filters {
  position: sticky;
  top: 60px;
  z-index: 800;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e8e8e8;
  padding: 0;
}

.pond-filters-inner {
  padding: 12px 0 0;
}

/* Layer 1 — Categories */
.pond-filter-l1 {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}

.pond-filter-l1::-webkit-scrollbar {
  display: none;
}

.pond-filter-tab {
  flex-shrink: 0;
  scroll-snap-align: start;
  padding: 8px 18px;
  border-radius: 24px;
  border: 1.5px solid #e0e0e0;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--color-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  white-space: nowrap;
}

.pond-filter-tab:hover {
  border-color: var(--color-amber);
  color: var(--color-amber);
}

.pond-filter-tab.active {
  background: var(--color-amber);
  border-color: var(--color-amber);
  color: #fff;
}

/* Layer 2 — Brands */
.pond-filter-l2 {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  min-height: 42px; /* prevent layout shift when empty */
}

.pond-filter-l2::-webkit-scrollbar {
  display: none;
}

.pond-brand-chip {
  flex-shrink: 0;
  scroll-snap-align: start;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid #e0e0e0;
  background: #fafafa;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--color-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  white-space: nowrap;
}

.pond-brand-chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.pond-brand-chip.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* =============================
   Sort Bar
   ============================= */

.pond-sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 16px;
  gap: 12px;
}

.pond-count {
  font-size: 14px;
  color: var(--color-muted);
  font-weight: 500;
}

.pond-sort-select {
  padding: 8px 12px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  background: #fff;
  cursor: pointer;
  outline: none;
}

.pond-sort-select:focus {
  border-color: var(--color-accent);
}

/* =============================
   Product Grid
   ============================= */

.pond-grid-section {
  padding: 0 0 80px;
  background: var(--color-background);
  min-height: 40vh;
}

.pond-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pond-product-card {
  background: var(--color-card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-base);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.pond-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.pond-product-card.hidden {
  display: none;
}

.pond-product-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--color-yellow);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pond-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pond-product-img--placeholder {
  background: linear-gradient(135deg, var(--color-yellow) 0%, #fce97c 100%);
}

.pond-product-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pond-product-category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.pond-product-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
}

.pond-product-brand {
  font-size: 13px;
  color: var(--color-muted);
  margin: 0;
}

.pond-product-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-amber);
  margin-top: auto;
  padding-top: 12px;
}

/* Empty state */
.pond-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  color: var(--color-muted);
}

.pond-empty p {
  font-size: 18px;
  margin-bottom: 8px;
}

.pond-empty small {
  font-size: 14px;
}

/* =============================
   Sell CTA
   ============================= */

.pond-cta {
  background: linear-gradient(135deg, var(--color-yellow) 0%, #fce97c 100%);
  padding: 64px 0;
}

.pond-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.pond-cta h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-amber);
  margin-bottom: 8px;
}

.pond-cta p {
  font-size: 16px;
  color: #6b4800;
  max-width: 500px;
}

/* =============================
   Product Detail Page
   ============================= */

.product-detail-section {
  padding: 64px 0 80px;
  background: var(--color-background);
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.product-detail-image {
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-yellow) 0%, #fce97c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.2s;
}

.product-detail-back:hover {
  color: var(--color-accent);
}

.product-detail-category {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.product-detail-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
  margin-bottom: 8px;
}

.product-detail-brand {
  font-size: 15px;
  color: var(--color-muted);
  margin-bottom: 20px;
}

.product-detail-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-amber);
  margin-bottom: 24px;
}

.product-detail-desc {
  font-size: 16px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 28px;
}

.product-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.product-tag {
  padding: 5px 12px;
  background: #f0f0f0;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
}

.product-detail-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-detail-cta .btn {
  text-align: center;
  width: 100%;
}

.product-not-found {
  text-align: center;
  padding: 120px 24px;
}

.product-not-found h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
}

.product-not-found p {
  color: var(--color-muted);
  margin-bottom: 28px;
}

/* =============================
   index.php preview section tweaks
   ============================= */

.picks-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.picks-see-all {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  white-space: nowrap;
}

.picks-see-all:hover {
  text-decoration: underline;
}

.product-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card-link .product-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card-link:hover .product-card {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.picks-empty {
  color: var(--color-muted);
  grid-column: 1 / -1;
}

/* =============================
   Responsive
   ============================= */

@media (max-width: 900px) {
  .pond-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pond-cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .pond-hero {
    padding: 48px 0 40px;
  }

  .pond-hero h1 {
    font-size: 2rem;
  }

  .pond-grid {
    grid-template-columns: 1fr;
  }

  .pond-filters {
    top: 60px;
  }
}
