/* ============================================================
   Sour Life Bakery — Shop Page Styles
   ============================================================ */

/* ── Shop Hero ──────────────────────────────────────────── */
.shop-hero {
  background: var(--cream-dark);
  border-bottom: 1px solid var(--cream-deeper);
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
}

.shop-hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 0.75rem;
}

.shop-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.shop-hero-title em {
  font-style: italic;
  color: var(--green-dark);
}

.shop-hero-sub {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-light);
  font-weight: 300;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Category Tabs ──────────────────────────────────────── */
.shop-tabs-wrap {
  position: sticky;
  top: 72px; /* height of .nav */
  z-index: 40;
  background: var(--cream);
  border-bottom: 1px solid var(--cream-deeper);
  padding: 0 1.5rem;
}

.shop-tabs {
  display: flex;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.shop-tabs::-webkit-scrollbar { display: none; }

.shop-tab {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 1rem 1.35rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-light);
  background: transparent;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  letter-spacing: 0.02em;
}

.shop-tab:hover {
  color: var(--green-dark);
}

.shop-tab.active {
  color: var(--text-dark);
  border-bottom-color: var(--green);
}

.shop-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--cream-dark);
  color: var(--text-light);
  transition: background 0.2s, color 0.2s;
}

.shop-tab.active .shop-tab-badge {
  background: var(--green);
  color: #fff;
}

/* ── Shop Layout ────────────────────────────────────────── */
.shop-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ── Category Sections ──────────────────────────────────── */
.shop-category-section {
  margin-bottom: 4rem;
}

.shop-category-section:last-child {
  margin-bottom: 0;
}

.shop-category-header {
  margin-bottom: 2rem;
}

.shop-category-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.shop-category-title em {
  font-style: italic;
  color: var(--green-dark);
}

.shop-category-sub {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 560px;
}

/* ── Product Grid ───────────────────────────────────────── */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* ── Product Card ───────────────────────────────────────── */
.shop-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--cream-deeper);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.shop-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

/* Card image panel */
.shop-card-image {
  position: relative;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.shop-card-emoji {
  font-size: 4.5rem;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.18));
  transition: transform 0.3s ease;
}

.shop-card:hover .shop-card-emoji {
  transform: scale(1.12) translateY(-3px);
}

.shop-card-category-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(4px);
  color: var(--text-dark);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}

/* Card body */
.shop-card-body {
  padding: 1.2rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.shop-card-subtitle {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 0.3rem;
}

.shop-card-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.shop-card-description {
  font-size: 0.87rem;
  color: var(--text-light);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.1rem;
}

/* Card footer: price + button */
.shop-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
}

.shop-card-price {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
}

.shop-card-price sup {
  font-size: 0.75em;
  vertical-align: super;
  font-weight: 500;
}

.price-cents {
  font-size: 0.62em;
}

/* Add to Cart button */
.shop-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.shop-card-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.shop-card-btn:hover {
  background: var(--green-dark);
  transform: scale(1.04);
}

.shop-card-btn:active {
  transform: scale(0.97);
}

.shop-card-btn.added {
  background: var(--success);
}

/* ── Pancake mix card — taller image panel ──────────────── */
.shop-card[data-id="15"] .shop-card-image {
  height: 200px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .shop-tabs-wrap {
    top: 72px;
  }

  .shop-main {
    padding: 2rem 1rem 4rem;
  }

  .shop-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
  }

  .shop-card-image {
    height: 140px;
  }

  .shop-card-emoji {
    font-size: 3.5rem;
  }
}

/* ── Sold-out state ─────────────────────────────────────────── */
.shop-card.sold-out {
  opacity: 0.72;
}

.shop-card.sold-out .shop-card-image {
  filter: saturate(0.35);
}

.shop-card-btn.sold-out-btn {
  background: #e8e0d8;
  color: #999;
  cursor: default;
  pointer-events: none;
  gap: 0;
}

.shop-card-image {
  position: relative;
}

/* ── Keyframe (matches global style.css) ────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
