/* ============================================================
   RAMBAL – Custom Header CSS
   ============================================================ */
   
/* 🔥 FIX GLOBAL OVERFLOW */
html, body {
    overflow-x: hidden !important;
  }
  
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

   :root {
    --rambal-blue:   #1a3a6b;
    --rambal-accent: #1e4fa0;
    --header-bg:     #eeeeee;
    --header-h:      76px;
    --navbar-h:      42px;
    --mobile-h:      56px;
  }
  
  /* ============================================================
     FIXED HEADER
     ============================================================ */
  .site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 900;
    background: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
  
    overflow: visible; /* 🔥 FIX */
  }
  
  body {
    padding-top: calc(var(--header-h) + var(--navbar-h) + 3px) !important;
  }
  
  /* ============================================================
     BARRA PRINCIPAL
     ============================================================ */
  .header-main { background: var(--header-bg); }
  
  .header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 0;
  
    overflow: visible; /* 🔥 FIX CLAVE */
  }
  
  /* ---------- Logo ---------- */
  .header-logo {
    flex-shrink: 0;
    margin-right: 28px;
  }
  .header-logo a { display: flex; align-items: center; }
  
  .logo-desktop {
    display: block;
    max-height: 72px;
    width: auto;
  }
  .logo-mobile { display: none !important; }
  
/* =========================================================
   SEARCH
   ========================================================= */

.header-search {
  display: flex !important;
  flex: 1 1 auto !important;

  min-width: 0 !important;
  width: 100% !important;

  margin-right: 24px !important;
}

.header-search #search_widget,
.header-search .search-widgets {
  display: flex !important;

  flex: 1 !important;

  width: 100% !important;
  min-width: 0 !important;
}

/* =========================================================
   FORM
   ========================================================= */

.header-search #search_widget form {
  position: relative !important;

  display: flex !important;
  align-items: center !important;

  flex: 1 !important;

  width: 100% !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 1.5px solid #bbb !important;
  border-radius: 8px !important;

  background: #fff !important;

  overflow: visible !important;
}

/* =========================================================
   INPUT
   ========================================================= */

.header-search #search_widget form input[type="text"] {
  flex: 1 1 auto !important;

  width: 100% !important;
  min-width: 0 !important;

  height: 42px !important;

  padding: 0 82px 0 12px !important;

  border: none !important;
  outline: none !important;

  font-size: 14px !important;

  background: transparent !important;
  box-shadow: none !important;
}

/* =========================================================
   BOTON BUSQUEDA
   ========================================================= */

.rambal-search-btn {
  position: absolute !important;

  top: 50% !important;
  right: 38px !important;

  transform: translateY(-50%) !important;

  width: 40px !important;
  height: 40px !important;

  border: none !important;
  border-radius: 6px !important;

  background: #1a3a6b !important;
  color: #fff !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  cursor: pointer !important;

  padding: 0 !important;

  transition: opacity .2s ease !important;
}

.rambal-search-btn:hover {
  opacity: .85 !important;
}

.rambal-search-btn i {
  font-size: 14px !important;
}

/* =========================================================
   BOTON CLEAR
   ========================================================= */

.rambal-search-clear {
  position: absolute !important;

  top: 50% !important;
  right: 4px !important;

  transform: translateY(-50%) !important;

  width: 28px !important;
  height: 28px !important;

  border: none !important;
  background: transparent !important;

  color: #999 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  cursor: pointer !important;

  padding: 0 !important;
}

.rambal-search-clear:hover {
  color: #000 !important;
}

/* =========================================================
   FOCUS
   ========================================================= */

