/* ============================================================
   BloomBundle Storefront — shop, catalog, product detail
   ============================================================ */

/* ---- SITE NAV ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 246, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--accent-bg);
  color: var(--fg);
}

.nav-cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--card-bg);
  background: var(--accent);
  text-decoration: none;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.nav-cta:hover {
  opacity: 0.88;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid var(--card-border);
  gap: 0.25rem;
}

.nav-mobile-menu.open {
  display: flex;
}

.nav-mobile-menu a {
  font-size: 0.95rem;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--card-border);
}

.nav-mobile-menu a:last-child {
  border-bottom: none;
}

/* ---- SHOP LAYOUT ---- */
.shop-page {
  background: var(--bg);
}

.shop-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ---- SIDEBAR ---- */
.shop-sidebar {
  position: sticky;
  top: 88px;
}

.sidebar-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
}

.sidebar-heading {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--card-border);
}

.category-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cat-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  color: var(--fg-muted);
  font-size: 0.87rem;
  transition: background 0.15s, color 0.15s;
}

.cat-link:hover {
  background: var(--accent-bg);
  color: var(--fg);
}

.cat-link.active {
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 500;
}

.cat-link-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.cat-link-name {
  flex: 1;
}

.cat-link-count {
  font-size: 0.78rem;
  color: var(--fg-muted);
  background: var(--bg-alt);
  border-radius: 100px;
  padding: 0.15rem 0.5rem;
  min-width: 24px;
  text-align: center;
}

/* ---- SHOP HEADER ---- */
.shop-main {
  min-width: 0;
}

.shop-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--card-border);
}

.shop-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 500;
  line-height: 1.2;
  margin: 0.4rem 0 0.5rem;
}

.shop-desc {
  font-size: 0.92rem;
  color: var(--fg-muted);
  font-weight: 300;
  max-width: 480px;
}

.product-count {
  font-size: 0.85rem;
  color: var(--fg-muted);
  white-space: nowrap;
  padding-bottom: 4px;
}

/* ---- PRODUCT GRID ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.product-card {
  text-decoration: none;
  color: inherit;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(45, 27, 20, 0.08);
}

.product-card-image {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--accent-bg);
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card-image img {
  transform: scale(1.03);
}

.product-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-bg) 0%, var(--cream) 100%);
}

.placeholder-icon {
  font-size: 2.5rem;
  color: var(--accent);
  opacity: 0.6;
}

.product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
}

.badge-sale {
  color: #8B6914;
  background: #FEF3C7;
  border-color: #FDE68A;
  left: auto;
  right: 0.75rem;
}

.product-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-category {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.product-card-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.6rem;
  color: var(--fg);
}

.product-card-desc {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.55;
  font-weight: 300;
  flex: 1;
  margin-bottom: 1rem;

  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.price-current {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg);
}

.price-original {
  font-size: 0.88rem;
  color: var(--fg-muted);
  text-decoration: line-through;
  margin-left: 0.4rem;
}

.product-format {
  font-size: 0.75rem;
  color: var(--fg-muted);
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
}

/* Small card variant (related products) */
.product-card-sm .product-card-name {
  font-size: 0.95rem;
}

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--fg-muted);
}

.empty-state p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

/* ---- PRODUCT DETAIL ---- */
.product-page {
  background: var(--bg);
}

.product-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2rem 5rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin-bottom: 2.5rem;
}

.breadcrumb a {
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--card-border);
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-bottom: 5rem;
}

/* Detail visual */
.product-detail-visual {}

.product-preview-frame {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--accent-bg) 0%, var(--cream) 100%);
  margin-bottom: 1rem;
  border: 1px solid var(--card-border);
}

.product-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-preview-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.preview-icon {
  font-size: 4rem;
  color: var(--accent);
  opacity: 0.5;
}

.preview-label {
  font-size: 0.85rem;
  color: var(--fg-muted);
  font-weight: 300;
}

.product-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meta-chip {
  font-size: 0.78rem;
  color: var(--fg-muted);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
}

/* Detail info */
.product-detail-info {}

.product-detail-category {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.product-detail-category a {
  color: inherit;
  text-decoration: none;
}

.product-detail-name {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--fg);
  margin-bottom: 1.25rem;
}

.product-detail-pricing {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.detail-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--fg);
}

.detail-original {
  font-size: 1.1rem;
  color: var(--fg-muted);
  text-decoration: line-through;
}

.detail-savings {
  font-size: 0.85rem;
  font-weight: 600;
  color: #8B6914;
  background: #FEF3C7;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

.product-detail-short {
  font-size: 1rem;
  color: var(--fg-muted);
  line-height: 1.65;
  font-weight: 300;
  margin-bottom: 2rem;
}

.product-cta-block {
  margin-bottom: 2rem;
}

.btn-buy {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--accent);
  color: var(--card-bg);
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
  margin-bottom: 0.6rem;
}

.btn-buy:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-buy:active {
  transform: translateY(0);
}

.cta-note {
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-align: center;
  font-weight: 300;
}

.product-long-desc {
  padding: 1.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.product-long-desc h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--fg);
}

.product-long-desc p {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.7;
  font-weight: 300;
}

.product-trust {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.87rem;
  color: var(--fg-muted);
}

.trust-icon {
  font-size: 0.9rem;
  color: var(--accent);
  width: 20px;
  text-align: center;
}

/* ---- RELATED PRODUCTS ---- */
.related-section {
  border-top: 1px solid var(--card-border);
  padding-top: 3rem;
}

.related-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.related-see-all {
  font-size: 0.87rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.related-see-all:hover {
  text-decoration: underline;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* ---- BUTTONS ---- */
.btn-secondary {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--card-border);
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-secondary:hover {
  background: var(--accent-bg);
}

/* ---- ERROR PAGE ---- */
.error-page {
  max-width: 480px;
  margin: 6rem auto;
  text-align: center;
  padding: 0 2rem;
}

.error-page h1 {
  font-family: var(--font-display);
  font-size: 3rem;
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

/* ---- LANDING PAGE CATEGORY CARDS as links ---- */
a.category-card {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}

a.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(45, 27, 20, 0.07);
}

/* ---- HERO CTA (landing page shop button) ---- */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: var(--card-bg);
  text-decoration: none;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.hero-cta:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  margin-top: 2.5rem;
  margin-left: 1rem;
  padding: 0.85rem 2rem;
  border: 1px solid var(--card-border);
  color: var(--fg-muted);
  text-decoration: none;
  border-radius: 100px;
  font-weight: 400;
  font-size: 0.95rem;
  transition: background 0.15s ease;
}

.hero-cta-secondary:hover {
  background: var(--accent-bg);
  color: var(--fg);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .shop-sidebar {
    position: static;
  }

  .sidebar-section {
    padding: 1rem 1.25rem;
  }

  .category-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .cat-link {
    padding: 0.4rem 0.75rem;
    background: var(--bg-alt);
    border-radius: 100px;
    font-size: 0.82rem;
  }

  .cat-link-count {
    display: none;
  }

  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .nav-links, .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .shop-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta-secondary {
    display: none;
  }
}

@media (max-width: 420px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-card-desc {
    display: none;
  }
}
