
/*
 * AYNE MOBILE V1 - EDICION PREMIUM
 * Diseño exclusivo para telefonos.
 * No modifica funcionalidad ni escritorio.
 */

@media (max-width: 680px) {

  html {
    scroll-padding-top: 76px;
  }

  body.theme-ayne {
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
  }

  body.theme-ayne .shell {
    width: 100%;
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  /* ENCABEZADO */

  body.theme-ayne .topline {
    font-size: 9px;
    line-height: 1.55;
    letter-spacing: .35px;
    padding: 8px 12px;
  }

  body.theme-ayne .main-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(10,10,9,.96);
    backdrop-filter: blur(16px);
  }

  body.theme-ayne .header-wrap {
    min-height: 64px;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 7px;
  }

  body.theme-ayne .brand-block {
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
  }

  body.theme-ayne .brand-emblem {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    font-size: 20px;
  }

  body.theme-ayne .brand-text strong {
    font-size: 25px;
    letter-spacing: 1px;
  }

  body.theme-ayne .brand-text small {
    font-size: 7px;
    letter-spacing: .6px;
    line-height: 1.3;
  }

  body.theme-ayne .header-actions {
    gap: 5px;
    margin-left: auto;
    flex: 0 0 auto;
  }

  body.theme-ayne .mode-pill,
  body.theme-ayne .pdf-top {
    display: none !important;
  }

  body.theme-ayne .cart-button {
    min-height: 43px;
    padding: 8px 9px;
    font-size: 11px;
    border-radius: 12px;
    white-space: nowrap;
  }

  body.theme-ayne .cart-button span {
    min-width: 20px;
    height: 20px;
    margin-left: 3px;
    padding: 0 4px;
    font-size: 10px;
  }

  /* PORTADA */

  body.theme-ayne .hero-ayne {
    padding: 20px 0 24px;
  }

  body.theme-ayne .hero-grid {
    display: block;
  }

  body.theme-ayne .hero-copy .eyebrow {
    font-size: 9px;
    line-height: 1.7;
    letter-spacing: 1.25px;
  }

  body.theme-ayne .hero-copy h1 {
    font-size: clamp(39px, 11vw, 53px);
    line-height: .97;
    margin: 14px 0;
    letter-spacing: -1px;
  }

  body.theme-ayne .hero-copy > p {
    font-size: 13px;
    line-height: 1.65;
    margin: 12px 0;
  }

  body.theme-ayne .ayne-majorista-note {
    margin: 14px 0;
    padding: 11px 12px;
    font-size: 12px;
    gap: 5px;
  }

  body.theme-ayne .ayne-majorista-note span {
    font-size: 11px;
    line-height: 1.5;
  }

  body.theme-ayne .hero-search {
    display: grid;
    grid-template-columns: minmax(0,1fr) 83px;
    gap: 7px;
    margin: 17px 0 14px;
  }

  body.theme-ayne .hero-search input {
    min-width: 0;
    min-height: 46px;
    padding: 12px;
    border-radius: 12px;
    font-size: 16px;
  }

  body.theme-ayne .hero-search button {
    min-height: 46px;
    padding: 8px;
    border-radius: 12px;
    font-size: 12px;
  }

  body.theme-ayne .hero-notes {
    gap: 5px 12px;
    font-size: 10px;
    line-height: 1.5;
  }

  body.theme-ayne .hero-panel {
    display: none !important;
  }

  /* CONTADOR DE TANDAS */

  body.theme-ayne #ayne-countdown {
    padding: 17px !important;
    border-radius: 17px !important;
  }

  body.theme-ayne #ayne-countdown > h2 {
    font-size: 22px;
    line-height: 1.2;
  }

  body.theme-ayne #ayne-clock {
    font-size: clamp(20px, 6vw, 30px) !important;
    letter-spacing: .5px !important;
    overflow-wrap: anywhere;
  }

  body.theme-ayne .ayne-cycle-explain h3 {
    font-size: 24px;
  }

  body.theme-ayne .ayne-cycle-explain > p {
    font-size: 13px;
    line-height: 1.65;
  }

  body.theme-ayne .ayne-cycle-facts {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.theme-ayne .ayne-cycle-fact {
    padding: 12px;
  }

  /* ENCABEZADO DEL CATALOGO */

  body.theme-ayne #productos {
    scroll-margin-top: 80px;
  }

  body.theme-ayne .catalog-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 8px;
    padding: 24px 0 15px;
  }

  body.theme-ayne .catalog-head h2 {
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1;
    margin: 8px 0 0;
  }

  body.theme-ayne .catalog-head .eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
  }

  body.theme-ayne .catalog-count {
    flex-shrink: 0;
    text-align: right;
    margin: 0;
  }

  body.theme-ayne .catalog-count strong {
    font-size: 32px;
  }

  body.theme-ayne .catalog-count small {
    font-size: 8px;
    letter-spacing: 1px;
  }

  /* BANNER PDF */

  body.theme-ayne .pdf-banner {
    padding: 13px;
    margin: 4px 0 15px;
    border-radius: 14px;
    gap: 10px;
  }

  body.theme-ayne .pdf-banner b {
    font-size: 14px;
  }

  body.theme-ayne .pdf-banner small {
    font-size: 11px;
    line-height: 1.5;
  }

  body.theme-ayne .pdf-banner .btn {
    min-height: 44px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 10px;
    font-size: 12px;
  }

  /* BUSCADOR Y FILTROS */

  body.theme-ayne .toolbar-ayne {
    grid-template-columns: minmax(0,1fr);
    gap: 9px;
    margin: 14px 0 18px;
  }

  body.theme-ayne .searchbox {
    display: grid;
    grid-template-columns: minmax(0,1fr) 79px;
    gap: 7px;
  }

  body.theme-ayne .searchbox input,
  body.theme-ayne .toolbar select {
    min-width: 0;
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 16px;
  }

  body.theme-ayne .search-btn {
    min-height: 46px;
    padding: 9px;
    border-radius: 12px;
    font-size: 12px;
  }

  body.theme-ayne #ayne-nav-button {
    width: 100%;
    min-height: 48px;
    text-align: left;
  }

  /* GRILLA - DOS PRODUCTOS POR FILA */

  body.theme-ayne #catalog.product-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
    padding-bottom: 24px;
    align-items: stretch;
  }

  body.theme-ayne #catalog .product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
    border: 1px solid #3c3527;
    background: linear-gradient(180deg,#191813,#10100e);
  }

  body.theme-ayne #catalog .product-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    background: #fff;
    overflow: hidden;
  }

  body.theme-ayne #catalog .product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
  }

  body.theme-ayne #catalog .tag {
    top: 7px;
    left: 7px;
    max-width: calc(100% - 14px);
    font-size: 8px;
    letter-spacing: .2px;
    padding: 5px 7px;
  }

  body.theme-ayne #catalog .product-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    padding: 11px 9px 10px;
  }

  body.theme-ayne #catalog .product-cat {
    font-size: 9px;
    letter-spacing: .5px;
    line-height: 1.4;
  }

  body.theme-ayne #catalog .product-name {
    font-family: 'DM Sans',Arial,sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    min-height: 49px;
    margin: 6px 0;
    color: #f6eddd;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  body.theme-ayne #catalog .product-code {
    font-size: 9px;
    line-height: 1.4;
    margin-bottom: 4px;
    overflow-wrap: anywhere;
  }

  body.theme-ayne #catalog .product-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px;
    font-size: clamp(17px, 5vw, 23px);
    font-weight: 800;
    line-height: 1.1;
    margin: 8px 0 10px;
    color: #f8e6bd;
    overflow-wrap: anywhere;
  }

  body.theme-ayne #catalog .product-price .peso {
    font-size: .75em;
    color: #d8b675;
  }

  body.theme-ayne #catalog .detail-trigger {
    width: 100%;
    margin: 0 0 9px;
    padding: 9px 5px;
    border-radius: 9px;
    font-size: 10px;
    line-height: 1.3;
    text-align: center;
    min-height: 41px;
  }

  body.theme-ayne #catalog .product-footer {
    margin-top: auto;
    display: grid;
    grid-template-columns: minmax(0,1fr) 39px;
    gap: 5px;
    align-items: stretch;
  }

  body.theme-ayne #catalog .product-footer button {
    min-width: 0;
    min-height: 43px;
    padding: 8px 3px;
    background: linear-gradient(125deg,#e0c080,#bd9652);
    color: #17130b;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 800;
  }

  body.theme-ayne #catalog .product-footer input {
    display: block;
    width: 39px;
    min-width: 0;
    height: 43px;
    padding: 5px 1px;
    border-radius: 9px;
    font-size: 13px;
    text-align: center;
    -moz-appearance: textfield;
  }

  body.theme-ayne #catalog .product-footer input::-webkit-inner-spin-button,
  body.theme-ayne #catalog .product-footer input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  /* PAGINAS */

  body.theme-ayne .ayne-pager {
    gap: 8px;
    padding: 5px 0 35px;
  }

  body.theme-ayne .ayne-page-info {
    font-size: 12px;
    line-height: 1.5;
  }

  body.theme-ayne .ayne-page-button {
    min-height: 45px;
    padding: 10px 15px;
    font-size: 12px;
    border-radius: 11px;
  }

  /* CARRITO */

  body.theme-ayne .drawer {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
  }

  body.theme-ayne .drawer-head {
    padding: 19px 17px;
  }

  body.theme-ayne .drawer-head h2 {
    font-size: 35px;
    margin: 5px 0;
  }

  body.theme-ayne .drawer-list {
    padding: 12px 17px;
  }

  body.theme-ayne .cart-line {
    gap: 9px;
    font-size: 12px;
  }

  body.theme-ayne .drawer-foot {
    padding: 16px 17px max(18px, env(safe-area-inset-bottom));
  }

  body.theme-ayne .total strong {
    font-size: 23px;
  }

  body.theme-ayne .drawer-foot .btn {
    min-height: 49px;
  }

  /* FICHA DE PRODUCTO */

  body.theme-ayne .detail-modal {
    width: calc(100% - 18px);
    max-height: 90dvh;
    padding: 15px;
    border-radius: 16px;
  }

  body.theme-ayne #detailContent {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 13px;
  }

  body.theme-ayne .detail-photo {
    min-height: 0;
    max-height: 35dvh;
    aspect-ratio: 4 / 3;
  }

  body.theme-ayne .detail-photo img {
    height: 100%;
    object-fit: contain;
  }

  body.theme-ayne .detail-copy {
    padding: 0 3px;
  }

  body.theme-ayne .detail-copy h2 {
    font-size: 28px;
    margin: 7px 0;
  }

  /* FORMULARIO DE PEDIDO */

  body.theme-ayne .checkout-modal {
    width: calc(100% - 18px);
    max-height: 93dvh;
    padding: 17px;
    border-radius: 17px;
    overscroll-behavior: contain;
  }

  body.theme-ayne .checkout-head h2 {
    font-size: 31px;
  }

  body.theme-ayne .checkout-modal input,
  body.theme-ayne .checkout-modal select {
    width: 100%;
    min-height: 45px;
    font-size: 16px;
  }

  body.theme-ayne .checkout-modal button[type="submit"] {
    min-height: 49px;
  }

  /* COMO COMPRAR Y PIE */

  body.theme-ayne .how-ayne {
    padding: 38px 0 42px;
  }

  body.theme-ayne .steps {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  body.theme-ayne .steps > div {
    padding: 17px;
  }

  body.theme-ayne .footer-inner {
    display: grid;
    gap: 15px;
  }

  /* EVITAR DESBORDES */

  body.theme-ayne img,
  body.theme-ayne input,
  body.theme-ayne select {
    max-width: 100%;
  }

  body.theme-ayne button {
    touch-action: manipulation;
  }
}