.header-search #search_widget form:focus-within {
  border-color: var(--rambal-blue) !important;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

  .header-search {
    margin-right: 10px !important;
  }

  .header-search #search_widget form {
    border-radius: 6px !important;
  }

  .header-search #search_widget form input[type="text"] {
    height: 38px !important;

    font-size: 13px !important;

    padding: 0 74px 0 10px !important;
  }

  .rambal-search-btn {
    width: 38px !important;
    height: 38px !important;

    right: 32px !important;
  }

  .rambal-search-btn i {
    font-size: 13px !important;
  }

  .rambal-search-clear {
    width: 24px !important;
    height: 24px !important;

    right: 3px !important;
  }
}
  
  /* ---------- Login ---------- */
  .header-login {
    flex-shrink: 0;
    margin-right: 28px;
  }
  .header-login a {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
  }
  .header-login a i { font-size: 22px; color: #555; }
  .header-login .login-text strong { font-size: 14px; font-weight: 700; color: #111; }
  
  /* ============================================================
     CARRITO
     ============================================================ */
  .header-cart {
    flex-shrink: 0;
    min-width: 0;
    position: relative;
  }
  
  #_desktop_cart .blockcart,
  .header-cart .blockcart {
    all: unset !important;
    display: none !important;
  }
  
  .rambal-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--rambal-blue);
    color: #fff !important;
    padding: 0 22px;
    height: 42px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s;
    position: relative;
    border: none;
    box-sizing: border-box;
  }
  .rambal-cart-btn:hover {
    background: var(--rambal-accent);
  }
  .rambal-cart-btn i {
    font-size: 18px;
    flex-shrink: 0;
  }
  .rambal-cart-btn .rambal-cart-label {
    font-size: 15px;
    font-weight: 600;
  }
  
  /* Burbuja */
  .rambal-cart-badge {
    display: none;
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid #fff;
    z-index: 20;
    pointer-events: none;
  }
  .rambal-cart-badge.has-items {
    display: flex;
  }
  
  /* ============================================================
     MOBILE BASE
     ============================================================ */
  @media (max-width: 768px) {
    .rambal-cart-btn {
      padding: 0 10px;
      height: 40px; /* 🔥 FIX */
      border-radius: 6px;
      gap: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  
    .rambal-cart-btn .rambal-cart-label {
      display: none;
    }
  
    .rambal-cart-badge {
      top: -4px;  /* 🔥 FIX */
      right: -4px;
      min-width: 16px;
      height: 16px;
      font-size: 9px;
    }
  }
  
  /* ---------- Hamburger ---------- */
  .mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    color: var(--rambal-blue);
    cursor: pointer;
    padding: 0 14px;
    line-height: 1;
    align-self: stretch;
    flex-shrink: 0;
  }
  
  /* ============================================================
     LÍNEA AZUL
     ============================================================ */
  .header-divider {
    height: 3px;
    background: var(--rambal-blue);
  }
  
  /* ============================================================
     NAVBAR
     ============================================================ */
  .header-nav { background: var(--header-bg); }
  
  .nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  .header-nav ul.top-menu {
    display: flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .header-nav ul.top-menu > li > a {
    display: flex !important;
    align-items: center !important;
    height: var(--navbar-h) !important;
    padding: 0 18px !important;
    color: #222 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
  }
  
  .header-nav ul.top-menu > li > a:hover {
    color: var(--rambal-blue) !important;
    background: rgba(0,0,0,.06) !important;
  }
  
    /* ============================================================
       MOBILE FINAL
       ============================================================ */
    @media (max-width: 767px) {
        
        .header-cart {
      margin-right: 20px; /* 👈 espacio hacia la izquierda */
    }
    
      body { padding-top: var(--mobile-h) !important; }
    
      .header-inner {
        height: var(--mobile-h);
        padding: 0;
      }
    
      .mobile-menu-btn { display: flex; align-items: center; }
    
      .logo-desktop { display: none !important; }
      .logo-mobile  { display: block !important; max-height: 34px; }
      .header-logo  { margin-right: 6px; margin-left: 4px; }
    
      .header-search { flex: 1; margin-right: 0; margin-top: 10px;}
    
      .header-login,
      .header-nav,
      .header-divider {
        display: none !important;
      }
    
      /* 🔥 FIX FINAL carrito */
      .rambal-cart-btn {
        padding: 0 10px;
        height: 40px;
        border-radius: 6px;
      }
    }

/* ============================================================
   DRAWER MOBILE
   ============================================================ */
.mobile-drawer {
  position: fixed;
  top: 0; left: -300px;
  width: 300px; height: 100vh;
  background: #fff;
  z-index: 1100;
  box-shadow: 4px 0 20px rgba(0,0,0,.22);
  transition: left .28s ease;
  display: flex;
  flex-direction: column;
}
.mobile-drawer.is-open { left: 0; }

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--rambal-blue);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.drawer-header button {
  background: none; border: none; color: #fff;
  font-size: 22px; cursor: pointer; line-height: 1;
}

