/* ============================================================
   SMI — System Mundo Informático
   responsive.css — Media queries para tablet y móvil (v2)
   ============================================================ */

/* ---------- TABLET (≤ 1024px) ---------- */
@media (max-width: 1024px) {
  :root { --header-h: 64px; }
  .carousel-track .product-card {
    flex: 0 0 calc((100% - (var(--carousel-gap) * 2)) / 3);
    max-width: calc((100% - (var(--carousel-gap) * 2)) / 3);
  }
  #homeProductsGrid .product-card,
  #laptopsTrack .product-card,
  #printersTrack .product-card,
  #peripheralsTrack .product-card {
    flex-basis: calc((100% - (var(--carousel-gap) * 2)) / 3);
    max-width: calc((100% - (var(--carousel-gap) * 2)) / 3);
  }
  .header-topbar-inner { gap: 0.75rem; }
  .header-search-shell {
    flex-basis: 360px;
    max-width: none;
  }
  .hamburger {
    display: flex;
  }
  .header-navbar {
    display: block;
  }
  .main-nav {
    position: fixed;
    top: calc(var(--shipping-ribbon-h) + var(--header-h));
    left: 0;
    width: 100%;
    height: auto;
    max-height: calc(100vh - var(--shipping-ribbon-h) - var(--header-h));
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem;
    gap: 0.25rem;
    background: #fff;
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    transform: translateY(-150%);
    transition: transform var(--transition);
    z-index: 999;
  }
  .main-nav.open {
    transform: translateY(0);
  }
  .main-nav a {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }
  .main-nav a::after {
    display: none;
  }
  .main-nav a:hover,
  .main-nav a.active {
    color: var(--purple-main);
    background: rgba(109, 40, 217, 0.08);
  }
  .search-preview-panel {
    width: min(860px, 100%);
  }
  .search-preview-grid {
    grid-template-columns: 1fr;
  }
  .search-results-card,
  .search-feature-card {
    min-height: auto;
  }
  .search-feature-media {
    height: 180px;
  }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .benefits-showcase { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .benefit-wide, .benefit-tall { grid-column: auto; grid-row: auto; min-height: 240px; }
  .offers-background-grid .offer-background-card,
  .offers-background-grid .offer-background-card:nth-child(1),
  .offers-background-grid .offer-background-card:nth-child(2),
  .offers-background-grid .offer-background-card:nth-child(3) {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
  }
  .offers-background-grid .offer-background-card:nth-child(1),
  .offers-background-grid .offer-background-card:nth-child(3) {
    aspect-ratio: 3 / 1;
  }
  .offers-background-grid .offer-background-card:nth-child(2) {
    aspect-ratio: 16 / 9;
  }
  .offers-background-grid .offer-background-card img,
  .offers-background-grid .offer-background-card.benefit-tall img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
  }
  .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 1.25rem; }
  .product-detail-hero { grid-template-columns: 1fr; gap: 2rem; }
  .product-detail-info { max-width: 680px; margin: 0 auto; }
  .recent-products-row { grid-template-columns: repeat(3, 1fr); }
  .promo-card.offer-slide-card {
    flex: 0 0 calc((100% - 2.5rem) / 3);
    min-width: 0;
  }
  .offers-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-content { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
  .hero-text { max-width: 100%; margin: 0 auto; }
  .hero-buttons { justify-content: center; }
  .hero-visual { max-width: 620px; min-height: 420px; margin: 0 auto; width: 100%; }
  .hero-tag { justify-content: center; }
  .hero-mini-card { margin-left: auto; margin-right: auto; text-align: left; }
  .hero-location { display: none; }
  .premium-eye-hero .hero-content {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: calc(var(--shipping-ribbon-h) + var(--header-h) + 4rem);
  }
  .premium-eye-hero h1 { font-size: clamp(2.8rem, 8vw, 3.2rem); }
  .eye-doctor-panel {
    align-items: center;
    min-height: auto;
    margin-top: 1rem;
  }
  .banner-slide-inner { grid-template-columns: 1fr; text-align: center; padding: 2rem; }
  .banner-copy { margin: 0 auto; }
  .banner-actions { justify-content: center; }
  .banner-dots { left: 50%; transform: translateX(-50%); }
  .google-reviews-grid {
    --review-card-w: min(360px, 42vw);
  }
  .float-card-1 { left: 0; }
  .float-card-2 { right: 0; }
  .auth-layout { grid-template-columns: 1fr; max-width: 450px; }
  .contact-layout { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-grid .hero-visual {
    min-height: 320px;
  }
  .modal-body { grid-template-columns: 1fr; }
  .modal-image { border-right: none; border-bottom: 1px solid var(--border-light); }
  .section { padding: 1rem 0; }
  .seo-answer-grid { grid-template-columns: 1fr; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .catalog-quick-filters {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.8rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
  }

  .catalog-quick-filters .filter-block {
    min-width: 0;
  }

  .catalog-quick-filters .filter-block h2 {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    margin-bottom: 0.45rem;
  }

  .catalog-quick-filters .filter-group {
    min-width: 0;
  }

  .catalog-quick-filters .filter-group label {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .catalog-quick-filters .filter-group input,
  .catalog-quick-filters .filter-group select {
    height: 42px;
    font-size: 0.82rem;
  }

  .products-grid .product-fulfillment {
    margin: 0.7rem 0 0.75rem;
  }

  .products-grid .product-fulfillment-list {
    gap: 0.55rem;
  }

  .products-grid .product-fulfillment-item {
    display: grid;
    grid-template-columns: 15px minmax(0, 1fr);
    gap: 0.38rem;
    font-size: 0.64rem;
    line-height: 1.25;
  }

  .products-grid .product-fulfillment-item svg {
    width: 14px;
    height: 14px;
    margin-top: 0.08rem;
  }

  .products-grid .product-fulfillment-item p,
  .products-grid .product-fulfillment-item span {
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .products-grid .product-fulfillment-item span {
    display: inline-block;
    width: auto;
    padding: 0.18rem 0.34rem;
    font-size: 0.58rem;
    line-height: 1.15;
  }

  .products-grid .product-card-countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.22rem;
    margin: 0.65rem 0 0.58rem;
  }

  .products-grid .product-card-countdown .countdown-box {
    min-width: 0;
    padding: 0.36rem 0.12rem;
    border-radius: 6px;
  }

  .products-grid .product-card-countdown .countdown-num {
    font-size: 0.76rem;
    line-height: 1;
  }

  .products-grid .product-card-countdown .countdown-label {
    margin-top: 0.16rem;
    font-size: 0.42rem;
    letter-spacing: 0;
    line-height: 1;
  }
}

@media (max-width: 1100px) {
  .product-card,
  .recent-product-card,
  .promo-card.offer-slide-card {
    min-width: 0;
  }

  .product-actions-row,
  .recent-product-actions > div,
  .offer-slide-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    width: 100%;
  }

  .product-actions-row .btn,
  .recent-product-actions .btn,
  .offer-slide-actions .btn,
  .banner-actions .btn {
    width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.15;
    min-height: 42px;
  }

  .product-actions-row .btn-wa,
  .recent-product-actions .btn-wa,
  .offer-slide-actions .btn-wa {
    gap: 0.35rem;
  }
}

/* ---------- MOBILE (≤ 768px) ---------- */
@media (min-width: 769px) and (max-width: 900px) {
  body:not(.home-page) .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-page .products-grid,
  .offers-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .offer-product-card .product-info {
    padding: 0.95rem 1rem 1.05rem;
  }

  .offer-product-card .price-oferta,
  .offer-product-card .price-normal {
    font-size: clamp(1.08rem, 2.35vw, 1.38rem);
    overflow-wrap: anywhere;
  }

  .offer-product-card .price-original {
    font-size: 0.72rem;
  }

  .offer-product-card .product-card-countdown {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.3rem;
  }

  .offer-product-card .countdown-box {
    min-width: 0;
    padding: 0.42rem 0.2rem;
  }

  .offer-product-card .countdown-num {
    font-size: 0.82rem;
  }

  .offer-product-card .countdown-label {
    font-size: 0.48rem;
  }

  .offer-product-card .product-fulfillment {
    font-size: 0.72rem;
  }

  .offer-product-card .product-fulfillment-item {
    gap: 0.32rem;
  }

  .offer-product-card .product-actions-row .btn {
    min-height: 36px;
    padding: 0.48rem 0.4rem;
    font-size: clamp(0.68rem, 1.45vw, 0.76rem);
    border-radius: 12px;
  }

  .offer-product-card .btn-wa img {
    width: 16px;
    height: 16px;
  }

  #ofertasMes .promo-card.offer-slide-card {
    grid-template-rows: 174px 1fr;
  }

  #ofertasMes .offer-slide-body {
    min-width: 0;
    padding: 1rem 0.9rem 1.05rem;
  }

  #ofertasMes .offer-slide-price {
    gap: 0.35rem;
    flex-wrap: wrap;
  }

  #ofertasMes .offer-slide-price strong {
    font-size: clamp(1.08rem, 2.4vw, 1.28rem);
    overflow-wrap: anywhere;
  }

  #ofertasMes .product-card-countdown {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.28rem;
  }

  #ofertasMes .countdown-box {
    min-width: 0;
    padding: 0.42rem 0.18rem;
  }

  #ofertasMes .countdown-num {
    font-size: 0.82rem;
  }

  #ofertasMes .countdown-label {
    font-size: 0.48rem;
  }

  #ofertasMes .product-fulfillment-item {
    min-width: 0;
    overflow: hidden;
  }

  #ofertasMes .product-fulfillment-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #ofertasMes .offer-slide-actions {
    width: 100%;
    max-width: 100%;
    gap: 0.45rem;
    padding-inline: 0.18rem;
  }

  #ofertasMes .offer-slide-actions .btn {
    width: 100%;
    max-width: 100%;
    min-height: 38px;
    padding: 0.48rem 0.35rem;
    border-radius: 12px;
    font-size: clamp(0.66rem, 1.35vw, 0.74rem);
  }

  #ofertasMes .offer-slide-actions .btn-wa img {
    width: 15px;
    height: 15px;
  }

  .product-detail-page {
    padding-top: calc(var(--shipping-ribbon-h) + var(--header-h) + 1.2rem);
  }

  .product-detail-page > .container {
    max-width: min(92%, 760px);
    padding-inline: 0;
  }

  .product-detail-page .pdp-breadcrumb,
  .product-detail-page .pdp-mobile-heading {
    display: none;
  }

  .product-detail-page .pdp-core-grid {
    display: contents;
  }

  .product-detail-page .pdp-impact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    grid-template-areas:
      "gallery buy"
      "tabs delivery"
      "payment payment";
    gap: 1rem;
    align-items: stretch;
    padding-bottom: 2rem;
  }

  .product-detail-page .pdp-main-column {
    display: contents;
  }

  .product-detail-page .pdp-gallery {
    grid-area: gallery;
    display: block;
    min-width: 0;
  }

  .product-detail-page .pdp-info-panel,
  .product-detail-page .pdp-thumbs {
    display: none;
  }

  .product-detail-page .pdp-main-image {
    min-height: 260px;
    height: 260px;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
  }

  .product-detail-page .pdp-main-image img {
    width: min(88%, 310px);
    max-height: 220px;
  }

  .product-detail-page .product-detail-tabs {
    grid-area: tabs;
    margin: 0;
    height: 100%;
    padding: 1.05rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
  }

  .product-detail-page .detail-tabs-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    padding: 0;
    overflow: visible;
    background: #eef2f7;
    border: 1px solid #e5e7eb;
  }

  .product-detail-page .detail-tab {
    min-width: 0;
    min-height: 46px;
    padding: 0.7rem 0.45rem;
    font-size: 0.72rem;
    white-space: normal;
  }

  .product-detail-page .detail-tab-panel.active {
    display: block;
    padding: 1rem 0.15rem 0;
  }

  .product-detail-page .detail-tab-panel h2 {
    max-width: 24ch;
    margin-bottom: 0.75rem;
    font-size: clamp(1.05rem, 2.4vw, 1.28rem);
    line-height: 1.18;
  }

  .product-detail-page .detail-tab-panel p,
  .product-detail-page .detail-spec-list li {
    font-size: 0.86rem;
    line-height: 1.55;
  }

  .product-detail-page .pdp-side-column {
    display: contents;
  }

  .product-detail-page .pdp-buy-card {
    grid-area: buy;
    padding: 1rem;
    align-self: stretch;
  }

  .product-detail-page .pdp-delivery-card {
    grid-area: delivery;
    padding: 1rem;
    align-self: stretch;
  }

  .product-detail-page .pdp-payment-card {
    grid-area: payment;
    padding: 1rem;
  }

  .product-detail-page .pdp-related-card {
    display: none;
  }

  .product-detail-page .pdp-buy-card,
  .product-detail-page .pdp-delivery-card,
  .product-detail-page .pdp-payment-card {
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
  }

  .product-detail-page .pdp-qty-row {
    margin-bottom: 0.85rem;
  }

  .product-detail-page .pdp-buy-card .btn {
    min-height: 48px;
    margin-bottom: 0.7rem;
    padding: 0.72rem 0.8rem;
    font-size: 0.8rem;
  }

  .product-detail-page .pdp-stock-ok {
    padding: 0.72rem;
    font-size: 0.8rem;
  }

  .product-detail-page .pdp-delivery-card h3,
  .product-detail-page .pdp-payment-card h3 {
    font-size: 0.78rem;
  }

  .product-detail-page .pdp-delivery-option {
    min-height: 74px;
    align-content: center;
    padding: 0.8rem;
  }

  .product-detail-page .pdp-payment-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1rem;
    align-items: start;
  }

  .product-detail-page .pdp-card-heading {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .product-detail-page .pdp-transfer-box,
  .product-detail-page .pdp-payment-card small {
    grid-column: 1 / -1;
  }

  .product-detail-page .pdp-payment-logos {
    gap: 0.65rem;
  }

  .product-detail-page .pdp-payment-logos img {
    width: 56px;
    height: 34px;
  }

  .product-detail-page .recent-products-section {
    padding-top: 1.25rem;
  }

  .product-detail-page .recent-products-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.95rem;
  }

  .product-detail-page .recent-product-card {
    display: flex;
    border-radius: 12px;
  }

  .product-detail-page .recent-products-row .recent-product-card:nth-child(n + 5) {
    display: flex;
  }

  .product-detail-page .recent-product-media {
    min-height: 138px;
    padding: 0.75rem;
  }

  .product-detail-page .recent-product-media img {
    height: 122px;
  }

  .product-detail-page .recent-product-body {
    padding: 0.85rem;
  }

  .product-detail-page .recent-product-title {
    font-size: 0.82rem;
  }

  .product-detail-page .recent-product-type,
  .product-detail-page .recent-product-rating,
  .product-detail-page .recent-product-stock,
  .product-detail-page .product-fulfillment,
  .product-detail-page .product-fulfillment-item {
    font-size: 0.68rem;
  }

  .product-detail-page .recent-product-price strong {
    font-size: 1.12rem;
  }

  .product-detail-page .recent-product-actions .btn {
    min-height: 34px;
    padding: 0.45rem 0.4rem;
    border-radius: 10px;
    font-size: 0.68rem;
  }

  #bannerSliderPrimary .banner-slide-inner {
    grid-template-columns: 1fr;
    min-height: 260px;
    padding: 2rem 3rem;
    text-align: center;
  }

  #bannerSliderPrimary .banner-copy {
    max-width: 680px;
    margin: 0 auto;
  }

  #bannerSliderPrimary .banner-actions {
    justify-content: center;
  }

  #bannerSliderPrimary .banner-product {
    display: none;
  }
}

