/* ============================
   Great Tales – Pricing Section
   ============================ */

.pricing-section {
  background: linear-gradient(to bottom right, var(--color-bg-light, #f6f5f3), var(--color-bg-medium, #ebe8e5));
  color: var(--color-primary, #1c1208);
  padding: 0px 0 0px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pricing-container {
  width: min(100% - 3rem, var(--container-max, 1100px));
  margin-inline: auto;
}

.pricing-title {
  font-family: "Mallians", serif;
  font-size: clamp(2.88rem, 6vw, 3.84rem);
  color: #e4882c;
  font-style: italic;
  margin-bottom: 0.9rem;
  font-weight: 400;
  text-align: center;
  position: relative;
  z-index: 3;
}

.pricing-subtitle {
  font-family: "Grift", serif;
  font-size: 1.1rem;
  color: var(--color-text-dark, #2e1d08);
  margin-bottom: 2rem;
  opacity: 0.85;
}

/* ===== Tabs ===== */
.pricing-tabs {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.tab-button {
  background: transparent;
  border: none;
  font-family: "Grift", serif;
  font-weight: 900;
  font-size: 1.05rem;
  color: #645c53;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  position: relative;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.tab-button::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 3px;
  background: var(--color-accent, #f17824);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.tab-button.active {
  color: var(--color-accent, #f17824);
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.08);
}

.tab-button.active::after {
  width: 100%;
}

/* ===== Crossfade stack ===== */
.pricing-groups {
  position: relative;
  width: 100%;
  min-height: clamp(460px, 56vh, 640px);
}

.pricing-cards {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.pricing-cards.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.pricing-cards[hidden] { display: none !important; }

.pricing-card {
  background: #ffffff;
  border-radius: var(--radius-md, 18px);
  padding: 2rem 2.4rem;
  flex: 1 1 300px;
  max-width: 340px;
  box-shadow: var(--shadow-md, 0 8px 24px rgba(0, 0, 0, 0.1));
  transition: all 0.35s ease;
  opacity: 0.8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}

.pricing-card:hover {
  opacity: 1;
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg, 0 10px 30px rgba(0, 0, 0, 0.15));
}

.pricing-card h3 {
  font-family: "Grift", serif;
  font-weight: 900;
  font-size: 1.6rem;
  margin-bottom: 0.2rem;
  color: var(--color-primary, #1c1208);
}

.price {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-accent, #f17824);
  margin-bottom: 1.2rem;
  font-family: "Grift", serif;
}

.price span {
  font-size: 1rem;
  font-family: "Mallians", sans-serif;
  font-weight: 400;
  color: #7d7368;
}

.features {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1rem 0;
  text-align: left;
  font-family: "Grift", sans-serif;
  flex-grow: 1;
}

.features li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.98rem;
  color: #2b1d0f;
}

.book-btn {
  background: var(--color-accent, #f17824);
  color: #fff;
  border: none;
  font-size: 14px;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-xl, 40px);
  font-family: "Grift", serif;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm, 0 4px 12px rgba(241, 120, 36, 0.25));
  width: 100%;
}

.book-btn:hover {
  background: #e86f1f;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 6px 18px rgba(232, 111, 31, 0.35));
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .pricing-cards {
    flex-direction: column;
    align-items: center;
  }
  .pricing-card {
    max-width: 380px;
  }
}

@media (max-width: 600px) {
  .pricing-title {
    font-size: 2.6rem;
    line-height: 1.15;
    margin-bottom: 0.6rem;
  }
  
  .tab-button {
    font-size: 0.95rem;
  }
  
  .pricing-card {
    padding: 1.2rem;
    min-height: 380px;
    max-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
  }
  
  .book-btn {
    font-size: 0.9rem;
  }

  /* Horizontal scroll for pricing cards on mobile */
  .pricing-cards {
    flex-direction: row !important;
    overflow-x: auto;
    overflow-y: visible;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    align-items: stretch;
    gap: 1.2rem;
    position: relative;
    display: flex;
  }
  
  .pricing-cards::-webkit-scrollbar {
    display: none;
  }
  
  .pricing-card {
    min-width: 80vw;
    max-width: 75vw;
    flex: 0 0 auto;
    scroll-snap-align: center;
  }

  .pricing-card h3 {
    font-size: 2rem;
    margin-bottom: 0.1rem;
  }

  .price {
    font-size: 2rem;
    margin-bottom: 0.3rem;
  }

  .features {
    margin: 0.9rem 1rem 0;
  }

  .features li {
    padding: 0.3rem 0;
  }

  .book-btn {
    font-size: 0.9rem;
    padding: 0.75rem 1.2rem;
    margin-top: auto;
  }

  /* Enable proper horizontal scroll visibility */
  .pricing-section,
  .pricing-container,
  .pricing-groups {
    overflow-x: visible;
    overflow-y: visible;
  }

  .pricing-cards {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .pricing-cards {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .pricing-cards::-webkit-scrollbar {
    display: none;
  }

  .pricing-card {
    flex: 0 0 82vw;
    min-width: 82vw;
    scroll-snap-align: center;
  }

  .pricing-cards {
    padding-bottom: 4px;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .pricing-groups {
    display: block;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    min-height: 560px;
  }

  .pricing-card {
    margin-bottom: 0.8rem;
  }
}

/* === Prevent next category cards from pushing down (mobile only) === */
@media (max-width: 600px) {
  .pricing-groups {
    position: relative;
    width: 100%;
  }

  .pricing-cards {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  .pricing-cards.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
  }
}