.drawer-body { flex: 1; overflow-y: auto; }

.drawer-body .search-widget,
.drawer-body #search_widget,
.drawer-body form[action*="search"],
.drawer-body [class*="search"] { display: none !important; }

.drawer-body ul.top-menu {
  display: flex !important;
  flex-direction: column !important;
  list-style: none !important;
  margin: 0 !important; padding: 0 !important;
}

.drawer-body ul.top-menu > li > a {
  display: flex !important;
  align-items: center !important;
  padding: 15px 24px !important;
  color: #222 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  border-bottom: 1px solid #f0f0f0 !important;
  text-transform: uppercase !important;
  transition: background .2s, color .2s !important;
}
.drawer-body ul.top-menu > li > a:hover {
  background: #f0f4ff !important;
  color: var(--rambal-blue) !important;
}

.drawer-account a {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 24px; color: #222;
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  transition: background .2s, color .2s;
}
.drawer-account a:hover { background: #f0f4ff; color: var(--rambal-blue); }

.mobile-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1099;
}
.mobile-overlay.is-open { display: block; }

/* ============================================================
   HOMEPAGE — ps_imageslider FULL WIDTH
   ============================================================ */

/* 1. Container sin límite de ancho */
body#index #wrapper > .container {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
}

/* 2. Row sin margen negativo */
body#index #wrapper > .container > .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* 3. Ocultar columna izquierda */
body#index #left-column {
  display: none !important;
}

/* 4. Content-wrapper ocupa todo el ancho */
body#index #content-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 5. El hook home sin padding */
body#index .page-home {
  padding: 0 !important;
  margin: 0 !important;
}

/* 6. homeslider-container: cancelar float y forzar full width */
body#index .homeslider-container {
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* 7. ul del slider y cada carousel-item */
body#index .homeslider-container ul,
body#index .homeslider-container .homeslider {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

body#index .homeslider-container .carousel-item {
  width: 100% !important;
}

body#index .homeslider-container .carousel-item a {
  display: block !important;
  width: 100% !important;
}

body#index .homeslider-container .carousel-item figure {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  display: block !important;
}

/* 8. Imagen: sobreescribir width/height inline, mantener proporciones */
body#index .homeslider-container .carousel-item figure img,
body#index .homeslider-container .carousel-item img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  min-width: 100% !important;
  display: block !important;
}

/* 9. Resto del contenido con padding */
body#index .page-home > *:not(.homeslider-container) {
  padding-left: 20px !important;
  padding-right: 20px !important;
}

/* ---- Mobile ---- */
@media (max-width: 767px) {

  /* Contenedor flexible según imagen */
  #carousel .carousel-item {
    height: auto !important;
    text-align: center;
  }

  /* Figure limpio */
  #carousel .carousel-item figure {
    margin: 0;
  }

  /* Imagen COMPLETA */
  #carousel .carousel-item img {
    width: 100% !important;
    height: auto !important;
    max-height: 180px; /* 👈 ajusta si quieres */
    object-fit: contain !important; /* 🔥 clave */
    display: block;
    margin: 0 auto;
  }

  /* Botones centrados verticalmente */
  #carousel .carousel-control {
    top: 50%;
    transform: translateY(-50%);
  }

}

