/* ALMAZARA · modelo móvil compartido · 25 septiembre 2026
   Cargar después de todas las hojas existentes. No contiene reglas de escritorio. */

/* Proporciones de Inicio para las cabeceras interiores.
   Solo móvil: el diseño, brillos y movimiento de escritorio no se modifican. */
@media (max-width: 640px) {
  html body:is(.nosotros-page, .aceites-page, .jamones-page, .productos-page, .recetas-page, .contacto-page) > section.hero:not(.home-hero):first-of-type {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    background: #06100a !important;
    overflow: hidden !important;
  }

  html body:not(.home-page) > section.hero:not(.home-hero):first-of-type > :is(.hero-media, .aceites-collage-media, .productos-collage-media) {
    position: relative !important;
    inset: auto !important;
    flex: none !important;
    width: 100% !important;
    height: 72vw !important;
    min-height: 240px !important;
    max-height: 430px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  html body:not(.home-page) > section.hero:not(.home-hero):first-of-type > .hero-media > img {
    object-fit: cover !important;
    object-position: center !important;
  }

  html body:not(.home-page) > section.hero:not(.home-hero):first-of-type .hero-inner {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: block !important;
    padding: 30px 22px 38px !important;
    margin: 0 !important;
    transform: none !important;
  }
  html body:not(.home-page) > section.hero:not(.home-hero):first-of-type .hero-inner :is(.hero-copy, .hero-copy-live, .recipes-hero-mobile-copy) {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
  }
  html body:not(.home-page) > section.hero:not(.home-hero):first-of-type .hero-inner :is(.hero-copy, .hero-copy-live) h1 {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 540px !important;
    height: auto !important;
    padding: 0 !important;
    margin: 14px auto 16px !important;
    font-size: clamp(32px, 10vw, 48px) !important;
    line-height: 1.04 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    hyphens: auto;
  }
  html body.recetas-page > section.hero:not(.home-hero):first-of-type .hero-inner .recipes-hero-mobile-copy h1 {
    font-size: clamp(25px, 8vw, 43px) !important;
  }
  html body:not(.home-page) > section.hero:not(.home-hero):first-of-type .hero-inner :is(.lead, .hero-lead-live) {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 400px !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 auto 22px !important;
    font-size: 16px !important;
    line-height: 1.55 !important;
    text-align: center !important;
  }
  html body:not(.home-page) > section.hero:not(.home-hero):first-of-type .hero-inner :is(.kicker, .hero-kicker-live) {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    font-size: 10px !important;
    line-height: 1.5 !important;
    letter-spacing: .16em !important;
    white-space: normal !important;
    text-align: center !important;
  }
  html body:not(.home-page) > section.hero:not(.home-hero):first-of-type .hero-inner :is(.cta-row, .hero-actions-live2) {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 10px !important;
  }
  html body:not(.home-page) > section.hero:not(.home-hero):first-of-type .hero-inner :is(.cta-row, .hero-actions-live2) > a {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: fit-content !important;
    min-width: min(230px, 100%) !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 50px !important;
    padding: 14px 20px !important;
    margin: 0 !important;
    font-size: 11px !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    text-align: center !important;
  }
  html body.nosotros-page > section.hero:not(.home-hero):first-of-type .hero-signature-live {
    width: 100% !important;
    max-width: 340px !important;
    margin: 20px auto 0 !important;
  }
}

/* Interior pages: mobile content only. Home, heroes, navigation and footer are excluded. */
@media (max-width:640px) {
  html body:is(.nosotros-page,.aceites-page,.jamones-page,.productos-page,.recetas-page) > main#main > .split {
    display:flex!important;flex-direction:column!important;gap:0!important;
    width:100%!important;min-width:0!important;
  }
  html body:is(.nosotros-page,.aceites-page,.jamones-page,.recetas-page) > main#main > .split > .visual {
    order:0;position:relative!important;width:100%!important;
    height:clamp(240px,72vw,430px)!important;min-height:0!important;max-height:none!important;
    overflow:hidden!important;
  }
  html body:is(.nosotros-page,.aceites-page,.jamones-page,.recetas-page) > main#main > .split > .visual > img {
    display:block;width:100%!important;height:100%!important;min-height:0!important;
    max-height:none!important;object-fit:cover!important;
  }
  html body:is(.nosotros-page,.aceites-page,.jamones-page,.recetas-page) > main#main > .split > .content {
    order:1;width:100%!important;min-width:0!important;
    padding:36px 22px 40px!important;text-align:center!important;
  }
  html body:is(.nosotros-page,.aceites-page,.jamones-page,.productos-page,.recetas-page) > main#main .section-title {
    font-size:clamp(30px,8.2vw,38px)!important;line-height:1.08!important;
    letter-spacing:-.02em!important;max-width:100%!important;
    margin:0 auto 20px!important;text-align:center!important;text-wrap:balance;
  }
  html body:is(.nosotros-page,.aceites-page,.jamones-page,.recetas-page) > main#main > .split .kicker {
    max-width:100%;font-size:11px!important;line-height:1.6!important;
    letter-spacing:.16em!important;margin-inline:auto!important;text-align:center!important;
  }
  html body:is(.nosotros-page,.aceites-page,.jamones-page,.recetas-page) > main#main > .split .kicker::after,
  html body.recetas-page > main#main .recipe-featured-premium .content::before {
    margin-left:auto!important;margin-right:auto!important;
  }
  html body:is(.aceites-page,.jamones-page,.recetas-page) > main#main > .split .section-sub {
    font-size:15px!important;line-height:1.65!important;
    max-width:36em!important;margin:0 auto 22px!important;text-align:center!important;
  }
  html body:is(.aceites-page,.jamones-page) > main#main :is(.oil-process-steps,.jamon-process-copy) {
    text-align:left;max-width:36em;margin-left:auto!important;margin-right:auto!important;
  }
  html body:is(.aceites-page,.jamones-page) > main#main :is(.oil-process-steps,.jamon-process-copy) p {
    font-size:15px!important;line-height:1.65!important;margin:0 0 20px!important;
  }
  html body:is(.aceites-page,.jamones-page) > main#main :is(.oil-process-steps,.jamon-process-copy) p:last-child {
    margin-bottom:0!important;
  }
  html body.recetas-page > main#main .recipe-featured-premium .section-title {font-size:clamp(28px,7.5vw,34px)!important;}
  html body.recetas-page > main#main .recipe-featured-premium .cta-row {justify-content:center!important;}
  html body.nosotros-page > main#main .roots-words {
    font-size:clamp(34px,10vw,44px)!important;line-height:1.18!important;
    margin:18px auto 0!important;text-align:center!important;
  }
  html body.nosotros-page > main#main .about-premium-cards .feature-card {
    display:flex;align-items:flex-end;height:auto!important;min-height:430px!important;
  }
  html body.nosotros-page > main#main .about-premium-cards .feature-card .copy {
    position:relative!important;inset:auto!important;width:100%!important;
    padding:140px 22px 30px!important;text-align:center!important;
  }
  html body.nosotros-page > main#main .about-premium-cards .feature-card h3 {
    font-size:clamp(25px,6.5vw,30px)!important;line-height:1.1!important;
  }
  html body.nosotros-page > main#main .about-premium-cards .feature-card p {
    font-size:15px!important;line-height:1.65!important;margin:0 auto!important;
  }
  html body.nosotros-page > main#main .stats {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  html body.nosotros-page > main#main .stats .stat {padding:28px 12px!important;}
  html body.nosotros-page > main#main .stats .stat strong {font-size:28px!important;}
  html body.nosotros-page > main#main .stats .stat span {font-size:13px!important;line-height:1.5!important;}
  html body:is(.aceites-page,.jamones-page,.productos-page,.recetas-page) > main#main > :is(.product-strip,.section) {
    padding:44px 0!important;
  }
  html body:is(.aceites-page,.jamones-page,.productos-page,.recetas-page) > main#main > :is(.product-strip,.section) > .container {
    width:calc(100% - 44px)!important;max-width:none!important;margin-inline:auto!important;
  }
  html body:is(.aceites-page,.jamones-page,.productos-page) > main#main .cards {
    grid-template-columns:minmax(0,1fr)!important;gap:22px!important;
  }
  html body:is(.aceites-page,.jamones-page,.productos-page) > main#main .card-media {
    height:280px!important;min-height:0!important;background:#fff!important;
  }
  html body:is(.aceites-page,.jamones-page,.productos-page) > main#main .card-media img {
    object-fit:contain!important;background:#fff!important;
    animation:none!important;transition:none!important;transform:none!important;
    scale:none!important;translate:none!important;rotate:none!important;
  }
  html body:is(.aceites-page,.jamones-page,.productos-page) > main#main .card-body {
    padding:20px 22px 22px!important;
  }
  html body.productos-page > main#main .filter-layout {gap:32px!important;}
  html body.productos-page > main#main #catalogo .catalog-count {text-align:center;}
  html body.recetas-page > main#main .recipes-premium-heading {margin-bottom:30px!important;text-align:center!important;}
  html body.recetas-page > main#main .recipes-premium-heading .kicker::after {margin-left:auto!important;margin-right:auto!important;}
  html body.recetas-page > main#main .recipes-premium-heading > p {font-size:15px!important;line-height:1.65!important;}
  html body.recetas-page > main#main .recipes-premium-grid {gap:22px!important;}
  html body.recetas-page > main#main .recipe-premium-content {padding:24px 22px!important;}
  html body:is(.nosotros-page,.aceites-page,.productos-page,.recetas-page) > main#main > .banner {
    min-height:320px!important;height:auto!important;padding:40px 0!important;
  }
  html body:is(.nosotros-page,.aceites-page,.productos-page,.recetas-page) > main#main > .banner > .container {
    width:calc(100% - 44px)!important;text-align:center!important;
  }
  html body:is(.aceites-page,.productos-page,.recetas-page) > main#main > .banner h2 {
    max-width:100%!important;margin:0 auto 22px!important;
    font-size:clamp(29px,8vw,36px)!important;line-height:1.12!important;text-wrap:balance;
  }
  html body.nosotros-page > main#main .about-final-banner .banner-copy {padding:0!important;}
}

