/* Mobile Optimization - DO NOT modify desktop styles */
/* These styles apply only at max-width: 768px */

/* ================================================
   TASK 1: Formula Block - Expandable Card (Mobile Only)
   ================================================ */
@media (max-width: 768px) {
  /* Formula card wrapper */
  .gc-formula-card {
    background: var(--color-bg, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
  }

  /* Formula toggle button */
  .gc-formula-toggle {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--color-bg-secondary, #f9fafb);
    border: none;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    text-align: left;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
  }

  .gc-formula-toggle:active {
    background: var(--color-bg, #fff);
  }

  .gc-formula-toggle-icon {
    transition: transform 0.3s ease;
    font-size: 1.25rem;
  }

  .gc-formula-toggle[aria-expanded="true"] .gc-formula-toggle-icon {
    transform: rotate(180deg);
  }

  /* Formula content */
  .gc-formula-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .gc-formula-content[aria-hidden="false"] {
    max-height: 2000px; /* Large enough for all content */
  }

  .gc-formula-content-inner {
    padding: var(--spacing-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Hide formula sections on mobile by default (will be wrapped) */
  .formula-container.gc-mobile-hidden {
    display: none;
  }
}

/* ================================================
   TASK 2: Hot Sauce Tables → Cards (EN Mobile Only)
   ================================================ */
@media (max-width: 768px) {
  /* Hide tables on mobile */
  .gc-sauce-table-desktop {
    display: none !important;
  }

  /* Show card container */
  .gc-sauce-cards {
    display: block;
  }

  /* Category section */
  .gc-sauce-category {
    margin-bottom: var(--spacing-xl);
  }

  .gc-sauce-category-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-sm);
  }

  /* Individual sauce card */
  .gc-sauce-card {
    background: var(--color-bg, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  }

  .gc-sauce-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
  }

  .gc-sauce-card-shu {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
  }

  .gc-sauce-card-desc {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
  }
}

/* Desktop: show tables, hide cards */
@media (min-width: 769px) {
  .gc-sauce-cards {
    display: none;
  }

  .gc-sauce-table-desktop {
    display: table !important;
  }
}

/* ================================================
   TASK 3: Pepper Reference Chart → Cards (Mobile Only)
   ================================================ */
@media (max-width: 768px) {
  /* Hide table on mobile */
  .gc-pepper-table-desktop {
    display: none !important;
  }

  /* Show card container */
  .gc-pepper-cards {
    display: block;
  }

  /* Individual pepper card */
  .gc-pepper-card {
    background: var(--color-bg, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  }

  .gc-pepper-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
  }

  .gc-pepper-card-shu {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xs);
  }

  .gc-pepper-card-range {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
  }

  .gc-pepper-card-min,
  .gc-pepper-card-max {
    flex: 1;
  }

  .gc-pepper-card-label {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
  }

  .gc-pepper-card-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-primary);
  }

  .gc-pepper-card-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 600;
  }
}

/* Desktop: show table, hide cards */
@media (min-width: 769px) {
  .gc-pepper-cards {
    display: none;
  }

  .gc-pepper-table-desktop {
    display: table !important;
  }
}

/* ================================================
   TASK 4: Hero/Header Mobile Layout (Mobile Only)
   ================================================ */
@media (max-width: 768px) {
  /* Hero section adjustments */
  .hero-section {
    padding: var(--spacing-xl) 0 var(--spacing-lg) !important;
    min-height: auto !important;
  }

  .hero-content {
    text-align: center !important;
    max-width: 100% !important;
  }

  /* Logo positioning */
  .hero-logo {
    margin: 0 auto var(--spacing-md) !important;
    display: block !important;
    max-width: 80px !important;
  }

  /* Headline */
  .hero-title {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
    margin-bottom: var(--spacing-md) !important;
  }

  /* Subtitle */
  .hero-subtitle {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    max-width: 90% !important;
    margin: 0 auto var(--spacing-lg) !important;
  }

  /* If hero uses flexbox, force column */
  .hero-content-wrapper {
    flex-direction: column !important;
    align-items: center !important;
  }
}
