.category-card {
  border: none;
  background: linear-gradient(145deg, #ffffff, #f7f7f7);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
  color: inherit;
  position: relative;
  border-left: 6px solid #7A0B12; /* detalle elegante */
}

.category-card h2 {
  margin: 0 0 8px;
  color: #7A0B12;
  font-size: 12px;
  font-weight: 700;
}

.category-card p {
  margin: 0;
  color: #555;
  font-size: 10px;
  line-height: 1.4;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.14);
}

.category-card--whatsapp {
  border: 2px solid #25D366;
}

.spacer { height: 12px; }

/* Responsive */
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
}
/* ==============================
   RES DESPLEGABLE
============================== */

.category-card--expandable {
  cursor: pointer;
  overflow: hidden;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-arrow {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.subcategory-list {
  max-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  transition: max-height 0.35s ease;
}

.subcategory-list a {
  font-size: 14px;
  color: #444;
  text-decoration: none;
  padding-left: 6px;
}

.subcategory-list a:hover {
  color: #7A0B12;
}

/* estado abierto */
.category-card--expandable.active .subcategory-list {
  max-height: 200px;
}

.category-card--expandable.active .category-arrow {
  transform: rotate(45deg);
}

/* ==============================
   SUBMENU RES
============================== */

/*.category-card--expandable {
  cursor: pointer;
}

.category-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.expand-icon {
  font-size: 26px;
  font-weight: bold;
  width: 36px;
  height: 36px;
  background: #7A0B12;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s ease;
}

.category-card--expandable.active .expand-icon {
  transform: rotate(45deg);
}

.category-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.category-card--expandable.active .category-submenu {
  max-height: 300px;
}

.category-submenu a {
  text-decoration: none;
  color: #7A0B12;
  font-weight: 500;
  padding: 6px 0;
}

.category-submenu a:hover {
  text-decoration: underline;
}
/* =========================
   MODAL CARNES FINAS
========================= */

/*.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 40px 20px;
}*/

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  width: 85%;
  max-width: 1100px;
  max-height: 85vh;   /* 🔥 límite de altura */
  overflow-y: auto;   /* 🔥 activa scroll interno */
  border-radius: 18px;
  padding: 30px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.modal-title {
  text-align: center;
  font-size: 20px;
  margin-bottom: 30px;
  color: #7A0B12;
  font-weight: 600;
}

/*.modal-close {
  position: absolute;
  right: 25px;
  top: 20px;
  font-size: 28px;
  cursor: pointer;
  font-weight: bold;
}*/

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 🔥 EXACTAMENTE 2 columnas */
  gap: 20px;
}

.modal-card {
  background: #fafafa;
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
  padding: 15px;
  transition: all 0.25s ease;
  border: 1px solid rgba(0,0,0,0.05);
}

.modal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

.modal-card img {
  width: 100%;
  height: 100px; /* 🔥 más pequeñas */
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 12px;
}

.modal-card h4 {
  font-size: 10px;
  color: #7A0B12;
  margin-bottom: 6px;
  font-weight: 600;
}

.modal-card p {
  font-size: 8px;
  color: #555;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(.95); }
  to { opacity: 1; transform: scale(1); }
}
/* =========================
   MODAL SCROLL
========================= */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  overflow-y: auto; /* 🔥 permite bajar */
  padding: 40px 20px;
}

.modal.active {
  display: flex;
}
.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 26px;
  cursor: pointer;
  color: #444;
  transition: 0.2s;
}

.modal-close:hover {
  color: #7A0B12;
}
.category-img {
  width: 60px;
  display: block;
  margin-bottom: 10px;
}

/* ==============================
   CONTROL INDEPENDIENTE MODAL
   SOLO EXPLORADOR
============================== */

.explorer-page .modal-content {
  width: 90vw;          /* ancho relativo a pantalla */
  max-width: 500px;     /* ancho máximo */
  max-height: 80vh;     /* alto máximo */
  height: auto;         /* se ajusta automático */
}

/* =========================================
   IMÁGENES HORIZONTALES DENTRO DEL MODAL
   SOLO EXPLORADOR
========================================= */

/*.explorer-page .modal-card-images {
  display: flex;
  gap: 12px;                 /* espacio entre imágenes */
 /* flex-wrap: wrap;  */         /* si no caben bajan a otra línea */
  /*justify-content: center;
}

.explorer-page .modal-card-images img {
  width: 180px;              /* 🔥 tamaño libre modificable */
 /* height: 130px;    */         /* 🔥 altura libre modificable */
 /* object-fit: cover;         /* cover o contain */
 /* border-radius: 10px;
  transition: 0.3s ease;
}

.explorer-page .modal-card-images img:hover {
  transform: scale(1.05);*/
}
/* =========================================
   CONTROL TOTAL IMÁGENES MODAL
========================================= */

/* 🔥 desactiva el 100% obligatorio */
.explorer-page .modal-card img {
  width: auto;
  height: auto;
}

/* 🔥 nuevo control libre */
.explorer-page .modal-card img {
  width: 100px;     /* 🔥 modifica libremente */
  height: 50px;    /* 🔥 modifica libremente */
  object-fit: contain;
  display: inline-block;
}
/* ===============================
   NAV TODOS DROPDOWN PREMIUM
================================ */

/*.nav-dropdown {
  position: absolute;
  right: 90px;
  top: -8px; 
  z-index: 9999;
}*/

/*.nav__todos {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  transition: 0.3s;
}

.nav__todos:hover {
  color: #E5C46A;
}

.todos-menu {
  position: absolute;
  top: 32px;
  right: 0;
  width: 220px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  padding: 10px 0;
  display: none;
  z-index: 9999;
}

.todos-menu.active {
  display: block;
}

.todos-item {
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
  color: #333;
}

.todos-item:hover {
  background: #f5f5f5;
  color: #7A0B12;
}

.todos-submenu {
  display: none;
  padding-left: 20px;
  background: #fafafa;
}

.todos-submenu div {
  padding: 6px 0;
  font-size: 13px;
  color: #555;
  cursor: pointer;
}

.todos-submenu div:hover {
  color: #7A0B12;
}*/
/* =========================================
   EXPLORADOR: PRODUCTOS EN FILA HORIZONTAL
   (cuadro + imagen + título + descripción)
   SOLO EXPLORADOR
========================================= */


/* Texto dentro del cuadro */
.explorer-page .modal-card h4{
  font-size: 14px;      /* 🔥 tamaño título */
  margin: 0 0 6px;
}

.explorer-page .modal-card p{
  font-size: 8px;      /* 🔥 tamaño descripción */
  margin: 0;
}


/* =========================
   BUSCADOR: resaltar producto encontrado
========================= */
.modal-card.search-focus{
  outline: 3px solid #7A0B12;
  box-shadow: 0 0 0 6px rgba(122, 11, 18, 0.16);
  transform: translateY(-2px);
}