/* Mobile-only form, document and recipe proportions. No Home, header or footer rules. */
@media (max-width:640px) {
  body.contacto-page .contact-premium-section { padding:40px 0; }
  body.contacto-page .contact-premium-shell { grid-template-columns:minmax(0,1fr); }
  body.contacto-page .contact-premium-form,
  body.contacto-page .contact-premium-info { min-width:0; padding:30px 18px!important; }
  body.contacto-page .contact-premium-title { font-size:clamp(34px,9.1vw,40px)!important; line-height:1.08!important; margin:20px 0 14px; }
  body.contacto-page .contact-premium-kicker { font-size:10px; line-height:1.6; letter-spacing:.18em; }
  body.contacto-page .contact-premium-subtitle { font-size:11px; line-height:1.6; letter-spacing:.16em; }
  body.contacto-page .contact-premium-intro { font-size:15px; line-height:1.75; margin-bottom:24px; }
  body.contacto-page .contact-field-row { grid-template-columns:minmax(0,1fr)!important; }
  body.contacto-page .contact-field { min-width:0; min-height:54px; }
  body.contacto-page .contact-field .field-icon { flex:0 0 36px; width:36px; }
  body.contacto-page .contact-field input,
  body.contacto-page .contact-field select,
  body.contacto-page .contact-field textarea { min-width:0; font-size:16px; padding:15px 12px 15px 0; }
  body.contacto-page .contact-field textarea { min-height:120px; }
  body.contacto-page .contact-privacy { min-height:44px; gap:9px; font-size:13px; line-height:1.6; }
  body.contacto-page .contact-privacy input { flex:0 0 18px; width:18px; height:18px; margin:0; accent-color:#9b762e; }
  body.contacto-page .contact-privacy span { min-width:0; }
  body.contacto-page .contact-premium-submit { min-height:54px; height:auto; padding:16px 14px; font-size:12px; line-height:1.5; letter-spacing:.12em!important; gap:18px; }
  body.contacto-page .contact-secure { font-size:12px; line-height:1.65; }
  body.contacto-page .contact-premium-info { min-height:0; }
  body.contacto-page .contact-brand-mini h3 { font-size:30px; }
  body.contacto-page .contact-brand-mini span { font-size:9px; line-height:1.6; letter-spacing:.2em; }
  body.contacto-page .contact-premium-detail { gap:12px; }
  body.contacto-page .contact-premium-detail i { flex-basis:44px; height:44px; }
  body.contacto-page .contact-premium-detail > div { min-width:0; }
  body.contacto-page .contact-premium-detail small { line-height:1.6; letter-spacing:.18em; }
  body.contacto-page .contact-premium-detail strong { overflow-wrap:anywhere; line-height:1.5; }
  body.contacto-page .contact-purchase-kicker { font-size:10px; line-height:1.6; letter-spacing:.2em; }
  body.contacto-page .contact-purchase-box h4 { font-size:23px; line-height:1.3; }
  body.contacto-page .contact-purchase-box p { font-size:15px; line-height:1.75; }
  body.contacto-page .contact-purchase-whatsapp { width:100%; min-height:54px; padding:14px 12px; font-size:11px; line-height:1.5; letter-spacing:.1em; gap:12px; }
  body.contacto-page .contact-purchase-box small { font-size:11px; line-height:1.6; letter-spacing:.06em; }

  body.checkout-page .checkout-wrap { padding:30px 16px 48px!important; }
  body.checkout-page .checkout-back { min-height:44px; display:inline-flex; align-items:center; margin-bottom:12px; font-size:14px; line-height:1.5; }
  body.checkout-page .checkout-head { margin-bottom:26px!important; }
  body.checkout-page .checkout-head .kicker { font-size:10px; line-height:1.6; letter-spacing:.18em; }
  body.checkout-page .checkout-head .kicker::after { margin:12px auto 0; }
  body.checkout-page .checkout-head h1 { font-family:'Abril Display Brand',Georgia,serif; font-size:clamp(34px,9.1vw,40px)!important; font-weight:400; line-height:1.08!important; margin:14px 0; }
  body.checkout-page .checkout-head p { font-size:15px; line-height:1.65; margin:0; }
  body.checkout-page .checkout-panel { padding:24px 18px!important; }
  body.checkout-page .checkout-panel h2 { font:400 27px/1.2 'Abril Display Brand',Georgia,serif; margin-bottom:22px; }
  body.checkout-page .checkout-fields label { min-width:0; font-size:13px; line-height:1.5; }
  body.checkout-page .checkout-fields input { min-width:0; min-height:48px; font-size:16px; }
  body.checkout-page .checkout-order-item { grid-template-columns:48px minmax(0,1fr) auto!important; gap:8px!important; }
  body.checkout-page .checkout-order-item img { width:48px!important; height:48px!important; }
  body.checkout-page .checkout-order-item > div { min-width:0; font-size:14px; line-height:1.5; }
  body.checkout-page .checkout-order-item > strong { font-size:13px; white-space:nowrap; }
  body.checkout-page .checkout-summary-row { font-size:14px; line-height:1.5; }
  body.checkout-page .checkout-summary-row strong { text-align:right; }
  body.checkout-page .checkout-summary-row.total { font-size:18px; }
  body.checkout-page .checkout-note { font-size:13px; line-height:1.65; }
  body.checkout-page .checkout-disabled { min-height:54px; padding:15px 12px; font-size:12px; line-height:1.5; letter-spacing:.06em; white-space:normal; }

  body.legal-page .legal-hero { display:flex; flex-direction:column; min-height:0; background:#06100a; }
  body.legal-page .legal-hero-media { position:relative; inset:auto; flex:none; z-index:0; width:100%; height:72vw; min-height:240px; max-height:430px; }
  body.legal-page .legal-hero-media img { width:100%; height:100%; object-fit:cover; }
  body.legal-page .legal-hero::after { display:none; }
  body.legal-page .legal-hero-copy { width:100%; padding:30px 22px 38px; margin:0; text-align:center; }
  body.legal-page .legal-layout { width:calc(100% - 32px); }
  body.legal-page .legal-kicker { font-size:10px; line-height:1.6; letter-spacing:.15em; margin-bottom:18px; }
  body.legal-page .legal-hero h1 { font-size:clamp(32px,8.65vw,38px); line-height:1.12; margin-bottom:18px; overflow-wrap:anywhere; }
  body.legal-page .legal-hero-intro { font-size:15px; line-height:1.65; }
  body.legal-page .legal-layout { padding-top:30px; padding-bottom:48px; gap:28px; }
  body.legal-page .legal-document-nav { grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr)); }
  body.legal-page .legal-document-nav a { min-height:44px; font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
  body.legal-page .legal-meta { gap:10px; }
  body.legal-page .legal-toc ol { columns:1; }
  body.legal-page .legal-toc li { padding:0; font-size:14px; }
  body.legal-page .legal-toc a { display:block; min-height:44px; padding:10px 0; line-height:1.65; }
  body.legal-page .legal-section { margin-bottom:32px; }
  body.legal-page .legal-section h2 { font-size:27px; line-height:1.25; }
  body.legal-page .legal-section p,
  body.legal-page .legal-section li { font-size:15px; line-height:1.75; overflow-wrap:anywhere; }

  body.recetas-page .recipe-modal { inset:0; z-index:10040; max-width:none!important; max-height:none!important; overflow:hidden!important; padding:14px; }
  body.recetas-page .recipe-modal-dialog { width:100%; min-width:0; max-height:calc(100vh - 28px); max-height:calc(100dvh - 28px); padding:28px 20px 24px; overscroll-behavior:contain; }
  body.recetas-page .recipe-modal-close { top:10px; right:10px; width:44px; height:44px; }
  body.recetas-page .recipe-modal-kicker { max-width:calc(100% - 48px); font-size:10px; line-height:1.6; letter-spacing:.16em; margin-bottom:14px; }
  body.recetas-page .recipe-modal-title { font-size:clamp(26px,7.2vw,30px); line-height:1.1; margin-right:0; overflow-wrap:anywhere; }
  body.recetas-page .recipe-modal-meta { font-size:11px; line-height:1.6; letter-spacing:.1em; }
  body.recetas-page .recipe-modal h4 { font-size:22px; }
  body.recetas-page .recipe-modal-steps li { grid-template-columns:26px minmax(0,1fr); gap:10px; line-height:1.6; }
  body.recetas-page .recipe-modal-measures small { font-size:13px; line-height:1.65; }
}

/* Mobile navigation corrections. Append after the existing responsive styles.
   Keep the approved Home header, button dimensions and all desktop rules. */
@media (max-width:640px) {
  /* The current header is 82px high, including at 320px viewport width. */
  .mobile-nav-panel {
    top:82px!important;
    max-height:calc(100vh - 82px)!important;
    max-height:calc(100dvh - 82px)!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }

  /* Remove the checkout-only horizontal offset from the shared header. */
  .checkout-page .site-header .container.nav {
    width:calc(100% - 28px)!important;
  }

  /* The whole basket can scroll when the viewport is short. Its established
     width, padding, product list and appearance remain controlled elsewhere. */
  .cart-drawer {
    height:100vh;
    height:100dvh;
    max-height:100vh;
    max-height:100dvh;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }

  @media (max-width:390px) {
    .checkout-page .site-header .container.nav {
      width:calc(100% - 20px)!important;
    }
  }
}
