/**
 * AcuaCheckout - Estilos del Carrito Flotante y Drawer Lateral
 */

:root {
    --acua-primary: #0088cc;
    --acua-primary-dark: #006699;
    --acua-accent: #2ecc71;
    --acua-dark: #1e293b;
    --acua-gray-100: #f8fafc;
    --acua-gray-200: #e2e8f0;
    --acua-gray-400: #94a3b8;
    --acua-gray-600: #475569;
    --acua-danger: #ef4444;
    --acua-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* ======================================================== */
/* 1. Botón Burbuja Flotante                                */
/* ======================================================== */
.acua-floating-cart-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #0088cc 0%, #005f9e 100%);
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(0, 136, 204, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    z-index: 99998;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
}

.acua-floating-cart-btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 28px rgba(0, 136, 204, 0.55);
}

.acua-cart-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.acua-cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    min-width: 19px;
    height: 19px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #ffffff;
    animation: acuaPop 0.3s ease-in-out;
}

.acua-cart-quick-amount {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.acua-quick-usd {
    font-size: 14px;
    font-weight: 700;
}

.acua-quick-ves {
    font-size: 11px;
    opacity: 0.85;
}

/* ======================================================== */
/* 2. Overlay Oscuro                                        */
/* ======================================================== */
.acua-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.acua-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ======================================================== */
/* 3. Drawer Lateral                                        */
/* ======================================================== */
.acua-cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #ffffff;
    z-index: 100000;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.acua-cart-drawer.active {
    right: 0;
}

.acua-drawer-header {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--acua-gray-200);
}

.acua-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.acua-header-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--acua-dark);
}

.acua-items-tag {
    background: #e0f2fe;
    color: #0284c7;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.acua-close-drawer-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--acua-gray-400);
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
    transition: color 0.2s;
}

.acua-close-drawer-btn:hover {
    color: var(--acua-danger);
}

.acua-drawer-rate-bar {
    background: #f0fdf4;
    color: #166534;
    padding: 8px 20px;
    font-size: 12px;
    border-bottom: 1px solid #bbf7d0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.acua-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

/* Empty State */
.acua-cart-empty-state {
    text-align: center;
    padding: 50px 20px;
}

.acua-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.acua-cart-empty-state h4 {
    margin: 0 0 6px;
    font-size: 18px;
    color: var(--acua-dark);
}

.acua-cart-empty-state p {
    margin: 0;
    font-size: 13px;
    color: var(--acua-gray-400);
}

/* Cart Items */
.acua-cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.acua-cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--acua-gray-100);
    border: 1px solid var(--acua-gray-200);
    border-radius: 10px;
    transition: border-color 0.2s;
}

.acua-cart-item:hover {
    border-color: #cbd5e1;
}

.acua-item-img {
    width: 65px;
    height: 65px;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.acua-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.acua-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.acua-item-name {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--acua-dark);
    line-height: 1.25;
}

.acua-item-sku {
    font-size: 11px;
    color: var(--acua-gray-400);
    margin-bottom: 4px;
}

.acua-item-prices {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 6px;
}

.acua-usd-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--acua-primary);
}

.acua-ves-price {
    font-size: 11px;
    color: var(--acua-gray-600);
}

.acua-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.acua-qty-selector {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--acua-gray-200);
    border-radius: 6px;
    overflow: hidden;
}

.acua-qty-btn {
    background: none;
    border: none;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-weight: 700;
    color: var(--acua-dark);
    transition: background 0.15s;
}

.acua-qty-btn:hover {
    background: var(--acua-gray-200);
}

.acua-qty-input {
    width: 32px;
    height: 26px;
    border: none;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    -moz-appearance: textfield;
}

.acua-qty-input::-webkit-outer-spin-button,
.acua-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.acua-remove-item-btn {
    background: none;
    border: none;
    color: var(--acua-danger);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}

.acua-remove-item-btn:hover {
    background: #fee2e2;
}

/* Footer Totales */
.acua-drawer-footer {
    padding: 18px 20px;
    border-top: 1px solid var(--acua-gray-200);
    background: #ffffff;
}

.acua-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.acua-total-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--acua-dark);
}

.acua-total-values {
    text-align: right;
}

.acua-total-usd-val {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--acua-primary);
}

.acua-total-ves-val {
    display: block;
    font-size: 12px;
    color: var(--acua-gray-600);
}

.acua-btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #0088cc;
    color: #ffffff;
    text-decoration: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    transition: background 0.2s, transform 0.1s;
    box-sizing: border-box;
}

.acua-btn-checkout:hover {
    background: #006699;
    color: #ffffff;
}

@keyframes acuaPop {
    0% { transform: scale(0.6); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@media (max-width: 480px) {
    .acua-floating-cart-btn {
        bottom: 16px;
        right: 16px;
        padding: 10px 14px;
    }
    .acua-cart-drawer {
        max-width: 100%;
    }
}
