/*
 * MALVAA NATURALS — Responsive Stylesheet
 * Mobile-first breakpoints. Applied after main.css and woocommerce.css.
 *
 * Breakpoints:
 *   --xs:  < 480px   (small phones)
 *   --sm:  480–767px (large phones)
 *   --md:  768–1023px (tablets)
 *   --lg:  1024–1199px (small laptops)
 *   --xl:  ≥ 1200px  (desktop — base styles in main.css)
 */

/* ============================================================
   TABLET  (max 1023px)
   ============================================================ */
@media (max-width: 1023px) {

  /* Header */
  .site-header__nav   { display: none; }
  .mobile-menu-toggle { display: flex; }

  /* Hero */
  .hero-section__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-section__visual { order: -1; }
  .hero-subheadline { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-trust  { justify-content: center; }

  /* Products */
  .product-grid--home {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Why */
  .why-grid { grid-template-columns: repeat(2, 1fr); }

  /* About strip */
  .about-strip__inner { grid-template-columns: 1fr; }
  .about-strip__visual { display: none; }

  /* How steps */
  .how-steps { grid-template-columns: 1fr; gap: var(--space-xl); }
  .how-steps::before { display: none; }

  /* Testimonials */
  .testimonials-grid { grid-template-columns: 1fr 1fr; }

  /* Footer */
  .footer-main__inner { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
  .footer-newsletter__inner { flex-direction: column; align-items: flex-start; }
  .footer-newsletter__form { width: 100%; max-width: 100%; }

  /* WooCommerce */
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; }
  .woocommerce div.product {
    grid-template-columns: 1fr;
  }
  .woocommerce div.product .woocommerce-tabs { margin-top: var(--space-xl); }
  .woocommerce form.checkout { grid-template-columns: 1fr; }

  /* Contact */
  .contact-layout { grid-template-columns: 1fr; }

  /* About values */
  .about-values-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   LARGE PHONE  (max 767px)
   ============================================================ */
@media (max-width: 767px) {

  :root {
    --space-3xl: 64px;
    --space-2xl: 48px;
    --container-pad: 16px;
  }

  /* Announcement bar — shorter */
  .malvaa-announcement-bar { font-size: .75rem; }

  /* Header height */
  :root { --header-height: 60px; }

  /* Hero */
  .hero-product-stack { width: 260px; height: 260px; }
  .hero-product-circle--1 { width: 220px; height: 220px; }
  .hero-product-circle--2 { width: 170px; height: 170px; }

  /* Products */
  .product-grid--home,
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
  .product-card__actions { flex-direction: column; }
  .product-card__actions .btn { flex: none; width: 100%; }

  /* Why */
  .why-grid { grid-template-columns: 1fr 1fr; gap: var(--space-md); }
  .why-card { padding: var(--space-lg) var(--space-md); }

  /* Testimonials */
  .testimonials-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-main__inner { grid-template-columns: 1fr; gap: var(--space-xl); }
  .footer-bottom__inner { flex-direction: column; text-align: center; gap: var(--space-sm); }

  /* WooCommerce */
  .woocommerce ul.products { grid-template-columns: 1fr 1fr !important; gap: var(--space-md) !important; }
  .woocommerce div.product form.cart { flex-direction: column; align-items: flex-start; }

  /* Sections */
  .section { padding-block: var(--space-2xl); }
  .section-header { margin-bottom: var(--space-xl); }

  /* How steps — reset connector */
  .how-step__num { width: 48px; height: 48px; font-size: 1.1rem; }

  /* About values */
  .about-values-grid { grid-template-columns: 1fr; }

  /* WhatsApp float — icon only */
  .malvaa-whatsapp-float__label { display: none; }
  .malvaa-whatsapp-float { padding: .85rem; border-radius: 50%; width: 56px; height: 56px; justify-content: center; }

  /* Cart totals */
  .woocommerce .cart_totals { max-width: 100%; }

  /* Cart table mobile stack */
  .woocommerce table.shop_table_responsive thead { display: none; }
  .woocommerce table.shop_table_responsive tr {
    display: block;
    border-bottom: 2px solid var(--color-border);
    padding: var(--space-md) 0;
  }
  .woocommerce table.shop_table_responsive td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xs) var(--space-md);
    border: none;
    text-align: right;
  }
  .woocommerce table.shop_table_responsive td::before {
    content: attr(data-title) ": ";
    font-weight: 600;
    color: var(--color-text-dark);
    text-align: left;
  }
  .woocommerce table.shop_table_responsive td.product-remove::before,
  .woocommerce table.shop_table_responsive td.actions::before {
    display: none;
  }

  /* My Account mobile stack */
  .woocommerce-account .woocommerce {
    flex-direction: column;
  }
  .woocommerce-MyAccount-navigation {
    width: 100%;
  }

  /* Contact */
  .contact-layout { gap: var(--space-xl); }
  .contact-form { padding: var(--space-lg); }
}

/* ============================================================
   SMALL PHONE  (max 479px)
   ============================================================ */
@media (max-width: 479px) {

  /* Products — single column */
  .product-grid--home,
  .product-grid { grid-template-columns: 1fr; }

  /* Why — single column */
  .why-grid { grid-template-columns: 1fr; }

  /* WooCommerce — single column */
  .woocommerce ul.products { grid-template-columns: 1fr !important; }

  /* Hero actions — stack */
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 280px; justify-content: center; }

  /* Hero trust — column */
  .hero-trust { flex-direction: column; align-items: center; gap: var(--space-xs); }

  /* Section eyebrow */
  .section-eyebrow { font-size: .6875rem; }

  /* Buttons */
  .btn--lg { font-size: .9375rem; }

  /* Footer newsletter form */
  .footer-newsletter__form { flex-direction: column; }
  .footer-newsletter__form input[type="email"],
  .footer-newsletter__form .btn { width: 100%; }

  /* Tabs */
  .woocommerce div.product .woocommerce-tabs ul.tabs { flex-wrap: wrap; }
  .woocommerce div.product .woocommerce-tabs ul.tabs li a { font-size: .8125rem; padding: var(--space-sm) var(--space-md); }

  /* My account nav */
  .woocommerce-MyAccount-navigation ul { flex-direction: row; flex-wrap: wrap; }
  .woocommerce-MyAccount-navigation ul li a { border-radius: 0; border-bottom: 1px solid var(--color-border); font-size: .8125rem; }

  /* Page hero */
  .page-hero { padding: var(--space-xl) 0; }
  .page-hero__title { font-size: 1.5rem; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header,
  .malvaa-announcement-bar,
  .usp-strip,
  .footer-newsletter,
  .site-footer,
  .malvaa-whatsapp-float,
  .mobile-nav-overlay,
  .mobile-nav-backdrop { display: none !important; }

  body { font-size: 12pt; color: #000; background: #fff; }
  a    { text-decoration: underline; color: #000; }
  img  { max-width: 100% !important; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .usp-strip__track { animation: none; }
  .hero-scroll-cue span::after { animation: none; }
}

/* ============================================================
   HIGH CONTRAST
   ============================================================ */
@media (forced-colors: active) {
  .btn--primary  { forced-color-adjust: none; }
  .btn--outline  { border: 2px solid ButtonText; }
  .product-card  { border: 1px solid ButtonText; }
}