/* ---- FIX REAL FLECHAS MOBILE ---- */
@media (max-width: 767px) {

  #carousel > .direction {
    display: none !important;
  }

}

/* ============================================================
   NAVBAR + DROPDOWNS CON IMAGEN + MEGA-MENÚ
   Reemplaza TODO el CSS anterior del mega-menú en custom.css
   ============================================================ */

#rambal-ps-menu-hidden { display: none !important; }

/* ── Navbar ── */
.rambal-nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0; padding: 0;
  width: 100%;
}
.rambal-nav-item { position: relative; }
.rambal-nav-item--right:first-of-type { margin-left: auto; }

.rambal-nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 13px;
  font-size: 12px;
  font-weight: 600;
  color: #1a3a5c;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}
.rambal-nav-link:hover,
.rambal-nav-item:hover > .rambal-nav-link { border-bottom-color: #1a3a5c; }
.rambal-nav-link--main { font-weight: 700; }

.rambal-caret { font-size: 9px; transition: transform 0.15s; }
.rambal-has-dropdown:hover .rambal-caret { transform: rotate(180deg); }

/* ── Dropdown con imágenes ── */
.rambal-dropdown--img {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #e0e6ed;
  border-top: 2px solid #1a3a5c;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.13);
  padding: 6px;
  min-width: 240px;
  max-width: 300px;
  z-index: 9998;
}
.rambal-dropdown--img.is-open { display: block; }

/* Item del dropdown */
.rambal-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px;
  border-radius: 4px;
  text-decoration: none;
  color: #222;
  transition: background 0.12s;
}
.rambal-dd-item:hover { background: #f0f4f8; color: #1a3a5c; }

/* Thumbnail */
.rambal-dd-thumb {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #e8edf2;
}
.rambal-dd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rambal-dd-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: #e0e6ed;
}

/* Nombre */
.rambal-dd-name {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: inherit;
}

/* ══════════════════════════════════════
   MEGA-MENÚ
══════════════════════════════════════ */
#rambal-megamenu {
  display: none;
  position: fixed;
  left: 0;
  width: 100%;
  z-index: 99999;
  background: #eef0f4;
  border-top: 3px solid #1a3a5c;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  padding: 10px 16px 12px;
  box-sizing: border-box;
}
#rambal-megamenu.is-visible { display: block; }

#rambal-megamenu .mm-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 7px;
  align-items: start;
}
#rambal-megamenu .mm-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
#rambal-megamenu .mm-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.09);
}
#rambal-megamenu .mm-card-img {
  width: 100%; height: 46px;
  object-fit: cover; display: block;
}
#rambal-megamenu .mm-card-body { padding: 6px 8px 8px; }
#rambal-megamenu .mm-cat-title {
  display: block;
  font-size: 11px; font-weight: 700;
  color: #1a3a5c; text-transform: uppercase;
  letter-spacing: 0.04em; line-height: 1.2;
  padding-bottom: 5px; margin-bottom: 4px;
  border-bottom: 1.5px solid #1a3a5c;
  text-decoration: none;
}
#rambal-megamenu .mm-cat-title:hover { color: #2a5a9c; }
#rambal-megamenu .mm-subcat-list { list-style: none; margin: 0; padding: 0; }
#rambal-megamenu .mm-subcat-list li a {
  display: flex; align-items: flex-start; gap: 5px;
  padding: 2px 0; font-size: 11px; color: #444;
  text-decoration: none; line-height: 1.35;
}
#rambal-megamenu .mm-subcat-list li a::before {
  content: ''; display: inline-block;
  width: 4px; height: 4px; min-width: 4px;
  border-radius: 50%; background: #aab5c0;
  margin-top: 5px; flex-shrink: 0;
}
#rambal-megamenu .mm-subcat-list li a:hover { color: #1a3a5c; }
#rambal-megamenu .mm-subcat-list li a:hover::before { background: #1a3a5c; }

@media (max-width: 991px) {
  .rambal-nav-list { display: none; }
  #rambal-megamenu { display: none !important; }
}



