/**
 * cart-empty.css — Estado "Carrito Vacío"
 * Rodio Divi Child v2.0
 *
 * NUEVO ARCHIVO — reemplaza cart-empty.css anterior.
 * NO modifica bestsellers-carousel.css ni ningún otro archivo existente.
 *
 * Las secciones de carrusel (Guardados, Más vendidos, Ofertas) usan
 * EXACTAMENTE las mismas clases rod-bs-* del carrusel aprobado.
 * Este archivo solo agrega lo que rod-bs-* NO cubre:
 *   · Hero (SVG + título + botones CTA)
 *   · Grid de categorías
 *   · Band de beneficios
 *   · Variantes específicas del saved-card (Mover al carrito / Agotado)
 *   · Espaciado entre secciones
 *   · Ocultar bloque WC nativo
 *
 * Cargado solo cuando: is_cart() && WC()->cart->is_empty()
 */

/* =============================================================================
 * 0. WRAPPER RAÍZ — scope de todo el diseño
 * ============================================================================= */
.rodio-cart-empty-wrap {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: #f9fafb;
    padding-bottom: 3rem;
}

.rodio-cart-empty-wrap *,
.rodio-cart-empty-wrap *::before,
.rodio-cart-empty-wrap *::after {
    box-sizing: border-box;
}

/* Contenedor centrado — mismo max-width que el carrito lleno */
.rodio-empty-inner {
    max-width: 960px;
    margin:    0 auto;
    padding:   0 1rem;
}

/* Separación entre secciones de carrusel */
.rodio-empty-carousel-section {
    margin-bottom: 2.5rem;
}

/* =============================================================================
 * 1. HERO — SVG + "Tu carrito está vacío" + botones
 * ============================================================================= */
.rodio-empty-hero {
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    text-align:      center;
    padding:         3.5rem 1rem 3rem;
    margin-bottom:   2.5rem;
}

.rodio-empty-hero__svg {
    width:       148px;
    height:      148px;
    flex-shrink: 0;
}

.rodio-empty-hero__title {
    font-size:   1.3rem   !important;
    font-weight: 700      !important;
    color:       #111827  !important;
    margin:      1.25rem 0 0.375rem !important;
    line-height: 1.3      !important;
    padding:     0        !important;
}

.rodio-empty-hero__subtitle {
    font-size:   0.9rem;
    color:       #6b7280;
    margin:      0 0 1.75rem;
    line-height: 1.5;
}

.rodio-empty-hero__actions {
    display:         flex;
    align-items:     center;
    gap:             0.75rem;
    flex-wrap:       wrap;
    justify-content: center;
}

/* Botón primario — idéntico a .rod-bs-add-to-cart */
.rodio-empty-hero__btn-primary {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    gap:             0.3rem;
    padding:         0.5rem 1.25rem;
    border-radius:   0.5rem;
    border:          none;
    background:      #00B3A6;
    color:           #fff;
    font-size:       0.875rem;
    font-weight:     600;
    text-decoration: none;
    cursor:          pointer;
    transition:      background 150ms ease, transform 150ms ease;
    min-height:      2.25rem;
    white-space:     nowrap;
}

.rodio-empty-hero__btn-primary:hover {
    background:      #009688;
    color:           #fff;
    text-decoration: none;
}

.rodio-empty-hero__btn-primary:active { transform: scale(0.97); }

/* Botón secundario — idéntico a .rod-bs-card__link */
.rodio-empty-hero__btn-secondary {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    gap:             0.3rem;
    padding:         0.5rem 1.25rem;
    border-radius:   0.5rem;
    border:          1px solid #e5e7eb;
    background:      #ffffff;
    color:           #111827;
    font-size:       0.875rem;
    font-weight:     600;
    text-decoration: none;
    cursor:          pointer;
    transition:      border-color 150ms ease, color 150ms ease;
    min-height:      2.25rem;
    white-space:     nowrap;
}

.rodio-empty-hero__btn-secondary:hover {
    border-color:    #00B3A6;
    color:           #00B3A6;
    text-decoration: none;
}

/* Divisor entre hero y secciones */
.rodio-empty-divider {
    border:     none;
    border-top: 1px solid #f3f4f6;
    margin:     0 0 2.5rem;
}

/* =============================================================================
 * 2. TÍTULO DE SECCIÓN — emoji + texto
 *    Extiende .rod-bs-title para soportar el emoji delante
 * ============================================================================= */
.rod-bs-title-wrap {
    display:     flex;
    align-items: center;
    gap:         0.4rem;
    line-height: 1.2;
}

