.item {
        cursor: pointer;
      }
      .category-menu {
        padding: 0px;
        max-width: 600px;
        margin: 0 auto;
      }
      .category-menu ul {
        list-style-type: none;
        padding-left: 0;
        margin: 0;
      }
      .category-menu li {
        margin-bottom: 5px;
      }
      .english-name{
        display: none;
      }
      .category-menu .item {
        display: flex;
        align-items: center;
        padding: 4px 12px;
        background-color: #ffffff;
        border-radius: 5px;
        cursor: pointer;
        position: relative;
        transition: background-color 0.3s ease;
      }
      .category-menu .item:hover {
        background-color: #f0f0f0;
        cursor: pointer;
      }
      .category-menu .item .category-name {
        flex-grow: 1;
      }
      .category-name:hover{
        background-color: #f0f0f0;
        border-radius: 6px;
      }
      .category-menu .item .english-name {
        font-size: 0.8em;
        color: #7f8c8d;
        margin-left: 5px;
      }
      .category-menu .item .toggle-icon {
        background-color: #808080;
        border-radius: 50%;
        cursor: pointer;
        color: white;
        font-size: 16px;
        width: 24px;
        height: 24px;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.3s ease;
      }
      .category-menu .item .toggle-icon:hover {
        background-color: #666666;
      }
      .category-menu .subcategories {
        display: none;
        margin-left: 20px;
      }
      
      .error-message {
        color: #e74c3c;
        text-align: center;
        font-weight: bold;
      }
      #loading {
        padding: 20px;
      }
 
      .filter-button {
        position: fixed;
        bottom: 90px;
        right: 20px;
        top: auto;
        left: auto;
        background-color: #00AB55;
        color: #ffffff;
        border: none;
        border-radius: 50px;
        width: 107px;
        height: 60px;
        font-size: 16px;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        z-index: 888;
      }
      
      .skeleton-loader {
        background-color: #f0f0f0;
        height: 20px;
        margin-bottom: 10px;
        border-radius: 4px;
        animation: skeleton-loading 1s infinite alternate;
      }
      @keyframes skeleton-loading {
        0% {
          background-color: #f0f0f0;
        }
        100% {
          background-color: #e0e0e0;
        }
      }

 
      .spinner {
        width: 50px;
        height: 50px;
        border: 3px solid #f3f3f3;
        border-top: 3px solid #3498db;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    @media(max-width:700px){
      /* Soral Group v2.9.3: ocultar el boton flotante de categorias en movil.
         En movil ya existe "Categorias" en el menu del header, asi que el
         boton flotante sobraba y ocupaba espacio. Solo se usa en escritorio. */
      .filter-button {
        display: none !important;
      }
    }

/* =========================================================================
   Soral Group v2.6.5 — Mejora visual SUAVE del checkout y del panel de
   direcciones. Solo presentación: espaciado, alineación, bordes y foco en
   verde de marca (#00AB55). No cambia campos, nombres ni lógica.

   v2.6.6 — Formulario de direcciones en 2 columnas (desktop) / 1 (móvil).
   v2.6.7 / v2.6.8 — Intentos de fix del grid.

   v2.6.9 — Fix definitivo (validado en vivo): las asignaciones de fila del
   grid llevan ahora !important. Sin él, las reglas de posicionamiento eran
   sobrescritas (grid-row computaba "auto" en lugar de "1"), dejando fuera
   de vista la primera fila de cada columna ("Nombre" y "Provincia").
   El !important fuerza la prioridad, igual que el estilo inyectado que
   confirmamos que funcionaba.
   Orden real del HTML:
     #id(hidden), #name, #lastName, #lastName2, #alternativeName,
     #phoneNumber, #email, #provinceId, #localityId, #city,
     #address, #remitter, #note, botón.
   ========================================================================= */

/* ----- 1) Panel flotante "Gestionar direcciones" ----- */

#address-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* La primera fila (cabecera) toma su altura de contenido; el resto igual.
     Sin esto, en desktop la fila implicita del header podia colapsar y el
     titulo quedaba con altura cero (invisible en pantalla ancha). */
  grid-auto-rows: min-content;
  grid-gap: 12px;
  column-gap: 20px;
  max-width: 760px;
  margin: 8px auto 0;
}

/* Soral Group v2.7.3: encabezado del formulario de direcciones.
   Ocupa ambas columnas y va arriba de todo (fila 1); los demas campos
   se corren a partir de la fila 2. */
#address-form .address-form-header {
  grid-column: 1 / -1 !important;
  grid-row: 1 / 2 !important;
  display: block !important;
  width: 100% !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  min-height: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}
#address-form .address-form-header h4 {
  font-size: 17px;
  font-weight: 600;
  color: #14222E;
  margin: 0 0 4px;
}
#address-form .address-form-header p {
  font-size: 13.5px;
  color: #5a6b78;
  margin: 0;
  line-height: 1.45;
}

/* Campo oculto de id: display:none real, sin celda de grid. */
#address-form #id {
  display: none !important;
}

/* Columna izquierda — datos del cliente (filas 1..7).
   !important para que estas asignaciones no sean sobrescritas. */