/*########################################
CATEGORIAS SLIDER
#########################################*/

/* ===== FIX GLOBAL ===== */
.container,
.row {
  overflow: visible !important;
}

/* ===== CONTENEDOR ===== */
.thans-cat-section {
  width: 100%;
  padding: 20px 0;
}

/* ===== TITULO ===== */
.thans-cat-title {
  font-size: 22px;
  margin: 0 16px 16px;
  color: #1a1a1a;
}

.thans-cat-title strong {
  font-weight: 700;
}

/* ===== WRAPPER ===== */
.thans-cat-wrapper {
  position: relative;
  overflow: visible;
}

/* ===== TRACK (CORREGIDO) ===== */
.thans-cat-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;

  /* 🔥 clave: evitar bug en desktop */
  scroll-behavior: auto;

  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;

  padding: 10px 16px 14px;
  min-width: 100%;
  justify-content: flex-start;

  /* Scrollbar Firefox */
  scrollbar-width: thin;
  scrollbar-color: #ccc #eee;
}

/* ===== SCROLLBAR (Chrome, Edge, Safari) ===== */
.thans-cat-track::-webkit-scrollbar {
  height: 6px;
}

.thans-cat-track::-webkit-scrollbar-track {
  background: #eee;
  border-radius: 10px;
}

.thans-cat-track::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.thans-cat-track::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* ===== CARD ===== */
.thans-cat-card {
  flex: 0 0 auto;
  width: 140px;
  text-align: center;
  text-decoration: none;
  color: #1a1a1a;
}

.thans-cat-img {
  background: #f5f5f5;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.thans-cat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thans-cat-name {
  margin-top: 8px;
  font-size: 13px;
}

/* ===== BOTONES ===== */
.thans-cat-btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thans-cat-prev {
  left: 5px;
}

.thans-cat-next {
  right: 5px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .thans-cat-card {
    width: 110px;
  }

  .thans-cat-btn {
    display: none;
  }
}

@media (max-width: 480px) {
  .thans-cat-card {
    width: 95px;
  }

  .thans-cat-name {
    font-size: 12px;
  }
}

/* 🚫 DESACTIVAR SNAP COMPLETAMENTE */
.thans-cat-track,
.thans-cat-track * {
  scroll-snap-type: none !important;
  scroll-snap-align: none !important;
  scroll-snap-stop: normal !important;
}


/*###########################################

layout para ver 2 productos en mobile

############################################*/

.directory-layout {
  max-width: 1900px;
  margin: 20px auto 50px;
  padding: 0 24px;
}

.directory-title {
  font-size: 54px;
  font-weight: 700;
  color: #111;
  margin-bottom: 34px;
  line-height: 1;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 34px 26px;
  align-items: start;
}

.directory-block {
  min-width: 0;
}

.directory-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ececec;
}

.directory-image {
  flex-shrink: 0;
}

.directory-image img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.directory-title-wrap {
  min-width: 0;
}

.directory-category-title {
  display: block;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.15;
  color: #111;
  text-decoration: none;
  transition: .15s;
}

.directory-category-title:hover {
  color: #1a3a6b;
}

.directory-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.directory-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #444;
  transition: .12s;
}

.directory-link:hover {
  color: #1a3a6b;
}

.directory-link img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
  border: 1px solid #eee;
}

.directory-link span {
  font-size: 14px;
  line-height: 1.25;
}

.directory-loading {
  padding: 80px 0;
  text-align: center;
  font-size: 20px;
}

/* =========================
   LAPTOP
========================= */

@media (max-width: 1600px) {

  .directory-grid {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
  }

}

/* =========================
   TABLET
========================= */