/* El span del emoji */
.rod-bs-title-icon {
    font-size:   1.1rem;
    line-height: 1;
    flex-shrink: 0;
    /* evita que el emoji herede transformaciones de Divi */
    font-style:  normal;
    font-weight: normal;
}

/* Contador de items (ej: "(5)") */
.rod-bs-title-count {
    font-size:   1rem;
    font-weight: 400;
    color:       #6b7280;
}

/* =============================================================================
 * 3. CATEGORÍAS — grid de acceso rápido
 * ============================================================================= */
.rodio-empty-categories {
    margin-bottom: 2.5rem;
}

.rodio-empty-categories__grid {
    display:               grid;
    grid-template-columns: repeat(4, 1fr);
    gap:                   0.75rem;
    margin-top:            1rem;
}

@media (max-width: 900px) {
    .rodio-empty-categories__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .rodio-empty-categories__grid { grid-template-columns: 1fr 1fr; }
}

/* Pill — misma estética que rod-bs-card */
.rodio-cat-pill {
    display:         flex;
    align-items:     center;
    gap:             0.625rem;
    padding:         0.75rem 1rem;
    background:      #ffffff;
    border:          1px solid #f3f4f6;
    border-radius:   0.5rem;
    text-decoration: none;
    cursor:          pointer;
    transition:      border-color 150ms ease, box-shadow 150ms ease;
}

.rodio-cat-pill:hover {
    border-color:    #e5e7eb;
    box-shadow:      0 4px 12px rgba(0, 0, 0, 0.06);
    text-decoration: none;
}

.rodio-cat-pill__icon {
    width:           36px;
    height:          36px;
    border-radius:   0.375rem;
    background:      #f9fafb;
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       1.1rem;
    flex-shrink:     0;
    overflow:        hidden;
}

.rodio-cat-pill__icon img {
    width:      24px;
    height:     24px;
    object-fit: contain;
}

.rodio-cat-pill__label {
    font-size:   0.8rem;
    font-weight: 600;
    color:       #111827;
    line-height: 1.3;
}

/* =============================================================================
 * 4. BOTONES DE ACCIÓN DENTRO DEL CARRITO VACÍO
 *    Dentro de .rodio-cart-empty-wrap, todos los botones de producto
 *    (Agregar, Ver opciones, Mover al carrito) usan el estilo verde
 *    del hero (.rodio-empty-hero__btn-primary).
 * ============================================================================= */

/* rod-bs-add-to-cart: hereda estilo verde del hero */
.rodio-cart-empty-wrap .rod-bs-add-to-cart {
    background:  #00B3A6;
    border:      none;
    color:       #fff;
    transition:  background 150ms ease, transform 150ms ease;
}

.rodio-cart-empty-wrap .rod-bs-add-to-cart:hover:not(:disabled) {
    background: #009688;
    color:      #fff;
}

.rodio-cart-empty-wrap .rod-bs-add-to-cart:active {
    transform: scale(0.97);
}

/* rod-bs-card__link (Ver opciones — productos variables):
   mismo estilo verde sólido */
.rodio-cart-empty-wrap .rod-bs-card__link {
    background:   #00B3A6;
    border:       none;
    color:        #fff;
    transition:   background 150ms ease, transform 150ms ease;
}

.rodio-cart-empty-wrap .rod-bs-card__link:hover {
    background:      #009688;
    border-color:    transparent;
    color:           #fff;
    text-decoration: none;
}

.rodio-cart-empty-wrap .rod-bs-card__link:active {
    transform: scale(0.97);
}

/* =============================================================================
 * 4b. VARIANTES ESPECÍFICAS DE SAVED CARD
 *     Solo estos dos elementos son nuevos: "Mover al carrito" y "Agotado"
 * ============================================================================= */

/* "Mover al carrito" — botón teal sólido (igual a rod-bs-add-to-cart) */
.rod-bs-card__move-btn {
    flex:            1;
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    gap:             0.3rem;
    padding:         0.4rem 0.7rem;
    border-radius:   0.5rem;
    font-size:       0.75rem;
    font-weight:     600;
    cursor:          pointer;
    border:          none;
    background:      #00B3A6;
    color:           #fff;
    transition:      background 150ms ease, transform 150ms ease;
    white-space:     nowrap;
    text-decoration: none;
    line-height:     1;
    min-height:      2rem;
}

.rod-bs-card__move-btn svg {
    width:       13px;
    height:      13px;
    flex-shrink: 0;
}

.rod-bs-card__move-btn:hover {
    background:      #009688;
    color:           #fff;
    text-decoration: none;
}

