/* ==========================================================================
   JOYERÍA MONARCA - RESPONSIVE STYLESHEET
   Adaptabilidad para pantallas ultra-wide, laptops, tablets y smartphones
   ========================================================================== */

/* --- TABLETS Y PANTALLAS MEDIANAS (<= 1024px) --- */
@media screen and (max-width: 1024px) {
  :root {
    --header-height: 74px;
  }

  .hero-pillars-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .experience-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  .experience-image-wrapper img {
    height: 420px;
  }
  .experience-card-floating {
    bottom: -16px;
    right: 16px;
  }

  .care-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .spotlight-banner,
  .spotlight-banner.reverse {
    grid-template-columns: 1fr;
  }
  .spotlight-image {
    min-height: 320px;
  }

  .lookbook-item.item-tall,
  .lookbook-item.item-wide,
  .lookbook-item.item-square {
    grid-column: span 6;
    height: 380px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .footer-brand {
    grid-column: span 2;
  }
}

/* --- SMARTPHONES Y DISPOSITIVOS MÓVILES (<= 768px) --- */
@media screen and (max-width: 768px) {
  :root {
    --header-height: 68px;
  }

  .section-container {
    padding-left: 18px;
    padding-right: 18px;
  }

  /* Ocultar navegación tradicional desktop y activar drawer móvil */
  .nav-desktop-wrapper,
  .nav-desktop,
  .btn-header-wa {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }

  /* Menú Móvil Desplegable */
  .mobile-nav-drawer {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: rgba(8, 8, 8, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-gold-subtle);
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99;
    overflow-y: auto;
  }
  .mobile-nav-drawer.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .mobile-nav-link {
    font-family: var(--font-serif-display);
    font-size: 1.35rem;
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .mobile-nav-link:hover,
  .mobile-nav-link.active {
    color: var(--gold-champagne);
  }
  .mobile-nav-link svg {
    width: 16px;
    height: 16px;
    color: var(--gold-primary);
  }
  .mobile-nav-footer {
    padding-top: 24px;
    border-top: 1px solid var(--border-gold-subtle);
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  /* Hero Section Móvil */
  .hero-section {
    padding: 50px 0 60px 0;
    min-height: auto;
  }
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .btn-luxury-primary,
  .btn-luxury-ghost {
    width: 100%;
    text-align: center;
  }

  .hero-pillars-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  /* Catálogo Toolbar Móvil */
  .filter-pills-wrapper {
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
  }
  .filter-pills-wrapper::-webkit-scrollbar {
    display: none;
  }
  .filter-pill {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 12px 20px;
    font-size: 0.76rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .catalog-search-sort-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .search-input-box {
    max-width: 100%;
    min-height: 44px;
  }
  .sort-select {
    min-height: 44px;
  }
  .catalog-stats-sort {
    justify-content: space-between;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
  }
  .btn-card-whatsapp {
    min-height: 44px;
  }
  .btn-card-add-bag {
    min-height: 44px;
    min-width: 44px;
  }

  /* Modal Ficha Técnica en Móvil */
  .modal-dialog {
    max-height: 94vh;
  }
  .modal-grid {
    grid-template-columns: 1fr;
  }
  .modal-image-col {
    min-height: 280px;
    max-height: 320px;
  }
  .modal-content-col {
    padding: 24px 20px;
  }
  .modal-title {
    font-size: 1.45rem;
  }
  .modal-cta-group {
    flex-direction: column;
  }

  /* Drawer Cotizador Móvil */
  .quote-drawer {
    max-width: 100%;
  }

  /* Cuidado y Lookbook Móvil */
  .care-guide-block {
    padding: 28px 18px;
  }
  .care-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .lookbook-item.item-tall,
  .lookbook-item.item-wide,
  .lookbook-item.item-square {
    grid-column: span 12;
    height: 320px;
  }

  .showroom-card {
    padding: 28px 20px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-brand {
    grid-column: span 1;
  }

  /* Floating WhatsApp en Móvil */
  .floating-whatsapp-widget {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    right: 20px;
  }
  .floating-wa-pill {
    display: none; /* Dejar solo el botón dorado en móviles pequeños para evitar tapar contenido */
  }

  /* Catálogos PDF en Móvil */
  .pdf-catalogs-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
  .pdf-btn-row {
    grid-template-columns: 1fr;
  }
  .pdf-viewer-dialog {
    width: 98%;
    height: auto;
    max-height: 92vh;
    border-radius: var(--radius-xs);
  }
  .pdf-viewer-header {
    padding: 12px 14px;
    gap: 12px;
  }
  .pdf-viewer-controls {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .pdf-viewer-frame {
    display: none;
  }
  .pdf-mobile-fallback {
    position: relative;
    display: flex;
    min-height: 360px;
    padding: 36px 20px;
  }
}

/* --- SMARTPHONES MUY PEQUEÑOS (<= 380px) --- */
@media screen and (max-width: 380px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  .brand-name {
    font-size: 1.15rem;
  }
  .brand-logo svg {
    width: 28px;
    height: 28px;
  }
}