@media (max-width: 1200px) {

  .directory-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }

}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

  .directory-layout {
    padding: 0 14px;
  }

  .directory-title {
    font-size: 34px;
    margin-bottom: 24px;
  }

  .directory-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 24px 16px;
  }

  .directory-header {
    gap: 10px;
    margin-bottom: 12px;
  }

  .directory-image img {
    width: 48px;
    height: 48px;
  }

  .directory-category-title {
    font-size: 18px;
  }

  .directory-link img {
    width: 28px;
    height: 28px;
  }

  .directory-link span {
    font-size: 13px;
  }

}

/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 480px) {

  .directory-grid {
    grid-template-columns: 1fr;
  }

}


/*################################
Tarjetas de productos
################################*/

/* =========================
   GRID PRINCIPAL
========================= */

#products .products,
.featured-products .products,
.product-accessories .products,
.productosporcategoria1 .products.row {

  display: grid !important;

  grid-template-columns:
    repeat(auto-fill, minmax(260px, 1fr));

  gap: 16px !important;

  margin: 0 !important;
}

/* ITEMS */

#products .product,
.featured-products .product,
.product-accessories .product,
.product-miniature,
.productosporcategoria1 .products.row > div {

  width: 100% !important;
  max-width: 100% !important;

  flex: unset !important;

  padding: 0 !important;
  margin: 0 !important;
}

/* =========================
   TARJETA
========================= */

.custom-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;

  overflow: hidden;

  transition: .2s;

  height: 100%;
}

.custom-card:hover {
  transform: translateY(-3px);

  box-shadow:
    0 6px 18px rgba(0,0,0,.08);

  border-color: #1a3a6b;
}

/* CONTENIDO */

.custom-card .thumbnail-container {

  padding: 14px !important;

  display: flex;
  flex-direction: column;

  height: 100%;
}

/* =========================
   IMAGEN
========================= */

.custom-image {

  width: 100%;

  aspect-ratio: 1 / 1;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 12px;
}

.custom-image img {

  width: 100%;
  height: auto;

  max-height: 220px;

  object-fit: contain;
}

/* =========================
   CODIGO
========================= */

.custom-code {

  font-size: 12px;

  color: #666;

  font-weight: 600;

  margin-bottom: 6px;
}

/* =========================
   TITULO
========================= */

.custom-title {

  margin: 0 0 8px 0;

  min-height: 58px;
}

.custom-title a {

  color: #111;

  text-decoration: none;

  font-size: 14px;

  font-weight: 600;

  line-height: 1.35;

  display: -webkit-box;

  -webkit-line-clamp: 3;

  -webkit-box-orient: vertical;

  overflow: hidden;
}

.custom-title a:hover {
  color: #1a3a6b;
}

/* =========================
   STOCK
========================= */

.custom-stock {

  font-size: 12px;

  color: #008f39;

  font-weight: 600;

  margin-bottom: 10px;
}

/* =========================
   PRECIOS
========================= */

.custom-prices {
  margin-top: auto;
}

.custom-discount-row {

  display: flex;

  align-items: center;

  gap: 8px;

  flex-wrap: wrap;

  margin-bottom: 6px;
}

.custom-discount {

  background: #e53935;

  color: white;

  padding: 3px 7px;

  border-radius: 6px;

  font-size: 11px;

  font-weight: 700;
}

.custom-old-price {

  text-decoration: line-through;

  color: #888;

  font-size: 13px;
}

.custom-price {

  font-size: 28px;

  font-weight: 800;

  color: #111;

  line-height: 1.1;
}

/* =========================
   BOTON
========================= */

.custom-cart {
  margin-top: 14px;
}

.custom-button {

  width: 100%;

  height: 44px;

  border: none;

  border-radius: 10px;

  background: #1a3a6b;

  color: white;

  font-size: 14px;

  font-weight: 700;

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 6px;
}

