/*
 * Darauche Audio Web - fidelidad de la portada móvil.
 * Esta capa solo adapta el teléfono. La composición de escritorio se revisará
 * en una fase independiente.
 */
.mobile-search-heading,
.mobile-category-showcase-section {
  display: none;
}

.featured-dots {
  justify-content: center;
  margin-top: 7px;
}

@media (max-width: 760px) {
  /* La APK abre con el carrusel principal antes del buscador. */
  .home-featured-section {
    margin-top: 3px;
  }

  .home-featured-section .promotion-strip,
  #promotions-section .promotion-strip {
    grid-auto-columns: 100%;
    gap: 0;
    padding-inline: 0;
  }

  .home-featured-section .promotion-card,
  #promotions-section .promotion-card {
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .home-featured-section .promotion-card::after,
  #promotions-section .promotion-card::after {
    display: none;
  }

  .home-featured-section .promotion-card img,
  #promotions-section .promotion-card img {
    width: 100%;
    aspect-ratio: 324 / 190;
    object-fit: contain;
    background: transparent;
  }

  .featured-dots,
  #promotion-dots {
    justify-content: center;
  }

  /* En la APK el buscador tiene su propio título. */
  .search-section {
    position: static;
    top: auto;
    z-index: auto;
    padding-top: 0;
    background: transparent;
    margin-top: 13px;
  }

  .mobile-search-heading {
    display: block;
    margin: 0 0 7px;
    font-size: 19px;
    line-height: 1.25;
    letter-spacing: -0.02em;
  }

  .promotions-heading {
    align-items: center;
    margin-bottom: 7px;
  }

  .promotions-heading h1 {
    font-size: 19px;
  }

  /* La portada móvil usa tarjetas 2 x 2 + Instrumentos, como la APK. */
  .desktop-category-filter {
    display: none;
  }

  .mobile-category-showcase-section:not([hidden]) {
    display: block;
    margin-top: 15px;
  }

  .mobile-category-showcase-section .section-heading {
    margin-bottom: 8px;
  }

  .mobile-category-showcase-section h2 {
    font-size: 19px;
  }

  .mobile-category-showcase {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .mobile-category-card {
    min-width: 0;
    overflow: hidden;
    padding: 9px 10px 10px;
    border: 1px solid rgba(55, 74, 102, 0.95);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    text-align: left;
    cursor: pointer;
  }

  .mobile-category-card:last-child:nth-child(odd) {
    grid-column: 1;
  }

  .mobile-category-card-heading {
    min-height: 27px;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .mobile-category-card-title {
    min-width: 0;
    flex: 1;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-category-card-arrow {
    flex: 0 0 auto;
    color: var(--blue);
    font-size: 24px;
    line-height: 1;
  }

  .mobile-category-card-media {
    height: 150px;
    margin-top: 7px;
    overflow: hidden;
    background: #fff;
  }

  .mobile-category-card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
  }

  .mobile-category-card-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #667085;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
  }

  /* El catálogo queda después de la portada por ahora; no tocamos aún sus funciones. */
  .catalog-section {
    margin-top: 17px;
  }
}

@media (max-width: 390px) {
  .mobile-category-showcase {
    gap: 8px;
  }

  .mobile-category-card {
    padding-inline: 8px;
  }

  .mobile-category-card-title {
    font-size: 15px;
  }

  .mobile-category-card-media {
    height: 138px;
  }
}
