/* ===== CATALOG PAGE ===== */

.catalog-page {
  min-height: 100vh;
  padding-top: 80px;
}

/* --- Hero / Title --- */
.catalog-hero {
  position: relative;
  text-align: center;
  padding: 4rem 2rem 3rem;
  overflow: hidden;
}

.catalog-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(232, 119, 46, 0.08) 0%, transparent 70%),
    radial-gradient(circle at 20% 80%, rgba(196, 90, 16, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.catalog-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  position: relative;
}

.catalog-title .fire {
  color: var(--accent);
  font-style: italic;
}

.catalog-subtitle {
  font-family: 'Manrope', sans-serif;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  position: relative;
}

/* --- Categories Grid --- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 0 2rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* --- Category Card --- */
.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s ease, border-color 0.4s ease;
  animation: cardReveal 0.7s ease both;
}

.category-card:hover {
  transform: translateY(-8px);
  border-color: rgba(232, 119, 46, 0.35);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(232, 119, 46, 0.08);
}

/* Image area */
.category-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1210 0%, #2a1a12 50%, #1a1210 100%);
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.category-card:hover .category-image img {
  transform: scale(1.08);
}

.category-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(232, 119, 46, 0.25);
}

.category-placeholder svg {
  width: 40%;
  height: auto;
  transition: transform 0.5s ease, color 0.5s ease;
}

.category-card:hover .category-placeholder svg {
  transform: scale(1.1);
  color: rgba(232, 119, 46, 0.4);
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(13, 9, 7, 0.8) 100%);
  opacity: 0.6;
  transition: opacity 0.4s ease;
}

.category-card:hover .category-overlay {
  opacity: 0.4;
}

/* Info area */
.category-info {
  padding: 1.5rem 1.8rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.category-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}

.category-desc {
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  font-weight: 300;
}

