/* ==========================================================================
   CATALOG PAGE STYLES - BASED ON FIGMA DESIGN
   ========================================================================== */

/* Base Catalog Styles */
.catalog {
  background-color: var(--color-header-bg);
  min-height: 100vh;
}

/* ==========================================================================
   BREADCRUMBS SECTION
   ========================================================================== */

.catalog__breadcrumbs {
  padding: var(--space-lg) 0;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-sm);
  font-weight: var(--font-weight-medium);
}

.breadcrumbs__link {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumbs__link:hover {
  color: var(--color-primary);
}

.breadcrumbs__separator {
  color: var(--color-text);
  font-weight: var(--font-weight-light);
  font-size: 13px;
}

.breadcrumbs__current {
  color: var(--color-text);
  font-weight: var(--font-weight-light);
}

/* ==========================================================================
   PAGE HEADER
   ========================================================================== */

.catalog__header {
  padding-bottom: var(--space-2xl);
}

.catalog__title {
  font-family: 'Montserrat', sans-serif;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-4xl);
  line-height: 1.22;
  letter-spacing: -8%;
  color: var(--color-text);
  margin: 0;
}

/* ==========================================================================
   FILTER TABS
   ========================================================================== */

.catalog__tabs {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

  border-radius: var(--radius-pill);
  padding: 10px var(--space-xl);
  font-family: 'Montserrat', sans-serif;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-sm);
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.catalog__tab--active {
  background: var(--color-secondary);
  color: var(--color-bg);
}

.catalog__tab:hover:not(.catalog__tab--active) {
  background: rgba(42, 91, 85, 0.1);
}

/* ==========================================================================
   HERO BANNER
   ========================================================================== */

.catalog__hero {
  padding-bottom: var(--space-6xl);
}

.catalog__hero-image {
  border-radius: var(--radius-3xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.catalog__hero-image img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   CATALOG SECTIONS
   ========================================================================== */

.catalog__section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4xl);
}

.catalog__section-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-4xl);
  line-height: 1.22;
  letter-spacing: -8%;
  color: var(--color-text);
  margin: 0;
}

/* Navigation Arrows */
.catalog__nav {
  display: flex;
  gap: var(--space-sm);
}

.catalog__nav-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.catalog__nav-btn:hover {
  background: var(--color-primary);
}

.catalog__nav-btn:hover img {
  filter: brightness(0) invert(1);
}

.catalog__nav-btn img {
  width: 14px;
  height: 11px;
  transition: filter var(--transition-fast);
}

/* Products Grid */
.catalog__products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2xl);
}

/* Product card styles are now unified in product-card.css */

.catalog .product-card:not(.product-card--showcase) .btn--primary:hover {
  background: var(--color-secondary);
  color: var(--color-bg);
}

/* ==========================================================================
   ORDER STEPS SECTION - Override catalog styles to match main page
   ========================================================================== */

/* Order step buttons - high specificity to override catalog styles */
.catalog .order-steps .order-step-btn {
  background-color: var(--white);
  color: var(--color-primary);
  box-shadow: 0px -6px 24px 0px rgba(59, 61, 78, 0.05);
  border: none;
  width: 100%;
  height: 58px;
  padding: 16px;
  border-radius: 24px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 21px;
  line-height: 1.22;
  letter-spacing: -0.057em;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.catalog .order-steps .order-step-btn.is-active {
  background-color: #97C7CB;
  color: var(--white);
  box-shadow: none;
}

.catalog .order-steps .order-step-btn:not(.is-active):hover {
  background-color: #f0f0f0;
}

/* Product showcase cards - high specificity to override catalog product-card styles */
.catalog .order-steps .product-card.product-card--showcase {
  background-color: var(--white);
  color: var(--color-text);
  border-radius: var(--radius-2xl);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(240, 240, 240, 0.9);
  overflow: hidden;
  position: relative;
}

.catalog .order-steps .product-card.product-card--showcase .product-card__title {
  color: #343434;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 0;
}

.catalog .order-steps .product-card.product-card--showcase .product-card__price {
  color: var(--color-primary);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
}

.catalog .order-steps .product-card.product-card--showcase .product-card__content {
  padding: 2px 4px;
  color: var(--color-text);
}

.catalog .order-steps .product-card.product-card--showcase .btn {
  background-color: var(--color-primary);
  color: var(--white);
  border: none;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.catalog .order-steps .product-card.product-card--showcase .btn:hover {
  background-color: var(--color-primary-hover);
}

/* ==========================================================================
   CTA QUESTIONS SECTION
   ========================================================================== */

.catalog__cta {
  padding-bottom: 0;
}

.cta-questions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6xl);
  align-items: center;
}

.cta-questions__images {
  position: relative;
  height: 449px;
}

.cta-questions__image {
  position: absolute;
  border-radius: var(--radius-3xl);
  overflow: hidden;
}

.cta-questions__image--1 {
  width: 432px;
  height: 290px;
  top: 0;
  left: 0;
  z-index: 1;
}

