/* ==========================================================================
   CSS EXCLUSIVO PARA MÓVILES - ESTILO CUADRÍCULA (GRID) MODERNO
   ========================================================================== */

.wcac-container {
    padding: 15px;
    background-color: #f9f9f9; /* Fondo gris claro detrás de las tarjetas */
}

/* --- 1. FILTROS / TABS REESTRUCTURADOS A REJILLA DE 2 COLUMNAS --- */
.wcac-filters {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* Dos columnas perfectas */
    gap: 12px !important; /* Espaciado limpio entre tarjetas */
    padding: 15px 0 !important;
    margin-bottom: 25px !important;
    border-bottom: none !important;
    overflow-x: visible !important; /* Eliminamos el scroll horizontal */
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Estilo de Tarjetas Basado en la Referencia */
.wcac-filter {
    flex: none !important;
    width: 100% !important; /* Ocupa todo el ancho de su celda en la rejilla */
    min-width: 0 !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important; /* Borde sutil gris/azul claro */
    padding: 20px 10px !important;
    border-radius: 12px !important; /* Esquinas bien redondeadas */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important; /* Sombra muy suave */
}

/* Estado Activo / Seleccionado (Color salmón/tierra suave según la referencia) */
.wcac-filter.active {
    border-color: #e2b6a6 !important; /* Borde activo sutil */
    background-color: #fcf1ed !important; /* Fondo crema/salmón muy claro */
}

/* Iconos dentro de las tarjetas */
.wcac-filter-icon {
    width: 45px !important; /* Un poco más grandes para que luzcan */
    height: 45px !important;
    margin-bottom: 12px !important;
    opacity: 0.9 !important;
    object-fit: contain !important;
}

/* Texto de las tarjetas */
.wcac-filter span {
    font-size: 13px !important; /* Texto legible */
    text-transform: capitalize !important; /* Formato normal de lectura (no todo mayúsculas) */
    font-weight: 500 !important;
    color: #334155 !important; /* Color de texto suave y moderno */
    text-align: center !important;
    line-height: 1.2 !important;
}

/* Cambia el color de texto si la tarjeta está activa */
.wcac-filter.active span {
    color: #b25e43 !important; /* Tono marrón/óxido elegante para el texto activo */
    font-weight: 600 !important;
}

/* --- 2. TÍTULOS DE GRUPO --- */
.wcac-group-title {
    font-family: inherit;
    font-size: 1.4em !important;
    color: #1e293b;
    margin: 25px 0 15px !important;
    text-align: left;
    border-bottom: 2px solid #2185d0;
    padding-bottom: 10px;
    display: inline-block;
}

/* --- 3. TRANSFORMAR TABLA EN TARJETAS (CARDS) --- */
.wcac-table, 
.wcac-table thead, 
.wcac-table tbody, 
.wcac-table tr, 
.wcac-table td { 
    display: block; 
    width: 100%;
}

.wcac-table {
    border: none;
    margin-bottom: 30px !important;
}

.wcac-table thead { display: none; }

.wcac-row {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* --- 4. DISEÑO INTERNO DE LA TARJETA --- */
.wcac-image, 
.wcac-alt-image {
    display: inline-block;
    width: 49%;
    text-align: center;
    border: none !important;
    margin-bottom: 15px;
    padding: 0 !important;
    vertical-align: top;
}

.wcac-table img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

.wcac-sku {
    color: #999;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    text-align: left;
    border: none !important;
    padding: 0 !important;
}

.wcac-desc {
    font-size: 16px !important;
    line-height: 1.3;
    color: #333;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: left;
    border: none !important;
    padding: 0 !important;
}

.wcac-price {
    color: #1a1a1a;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: left;
    border: none !important;
    padding: 0 !important;
}

.wcac-price del {
    color: #999;
    font-size: 0.8em;
    font-weight: normal;
    margin-right: 8px;
}

.wcac-price ins {
    text-decoration: none;
    color: #1e7a35;
}

/* --- 5. ACCIONES --- */
.wcac-qty, 
.wcac-cart {
    display: inline-block;
    width: 50%;
    border: none !important;
    padding: 0 !important;
    vertical-align: middle;
}

.wcac-qty-input {
    width: 90% !important;
    height: 48px;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.wcac-add-to-cart {
    width: 100% !important;
    height: 48px;
    background-color: #2185d0 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
}

.wcac-table td {
    padding: 0;
    line-height: 1;
}

/* --- 6. DESCRIPCIÓN Y READ MORE --- */
.wcac-description-wrapper {
    margin-bottom: 25px;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
}

.wcac-shortened-description {
    max-height: 120px;
    overflow: hidden;
    transition: max-height 0.5s ease;
    position: relative;
    line-height: 1.5;
    font-size: 14px;
    color: #444;
}

.wcac-shortened-description::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(transparent, #fff);
}

.wcac-shortened-description.expanded {
    max-height: 10000px;
}

.wcac-shortened-description.expanded::after {
    opacity: 0;
    pointer-events: none;
}

#wcac-read-more-btn {
    background: none;
    border: none;
    color: #2185d0;
    text-decoration: underline;
    font-weight: bold;
    cursor: pointer;
    padding: 12px 0;
    font-size: 14px;
    display: inline-block;
}