.category-count {
  font-family: 'Manrope', sans-serif;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

.category-arrow {
  position: absolute;
  right: 1.8rem;
  bottom: 1.8rem;
  font-size: 1.4rem;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.category-card:hover .category-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* --- Products View --- */
.products-header {
  padding: 4rem 2rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.breadcrumbs {
  font-family: 'Manrope', sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.breadcrumbs a:hover { opacity: 0.7; }

.breadcrumb-sep {
  margin: 0 0.5rem;
  opacity: 0.4;
}

.products-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.products-subtitle {
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 300;
  margin-top: 0.75rem;
  max-width: 600px;
}

/* --- Products Grid --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  padding: 0 2rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* --- Product Card (fixed height) --- */
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease, border-color 0.3s ease;
  animation: cardReveal 0.6s ease both;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 119, 46, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.p-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1210 0%, #231a16 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.p-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.p-img-placeholder {
  color: rgba(232, 119, 46, 0.2);
  padding: 2rem;
}

.p-img-placeholder svg {
  width: 80px;
  height: auto;
}

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

.p-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.p-badge {
  display: inline-block;
  font-family: 'Manrope', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
}

.p-badge-bowl { background: rgba(232, 119, 46, 0.15); color: var(--accent); }
.p-badge-table { background: rgba(212, 160, 84, 0.15); color: var(--gold); }
.p-badge-oven { background: rgba(220, 60, 60, 0.15); color: #dc5050; }
.p-badge-accessory { background: rgba(120, 180, 220, 0.15); color: #78b4dc; }

.p-stock {
  display: inline-block;
  font-family: 'Manrope', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
}
.p-stock-available {
  background: rgba(80, 200, 120, 0.15);
  color: #50c878;
  border: 1px solid rgba(80, 200, 120, 0.25);
}
.p-stock-unavailable {
  background: rgba(220, 60, 60, 0.15);
  color: #e86050;
  border: 1px solid rgba(220, 60, 60, 0.25);
}

.p-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.p-specs {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.p-spec {
  font-family: 'Manrope', sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.p-spec-label {
  opacity: 0.6;
  margin-right: 0.25rem;
}

/* ===== ACCESSORIES IN PRODUCT DETAIL MODAL ===== */
.pd-acc {
  margin: 1.25rem 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--border);
}

.pd-acc-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.pd-acc-icon {
  width: 18px;
  height: 18px;
  color: var(--gold);
  opacity: 0.7;
  flex-shrink: 0;
}

.pd-acc h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
  margin: 0;
}

.pd-acc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}

.pd-acc-tile {
  position: relative;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(212, 160, 84, 0.06) 0%, rgba(232, 119, 46, 0.03) 100%);
  border: 1px solid rgba(212, 160, 84, 0.12);
  overflow: hidden;
  cursor: default;
  transition: border-color 0.3s, transform 0.25s;
  animation: pdAccTileIn 0.4s ease both;
}

.pd-acc-tile:hover {
  border-color: rgba(212, 160, 84, 0.35);
  transform: translateY(-1px);
}

@keyframes pdAccTileIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Subtle corner glow */
.pd-acc-tile-glow {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 160, 84, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.pd-acc-tile-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pd-acc-tile-name {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.pd-acc-tile-price {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.01em;
}

.pd-acc-tile-price small {
  font-size: 0.7em;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Footer / Price / CTA — always at bottom */
.p-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.p-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}

.p-price small {
  font-size: 0.7em;
  color: var(--text-secondary);
  font-weight: 400;
}

.p-order-btn {
  font-family: 'Manrope', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  display: inline-block;
}

.p-order-btn:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 119, 46, 0.3);
}

/* Back link */
.products-back {
  text-align: center;
  padding: 0 2rem 4rem;
}

.btn-back {
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  padding: 0.75rem 2rem;
  border: 1px solid rgba(232, 119, 46, 0.3);
  border-radius: 50px;
  transition: background 0.3s, border-color 0.3s;
}

.btn-back:hover {
  background: rgba(232, 119, 46, 0.08);
  border-color: var(--accent);
}

/* --- Animation --- */
@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== PRODUCT DETAIL MODAL ===== */
.pd-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
}
.pd-modal.active { display: flex; }

.pd-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: cardReveal 0.4s ease;
}

.pd-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--bg-dark);
  color: var(--text-primary);
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: border-color 0.2s;
}
.pd-close:hover { border-color: var(--accent); }

.pd-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
}

.pd-body {
  padding: 1.5rem 2rem 2rem;
}

.pd-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0.5rem 0 0.75rem;
  line-height: 1.2;
}

.pd-desc {
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 1rem;
  font-weight: 300;
}

.pd-specs {
  margin-bottom: 1rem;
}

.pd-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1rem 0;
}

.pd-price small {
  font-size: 0.6em;
  color: var(--text-secondary);
  font-weight: 400;
}

.pd-order-btn {
  width: 100%;
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Recommendations in detail modal */
.pd-recs {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.pd-recs h4 {
  font-family: 'Manrope', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.pd-recs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.pd-rec-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.pd-rec-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.pd-rec-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.pd-rec-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: rgba(232, 119, 46, 0.08);
}

.pd-rec-info {
  padding: 0.5rem 0.75rem;
}

.pd-rec-name {
  font-family: 'Manrope', sans-serif;
  font-size: 0.78rem;
  color: var(--text-primary);
  display: block;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.pd-rec-price {
  font-family: 'Manrope', sans-serif;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .categories-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem 3rem;
    gap: 1.25rem;
  }

  .catalog-hero {
    padding: 3rem 1rem 2rem;
  }

  .category-info {
    padding: 1.25rem 1.5rem 1.5rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem 2rem;
  }

  .products-header {
    padding: 3rem 1rem 1.5rem;
  }

  .products-back {
    padding: 0 1rem 3rem;
  }

  .pd-modal { padding: 1rem; }
  .pd-body { padding: 1.25rem 1.5rem; }
  .pd-recs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .category-image {
    aspect-ratio: 3 / 2;
  }

  .p-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .p-order-btn {
    text-align: center;
  }
}
