/* ==========================================================================
   Cheesecake Bliss CSS
   Follows the exact same structure as the template provided (Better Than A Brookie)
   ========================================================================== */

/* ─────────────────────────────────────────────────────────
   1) ROOT-LEVEL VARIABLES & BASE SETUP
   Description: Global custom properties, resets, fonts.
─────────────────────────────────────────────────────────── */
:root {
    /* Light Mode Colors */
    --clr-bg-light: #fff;
    --clr-text-light: #000;
    --clr-hero-bg-light: #F5DCB2; /* Light hero background */
    --clr-card-border-light: #eee;
    --clr-card-shadow-light: rgba(0, 0, 0, 0.1);
  
    /* Dark Mode Colors */
    --clr-bg-dark: #000;
    --clr-text-dark: #fff;
    --clr-hero-bg-dark: #382014; /* Dark hero background */
    --clr-card-bg-dark: #111;
    --clr-card-border-dark: #333;
    --clr-card-shadow-dark: rgba(255, 255, 255, 0.1);
  
    /* Special Accents */
    --clr-accent-pink: #ff69b4;
    --clr-accent-blue: #55cdff;
  
    /* Quote Colors */
    --clr-quote-light: var(--clr-accent-pink);
    --clr-quote-dark: var(--clr-accent-blue);
  
    /* Shared */
    --clr-secondary-text: #444;
  
    /* Misc Settings */
    --transition-speed: 0.3s;
    --border-radius: 4px;
  
    /* Updated Font Families */
    --font-family-base: 'Lato Light', sans-serif;
    --font-family-heading: 'DM Serif Display', serif;
  }
  
  html {
    box-sizing: border-box;
    scroll-behavior: smooth;
  }
  *, *::before, *::after {
    box-sizing: inherit;
  }
  
  body {
    margin: 0;
    font-family: var(--font-family-base);
    background-color: var(--clr-bg-light);
    color: var(--clr-text-light);
    line-height: 1.5;
    transition: background-color var(--transition-speed), color var(--transition-speed);
  }
  
  /* Headings in DM Serif Display */
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
  }
  
  /* ─────────────────────────────────────────────────────────
     2) LIGHT-MODE STYLING
     Description: Base layout, hero, and typical site sections.
  ─────────────────────────────────────────────────────────── */
  .product-hero {
    display: flex;
    justify-content: center;
    padding: 3rem 1rem;
    background-color: var(--clr-hero-bg-light);
    transition: background-color var(--transition-speed);
  }
  .product-hero-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }
  .product-hero-image {
    flex: 1 1 45%;
    text-align: center;
  }
  .product-hero-image img {
    /* Ensures the cheesecake image never exceeds 400px */
    max-width: 400px;
    width: 100%;
    height: auto;
  }
  .product-hero-content {
    flex: 1 1 45%;
    padding: 1rem;
  }
  .product-hero-content h2 {
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    color: var(--clr-secondary-text);
  }
  .product-hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  .product-hero-content p {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
  }
  .hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  .hero-buttons button {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color var(--transition-speed), color var(--transition-speed);
  }
  .hero-buttons button:focus,
  .hero-buttons button:hover {
    opacity: 0.9;
  }
  .order-btn {
    background-color: var(--clr-text-light);
    color: var(--clr-bg-light);
  }
  .favorites-btn {
    background-color: var(--clr-bg-light);
    color: var(--clr-text-light);
    border: 1px solid var(--clr-text-light);
  }
  .rating-row {
    display: flex;
    align-items: center;
    font-size: 1rem;
    margin-top: 1rem;
  }
  .stars {
    color: var(--clr-text-light);
    margin-right: 0.5rem;
    font-size: 1.4rem;
  }
  
  /* ─────────────────────────────────────────────────────────
     3) REVIEWS SECTION
     Description: Titles, review cards, fancy quotes, and footer CTA.
  ─────────────────────────────────────────────────────────── */
  .reviews-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    background-color: var(--clr-bg-light);
    transition: background-color var(--transition-speed);
  }
  .reviews-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
  }
  .reviews-subtitle {
    color: var(--clr-text-light);
    margin-bottom: 2rem;
  }
  .review-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  .review-item {
    background-color: var(--clr-bg-light);
    border: 1px solid var(--clr-card-border-light);
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px var(--clr-card-shadow-light);
    position: relative;
    color: var(--clr-text-light);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
  }
  .review-item:hover {
    box-shadow: 0 4px 8px var(--clr-card-shadow-light);
  }
  /* Double opening quotes via Unicode + color from our variable */
  .review-item::before {
    content: "\201C\201C";
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    font-size: 1.8rem;
    color: var(--clr-quote-light);
  }
  .review-item p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.3;
  }
  .review-author {
    font-weight: bold;
  }
  .reviews-footer {
    /* Arrange items in a vertical column, centered in the container */
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;
  }
  .review-cta {
    text-align: center;
    margin: 0;
  }
  .reviews-footer button {
    display: block;
    margin: 0 auto;
  }
  .reviews-footer button:hover {
    background-color: var(--clr-accent-blue);
    color: #fff;
  }
  
  /* ─────────────────────────────────────────────────────────
     4) FRESH INGREDIENTS (MADE-FROM-SCRATCH)
  ─────────────────────────────────────────────────────────── */
  .fresh-ingredients {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
    text-align: center;
    background-color: var(--clr-bg-light);
  }
  .fresh-ingredients h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
  }
  .fresh-ingredients p {
    color: var(--clr-text-light);
  }
  .ingredient-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
  }
  .ingredient-icons img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
  }
  
  /* ─────────────────────────────────────────────────────────
     5) NUTRITION & ALLERGEN SECTION
  ─────────────────────────────────────────────────────────── */
  .nutrition-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
    background-color: var(--clr-bg-light);
  }
  .nutrition-section h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
  }
  .nutrition-section .note {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
  }
  .accordion {
    border-top: 1px solid var(--clr-card-border-light);
    border-bottom: 1px solid var(--clr-card-border-light);
  }
  .accordion-item {
    border-top: 1px solid var(--clr-card-border-light);
  }
  .accordion-item:last-child {
    border-bottom: 1px solid var(--clr-card-border-light);
  }
  .accordion-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--clr-bg-light);
    color: var(--clr-text-light);
    border: none;
    outline: none;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    text-align: left;
  }
  /* Light Mode Hover => Pink Background, White Text */
  .accordion-button:hover,
  .accordion-button:focus {
    background-color: var(--clr-accent-pink);
    color: #fff;
  }
  .accordion-button::after {
    content: "\25BC";
    color: currentColor; /* Arrow matches the text color */
    transition: transform 0.3s;
  }
  body.dark-mode .accordion-button::after {
    content: "\25BC"; /* ▼ */
    color: var(--clr-accent-blue);
    transition: transform 0.3s;
  }
  .accordion-item.active .accordion-button::after {
    transform: rotate(-180deg);
  }
  .accordion-content {
    display: none;
    padding: 0 1rem 1rem 1rem;
    background-color: var(--clr-bg-light);
    color: var(--clr-text-light);
    transition: background-color var(--transition-speed), color var(--transition-speed);
  }
  .accordion-item.active .accordion-content {
    display: block;
  }
  .accordion-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
  }
  .accordion-content th,
  .accordion-content td {
    text-align: left;
    padding: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1rem;
  }
  .nutrition-disclaimer {
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #666;
  }
  
  /* ─────────────────────────────────────────────────────────
     6) RESPONSIVE ADJUSTMENTS
  ─────────────────────────────────────────────────────────── */
  @media (max-width: 768px) {
    .product-hero-container {
      flex-direction: column;
      text-align: center;
    }
    .product-hero-content h1 {
      font-size: 2rem;
    }
    .product-hero-content p {
      font-size: 1rem;
    }
    .reviews-title {
      font-size: 2rem;
    }
    .accordion-button {
      font-size: 1.1rem;
    }
  }
  
  /* ─────────────────────────────────────────────────────────
     7) DARK-MODE OVERRIDES
     Description: Switch backgrounds, text, and accent colors for dark themes.
  ─────────────────────────────────────────────────────────── */
  body.dark-mode {
    background-color: var(--clr-bg-dark);
    color: var(--clr-text-dark);
  }
  body.dark-mode .product-hero {
    background-color: var(--clr-hero-bg-dark);
  }
  body.dark-mode .product-hero-content h1,
  body.dark-mode .product-hero-content h2,
  body.dark-mode .product-hero-content p {
    color: var(--clr-text-dark);
  }
  body.dark-mode .stars {
    color: var(--clr-text-dark);
  }
  body.dark-mode .reviews-section,
  body.dark-mode .fresh-ingredients,
  body.dark-mode .nutrition-section {
    background-color: var(--clr-bg-dark);
  }
  body.dark-mode .review-item {
    background-color: var(--clr-card-bg-dark) !important;
    color: var(--clr-text-dark) !important;
    box-shadow: 0 2px 4px var(--clr-card-shadow-dark);
  }
  body.dark-mode .review-item:hover {
    box-shadow: 0 4px 8px var(--clr-card-shadow-dark);
  }
  /* Switch quote color in dark mode to bright blue */
  body.dark-mode .review-item::before {
    color: var(--clr-quote-dark) !important;
  }
  body.dark-mode .reviews-title,
  body.dark-mode .reviews-subtitle,
  body.dark-mode .review-cta {
    color: var(--clr-text-dark);
  }
  body.dark-mode .reviews-footer button {
    background-color: var(--clr-text-dark);
    color: var(--clr-bg-dark);
  }
  /* Dark Mode Hover => Blue Background, White Text */
  body.dark-mode .reviews-footer button:hover,
  body.dark-mode .reviews-footer button:focus {
    background-color: var(--clr-accent-blue);
    color: #fff;
  }
  body.dark-mode .accordion-button {
    background-color: var(--clr-card-bg-dark);
    color: var(--clr-text-dark);
  }
  body.dark-mode .accordion-button:hover,
  body.dark-mode .accordion-button:focus {
    background-color: var(--clr-accent-blue);
    color: #fff;
  }
  body.dark-mode .accordion-content {
    background-color: var(--clr-card-bg-dark);
    color: var(--clr-text-dark);
  }
  body.dark-mode .accordion-content th,
  body.dark-mode .accordion-content td {
    border-color: var(--clr-card-border-dark);
  }
  body.dark-mode .nutrition-disclaimer {
    color: #bbb;
  }