/* Mobile-first theme layer for Aceitera La Espanola. */
.mobile-bottom-actions {
  display: none;
}

.mobile-menu {
  display: none;
}

@media (max-width: 760px) {
  :root {
    --mobile-gutter: clamp(18px, 5vw, 24px);
    --mobile-header: 68px;
    --mobile-bottom-bar: 78px;
    --radius: 18px;
  }

  html {
    scroll-padding-top: calc(var(--mobile-header) + 10px);
  }

  body {
    background: #fff7e8;
  }

  body.mobile-chrome-ready {
    --chrome-ease: cubic-bezier(.22, 1, .36, 1);
  }

  body::before {
    display: none;
  }

  .container {
    width: min(100% - (var(--mobile-gutter) * 2), 520px);
  }

  .btn {
    width: 100%;
    min-height: 48px;
    padding: 13px 16px;
    border-radius: 14px;
    font-size: .72rem;
    letter-spacing: .04em;
    line-height: 1.15;
    text-align: center;
  }

  header {
    background: rgba(21, 53, 31, .94);
    border-bottom: 1px solid rgba(240, 215, 138, .2);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  }

  body.mobile-chrome-ready header {
    transition: transform .34s var(--chrome-ease), opacity .22s ease, background-color .22s ease, box-shadow .22s ease;
    will-change: transform, opacity;
  }

  body.mobile-header-hidden:not(.mobile-chrome-locked) header {
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc((var(--mobile-header) + 12px) * -1));
  }

  .navbar {
    width: 100%;
    height: var(--mobile-header);
    padding: 0 var(--mobile-gutter);
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    justify-content: stretch;
    gap: 12px;
  }

  .logo {
    grid-column: 2;
    justify-self: center;
  }

  .logo svg {
    width: 48px;
    height: 48px;
  }

  .mobile-menu {
    display: block;
    grid-column: 3;
    justify-self: end;
    position: relative;
  }

  .mobile-menu-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(240, 215, 138, .26);
    border-radius: 14px;
    background: rgba(255, 250, 241, .08);
    color: #fffaf1;
    display: grid;
    place-content: center;
    gap: 5px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
  }

  .mobile-menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: currentColor;
    transition: transform .22s ease, opacity .18s ease;
  }

  .mobile-menu.is-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-menu.is-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu.is-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .mobile-menu-panel {
    position: fixed;
    top: calc(var(--mobile-header) + 10px);
    right: var(--mobile-gutter);
    z-index: 150;
    width: min(286px, calc(100vw - (var(--mobile-gutter) * 2)));
    padding: 10px;
    border: 1px solid #d8dadd;
    border-radius: 14px;
    background: #fffdf8;
    color: #3a3e42;
    box-shadow: 0 16px 34px rgba(0, 32, 79, .16);
    font-family: Arial, sans-serif;
    font-size: .86rem;
    font-weight: 700;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  }

  .mobile-menu.is-open .mobile-menu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .mobile-menu-panel a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 10px;
    color: #3a3e42;
  }

  .mobile-menu-panel a:hover,
  .mobile-menu-panel a:focus-visible {
    color: var(--green-dark);
    background: rgba(201, 162, 74, .14);
    outline: none;
  }

  .nav-actions {
    display: none;
  }

  .mobile-bottom-actions {
    position: fixed;
    left: var(--mobile-gutter);
    right: var(--mobile-gutter);
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 130;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px;
    gap: 10px;
    min-width: 0;
    padding: 9px;
    background: rgba(21, 53, 31, .88);
    border: 1px solid rgba(240, 215, 138, .24);
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .28);
    backdrop-filter: blur(18px);
    box-sizing: border-box;
    transform: translateY(0);
  }

  body.mobile-chrome-ready .mobile-bottom-actions {
    transition: transform .26s var(--chrome-ease), opacity .2s ease, visibility .2s ease;
    will-change: transform, opacity;
  }

  body.mobile-actions-hidden:not(.mobile-chrome-locked) .mobile-bottom-actions {
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 28px + env(safe-area-inset-bottom)));
    visibility: hidden;
  }

  .mobile-bottom-actions .btn {
    min-height: 44px;
    padding: 11px 10px;
    border-radius: 12px;
    font-size: .66rem;
    letter-spacing: .03em;
  }

  .mobile-whatsapp-action {
    width: 48px;
    height: 44px;
    border-radius: 13px;
    background: #25D366;
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  }

  .mobile-whatsapp-action svg {
    width: 20px;
    height: 20px;
  }

  section {
    padding: 76px 0;
  }

  .section-bg::before {
    background-attachment: scroll;
    background-position: var(--mobile-bg-position, center);
    transform: scale(var(--mobile-bg-scale, 1));
  }

  .eyebrow {
    margin-bottom: 10px;
    font-size: .68rem;
    letter-spacing: .14em;
  }

  .section-title,
  h1 {
    font-size: clamp(2.35rem, 13vw, 4rem);
    line-height: .95;
    max-width: 11ch;
  }

  .section-copy,
  .premium-content p,
  .hero p {
    max-width: none;
    font-size: .98rem;
    line-height: 1.7;
  }

  .hero {
    min-height: 100svh;
    align-items: end;
    padding: calc(var(--mobile-header) + 42px) 0 92px;
    background-position: 58% center !important;
  }

  .hero.section-bg::after {
    background: linear-gradient(180deg, rgba(21, 53, 31, .18) 0%, rgba(21, 53, 31, .5) 42%, rgba(12, 25, 15, .94) 100%);
  }

  .hero > .fade-up {
    position: relative;
    z-index: 3;
    width: min(100% - (var(--mobile-gutter) * 2), 520px);
    margin: 0 auto;
    padding: 0;
    opacity: 1;
    transform: none;
  }

  .hero h1 {
    max-width: 9ch;
    text-shadow: 0 3px 24px rgba(0, 0, 0, .42);
  }

  .hero p {
    margin: 18px 0 24px;
    color: rgba(255, 250, 241, .92);
    text-shadow: 0 2px 18px rgba(0, 0, 0, .36);
  }

  .who {
    min-height: auto;
    padding: 72px 0;
  }

  .who-grid,
  .premium-content,
  .product-grid,
  .product-cards,
  .flavor-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .who .section-title {
    font-size: clamp(2.3rem, 12vw, 3.5rem);
    max-width: 10ch;
  }

  .who-stack {
    min-height: 390px;
    padding-bottom: 52px;
  }

  .who-stack .card {
    width: min(330px, calc(100vw - 64px));
    padding: 26px;
    border-radius: 18px;
  }

  .who-stack .card.is-active {
    left: 0;
  }

  .who-stack .card.is-next {
    left: 20px;
  }

  .who-stack .card.is-back {
    left: 40px;
  }

  .cert-card {
    grid-template-columns: 1fr;
  }

  .premium-band,
  .product-row,
  .healthy {
    min-height: 100svh;
    padding: 90px 0;
    align-items: end;
  }

  .premium-band.section-bg::after,
  .product-row.section-bg::after,
  .healthy.section-bg::after,
  .contact.section-bg::after {
    background: linear-gradient(180deg, rgba(21, 53, 31, .18) 0%, rgba(21, 53, 31, .56) 38%, rgba(12, 25, 15, .94) 100%);
  }

  .section-bg--elicalal {
    --mobile-bg-position: 62% center;
  }

  .section-bg--oro {
    --mobile-bg-position: 56% center;
  }

  .section-bg--magna {
    --mobile-bg-position: 58% center;
    --mobile-bg-scale: 1.06;
  }

  .section-bg--healthy {
    --mobile-bg-position: 64% center;
  }

  .healthy .eyebrow,
  .healthy .section-title,
  .healthy .section-copy {
    color: #fffaf1 !important;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .28);
  }

  .benefits,
  .flavor-list {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 22px 0;
  }

  .benefit,
  .flavor-pill {
    border-radius: 14px;
    padding: 13px 14px;
    font-size: .86rem;
  }

  .flavor-pill {
    width: 100%;
    min-height: 48px;
  }

  .flavors {
    padding-top: 78px;
  }

  .flavors .product-image {
    margin-top: 6px;
  }

  .flavors .product-image img {
    max-height: 360px;
    width: 100%;
    object-fit: contain;
  }

  .logos-marquee {
    height: 104px;
    margin-top: 26px;
  }

  .logos div {
    width: 150px;
    height: 104px;
    flex-basis: 150px;
    padding: 0 42px;
  }

  .logos img {
    max-width: 104px;
    max-height: 82px;
  }

  .contact {
    padding-bottom: 92px;
  }

  form {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 250, 241, .12);
  }

  input,
  textarea,
  select {
    min-height: 48px;
    padding: 13px 14px;
    border-radius: 12px;
    font-size: 16px;
  }

  textarea {
    min-height: 112px;
  }

  footer {
    padding: 34px 0 110px;
  }

  .footer-grid {
    gap: 24px;
  }

  .legal-modal {
    padding: 12px;
    align-items: end;
  }

  .legal-modal-panel {
    width: 100%;
    max-height: min(86svh, 760px);
    padding: 22px;
    border-radius: 18px 18px 0 0;
  }

  .legal-modal h2 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .legal-modal p,
  .legal-modal li {
    font-size: .94rem;
  }

  .whatsapp {
    display: none;
  }

  @media (prefers-reduced-motion: reduce) {
    body.mobile-chrome-ready header,
    body.mobile-chrome-ready .mobile-bottom-actions {
      transition-duration: .01ms;
    }
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  .container {
    width: min(92%, 720px);
  }

  .nav-actions {
    margin-left: auto;
  }

  .premium-band,
  .product-row,
  .healthy {
    min-height: 720px;
  }
}
