/* =====================================================
   Pyrene Viajes — Carrito Flotante & Mini-Cart
   ===================================================== */

/* ---- Botón flotante ---- */
#pyrene-float-cart-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9990;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #4E0000;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 8px 32px rgba(78,0,0,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
    animation: pyrene-float-in 0.4s ease;
}

#pyrene-float-cart-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 40px rgba(78,0,0,0.45);
    background: #6e0000;
}

#pyrene-float-cart-btn.has-items {
    animation: pyrene-pulse 2.5s ease-in-out infinite;
}

@keyframes pyrene-float-in {
    from { opacity: 0; transform: scale(0.5) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes pyrene-pulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(78,0,0,0.35); }
    50%       { box-shadow: 0 8px 32px rgba(78,0,0,0.35), 0 0 0 8px rgba(78,0,0,0.12); }
}

.pyrene-float-icon { line-height: 1; }

.pyrene-float-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #fff;
    color: #4E0000;
    font-size: 11px;
    font-weight: 800;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #4E0000;
    line-height: 1;
}

.pyrene-float-count.hidden { display: none; }

/* ---- Overlay ---- */
#pyrene-minicart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9995;
    backdrop-filter: blur(2px);
    animation: pyrene-fade-in 0.25s ease;
}

#pyrene-minicart-overlay.open { display: block; }

@keyframes pyrene-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---- Panel Mini-Cart ---- */
#pyrene-minicart {
    position: fixed;
    top: 0;
    right: -420px;
    width: min(420px, 95vw);
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0,0,0,0.18);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

#pyrene-minicart.open { right: 0; }

/* Header del mini-cart */
.pyrene-minicart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #4E0000;
    color: #fff;
    flex-shrink: 0;
}

.pyrene-minicart-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.pyrene-mc-badge {
    background: #fff;
    color: #4E0000;
    font-size: 12px;
    font-weight: 800;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pyrene-minicart-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    opacity: 0.8;
    transition: opacity 0.15s;
    font-weight: 300;
}

.pyrene-minicart-close:hover { opacity: 1; }

/* Body — items */
.pyrene-minicart-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.pyrene-mc-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fafaf8;
    position: relative;
    transition: box-shadow 0.2s;
}

.pyrene-mc-item:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }

.pyrene-mc-item-img { flex-shrink: 0; }
.pyrene-mc-item-img img,
.pyrene-mc-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
}

.pyrene-mc-item-info { flex: 1; min-width: 0; }
.pyrene-mc-item-name { font-weight: 600; font-size: 14px; color: #111; margin-bottom: 4px; line-height: 1.3; }
.pyrene-mc-item-meta { font-size: 12px; color: #6b7280; margin-bottom: 6px; }
.pyrene-mc-item-row  { display: flex; align-items: center; justify-content: space-between; }
.pyrene-mc-item-qty  { font-size: 13px; color: #6b7280; }
.pyrene-mc-item-price { font-size: 14px; font-weight: 700; color: #4E0000; }

.pyrene-mc-item-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(220,38,38,0.1);
    color: #dc2626;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    text-decoration: none;
    transition: background 0.15s;
}

.pyrene-mc-item-remove:hover { background: rgba(220,38,38,0.2); }

/* Carrito vacío */
.pyrene-mc-empty {
    text-align: center;
    padding: 48px 24px;
    color: #6b7280;
}

.pyrene-mc-empty-icon { font-size: 52px; margin-bottom: 16px; }
.pyrene-mc-empty p    { font-size: 16px; margin-bottom: 16px; color: #374151; }
.pyrene-mc-shop-link  { color: #4E0000; font-weight: 600; text-decoration: none; }
.pyrene-mc-shop-link:hover { text-decoration: underline; }

/* Footer — total + botones */
.pyrene-minicart-footer {
    padding: 16px 24px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fafaf8;
    flex-shrink: 0;
}

.pyrene-mc-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 17px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.pyrene-mc-total strong { font-size: 20px; color: #4E0000; }

.pyrene-mc-actions { display: flex; flex-direction: column; gap: 10px; }

.pyrene-mc-btn {
    display: block;
    width: 100%;
    padding: 13px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.15s, transform 0.15s;
    cursor: pointer;
}

.pyrene-mc-btn:hover { opacity: 0.9; transform: translateY(-1px); text-decoration: none; }

.pyrene-mc-btn-primary {
    background: #4E0000;
    color: #fff !important;
}

.pyrene-mc-btn-secondary {
    background: transparent;
    color: #4E0000 !important;
    border: 2px solid #4E0000;
}

/* Badge en el menú de navegación */
#pyrene-cart-badge {
    transition: transform 0.2s;
}

#pyrene-cart-badge:not(.hidden) { transform: scale(1); }
