
/* =====================================================
   TESH-SB - MENU CLARO + CATEGORIAS/PRODUCTOS 3 COLUMNAS
   Pegar al FINAL de /assets/css/mobile-safe-final.css
   o cargar despues de mobile-safe-final.css
===================================================== */

/* =====================================================
   1) MENU HAMBURGUESA CLARO, SIN OSCURECER EL SITIO
===================================================== */

@media (max-width: 820px) {

  /* Quitamos la capa oscura completa */
  body.nav-open::after {
    display: none !important;
    content: none !important;
  }

  body.nav-open {
    overflow: hidden !important;
  }

  .nav-menu {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #111 !important;
    border-left: 7px solid var(--accent, #ff3c00) !important;
    box-shadow: -14px 0 34px rgba(0, 0, 0, 0.18) !important;
  }

  .nav-menu.open {
    background: rgba(255, 255, 255, 0.98) !important;
  }

  .nav-menu.open a,
  .navbar .nav-menu.open a {
    color: #111 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
  }

  .nav-menu.open a:hover {
    color: var(--accent, #ff3c00) !important;
  }

  .nav-menu.open .admin-access-link {
    background: #111 !important;
    color: #fff !important;
    box-shadow: 4px 4px 0 var(--accent, #ff3c00) !important;
    border-bottom: 0 !important;
  }

  .nav-menu.open .cart-link {
    background: var(--accent, #ff3c00) !important;
    color: #111 !important;
    box-shadow: 4px 4px 0 #111 !important;
    border-bottom: 0 !important;
  }

  .nav-menu.open .cart-link span,
  .nav-menu.open #cart-count {
    background: #111 !important;
    color: #fff !important;
  }

  /* Boton X/hamburguesa siempre visible y clickeable */
  .nav-toggle {
    z-index: 2147483002 !important;
    pointer-events: auto !important;
  }
}

/* =====================================================
   2) CATEGORIAS EN 3 COLUMNAS EN MOVIL
   Aplica a home, catalogo y menus laterales.
===================================================== */

@media (max-width: 820px) {

  .catalog-sidebar,
  .filters,
  .category-menu,
  .home-categories,
  .categories-section .filters,
  .catalog-layout .filters {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px !important;
    margin-bottom: 18px !important;
  }

  .catalog-sidebar .panel-title,
  .filters .panel-title,
  .category-menu .panel-title {
    margin-bottom: 12px !important;
  }

  .catalog-sidebar .panel-title h2,
  .filters .panel-title h2,
  .category-menu .panel-title h2,
  .home-categories h2,
  .categories-section h2 {
    font-size: 24px !important;
    line-height: .95 !important;
  }

  .catalog-category-list,
  .category-menu,
  .filters nav,
  .home-category-list,
  .categories-list {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
  }

  .catalog-category-list a,
  .category-menu a,
  .filters nav a,
  .home-category-list a,
  .categories-list a,
  .filters a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 8px 5px !important;
    background: #111 !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    border-right: 3px solid var(--accent, #ff3c00) !important;
    border-bottom: 3px solid var(--accent, #ff3c00) !important;
    font-size: 8.5px !important;
    line-height: 1.05 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    font-weight: 1000 !important;
    letter-spacing: .1px !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
  }

  .catalog-category-list a::after,
  .category-menu a::after,
  .filters a::after,
  .home-category-list a::after,
  .categories-list a::after {
    display: none !important;
    content: none !important;
  }

  .catalog-category-list a.active,
  .category-menu a.active,
  .filters a.active {
    background: var(--accent, #ff3c00) !important;
    color: #111 !important;
  }

  .catalog-help-box {
    display: none !important;
  }
}

/* =====================================================
   3) PRODUCTOS DESTACADOS / CATALOGO EN 3 COLUMNAS
===================================================== */

@media (max-width: 820px) {

  .product-grid,
  .featured-grid,
  .featured-products-grid,
  .catalog-product-grid,
  .products-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .product-card,
  .product-item,
  .card-product {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    border-right-width: 3px !important;
    border-bottom-width: 3px !important;
    box-shadow: 3px 3px 0 rgba(255,60,0,.9) !important;
  }

  .product-card .product-image,
  .product-item .product-image,
  .card-product .product-image,
  .product-card a:first-child {
    min-height: 112px !important;
    height: 112px !important;
    padding: 7px !important;
    background: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  .product-card img,
  .product-item img,
  .card-product img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 98px !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  .product-card .product-body,
  .product-item .product-body,
  .card-product .product-body {
    padding: 8px 6px !important;
  }

  .product-card .product-category,
  .product-item .product-category,
  .card-product .product-category,
  .product-card .tag,
  .product-item .tag {
    font-size: 6.5px !important;
    padding: 3px 5px !important;
    line-height: 1 !important;
    margin-bottom: 5px !important;
  }

  .product-card h3,
  .product-item h3,
  .card-product h3 {
    font-size: 8.5px !important;
    line-height: 1.08 !important;
    margin: 5px 0 !important;
    min-height: 28px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .product-card .price,
  .product-item .price,
  .card-product .price,
  .product-card .product-price {
    font-size: 12px !important;
    line-height: 1 !important;
    margin: 4px 0 !important;
  }

  .product-card small,
  .product-card del,
  .product-item small,
  .card-product small {
    font-size: 7px !important;
  }

  .product-card .btn,
  .product-item .btn,
  .card-product .btn,
  .product-card button,
  .product-item button {
    width: 100% !important;
    min-height: 27px !important;
    padding: 6px 4px !important;
    font-size: 6.7px !important;
    line-height: 1.05 !important;
    box-shadow: 2px 2px 0 #111 !important;
  }

  .catalog-toolbar,
  .section-head {
    margin-bottom: 14px !important;
  }

  .catalog-toolbar h2,
  .section-head h2,
  .featured-section h2,
  .featured-products h2 {
    font-size: clamp(24px, 8vw, 34px) !important;
    line-height: .92 !important;
  }

  .catalog-toolbar p,
  .section-head p,
  .featured-section p,
  .featured-products p {
    font-size: 11px !important;
    line-height: 1.35 !important;
  }
}

/* =====================================================
   4) CELULARES MUY ANGOSTOS
   Mantiene 3 columnas, pero aun mas compacto.
===================================================== */

@media (max-width: 430px) {

  .catalog-category-list,
  .category-menu,
  .filters nav,
  .home-category-list,
  .categories-list {
    gap: 5px !important;
  }

  .catalog-category-list a,
  .category-menu a,
  .filters nav a,
  .home-category-list a,
  .categories-list a,
  .filters a {
    min-height: 38px !important;
    font-size: 7.4px !important;
    padding: 7px 4px !important;
  }

  .product-grid,
  .featured-grid,
  .featured-products-grid,
  .catalog-product-grid,
  .products-grid {
    gap: 6px !important;
  }

  .product-card .product-image,
  .product-item .product-image,
  .card-product .product-image,
  .product-card a:first-child {
    height: 100px !important;
    min-height: 100px !important;
    padding: 6px !important;
  }

  .product-card img,
  .product-item img,
  .card-product img {
    max-height: 88px !important;
  }

  .product-card .product-body,
  .product-item .product-body,
  .card-product .product-body {
    padding: 7px 5px !important;
  }

  .product-card h3,
  .product-item h3,
  .card-product h3 {
    font-size: 7.4px !important;
    min-height: 25px !important;
  }

  .product-card .price,
  .product-item .price,
  .card-product .price,
  .product-card .product-price {
    font-size: 10.5px !important;
  }

  .product-card .btn,
  .product-item .btn,
  .card-product .btn,
  .product-card button,
  .product-item button {
    min-height: 25px !important;
    font-size: 5.9px !important;
    padding: 5px 3px !important;
  }
}