.cta-questions__image--2 {
  width: 453px;
  height: 387px;
  top: 62px;
  right: 0;
  border: 5px solid var(--color-header-bg);
}

.cta-questions__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cta-questions__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4xl);
}

.cta-questions__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.cta-questions__title {
  font-family: 'Montserrat', sans-serif;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-4xl);
  line-height: 1.22;
  letter-spacing: -8%;
  color: var(--color-text);
  margin: 0;
}

.cta-questions__description {
  font-family: 'Montserrat', sans-serif;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-sm);
  line-height: 1.5;
  color: rgba(52, 52, 52, 0.9);
  margin: 0;
}

.cta-questions__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xl);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: var(--font-weight-light);
  font-size: var(--font-md);
  line-height: 1.22;
  letter-spacing: -6.875%;
  color: var(--color-text);
}

.form-input {
  border: none;
  border-bottom: 1px solid var(--color-primary);
  background: transparent;
  padding: var(--space-sm) 0;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--font-md);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-bottom-color: var(--color-secondary);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.form-actions .btn--secondary {
  background: var(--color-secondary);
  color: var(--color-bg);
  border: none;
  padding: 10px var(--space-4xl);
  border-radius: var(--radius-pill);
  font-family: 'Montserrat', sans-serif;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-md);
  line-height: 1.24;
  letter-spacing: -3.01%;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.form-actions .btn--secondary:hover {
  background: var(--color-primary);
}

.form-privacy {
  font-family: 'Manrope', sans-serif;
  font-weight: var(--font-weight-light);
  font-size: 10px;
  line-height: 1.37;
  color: var(--color-text-mobile);
  margin: 0;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1200px) {
  .catalog__products {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
  }
  
  .catalog__section-title {
    font-size: 36px;
  }
  
  .catalog__title {
    font-size: 36px;
  }
}

@media (max-width: 992px) {
  .catalog__products {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
  
  .order-steps {
    grid-template-columns: 1fr;
    gap: var(--space-4xl);
  }
  
  .cta-questions {
    grid-template-columns: 1fr;
    gap: var(--space-4xl);
  }
  
  .cta-questions__images {
    height: 300px;
  }
  
  .cta-questions__image--1 {
    width: 300px;
    height: 200px;
  }
  
  .cta-questions__image--2 {
    width: 320px;
    height: 250px;
    top: 50px;
  }
}

@media (max-width: 768px) {
  /* Make sure catalog is visible on mobile (main.css may hide it globally) */
  .catalog { display: block !important; }

  /* Convert products grid into a horizontal scroller on mobile (like home page) */
  .catalog__products {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 4px 16px 8px;
    margin: 0 -16px;
  }
  .catalog__products::-webkit-scrollbar { display: none; }

  /* Cards inside scroller */
  .catalog__products > .product-card {
    flex: 0 0 220px;
    scroll-snap-align: start;
    width: 220px;
  }
  .catalog .product-card:not(.product-card--showcase) .product-card__image {
    height: 160px;
    padding: 8px;
  }
  .catalog .product-card:not(.product-card--showcase) .product-card__content {
    padding: 12px;
  }

  /* Stack section header and reduce gaps */
  .catalog__section-header {
    flex-direction: column;
    gap: var(--space-lg);
    align-items: flex-start;
  }

  .catalog__tabs {
    gap: var(--space-md);
    /* make tabs scrollable as well */
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin: 0 -16px;
    padding-left: 16px;
  }
  .catalog__tabs::-webkit-scrollbar { display: none; }
  .catalog__tab { flex: 0 0 auto; padding: var(--space-sm) var(--space-lg); font-size: 12px; }

  .catalog__hero-image img { height: 220px; }

  .catalog__order-steps { padding: var(--space-4xl) var(--space-xl); margin: 0; }
  .order-steps__tabs { justify-content: center; }
  .order-step__tab { width: 48px; height: 48px; font-size: var(--font-lg); }
}

/* Mobile small '+' button for catalog cards */
@media (max-width: 768px) {
  /* hide full-width primary buttons to avoid duplicate controls on the same card */
  .catalog .product-card:not(.product-card--showcase) .btn--primary { display: none; }

  .catalog-mobile-add {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 20px;
    line-height: 1;
    margin-top: 8px;
  }

  .catalog-mobile-add.added {
    background-color: var(--color-primary) !important;
    color: var(--color-bg) !important;
  }
}

@media (max-width: 480px) {
  .catalog__section-title {
    font-size: 28px;
  }
  
  .catalog__title {
    font-size: 28px;
  }
  
  .catalog .product-card:not(.product-card--showcase) .product-card__image {
    height: 240px;
  }
  
  .form-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-lg);
  }
}

