/* Animación de aparición */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.data-content input, input.data-content {
    color: #000000 !important;
}

#seccionEnvio {
    animation: fadeIn 0.4s ease-out forwards;
}

.single-profile-data .data-content {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 50%;
    flex: 38% 0 0;
}

.single-profile-data .title {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
    width: 58%;
    max-width: 58%;
}

/* Estilos para el mapa */
#map, #mapEnvio {
    height: 400px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-top: 10px;
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

#mapLoading, #mapLoadingEnvio {
    background-color: rgba(255, 255, 255, 0.9);
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.map-toggle-btn, .map-toggle-btn-envio {
    margin-top: 10px;
    cursor: pointer;
    color: #0d6efd;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.map-toggle-btn:hover, .map-toggle-btn-envio:hover {
    text-decoration: underline;
}

.map-container { position: relative; margin: 15px 0; }

.map-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.location-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.location-btn:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

/* Estilos para alertas */
.custom-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    border-radius: 5px;
    color: white;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: calc(100% - 40px);
    word-wrap: break-word;
}
.custom-alert.show { opacity: 1; }
.custom-alert.info { background-color: rgb(0, 173, 239); }
.custom-alert.warning { background-color: #0d6efd; color: #ffffff; }
.custom-alert.error { background-color: #dc3545; }

/* Contenedor de cada opción de envío */
.opcion-envio-item .form-check {
    background: #ffffff;
    border: 2px solid #e9ecef;
    transition: all 0.2s ease;
    border-radius: 10px;
    padding: 18px !important;
    position: relative;
}
.opcion-envio-item .form-check:hover {
    border-color: #00adef;
    background: #fafbfc;
}
.opcion-envio-item .form-check:has(.opcion-envio-combinado:checked) {
    background: #d8dbdd;
    border-color: #00adef;
    border-width: 2px;
}
.opcion-envio-combinado {
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #dee2e6 !important;
    cursor: pointer;
}
.opcion-envio-combinado:checked {
    background-color: #159dd1 !important;
    border-color: #3bb373 !important;
}
.opcion-envio-item .form-check:has(.opcion-envio-combinado:checked) h6 {
    color: #222527;
    font-weight: 600;
}
.opcion-envio-item .form-check:has(.opcion-envio-combinado:checked) .text-success {
    color: #00698f !important;
}
.detalles-opcion {
    background: rgba(0, 173, 239, 0.03);
    padding: 10px;
    border-radius: 6px;
    margin-top: 8px;
}
.opcion-envio-item .form-check:has(.opcion-envio-combinado:checked) .detalles-opcion {
    background: rgb(0 173 239 / 47%);
}
.grupo-transporte { margin-bottom: 2rem; }
.grupo-transporte h6 {
    background: linear-gradient(135deg, #00adef, #86d8f7);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 1.05rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Resumen del carrito */
.resumen-carrito {
    background: linear-gradient(135deg, #00adef, #86d8f7);
    color: white;
    border: none;
    border-radius: 10px;
}
.resumen-carrito strong { color: white; }
.badge.bg-primary { background-color: #00adef !important; }

/* BARRA DE TOTAL FIJA (STICKY BOTTOM BAR) */
.cart-amount-area-fixed {
    position: fixed;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 2px solid #00adef;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 12px 15px;
    display: none;
    animation: slideUpBar 0.3s ease;
}
@keyframes slideUpBar {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.cart-amount-area-fixed .d-flex {
    max-width: 1000px;
    margin: 0 auto;
}
.cart-amount-area-fixed .total-price {
    color: #00adef;
    font-size: 1.4rem;
    font-weight: 700;
}
.cart-amount-area-fixed .total-price small {
    display: block;
    font-size: 0.7rem;
    color: #6c757d;
    font-weight: normal;
}
.cart-amount-area-fixed .btn-primary {
    background: linear-gradient(135deg, #00adef, #00698f);
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 8px;
    white-space: nowrap;
}
body.has-fixed-cart-bar { padding-bottom: 90px; }

@media (max-width: 400px) {
.cart-amount-area-fixed .total-price { font-size: 1.1rem; }
.cart-amount-area-fixed .btn-primary { padding: 8px 14px; font-size: 0.9rem; }
}

.shipping-method-choose-card {
    border: 2px solid #00adef;
    border-radius: 12px;
    overflow: hidden;
}
.shipping-method-choose-card .card-body > h6 {
    background: linear-gradient(135deg, #00adef, #00698f);
    color: white;
    padding: 12px 18px;
    margin: -16px -16px 16px -16px;
    font-size: 1rem;
    font-weight: 600;
}
.shipping-method-choose-card .form-check {
    background: #f8fcff;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 16px !important;
    transition: all 0.2s ease;
}
.shipping-method-choose-card .form-check:has(input:checked) {
    background: #e8f7fd;
    border-color: #00adef;
}
.shipping-method-choose-card input[type="date"],
.shipping-method-choose-card input[type="time"] {
    border: 2px solid #00adef;
    border-radius: 8px;
    padding: 6px 10px;
    color: #00698f;
    font-weight: 600;
}

/* =====================================================
BANNER DE ERRORES FIJO (STICKY ERROR BAR)
===================================================== */
.error-banner-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    z-index: 9999;
    padding: 15px 20px;
    animation: slideDownBanner 0.5s ease-out forwards;
    border-bottom: 3px solid #a71d2a;
}

@keyframes slideDownBanner {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.error-banner-fixed .error-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.error-banner-fixed .error-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-banner-fixed .error-text {
    flex-grow: 1;
}

.error-banner-fixed .error-text h6 {
    color: white;
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 1rem;
}

.error-banner-fixed .error-text ul {
    margin: 0;
    padding-left: 20px;
    font-size: 0.9rem;
}

.error-banner-fixed .error-text ul li {
    margin-bottom: 3px;
}

.error-banner-fixed .btn-close-error {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.error-banner-fixed .btn-close-error:hover {
    background: rgba(255,255,255,0.35);
    transform: scale(1.1);
}

/* Padding extra en el body cuando hay banner de error */
body.has-error-banner {
    padding-top: 100px;
}

/* Responsive */
@media (max-width: 576px) {
    .error-banner-fixed {
        padding: 12px 15px;
    }
    .error-banner-fixed .error-icon {
        font-size: 1.5rem;
    }
    .error-banner-fixed .error-text h6 {
        font-size: 0.9rem;
    }
    .error-banner-fixed .error-text ul {
        font-size: 0.8rem;
    }
    body.has-error-banner {
        padding-top: 120px;
    }
}