/* AJUSTE PARA TELEFONOS MUY ESTRECHOS */

@media (max-width: 360px) {
  body.theme-ayne #catalog.product-grid {
    gap: 7px;
  }

  body.theme-ayne #catalog .product-content {
    padding: 8px 6px;
  }

  body.theme-ayne #catalog .product-name {
    font-size: 11px;
  }

  body.theme-ayne #catalog .product-price {
    font-size: 17px;
  }

  body.theme-ayne #catalog .product-footer {
    grid-template-columns: minmax(0,1fr) 36px;
    gap: 3px;
  }

  body.theme-ayne #catalog .product-footer input {
    width: 36px;
  }
}

/* TABLETS: 3 COLUMNAS SIN MODIFICAR PC */

@media (min-width: 681px) and (max-width: 1024px) {
  body.theme-ayne #catalog.product-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 15px;
  }
}


/* AYNE MOBILE V1.1 - BANNER REVENDEDORES */

@media (max-width: 680px) {

  /* Imagen del banner: evitar recortes */
  .ayne-revendedores img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: center;
  }

  /* Evitar que la imagen se estire */
  .ayne-revendedores picture,
  .ayne-revendedores .banner-image {
    width: 100%;
    height: auto;
    overflow: hidden;
  }

  /* Botones cómodos para pantalla táctil */
  .ayne-revendedores a.btn,
  .ayne-revendedores button {
    min-height: 48px;
  }
}