.custom-button:hover {
  background: #244f91;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

  #products .products,
  .featured-products .products,
  .product-accessories .products,
  .productosporcategoria1 .products.row {

    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;

    gap: 10px !important;
  }

  .custom-card .thumbnail-container {
    padding: 10px !important;
  }

  .custom-image img {
    max-height: 140px;
  }

  .custom-title {
    min-height: 44px;
  }

  .custom-title a {

    font-size: 12px;

    line-height: 1.3;

    -webkit-line-clamp: 2;
  }

  .custom-code {
    font-size: 10px;
  }

  .custom-stock {
    font-size: 10px;
  }

  .custom-price {
    font-size: 20px;
  }

  .custom-old-price {
    font-size: 11px;
  }

  .custom-button {

    height: 36px;

    font-size: 12px;
  }
}

/*####################
color del boton agregar al carrito
######################*/

/* Botón añadir al carrito */
.product-add-to-cart .btn-primary,
.product-add-to-cart .add-to-cart {
    background: #1a3a6b !important;
    border-color: #1a3a6b !important;
    color: #fff !important;
}

/* Hover */
.product-add-to-cart .btn-primary:hover,
.product-add-to-cart .add-to-cart:hover {
    background: #244f91 !important;
    border-color: #244f91 !important;
}

/*#############################
drawer body mobile o las categorias
################################*/

/* =========================
   MOBILE ACCORDION MENU
========================= */

.drawer-mobile-menu {
  width: 100%;
  background: #fff;
}

.rm-mobile-list,
.rm-mobile-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Item */
.rm-mobile-item {
  border-bottom: 1px solid rgba(26,58,107,.08);
}

/* Fila principal */
.rm-mobile-row {
  display: flex;
  align-items: center;
  min-height: 54px;
}

/* Link categoría */
.rm-mobile-title {
  flex: 1;
  padding: 16px 18px;
  text-decoration: none;
  color: #1a3a6b;
  font-size: 15px;
  font-weight: 400;
  transition: background .2s ease;
}

.rm-mobile-title:hover {
  background: rgba(36,185,215,.08);
}

/* Flecha */
.rm-mobile-arrow {
  width: 52px;
  height: 52px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #1a3a6b;
  transition: all .2s ease;
}

.rm-mobile-arrow:hover {
  background: rgba(36,185,215,.08);
}

/* Rotación */
.rm-mobile-arrow i {
  transition: transform .25s ease;
}

.rm-mobile-arrow.is-open i {
  transform: rotate(180deg);
}

/* Subs */
.rm-mobile-sublist {
  display: none;
  background: #f8fbff;
  padding: 6px 0;
}

.rm-mobile-sublist.is-open {
  display: block;
}

/* Sub links */
.rm-mobile-sub {
  display: block;
  padding: 12px 18px 12px 38px;
  text-decoration: none;
  color: #1a3a6b;
  font-size: 14px;
  font-weight: 400;
  border-left: 3px solid transparent;
  transition: all .2s ease;
}

.rm-mobile-sub:hover {
  background: rgba(36,185,215,.12);
  border-left-color: #24b9d7;
  color: #24b9d7;
  padding-left: 44px;
}

/* text de webpay */

.payment-option span {
    text-align: left;
    display: block;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/*#########################################
    configuracion del homeslider/imageslider
##########################################*/
/*para que no se vea el titulo*/
#carousel .caption {
    display: none !important;
}

/* para aumentar las imagenes en un 300% */
#carousel .carousel-item {
    overflow: hidden;
}

#carousel .carousel-item img {
    width: 171% !important;
    max-width: none !important;
    height: auto !important;
}

/* #################
    apariencia del flag oferta
########################*/
/* El enlace sale-box posicionado en la esquina superior izquierda */
.product-miniature {
  position: relative;
  overflow: hidden;
}

.sale-box {
  position: absolute;
  top: 0;
  right: 0;        /* <-- derecha */
  left: auto;
  width: 90px;
  height: 90px;
  overflow: hidden;
  z-index: 10;
  text-decoration: none;
}

.sale-box .sale-label {
  position: absolute;
  top: 18px;
  right: -28px;    /* <-- derecha */
  left: auto;
  width: 110px;
  padding: 6px 0;
  background-color: #1a6eb5;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(45deg);   /* <-- giro inverso para esquina derecha */
  display: block;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}