@media (max-width: 768px) {
  .product-detail-page,
  .product-detail-page .container,
  .pdp-impact-layout,
  .pdp-main-column,
  .pdp-info-panel,
  .pdp-price-box,
  .pdp-meta {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .pdp-mobile-heading div {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .pdp-mobile-heading span {
    max-width: 100%;
    white-space: normal;
  }

  .pdp-price-box p {
    display: block;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .pdp-mobile-bar {
    grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1fr);
    overflow: hidden;
  }

  .pdp-mobile-bar .btn {
    min-width: 0;
    white-space: normal;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    line-height: 1.1;
  }

  .recent-product-actions,
  .recent-product-actions > div {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .recent-product-actions .btn {
    width: 100%;
    min-width: 0;
  }

  :root {
    --header-h: 44px;
    --shipping-ribbon-h: 18px;
  }
  .site-header {
    box-shadow: 0 4px 16px rgba(17, 24, 39, 0.08);
    background: #fff;
  }
  .header-topbar {
    background: #fff;
  }
  .shipping-ribbon {
    height: var(--shipping-ribbon-h);
  }
  .shipping-ribbon-track {
    gap: 1.4rem;
    animation-duration: 20s;
  }
  .shipping-ribbon span {
    font-size: 0.56rem;
    line-height: 1;
    letter-spacing: 0.04em;
  }
  .header-topbar-inner {
    height: var(--header-h);
    padding: 0 0.45rem;
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(76px, 1fr) 98px;
    align-items: center;
    gap: 0;
  }
  .header-navbar { display: block; }
  .header-currency-selector { display: none; }
  .logo-text { display: none; }
  .logo {
    grid-column: 2;
    justify-self: center;
    justify-content: center;
    min-width: 0;
    z-index: 2;
  }
  .site-header .logo img.logo-mark,
  .logo-mark {
    width: 92px !important;
    height: 34px !important;
    background: transparent;
    padding: 0;
    border-radius: 0 !important;
  }
  .header-actions {
    position: absolute;
    inset: 0 0.45rem;
    display: grid;
    grid-template-columns: 42px minmax(76px, 1fr) repeat(3, 30px);
    align-items: center;
    gap: 0;
    z-index: 3;
    pointer-events: none;
  }
  .header-icon-btn,
  .header-topbar .cart-link {
    background: transparent;
    border: 0;
    color: #0f172a;
    box-shadow: none;
    border-radius: 6px;
    pointer-events: auto;
  }
  .header-icon-btn svg,
  .header-topbar .cart-link svg { stroke: #0f172a; }
  .header-actions > a[href="login.html"] {
    display: flex;
  }
  .header-search-shell {
    display: none;
  }
  #headerSearchBtn {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    justify-self: center;
    width: 28px !important;
    height: var(--header-h);
    transform: none;
  }
  .header-actions > a[href="login.html"] {
    grid-column: 4;
    grid-row: 1;
    justify-self: center;
    width: 28px !important;
    height: var(--header-h);
    margin: 0 !important;
  }
  .hamburger {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    margin: 0;
    display: flex;
    width: 34px;
    height: var(--header-h);
    background: transparent;
    border: 0;
    border-radius: 0;
    pointer-events: auto;
  }
  .home-page .hamburger {
    background: transparent;
    border: 0;
  }
  .hamburger span {
    width: 20px;
    height: 2px;
    background: #0f172a;
  }
  .home-page .hamburger span {
    background: #0f172a;
  }
  .header-topbar .cart-link {
    grid-column: 5;
    grid-row: 1;
    justify-self: center;
    display: flex !important;
    width: 28px !important;
    height: var(--header-h);
  }
  .header-icon-btn svg,
  .header-topbar .cart-link svg {
    width: 16px;
    height: 16px;
  }
  .cart-count {
    top: 3px;
    right: 0;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    font-size: 0.52rem;
  }
  .mobile-header-search { display: none; }
  .search-preview-overlay {
    padding: calc(var(--shipping-ribbon-h) + var(--header-h) + 0.5rem) 0.55rem 0.75rem;
  }
  .search-preview-panel {
    border-radius: 20px;
    max-height: calc(100vh - var(--shipping-ribbon-h) - var(--header-h) - 1rem);
    overflow-y: auto;
  }
  .search-preview-form {
    height: 48px;
  }
  .search-preview-grid {
    grid-template-columns: 1fr;
  }
  .search-result-item {
    grid-template-columns: 46px 1fr;
  }
  .search-result-item b {
    grid-column: 2;
    justify-self: start;
  }
  .search-feature-card {
    display: none;
  }

  /* Navigation -> hamburger */
  .main-nav {
    top: calc(var(--shipping-ribbon-h) + var(--header-h));
    padding: 1rem;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 0.9rem 1rem; font-size: 1rem; border-radius: var(--radius-sm); color: var(--text-secondary); }
  .main-nav a::after { display: none; }
  .main-nav a:hover,
  .main-nav a.active {
    color: var(--purple-main);
    background: rgba(109, 40, 217, 0.08);
  }

  /* Products */
  .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
  .carousel-track { gap: 1rem; scroll-padding-inline: 0; }
  .carousel-track .product-card {
    flex: 0 0 calc((100% - 2rem) / 3);
    max-width: calc((100% - 2rem) / 3);
  }
  #homeProductsGrid .product-card,
  #laptopsTrack .product-card,
  #printersTrack .product-card,
  #peripheralsTrack .product-card {
    flex-basis: calc((100% - 1rem) / 2);
    max-width: calc((100% - 1rem) / 2);
  }
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-quick-filters {
    grid-template-columns: 1fr;
    padding: 0.85rem;
  }
  .filters-sidebar {
    position: static;
    padding: 1rem;
  }
  .catalog-toolbar { align-items: flex-start; flex-direction: column; }
  .filter-list { display: grid; grid-template-columns: repeat(2, 1fr); }
  .filter-list .pill { text-align: center; justify-content: center; }
  .product-detail-page { padding-top: calc(var(--shipping-ribbon-h) + var(--header-h) + 1rem); }
  .product-detail-main-img { min-height: 330px; }
  .product-detail-controls { align-items: stretch; flex-direction: column; }
  .product-detail-controls .btn { width: 100%; }
  .product-detail-meta { grid-template-columns: 1fr; }
  .detail-tab-panel.active { grid-template-columns: 1fr; gap: 1.5rem; }
  .detail-spec-list { columns: 1; }
  .recent-products-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .recent-product-media { min-height: 180px; }
  .recent-product-media img { height: 160px; }

  /* Benefits */
  .benefits-grid { grid-template-columns: 1fr; }
  .benefits-showcase .benefit-card {
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
  }
  .benefits-showcase .benefit-card img,
  .benefits-showcase .benefit-tall img {
    width: 100%;
    max-height: 190px;
  }

  /* Offers */
  .offers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promo-card.offer-slide-card {
    flex: 0 0 calc((100% - 2rem) / 3);
    min-width: 0;
    scroll-snap-align: start;
  }

  /* Filters */
  .filters-bar { flex-direction: column; align-items: stretch; }
  .filter-group { width: 100%; }
  .filter-group select, .filter-group input { min-width: 0; width: 100%; }
  .seo-answer-card { padding: 1.1rem; }

  /* Cart item */
  .cart-item {
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto auto auto;
    gap: 0.6rem; padding: 0.85rem;
  }
  .cart-item-img { width: 64px; height: 64px; font-size: 1.2rem; }
  .cart-item-info { grid-column: 2; }
  .cart-item-price { grid-column: 2; text-align: left; }
  .cart-item-qty { grid-column: 1 / -1; justify-self: start; }
  .cart-item-remove { grid-column: 1 / -1; justify-self: end; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-col ul {
    list-style: none;
    padding-left: 0;
  }
  .footer-brand .logo { justify-content: center; }
  .footer-social { justify-content: center; }

  /* Sections */
  .section { padding: 1rem 0; }
  .container { padding: 0 1rem; }
  .hero {
    min-height: auto;
    padding-top: calc(var(--shipping-ribbon-h) + var(--header-h) + 2rem);
    padding-bottom: 3.5rem;
    margin-top: 70px;
  }
  .hero h1 { font-size: 2rem; }
  .commerce-hero h1 { font-size: clamp(2.55rem, 12vw, 4.6rem); }
  .premium-eye-hero h1 { font-size: clamp(2.35rem, 10vw, 3.2rem); }
  .hero-subtitle { font-size: 0.98rem; }
  .hero-visual { min-height: 330px; }
  .premium-eye-hero .hero-visual { min-height: auto; }
  .premium-eye-hero .hero-buttons { width: 100%; }
  .premium-eye-hero .hero-buttons .btn {
    flex: 0 0 auto;
    min-width: 0;
  }
  .doctor-card,
  .doctor-slider-controls,
  .doctor-progress {
    width: 100%;
    max-width: 340px;
  }
  .hero-product-image-ring {
    width: 100%;
    height: 190px;
  }
  .hero-orbit-card { width: 106px; height: 106px; top: 8%; }
  .hero-secondary-product { width: 36%; }
  .banner-slider {
    min-height: 0;
    height: auto;
  }
  .banner-slide {
    position: relative;
    display: none;
    inset: auto;
  }
  .banner-slide.active { display: block; }
  .banner-slide-inner {
    min-height: 0;
    height: auto;
    padding: 1.5rem;
    gap: 1.4rem;
  }
  .banner-copy h3 { font-size: 1.95rem; }
  .banner-copy p { margin-left: auto; margin-right: auto; }
  .banner-product {
    width: min(100%, 300px);
    max-height: 240px;
  }
  .banner-product img { max-height: 230px; }
  #bannerSliderPrimary .banner-slide-inner {
    min-height: 260px;
    text-align: center;
  }
  #bannerSliderPrimary .banner-actions {
    justify-content: center;
  }
  #bannerSliderPrimary .banner-product {
    display: none;
  }
  .reviews-head { flex-direction: column; align-items: flex-start; }
  .google-reviews-grid {
    --review-card-w: min(82vw, 340px);
    --review-gap: 0.9rem;
    mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  }
  .home-page .premium-eye-hero {
    aspect-ratio: 2172 / 724;
    height: auto;
    min-height: 0;
    max-height: none;
    padding-top: 0;
    padding-bottom: 0;
  }
  .featured-categories-row {
    justify-content: flex-start;
    padding-left: 0.2rem;
    gap: 1.35rem;
  }
  .featured-category {
    width: 132px;
    min-width: 132px;
    min-height: 142px;
  }
  .featured-category span {
    width: 104px;
    height: 72px;
  }
  .featured-category small {
    font-size: 0.92rem;
  }
  .admin-head,
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-head {
    display: grid;
  }
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
  .login-panel-shell {
    grid-template-columns: 1fr;
  }
  .login-brand-panel {
    min-height: auto;
  }
  .dashboard-page-shell {
    grid-template-columns: 1fr;
  }
  .dashboard-sidebar {
    position: static;
    height: auto;
  }
  .dashboard-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-page .admin-layout {
    grid-template-columns: 1fr;
  }
  .product-img-wrap {
    aspect-ratio: 16 / 9;
  }

  /* Subscribe */
  .subscribe-form { flex-direction: column; }
  .subscribe-form input { width: 100%; }

  /* Modal */
  .modal-overlay { padding: 0.5rem; }
  .modal { max-height: 95vh; border-radius: var(--radius-lg); }
  .modal-info { padding: 1.25rem; }
  .modal-image { padding: 1.25rem; }
  .modal-meta { grid-template-columns: 1fr; }
  .modal-actions { flex-direction: column; }

  /* Carousel buttons */
  .carousel-btn { width: 40px; height: 40px; font-size: 1.1rem; }
  .carousel-btn.prev { left: 0.4rem; }
  .carousel-btn.next { right: 0.4rem; }

  /* Float cards */
  .float-card { display: none; }

  /* Page hero */
  .page-hero { padding-top: calc(var(--shipping-ribbon-h) + var(--header-h) + 2.5rem); padding-bottom: 2.5rem; }

  /* Section header */
  .section-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .section-title-left { font-size: 1.5rem; }

  /* Hero stats */
  .hero-stats { gap: 1rem; flex-wrap: wrap; }
  .hero-stat-divider { display: none; }

  /* WhatsApp float */
  .whatsapp-float { width: 52px; height: 52px; font-size: 1.5rem; bottom: 1rem; right: 1rem; }

  /* Section subtitle */
  .section-subtitle { margin-bottom: 2.5rem; }
}

