.apple-toast-popup {
    /* El truco: bajarlo para que no tape el header ni el buscador */
    margin-top: 100px !important; 
    margin-right: 20px !important;
    
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(210, 210, 215, 0.8) !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.1) !important;
    padding: 8px 15px !important;
    width: auto !important; /* Que no sea muy ancho */
}

.apple-toast-title {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #1d1d1f !important;
}

/* Reducimos un poco el icono del toast para que sea discreto */
.swal2-icon {
    transform: scale(0.6) !important;
    margin: 0 !important;
}


/* 1. El Drawer (Panel Lateral) */
.side-cart {
    position: fixed;
    top: 0;
    right: -450px;
    width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.075, 0.82, 0.165, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 35px rgba(0,0,0,0.05);
}

.side-cart.active {
    right: 0;
}

/* 2. El Fondo Oscuro (Overlay) */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px); /* El toque Apple: desenfoque */
    z-index: 9999;
    display: none;
}

/* 3. Cabecera del Carrito */
.cart-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f2f2f2;
}

.cart-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #1d1d1f;
}

/* 4. El área de items (Aquí irá el scroll) */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* 5. Footer con totales (Fijo abajo) */
.cart-footer {
    padding: 24px;
    background: #ffffff; /* O un gris muy suave #f9f9f9 */
    border-top: 1px solid #f2f2f2;
    box-shadow: 0 -10px 20px rgba(0,0,0,0.02); /* Sombra hacia arriba sutil */
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 15px;
    color: #424245;
}

.summary-line.total {
    font-size: 19px;
    font-weight: 600;
    color: #1d1d1f;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #d2d2d7;
}

/* 6. Botones */
.btn-apple-checkout {
    width: 100%;
    background: #0071e3;
    color: #fff;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-apple-checkout:hover {
    background: #0077ed;
}

.btn-continue-shopping {
    width: 100%;
    background: transparent;
    color: #0071e3;
    border: none;
    font-size: 15px;
    cursor: pointer;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f5f5f7; /* La línea sutil que sugeriste */
}

.cart-item-img img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: #f5f5f7;
    border-radius: 8px;
}

.cart-item-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.btn-remove {
    background: none;
    border: none;
    color: #ff3b30;
    font-size: 12px;
    padding: 0;
    margin-top: 5px;
    cursor: pointer;
}

/* Cabecera del carrito */
/* La nueva "X" minimalista */
.close-cart {
    background: #f5f5f7; /* Gris muy clarito */
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%; /* Circular como Apple */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #86868b;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.close-cart:hover {
    background: #e8e8ed;
    color: #1d1d1f;
    transform: rotate(90deg); /* Un toque juguetón al girar */
}

.cart-item:last-child {
    border-bottom: none; /* Quitamos la línea al último para que no choque con el footer */
}

/* Imagen: Tamaño fijo y fondo neutro */
.cart-item-media {
    flex: 0 0 64px;
    height: 64px;
    background: #f5f5f7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cart-item-media img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

/* Detalles: Crece para ocupar el espacio central */
.cart-item-details {
    flex: 1;
    min-width: 0; /* Evita que nombres largos rompan el layout */
}

.cart-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Si el nombre es muy largo, pone ... */
}

.cart-item-pricing {
    font-size: 13px;
    color: #86868b;
}

.cart-price {
    font-weight: 600;
    color: #1d1d1f;
    margin-left: 4px;
}

/* Botón de eliminar: Discreto a la derecha */
.btn-delete-item {
    background: transparent;
    border: none;
    color: #d2d2d7; /* Gris suave por defecto */
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-item:hover {
    color: #ff3b30; /* Rojo Apple al pasar el mouse */
    background: #fff2f2;
}

/* Contenedor del Stepper (Píldora) */
/* El contenedor: más pequeño y minimalista */
.amazon-stepper {
    display: inline-flex;
    align-items: center;
    background: #f5f5f7; /* Gris sutil de fondo */
    border: none;
    border-radius: 10px; /* Menos redondeado, más moderno */
    padding: 2px;
    margin-top: 8px;
    height: 28px; /* Altura reducida */
}

.stepper-btn {
    background: transparent;
    border: none;
    width: 26px; /* Botones más pequeños */
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1d1d1f;
    font-size: 11px; /* Iconos pequeños */
    transition: all 0.2s;
}

.stepper-btn:hover {
    background: #e8e8ed;
    border-radius: 6px;
}

/* El icono de basura en rojo si el usuario se posiciona para eliminar */
.stepper-btn .fa-trash-o {
    color: #ff3b30;
}

.stepper-value {
    padding: 0 8px;
    font-weight: 500;
    font-size: 13px;
    color: #1d1d1f;
    min-width: 25px;
    text-align: center;
}

/* Ajuste del ítem para que el precio total de la fila quede a la derecha */
.cart-item {
    display: flex;
    padding: 16px 0;
    border-bottom: 1px solid #f5f5f7;
}

/* Alineación del precio total a la derecha */
.cart-item-total-price {
    margin-left: auto;
    font-weight: 600;
    font-size: 14px;
    color: #1d1d1f;
    white-space: nowrap;
}