/* ==========================================================
   SK Wishlist v1.0 — Estilos del botón y panel de Mi Cuenta
   Compatible con: Astra Theme / WooCommerce / WordPress 6.9+
   ========================================================== */

/* ----------------------------------------------------------
   1) Botón de favoritos — Ficha de producto individual
   Ubicación: En su propia línea independiente debajo del carrito
   ---------------------------------------------------------- */

.shoka-wl-wrap {
    display: block !important;
    clear: both !important;
    width: 100% !important;
    margin-top: 14px !important;
    margin-bottom: 10px !important;
}

.shoka-wl-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    color: #666;
    font-size: 0.88rem;
    font-weight: 300;
    font-family: inherit;
    letter-spacing: 0.2px;
    line-height: 1;
    transition: color 0.2s ease;
    text-decoration: none !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none;
    appearance: none;
}

/* Al pasar el mouse: ÚNICAMENTE cambia el color del texto a rojo Shoka */
.shoka-wl-btn:hover {
    color: #FF3053 !important;
    background: transparent !important;
}

/* Ícono SVG del corazón */
.shoka-wl-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: fill 0.2s ease, stroke 0.2s ease;
    /* Estado por defecto: contorno lineal fino, sin relleno */
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

/* Estado activo (guardado): corazón relleno en rojo #FF3053 */
.shoka-wl-btn.shoka-wl-active {
    color: #FF3053 !important;
}

.shoka-wl-btn.shoka-wl-active .shoka-wl-icon {
    fill: #FF3053 !important;
    stroke: #FF3053 !important;
}

.shoka-wl-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* ----------------------------------------------------------
   2) Toast de confirmación sutil (Centrado superior)
   ---------------------------------------------------------- */

.shoka-wl-toast {
    position: fixed;
    top: 30px;
    left: 50%;
    z-index: 99999;
    background: rgba(18, 18, 18, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
    padding: 10px 22px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.84rem;
    font-weight: 400;
    white-space: nowrap;

    /* Posicionamiento centrado y animación sutil de caída */
    transform: translateX(-50%) translateY(-15px);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
    pointer-events: none;
}

.shoka-wl-toast.shoka-wl-toast--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.shoka-wl-toast-icon {
    color: #FF3053;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.shoka-wl-toast-text {
    line-height: 1;
}

.shoka-wl-toast-text strong {
    font-weight: 600;
    color: #fff;
}

/* Enlace a la pestaña de favoritos en Mi Cuenta dentro del Toast */
.shoka-wl-toast-text a {
    color: #FF3053 !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
    margin-left: 2px;
    transition: color 0.15s ease;
}

.shoka-wl-toast-text a:hover {
    color: #ff607d !important;
}

/* Ajuste para la barra de administración de WordPress */
body.admin-bar .shoka-wl-toast {
    top: 60px;
}

/* ----------------------------------------------------------
   3) Mi Cuenta — Grid de favoritos con botón 'X' flotante
   ---------------------------------------------------------- */

.shoka-wl-account-empty {
    text-align: center;
    padding: 40px 20px;
    color: #555;
}

.shoka-wl-account-empty .button {
    margin-top: 16px;
    display: inline-block;
}

.shoka-wl-account-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax(200px, 1fr) );
    gap: 18px;
    margin-top: 20px;
}

.shoka-wl-account-card {
    position: relative;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.shoka-wl-account-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* Botón 'X' sutil y rápido en la esquina superior derecha */
.shoka-wl-remove-btn {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 10 !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.55) !important;
    color: #fff !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 11px !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0.85;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
}

.shoka-wl-remove-btn:hover {
    background: #FF3053 !important;
    color: #fff !important;
    opacity: 1;
    transform: scale(1.1);
}

.shoka-wl-account-image {
    display: block;
    overflow: hidden;
}

.shoka-wl-account-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.shoka-wl-account-info {
    padding: 12px 14px 8px;
    flex: 1;
}

.shoka-wl-account-name {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    margin-bottom: 4px;
    line-height: 1.3;
}

.shoka-wl-account-name:hover {
    color: #FF3053;
}

.shoka-wl-variation {
    font-weight: 400;
    color: #777;
    font-size: 0.80rem;
}

.shoka-wl-account-price {
    font-size: 0.92rem;
    font-weight: 700;
    color: #111;
}

.shoka-wl-account-actions {
    padding: 8px 14px 14px;
}

.shoka-wl-buy-btn {
    width: 100%;
    background: #111 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    text-align: center;
    font-size: 0.82rem;
    padding: 8px 0 !important;
    transition: background 0.2s ease !important;
}

.shoka-wl-buy-btn:hover {
    background: #FF3053 !important;
}

/* ----------------------------------------------------------
   4) Admin — Panel de Analítica
   ---------------------------------------------------------- */

.shoka-wl-admin h1 {
    margin-bottom: 20px;
}

.shoka-wl-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.shoka-wl-filters select {
    height: 34px;
    padding: 0 10px;
    border-radius: 4px;
}

.shoka-wl-table img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
}

.shoka-wl-count {
    font-size: 1.05rem;
    color: #FF3053;
}

.shoka-wl-breakdown-row td {
    background: #fafafa;
    padding: 12px 20px;
}

.shoka-wl-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.shoka-wl-breakdown-table th,
.shoka-wl-breakdown-table td {
    text-align: left;
    padding: 6px 12px;
    border-bottom: 1px solid #e5e5e5;
}

.shoka-wl-breakdown-table th {
    font-weight: 600;
    color: #444;
}

/* ----------------------------------------------------------
   5) Responsive
   ---------------------------------------------------------- */

@media (max-width: 480px) {
    .shoka-wl-toast {
        top: 20px;
        font-size: 0.78rem;
        padding: 8px 16px;
    }

    body.admin-bar .shoka-wl-toast {
        top: 56px;
    }

    .shoka-wl-account-grid {
        grid-template-columns: repeat( 2, 1fr );
        gap: 10px;
    }

    .shoka-wl-account-image img {
        height: 150px;
    }
}