/*
 AYNE MOBILE V1.2
 CORRECCION DEL BANNER DE REVENDEDORES
 Exclusivo para celulares
*/

@media (max-width: 760px) {

  #ayne-rev-banner.ayne-rev-banner {
    display: flex !important;
    flex-direction: column-reverse !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    border-radius: 17px !important;
    background: #15110e !important;
  }

  /* Sustituimos el banner panoramico recortado
     por la fotografia de la version anterior */

  #ayne-rev-banner .ayne-rev-banner-art {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 10 !important;
    padding: 0 !important;
    margin: 0 !important;

    background-image:
      url("AYNE_REVENDEDORES_V126.webp") !important;
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-color: #15110e !important;
  }

  #ayne-rev-banner .ayne-rev-banner-art::before,
  #ayne-rev-banner .ayne-rev-banner-art::after {
    display: none !important;
    content: none !important;
  }

  /* Textos reales debajo de la fotografia */

  #ayne-rev-banner .ayne-rev-banner-content {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    padding: 21px 17px 23px !important;
    background: #15110e !important;
  }

  #ayne-rev-banner .ayne-rev-banner-content > * {
    visibility: visible !important;
    opacity: 1 !important;
  }

  #ayne-rev-banner .ayne-rev-banner-content h2 {
    font-size: clamp(27px, 8vw, 38px) !important;
    line-height: 1.13 !important;
    margin: 13px 0 !important;
  }

  #ayne-rev-banner .ayne-rev-lead {
    font-size: 13px !important;
    line-height: 1.6 !important;
  }

  #ayne-rev-banner .ayne-rev-benefits {
    gap: 7px !important;
    margin: 14px 0 18px !important;
  }

  #ayne-rev-banner .ayne-rev-hero-cta {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    min-height: 49px !important;
    padding: 13px 10px !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background: linear-gradient(
      110deg,#efd39c,#cda15e
    ) !important;
    color: #21180c !important;
  }
}

/* AYNE MOBILE V1.3 - OCULTAR TEXTO CORTADO */
@media (max-width: 680px) {
  #ayne-rev-banner .ayne-rev-banner-art {
    background-image:
      linear-gradient(
        90deg,
        rgba(21,17,14,1) 0%,
        rgba(21,17,14,.85) 12%,
        rgba(21,17,14,0) 40%
      ),
      url("AYNE_REVENDEDORES_V126.webp") !important;
    background-size: 100% 100%, contain !important;
    background-position: center, center !important;
    background-repeat: no-repeat !important;
  }
}


/* AYNE MOBILE V1.4 - TAPAR LETRAS NE */
@media (max-width: 680px) {

  #ayne-rev-banner .ayne-rev-banner-art {
    position: relative !important;
  }

  #ayne-rev-banner .ayne-rev-banner-art::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    width: 38% !important;
    height: 42% !important;
    z-index: 5 !important;

    background: linear-gradient(
      90deg,
      #15110e 0%,
      rgba(21,17,14,.95) 55%,
      transparent 100%
    ) !important;

    filter: none !important;
    pointer-events: none !important;
  }
}