/* ---------- SMALL MOBILE (≤ 480px) ---------- */
@media (max-width: 640px) {
  .container {
    max-width: 100%;
  }

  .products-grid,
  .offers-grid,
  .recent-products-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .carousel-track .product-card {
    flex: 0 0 calc((100% - 1rem) / 2);
    max-width: calc((100% - 1rem) / 2);
    min-width: calc((100% - 1rem) / 2);
  }

  .promo-card.offer-slide-card {
    flex: 0 0 100%;
    max-width: 100%;
    min-width: 100%;
  }

  #homeProductsGrid .product-card,
  #laptopsTrack .product-card,
  #printersTrack .product-card,
  #peripheralsTrack .product-card {
    flex-basis: calc((100% - 1rem) / 2);
    max-width: calc((100% - 1rem) / 2);
    min-width: calc((100% - 1rem) / 2);
  }

  .product-card,
  .recent-product-card {
    border-radius: 14px;
  }

  .product-img-wrap {
    aspect-ratio: 1 / 1;
  }

  .product-img-wrap img {
    margin-top: 0px;
    max-width: 86%;
    max-height: 86%;
    padding-bottom: 0px;
  }

  #laptopsTrack .product-img-wrap,
  #printersTrack .product-img-wrap,
  #peripheralsTrack .product-img-wrap {
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  #laptopsTrack .product-img-wrap img,
  #printersTrack .product-img-wrap img,
  #peripheralsTrack .product-img-wrap img {
    max-width: 66%;
    max-height: 96%;
    transform: scale(1.16);
    transform-origin: center;
    padding-top: 20px;
  }

  .product-img-badge {
    flex-direction: row;
    flex-wrap: nowrap;
    top: 0.72rem;
    left: 0.72rem;
    right: 0.72rem;
    gap: 0.28rem;
    z-index: 5;
  }

  .product-img-badge .badge {
    padding: 0.34rem 0.58rem;
    font-size: 0.66rem;
    line-height: 1;
  }

  .product-img-badge .badge-discount {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 0.7rem;
  }

  .product-img-badge .badge-extra {
    display: none;
  }

  .product-info,
  .recent-product-body {
    padding: 0.75rem;
  }

  .product-name,
  .recent-product-title {
    font-size: 0.82rem;
    line-height: 1.2;
  }

  .product-type,
  .product-rating,
  .product-stock,
  .recent-product-type,
  .recent-product-rating,
  .recent-product-stock {
    font-size: 0.66rem;
  }

  .price-oferta,
  .price-normal,
  .recent-product-price strong {
    font-size: 1.02rem;
  }

  .product-actions-row .btn,
  .product-actions .btn,
  .recent-product-actions .btn {
    min-height: 34px;
    padding: 0.45rem 0.35rem;
    border-radius: 10px;
    font-size: 0.68rem;
    line-height: 1.05;
  }

  .product-actions .btn-wa,
  .recent-product-actions .btn-wa {
    font-size: 0;
    gap: 0.25rem;
  }

  .product-actions .btn-wa::after,
  .recent-product-actions .btn-wa::after {
    content: "Comprar";
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  #headerSearchBtn,
  .header-topbar .cart-link {
    display: flex !important;
  }
  .header-actions > a[href="login.html"] {
    margin: 0 !important;
    width: 28px !important;
  }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-card,
  .carousel-track .product-card {
    flex: 0 0 calc((100% - 0.75rem) / 2);
    max-width: calc((100% - 0.75rem) / 2);
    min-width: calc((100% - 0.75rem) / 2);
  }
  .filter-list { grid-template-columns: repeat(2, 1fr); }
  .detail-tabs-nav { overflow-x: auto; justify-content: flex-start; padding: 0 1rem; }
  .detail-tab { min-width: 132px; }
  .product-detail-thumbs { flex-wrap: wrap; }
  .recent-products-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
  .commerce-hero h1 { font-size: 2.25rem; }
  .premium-eye-hero h1 { font-size: clamp(2.25rem, 12vw, 3.2rem); }
  .hero-subtitle { font-size: 0.9rem; }
  .hero-buttons { flex-direction: column; width: 100%; }
  .hero-buttons .btn { width: 100%; }
  .premium-eye-hero .hero-content {
    padding-top: 20px;
    padding-bottom: 3rem;
    gap: 2rem;
  }
  .home-page .premium-eye-hero {
    aspect-ratio: 2172 / 724;
    height: auto;
    min-height: 0;
    max-height: none;
    padding-top: 0;
    padding-bottom: 0;
  }
  .home-page .premium-eye-hero .hero-content {
    min-height: 0;
    padding: 0;
  }
  .home-hero-dot {
    width: 22px;
    height: 4px;
  }
  .home-hero-dot.active {
    width: 34px;
  }
  .featured-category {
    width: 124px;
    min-width: 124px;
    min-height: 136px;
  }
  .featured-category span {
    width: 96px;
    height: 66px;
  }
  .featured-category small {
    font-size: 0.88rem;
  }
  .premium-eye-hero .hero-bg {
    background-position: 62% center;
  }
  .doctor-card {
    border-radius: 24px;
    padding: 0.95rem;
  }
  .doctor-image-ring {
    width: 112px;
    height: 112px;
  }
  .hero-product-image-ring {
    width: 100%;
    height: 170px;
  }
  .doctor-slider-controls { gap: 0.6rem; }
  .doctor-dot { width: 24px; }
  .doctor-dot.active { width: 42px; }
  .hero-mini-card { grid-template-columns: 74px 1fr; }
  .hero-mini-card img { width: 74px; height: 60px; }
  .hero-visual { min-height: 250px; }
  .hero-orbit-card { display: none; }
  .banner-slide-inner { padding: 1.25rem; min-height: 0; }
  .banner-slider { min-height: 0; }
  .banner-product { width: 100%; }
  .promo-card.offer-slide-card {
    flex: 0 0 100%;
    min-width: 100%;
  }
  .countdown { flex-wrap: wrap; }
  .countdown-box { flex: 1 1 calc(50% - 0.25rem); }
  .modal-info h2 { font-size: 1.15rem; }
  .modal-price .m-price-now { font-size: 1.5rem; }
  .toast { font-size: 0.82rem; padding: 0.7rem 1.2rem; }
  .hero-tag { font-size: 0.85rem; }
  .hero-tag::before { width: 16px; }
  .benefit-card { padding: 1.75rem 1.25rem; }
  .auth-card { padding: 1.5rem; }
  .login-screen {
    padding: 1rem;
  }
  .login-form-panel,
  .login-brand-panel {
    padding: 1.5rem;
  }
  .dashboard-nav,
  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }
  .admin-table-toolbar {
    grid-template-columns: 1fr;
  }
  .admin-pagination {
    justify-content: center;
    flex-wrap: wrap;
  }
  .dashboard-main {
    padding: 1rem;
  }
  .form-card, .contact-info-card { padding: 1.5rem; }
}

@media (max-width: 900px) {
  .admin-site-banners-form,
  .admin-banner-fields {
    grid-template-columns: 1fr;
  }

  .admin-spec-row {
    grid-template-columns: 1fr;
  }

  .admin-spec-remove {
    justify-self: start;
  }
}

@media (max-width: 768px) {
  .admin-spec-editor-head {
    display: grid;
  }

  .detail-spec-table {
    font-size: 0.82rem;
  }

  .detail-spec-table th,
  .detail-spec-table td {
    padding: 0.7rem 0.75rem;
  }
}