.rod-bs-card__move-btn:active { transform: scale(0.97); }

/* "Agotado" — estado desactivado neutral */
.rod-bs-card__oos {
    flex:         1;
    display:      block;
    text-align:   center;
    background:   #f9fafb;
    color:        #6b7280;
    border:       1px solid #f3f4f6;
    border-radius: 0.5rem;
    padding:      0.4rem 0.7rem;
    font-size:    0.75rem;
    font-weight:  500;
    min-height:   2rem;
    line-height:  calc(2rem - 2px);
    white-space:  nowrap;
}

/* Botón eliminar (X) en saved card — posicionado sobre la imagen */
.rod-bs-card__remove-btn {
    position:        absolute;
    top:             0.5rem;
    right:           0.5rem;
    z-index:         3;
    width:           24px;
    height:          24px;
    border-radius:   50%;
    background:      #ffffff;
    border:          none;
    box-shadow:      0 1px 4px rgba(0, 0, 0, 0.15);
    display:         flex;
    align-items:     center;
    justify-content: center;
    cursor:          pointer;
    opacity:         0;
    transition:      opacity 150ms ease, color 150ms ease;
    color:           #6b7280;
    padding:         0;
    line-height:     0;
}

.rod-bs-card__remove-btn svg {
    width:  11px;
    height: 11px;
    stroke: currentColor;
}

/* Mostrar X al hover de la CARD, no del botón */
.rod-bs-card:hover .rod-bs-card__remove-btn {
    opacity: 1;
}

.rod-bs-card__remove-btn:hover {
    color: #dc2626;
}

/* =============================================================================
 * 5. BENEFITS STRIP
 * ============================================================================= */
.rodio-empty-benefits {
    margin-top:  3rem;
    padding-top: 2rem;
    border-top:  1px solid #f3f4f6;
}

.rodio-empty-benefits__grid {
    display:               grid;
    grid-template-columns: repeat(4, 1fr);
    gap:                   1.5rem;
}

@media (max-width: 900px) {
    .rodio-empty-benefits__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .rodio-empty-benefits__grid { grid-template-columns: 1fr; }
}

.rodio-empty-benefit-item {
    display:     flex;
    align-items: center;
    gap:         0.625rem;
}

.rodio-empty-benefit-item__icon {
    font-size:   1.1rem;
    flex-shrink: 0;
}

.rodio-empty-benefit-item__label {
    font-size:   0.8rem;
    color:       #6b7280;
    line-height: 1.4;
    margin:      0;
}

/* =============================================================================
 * 6. OCULTAR BLOQUE NATIVO DE WC VACÍO
 * ============================================================================= */
.rodio-wc-cart-block .wp-block-woocommerce-empty-cart-block {
    display: none !important;
}


/* =============================================================================
 * 7. ICONOS DE DIVI
 *    Clases para evitar que los emojis del título hereden transformaciones de Divi
 * ============================================================================= */
 /* ==========================================================
   DIVI ICONS (ETmodules)
   ========================================================== */

.rod-divi-icon::before {
    font-family: "ETmodules" !important;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    speak: none;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Explorar por categoría */
.rod-divi-icon--categories::before {
    content: "\e013";
}

/* Guardados / Wishlist */
.rod-divi-icon--wishlist::before {
    content: "\e030";
}

/* Más vendidos */
.rod-divi-icon--trending::before {
    content: "\e0e3";
}

/* Ofertas */
.rod-divi-icon--offers::before {
    content: "\e018";
}

/* Carrito */
.rod-divi-icon--cart::before {
    content: "\e015";
}

/* Envíos */
.rod-divi-icon--shipping::before {
    content: "\e01d";
}

/* Facturación */
.rod-divi-icon--invoice::before {
    content: "\7e";
}

/* Soporte */
.rod-divi-icon--support::before {
    content: "\e010";
}

/* Garantía / Seguridad */
.rod-divi-icon--shield::before {
    content: "\e001";
}

/* ==========================================================
   ESTILO VISUAL DE LOS ICONOS
   ========================================================== */

.rod-divi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--rod-primary, #34c505);
    font-size: 1.1rem;
    width: 1.25em;
    height: 1.25em;
}

/* Títulos de sección */
.rod-bs-title-icon.rod-divi-icon {
    font-size: 1.2rem;
    margin-right: .45rem;
}

/* Beneficios */
.rodio-empty-benefit-item__icon.rod-divi-icon {
    font-size: 1.6rem;
    color: var(--rod-primary, #34c505);
}

/* Categorías */
.rodio-cat-pill__icon.rod-divi-icon {
    font-size: 1.15rem;
}
