/* app-mobile-product.css — SOLO ficha de producto (body.page-product) y SOLO móvil. */
@media (max-width: 768px) {

  body.page-product #header,
  body.page-product .header-nav {
    display: none !important;
  }

  /* El footer NO se oculta con display:none: el widget del chat vive
     dentro de él en el DOM y display:none apaga sus descendientes
     position:fixed. Se oculta solo visualmente. */
  #footer.footer-container {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  body.page-product {
    padding-top: 56px;
    padding-bottom: 64px;
  }

  body.page-product h1.product-detail-name {
    font-size: 17px !important; line-height: 1.35 !important; font-weight: 700 !important;
    color: #16324a !important; padding: 0 12px; margin: 12px 0 6px !important;
  }

  body.page-product .images-container,
  body.page-product .product-cover {
    width: 100% !important; padding: 0 12px;
  }
  body.page-product .images-container img { border-radius: 12px; }

  body.page-product [itemprop="price"],
  body.page-product .current-price,
  body.page-product .product-price {
    font-size: 22px !important; font-weight: 800 !important; color: #0f3f66 !important;
  }
  body.page-product .product-prices { padding: 0 12px; margin-bottom: 10px; }

  body.page-product .box-add-to-cart,
  body.page-product .product-add-to-cart {
    background: #fff; border: 1px solid #eef1f4; border-radius: 14px;
    margin: 10px 12px; padding: 12px;
  }
  body.page-product .product-add-to-cart {
    font-weight: 700; color: #0f3f66; text-align: center;
  }
  /* El contenido de estos bloques suele venir pegado desde Word con
     font-size en pt inline — forzamos con !important para que no rompa
     el diseño móvil (!important SÍ gana a un style inline sin !important). */
  body.page-product .product-add-to-cart,
  body.page-product .product-add-to-cart *,
  body.page-product .description-short,
  body.page-product .description-short * {
    font-size: 13px !important;
    line-height: 1.5 !important;
    max-width: 100% !important;
  }
  body.page-product .product-add-to-cart table,
  body.page-product .description-short table {
    width: 100% !important; display: block !important; overflow-x: auto !important; font-size: 11px !important;
  }
  body.page-product .product-add-to-cart img,
  body.page-product .description-short img {
    max-width: 100% !important; height: auto !important;
  }
  body.page-product .description-short { padding: 0 12px; }

  /* Recorte plegable para bloques de texto largos pegados desde Word */
  body.page-product .amh-truncatable {
    position: relative; max-height: 150px; overflow: hidden;
  }
  body.page-product .amh-truncatable.amh-expanded { max-height: none; }
  body.page-product .amh-truncatable:not(.amh-expanded)::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 48px;
    background: linear-gradient(180deg, rgba(255,255,255,0), #fff);
  }
  body.page-product .amh-readmore-btn {
    display: block; width: 100%; margin: 6px 0 10px; padding: 8px 0;
    background: none; border: 0; color: #0f3f66; font-weight: 700; font-size: 12px;
    text-align: center; border-top: 1px solid #eef1f4;
  }

  body.page-product .blockreassurance_product {
    display: flex; gap: 6px; padding: 0 12px; margin-bottom: 10px;
  }
  body.page-product .blockreassurance_product > div {
    flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 4px; background: #fff; border: 1px solid #eef1f4; border-radius: 12px; padding: 8px 4px;
  }
  body.page-product .blockreassurance_product img { width: 22px; height: 22px; object-fit: contain; }
  body.page-product .blockreassurance_product .block-title { font-size: 9px !important; margin: 0 !important; color: #16324a; }

  body.page-product #estimateddelivery {
    margin: 0 12px 10px; border-radius: 12px; font-size: 11px;
  }

  body.page-product .product-flags { padding: 0 12px; }

  /* Carrusel "productos relacionados" (owl-carousel, #category-products):
     no se le fuerza grid (rompería el carrusel JS), solo se contiene la
     imagen para que no salga gigante. */
  body.page-product .category-products img.img-fluid,
  body.page-product .category-products .product-image {
    width: 100% !important; height: auto !important; max-height: 160px !important;
    aspect-ratio: 1/1; object-fit: contain !important;
  }
  body.page-product .category-products .thumbnail-container {
    background: #fff; border: 1px solid #eef1f4; border-radius: 14px; padding: 8px;
  }
  body.page-product .category-products .functional-buttons,
  body.page-product .category-products .product-description-short,
  body.page-product .category-products .quickview,
  body.page-product .category-products .leo-list-product-reviews {
    display: none !important;
  }
  body.page-product .category-products h2.product-title {
    font-size: 12px !important; line-height: 1.3 !important; margin: 6px 0 2px !important;
  }

  /* "También te puede interesar": mismo look de tarjeta que categoría */
  body.page-product .product-accessories .ajax_block_product,
  body.page-product .product-accessories { padding-left: 12px; padding-right: 12px; }
  body.page-product .product-accessories .row {
    display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; margin: 0 !important;
  }
  body.page-product .product-accessories .ajax_block_product {
    width: 100% !important; max-width: 100% !important; flex: none !important; padding: 0 !important;
  }
  body.page-product .product-accessories .thumbnail-container {
    background: #fff; border: 1px solid #eef1f4; border-radius: 14px; padding: 8px;
  }
  body.page-product .product-accessories .functional-buttons,
  body.page-product .product-accessories .product-description-short,
  body.page-product .product-accessories .quickview {
    display: none !important;
  }
  body.page-product .product-accessories h2.product-title {
    font-size: 12px !important; line-height: 1.3 !important; margin: 6px 0 2px !important;
  }

  /* ---------- Cabecera / barra inferior / footer (idénticos al resto) ---------- */
  #app-mobile-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1200;
    display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px;
    background: linear-gradient(135deg, #0a1a33 0%, #0f2a52 55%, #163a6b 100%);
    box-shadow: 0 2px 10px rgba(10,26,51,.35);
  }
  #app-mobile-header .amh-logo { display: flex; align-items: center; height: 34px; }
  #app-mobile-header .amh-logo img { height: 34px; width: auto; }
  #app-mobile-header .amh-spacer { flex: 1; }
  #app-mobile-header .amh-icon-btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff;
    border: 0; position: relative; font-size: 18px;
  }
  #app-mobile-header .amh-badge {
    position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 3px;
    border-radius: 8px; background: #ff5a3c; color: #fff; font-size: 10px; line-height: 16px;
    text-align: center; font-weight: 700;
  }
  #app-mobile-header .amh-badge.is-empty { display: none; }

  #app-mobile-bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
    display: flex; background: #fff; border-top: 1px solid #eef1f4; box-shadow: 0 -2px 8px rgba(0,0,0,.06);
  }
  #app-mobile-bottomnav .amb-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 8px 0 6px; color: #7c93a8; text-decoration: none; font-size: 10px; font-weight: 600;
    border: 0; background: none; position: relative;
  }
  #app-mobile-bottomnav .amb-item.is-active { color: #0f3f66; }
  #app-mobile-bottomnav .amb-icon { font-size: 19px; line-height: 1; }
  #app-mobile-bottomnav .amb-badge {
    position: absolute; top: 2px; right: calc(50% - 20px); min-width: 15px; height: 15px; padding: 0 3px;
    border-radius: 8px; background: #ff5a3c; color: #fff; font-size: 9px; line-height: 15px; text-align: center; font-weight: 700;
  }
  #app-mobile-bottomnav .amb-badge.is-empty { display: none; }

  .amh-footer-minimal {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 18px 0 12px; margin: 12px 0 0; border-top: 1px solid #eef1f4;
  }
  .amh-footer-minimal img { height: 20px; width: auto; opacity: .85; }
  .amh-footer-minimal .amh-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; }
  .amh-footer-minimal a { font-size: 10px; color: #9aa8b5; text-decoration: none; }
  .amh-footer-minimal .amh-footer-copy { font-size: 9px; color: #c2cbd3; }

  /* El tamaño/posición del botón del chat se controla globalmente desde footer.tpl */
  .panteraai-grip__card--wa,
  a[href*="wa.me"],
  a[href*="api.whatsapp.com"],
  a[href^="whatsapp://"] {
    display: none !important;
  }
}

@media (min-width: 769px) {
  #app-mobile-header, #app-mobile-bottomnav { display: none !important; }
}