#address-form #name             { grid-column: 1 !important; grid-row: 2 !important; }
#address-form #lastName         { grid-column: 1 !important; grid-row: 3 !important; }
#address-form #lastName2        { grid-column: 1 !important; grid-row: 4 !important; }
#address-form #alternativeName  { grid-column: 1 !important; grid-row: 5 !important; }
#address-form #phoneNumber      { grid-column: 1 !important; grid-row: 6 !important; }
#address-form #email            { grid-column: 1 !important; grid-row: 7 !important; }

/* Columna derecha — dirección (filas 1..6) */
#address-form #provinceId       { grid-column: 2 !important; grid-row: 2 !important; }
#address-form #localityId       { grid-column: 2 !important; grid-row: 3 !important; }
#address-form #city             { grid-column: 2 !important; grid-row: 4 !important; }
#address-form #address          { grid-column: 2 !important; grid-row: 5 !important; }
#address-form #remitter         { grid-column: 2 !important; grid-row: 6 !important; }
#address-form #note             { grid-column: 2 !important; grid-row: 7 !important; }

/* Botón a lo ancho, debajo de ambas columnas (fila 8) */
#address-form button[type="submit"] {
  grid-column: 1 / -1 !important;
  grid-row: 9 !important;
}

#address-form input[type="text"],
#address-form input[type="email"],
#address-form select,
#address-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  font-size: 15px;
  line-height: 1.3;
  color: #14222E;
  background-color: #fff;
  border: 1px solid #d6d6d6;
  border-radius: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#address-form textarea {
  min-height: 80px;
  resize: vertical;
}

#address-form input:focus,
#address-form select:focus,
#address-form textarea:focus {
  outline: none;
  border-color: #00AB55;
  box-shadow: 0 0 0 3px rgba(0, 171, 85, 0.15);
}

#address-form select:disabled {
  background-color: #f3f3f3;
  color: #999;
}

#address-form button[type="submit"] {
  width: 100%;
  padding: 12px 16px;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background-color: #00AB55;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#address-form button[type="submit"]:hover {
  background-color: #008f47;
}

/* En móvil: una sola columna; se neutralizan las filas explícitas.
   También con !important para ganarle a las reglas de desktop de arriba. */
@media (max-width: 768px) {
  #address-form {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
  #address-form .address-form-header,
  #address-form #name,
  #address-form #lastName,
  #address-form #lastName2,
  #address-form #alternativeName,
  #address-form #phoneNumber,
  #address-form #email,
  #address-form #provinceId,
  #address-form #localityId,
  #address-form #city,
  #address-form #address,
  #address-form #remitter,
  #address-form #note,
  #address-form button[type="submit"] {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
}

/* Título y lista del panel con algo de aire */
#addresses-panel h5 {
  font-size: 18px;
  font-weight: 600;
  margin: 4px 0 14px;
}

#addresses-list {
  margin-bottom: 14px;
}

/* Botón "Gestionar direcciones" (fuera del panel) en verde de marca */
#manage-addresses {
  background-color: #00AB55;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#manage-addresses:hover {
  background-color: #008f47;
}

/* ----- 2) Checkout (facturación / envío de WooCommerce + THWCFD) ----- */

/* Espaciado uniforme entre filas de campos */
.woocommerce-checkout .form-row {
  margin-bottom: 16px;
}

/* Labels legibles y con aire */
.woocommerce-checkout .form-row > label {
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #14222E;
}

/* Inputs, selects y textareas consistentes */
.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row textarea.input-text,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .select2-container .select2-selection--single {
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 15px;
  color: #14222E;
  background-color: #fff;
  border: 1px solid #d6d6d6;
  border-radius: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Alinear el texto del select2 con su alto */
.woocommerce-checkout .select2-container .select2-selection--single {
  display: flex;
  align-items: center;
}
.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 1.3;
  padding-left: 0;
}
.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 42px;
}

/* Foco en verde de marca */
.woocommerce-checkout .form-row input.input-text:focus,
.woocommerce-checkout .form-row textarea.input-text:focus,
.woocommerce-checkout .form-row select:focus,
.woocommerce-checkout .select2-container--default.select2-container--focus .select2-selection--single {
  outline: none;
  border-color: #00AB55;
  box-shadow: 0 0 0 3px rgba(0, 171, 85, 0.15);
}

/* Selector de dirección de Treew (el <select id="treew_selected_address">) */
#treew_selected_address {
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #d6d6d6;
  border-radius: 6px;
}

/* Encabezados de sección con algo de separación */
.woocommerce-checkout .woocommerce-billing-fields > h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_payment_heading {
  margin: 8px 0 16px;
  font-weight: 600;
}

/* Resumen del pedido: tabla con aire */
.woocommerce-checkout .shop_table {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}
.woocommerce-checkout .shop_table th,
.woocommerce-checkout .shop_table td {
  padding: 12px 14px;
}

/* Botón principal "Realizar el pedido" en verde de marca */
.woocommerce-checkout #place_order {
  background-color: #00AB55;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.woocommerce-checkout #place_order:hover {
  background-color: #008f47;
}

/* Campos de tarjeta (NMI) consistentes con el resto */
.woocommerce-checkout #wc-nmi-cc-form input.input-text {
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d6d6d6;
  border-radius: 6px;
}

/* En pantallas anchas, evitar que las dos columnas queden pegadas */
@media (min-width: 992px) {
  .woocommerce-checkout .details-check {
    padding-right: 24px;
  }
}