/* Extra fine‑tuning for small / very small devices */
@media (max-width: 640px) {
  /* Global rhythm tweaks */
  .catalog__breadcrumbs { padding: var(--space-md) 0; }
  .catalog__filters { padding-bottom: var(--space-3xl); }
  .catalog__hero { padding-bottom: var(--space-4xl); }
  .catalog__section { padding-bottom: var(--space-4xl); }

  /* Tabs: convert to horizontal scroll instead of wrapping to many lines */
  .catalog__tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: var(--space-sm);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding-bottom: 4px;
    margin: 0 -16px;
    padding-left: 16px;
  }
  .catalog__tabs::-webkit-scrollbar { display: none; }
  .catalog__tab { flex: 0 0 auto; font-size: 11px; padding: 8px 18px; }

  /* Hero */
  .catalog__hero-image { border-radius: var(--radius-2xl); }
  .catalog__hero-image img { height: 200px; }

  /* Section headers: stack with tighter gap */
  .catalog__section-header { margin-bottom: var(--space-2xl); }
  .catalog__section-title { font-size: 30px; }

  /* Product grid single column already; tighten spacing */
  .catalog__products { gap: var(--space-md); }
  .catalog .product-card:not(.product-card--showcase) .product-card__content { padding: var(--space-xl) var(--space-xl) var(--space-lg); }
  .catalog .product-card:not(.product-card--showcase) .product-card__title { font-size: 15px; }
  .catalog .product-card:not(.product-card--showcase) .product-card__price { font-size: 18px; margin-bottom: var(--space-lg); }
  .catalog .product-card:not(.product-card--showcase) .btn--primary { font-size: 12px; padding: 9px 16px; }

  /* Order steps inside catalog: reduce paddings inherited from main */
  .catalog .order-steps { padding-top: var(--space-4xl); padding-bottom: var(--space-4xl); }
  .catalog .order-steps .order-steps__panel { padding: 20px; }

  /* CTA Questions: switch to simple vertical flow, remove overlapping absolute positioning */
  .cta-questions__images { height: auto; position: relative; display: flex; gap: var(--space-lg); }
  .cta-questions__image { position: static; width: 100%; height: auto; border: none; }
  .cta-questions__image--1, .cta-questions__image--2 { width: 100%; max-width: 100%; }
  .cta-questions__image img { height: 200px; border-radius: var(--radius-2xl); object-fit: cover; }
  .cta-questions { gap: var(--space-3xl); }
  .cta-questions__content { gap: var(--space-3xl); }
  .cta-questions__title { font-size: 30px; }
  .cta-questions__description { font-size: 14px; }
  .form-actions { width: 100%; }
  .form-actions .btn--secondary { width: 100%; text-align: center; padding: 12px var(--space-lg); font-size: 16px; }
  .form-privacy { font-size: 9px; }
}

@media (max-width: 400px) {
  .catalog__title, .catalog__section-title, .cta-questions__title { font-size: 26px; }
  .catalog .product-card:not(.product-card--showcase) .product-card__image { height: 200px; }
  .catalog__tabs { margin: 0 -12px; padding-left: 12px; }
  .catalog__tab { padding: 8px 14px; font-size: 10px; }
  .cta-questions__image img { height: 170px; }
}

.catalog__section.author-collection {
  display: grid;
}

/* ==========================================================================
   AUTHOR BOUQUET SECTION
   ========================================================================== */

/* Author section uses standard .catalog__section spacing; no extra wrapper styles needed */

.author-bouquet {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2xl); /* reduced horizontal gap */
  min-height: 420px; /* slightly lower minimum height */
  width: 100%;
  justify-content: flex-start;
  padding-top: var(--space-lg); /* tighter vertical spacing */
  padding-bottom: var(--space-lg);
}

.author-bouquet__content {
  flex: 1;
  max-width: 500px;
}

/* Title now uses .catalog__section-title, remove custom heading styles */

.author-bouquet__description {
  font-size: var(--font-base);
  color: var(--color-text);
  line-height: 1.5; /* slightly tighter */
  margin-bottom: 10px; /* reduced space between paragraphs */
}

.author-bouquet__description:last-of-type { margin-bottom: var(--space-lg); }

.author-bouquet__btn { min-width: 180px; margin-top: var(--space-md); }

.author-bouquet__image {
  flex: 0 0 auto;
  width: 50%; /* larger image */
  display: flex;
  align-items: center;
  margin-left: auto;
}

.author-bouquet__image img {
  width: 100%;
  height: auto;
  max-height: 540px; /* a bit taller */
  object-fit: cover;
  border-radius: 24px; /* slightly more rounded for emphasis */
}

/* Responsive Design */
@media (max-width: 768px) {
  .author-bouquet {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: left;
    padding-top: var(--space-md);
    padding-bottom: 0;
  }
  
  .author-bouquet__content {
    max-width: 100%;
  }
  
  .author-bouquet__image {
    width: 100%;
    max-width: 380px;
    margin-left: 0;
    margin-top: var(--space-lg);
  }

  .author-bouquet__image img {
    max-height: 340px;
    border-radius: 20px;
  }

  .author-bouquet__description {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .author-bouquet__btn {
    width: 100%;
    max-width: 210px;
  }
}

/* Smaller phones */
@media (max-width: 480px) {
  .author-bouquet__image img { max-height: 300px; }
  .author-bouquet__description { font-size: 13.5px; }
  .author-bouquet { gap: var(--space-md); }
}
