/**
 * Fornata Cart Icon - Estilos del icono del carrito para el header.
 *
 * Replica las reglas de .fornata-kiosk__header-cart de fornata-kiosk.css
 * (el estilo creado en /tienda) como hoja standalone, con fallbacks en cada
 * var() para que funcione también en páginas donde el CSS del quiosco no
 * está cargado. Si fornata-kiosk.css SÍ está presente, sus variables mandan
 * y el resultado es idéntico al de /tienda.
 *
 * @package Fornata_Custom
 */

/* El enlace se comporta como el botón de /tienda. */
.fornata-kiosk__header-cart.fornata-cart-icon {
    text-decoration: none;
    flex-shrink: 0;
}

.fornata-kiosk__header-cart {
    position: relative;
    width: 54px;
    height: 54px;
    border: 2px solid var(--fk-secondary, #649F91);
    border-radius: 50%;
    background-color: var(--fk-surface, #ffffff);
    color: var(--fk-secondary-dark, rgb(78, 126, 113));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 200ms ease, transform 200ms ease;
}

.fornata-kiosk__header-cart svg {
    width: 28px;
    height: 28px;
}

.fornata-kiosk__header-cart:hover {
    background-color: var(--fk-secondary-light, rgb(226, 239, 235));
    transform: scale(1.05);
}

/* Globo de cantidades: base común (el color y el tamaño los pone el
   contexto: icono del header en verde, flotante en rojo). */
[data-fornata-cart-count] {
    position: absolute;
    border-radius: 50%;
    color: #fff;
    font-weight: 800;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

[data-fornata-cart-count][hidden] {
    display: none !important;
}

.fornata-cart-icon [data-fornata-cart-count] {
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    font-size: 0.68rem;
    background-color: var(--fk-secondary, #649F91);
}

/* --------------------------------------------------------------------------
   Botón flotante del carrito para todo el sitio (réplica del de /tienda).
   Visible siempre (móvil y escritorio), fijo abajo a la derecha.
   -------------------------------------------------------------------------- */
.fornata-cart-floating {
    display: inline-flex;
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 60;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--fk-secondary, #649F91);
    color: #fff;
    box-shadow: var(--fk-shadow-lg, 0 10px 40px rgba(44, 36, 32, 0.15));
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 200ms ease, background-color 200ms ease;
}

.fornata-cart-floating:hover {
    transform: scale(1.08);
    background-color: var(--fk-secondary-dark, rgb(78, 126, 113));
}

.fornata-cart-floating svg {
    width: 28px;
    height: 28px;
}

.fornata-cart-floating [data-fornata-cart-count] {
    top: -4px;
    right: -4px;
    min-width: 26px;
    height: 26px;
    font-size: 0.85rem;
    background-color: var(--fk-danger, #c0392b);
}

/* Tamaño reducido para el header del sitio (no es el botón táctil del
   quiosco de /tienda, que mantiene sus 54 px). */
.fornata-kiosk__header-cart.fornata-cart-icon {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
}

.fornata-kiosk__header-cart.fornata-cart-icon:hover {
    background-color: transparent;
}

.fornata-kiosk__header-cart.fornata-cart-icon svg {
    width: 19px;
    height: 19px;
}

@media (max-width: 768px) {
    .fornata-kiosk__header-cart {
        width: 50px;
        height: 50px;
    }

    .fornata-kiosk__header-cart svg {
        width: 27px;
        height: 27px;
    }

    .fornata-kiosk__header-cart.fornata-cart-icon {
        width: 32px;
        height: 32px;
    }

    .fornata-kiosk__header-cart.fornata-cart-icon svg {
        width: 18px;
        height: 18px;
    }
}
