/* ============================================
   CARRITO FLOTANTE
   ============================================ */
.carrito-flotante {
    position: fixed;
    bottom: 30px;
    right: 20px;
    z-index: 999;
    cursor: pointer;
}

.carrito-icono {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.96);
    border: 1.5px solid #999;
    border-radius: 50%;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.carrito-icono:hover {
    border-color: #D4AF37;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.carrito-icono svg {
    width: 30px;
    height: 30px;
    display: block;
}

.carrito-icono svg g {
    stroke: #999;
    transition: stroke 0.3s ease;
}

.carrito-icono:hover svg g {
    stroke: #D4AF37;
}

/* Estado: carrito con productos (respiración lenta y continua) */
.carrito-icono.con-productos svg g {
    animation: breathingLentaIcono 3s ease-in-out infinite;
}

/* Halo suave dorado que nace pegado al propio borde del círculo, sin anillo separado */
.carrito-icono.con-productos {
    animation: breathingLenta 3s ease-in-out infinite, haloPulse 3s ease-in-out infinite, fondoPulse 3s ease-in-out infinite;
}

@keyframes breathingLenta {
    0%, 100% { border-color: #999; }
    50%      { border-color: #D4AF37; }
}

@keyframes breathingLentaIcono {
    0%, 100% { stroke: #999; }
    50%      { stroke: #ffffff; }
}

@keyframes fondoPulse {
    0%, 100% { background: rgba(255, 255, 255, 0.96); }
    50%      { background: #D4AF37; }
}

@keyframes haloPulse {
    0%, 100% {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1), 0 0 0 0 rgba(212, 175, 55, 0);
    }
    50% {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1),
                    0 0 28px 8px rgba(212, 175, 55, 0.6),
                    0 0 50px 16px rgba(212, 175, 55, 0.3);
    }
}

/* Respiración única dorada al agregar un producto */
.carrito-icono.respiracion-dorada {
    animation: respiracionUnica 1s ease-in-out;
}

.carrito-icono.respiracion-dorada svg g {
    animation: respiracionUnicaIcono 1s ease-in-out;
}

@keyframes respiracionUnica {
    0%, 100% { border-color: #999; }
    50%      { border-color: #D4AF37; }
}

@keyframes respiracionUnicaIcono {
    0%, 100% { stroke: #999; }
    50%      { stroke: #D4AF37; }
}

/* ============================================
   BOTÓN "AGREGAR" — FICHA DE PRODUCTO
   ============================================ */
.btn-modal-carrito {
    display: flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    background: transparent;
    color: #999;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: color 0.6s ease, border-color 0.7s ease;
    margin: 0 auto 8px;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.btn-modal-carrito svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-modal-carrito svg g {
    stroke: #999;
    transition: stroke 0.25s ease;
}

.btn-modal-carrito:hover {
    color: #D4AF37;
    border-color: #D4AF37;
}

.btn-modal-carrito:hover svg g {
    stroke: #D4AF37;
}

/* DESPACHO INFO */
.modal-despacho {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin: 0;
    font-style: italic;
    letter-spacing: 0.5px;
}

.modal-acciones {
    position: relative;
    margin-top: 16px;
    margin-bottom: 16px;
}

.modal-precio {
    text-align: center !important;
    margin: 16px 0 !important;
}

/* ============================================
   BANNER "PRODUCTO AGREGADO"
   ============================================ */
.banner-agregado {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 12px 20px;
    z-index: 20;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.5s ease;
    white-space: nowrap;
    text-align: center;
}

.banner-agregado.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(-14px);
    pointer-events: auto;
}

.banner-agregado .banner-titulo {
    font-size: 13px;
    color: #555;
    margin: 0 0 4px 0;
    font-weight: 500;
}

.banner-agregado .banner-link {
    font-size: 12px;
    color: #999;
    margin: 0;
    transition: color 0.25s ease;
}

.banner-agregado:hover .banner-link {
    color: #D4AF37;
}

/* ============================================
   PANEL LATERAL DEL CARRITO
   Drawer que se desliza desde la derecha.
   Paleta exclusiva: gris claro, gris oscuro, dorado.
   ============================================ */
.carrito-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 92vw;
    background: #ffffff;
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    z-index: 998;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.38s ease, opacity 0.38s ease;
}

.carrito-panel.activo {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.carrito-header {
    padding: 32px 32px 24px 32px;
    border-bottom: 1px solid #ececec;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carrito-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 1.5px;
    color: #444;
    text-transform: uppercase;
}

.carrito-header button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    transition: color 0.25s ease;
}

.carrito-header button:hover {
    color: #D4AF37;
}

#carrito-contenido {
    flex: 1;
    overflow-y: auto;
    padding: 8px 32px 32px 32px;
}

.carrito-vacio {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #aaa;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.carrito-items {
    display: flex;
    flex-direction: column;
}

.carrito-item {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid #f0f0f0;
}

.carrito-item img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    flex-shrink: 0;
}

.carrito-item-info {
    flex: 1;
    min-width: 0;
}

.carrito-item-info h4 {
    margin: 0 0 10px 0;
    font-size: 13px;
    font-weight: 400;
    color: #444;
    line-height: 1.4;
}

.carrito-item-cantidad {
    display: flex;
    align-items: center;
    gap: 14px;
}

.carrito-item-cantidad button {
    width: 22px;
    height: 22px;
    border: 1px solid #ddd;
    background: transparent;
    color: #888;
    cursor: pointer;
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.25s ease, color 0.25s ease;
}

.carrito-item-cantidad button:hover {
    border-color: #D4AF37;
    color: #D4AF37;
}

.carrito-item-cantidad .cantidad-valor {
    font-size: 13px;
    color: #555;
    min-width: 14px;
    text-align: center;
}

.carrito-item .precio {
    margin: 0;
    font-size: 13px;
    color: #555;
    white-space: nowrap;
    align-self: flex-start;
    padding-top: 2px;
}

.carrito-total {
    padding: 32px 0 20px 0;
    text-align: center;
}

.carrito-total strong {
    display: block;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.3px;
    color: #333;
    margin-bottom: 6px;
}

.carrito-total .envio-nota {
    font-size: 11px;
    color: #aaa;
    margin: 0;
    font-style: italic;
}

.btn-proceder {
    width: 100%;
    padding: 16px;
    background: transparent;
    color: #666;
    border: 1.5px solid #ccc;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease;
}

.btn-proceder:hover {
    border-color: #D4AF37;
    color: #D4AF37;
}

@media (max-width: 768px) {
    .carrito-panel {
        width: 100%;
        max-width: 100%;
    }
}

/* ============================================
   MODAL DE COMPRA
   ============================================ */
#modal-compra,
#modal-politica {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#modal-compra.activo,
#modal-politica.activo {
    display: flex;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   MODAL DE COMPRA — mismo lenguaje visual del sitio
   ============================================ */
#modal-compra .modal-contenido,
#modal-politica .modal-contenido {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    width: 600px;
    max-width: 94vw;
    max-height: 88vh;
    overflow-y: auto;
    padding: 0;
}

.modal-header {
    padding: 32px 36px 24px 36px;
    border-bottom: 1px solid #ececec;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 1.5px;
    color: #444;
    text-transform: uppercase;
}

.modal-header button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    transition: color 0.25s ease;
}

.modal-header button:hover {
    color: #D4AF37;
}

.modal-body {
    padding: 28px 36px 36px 36px;
}

.formulario-resumen {
    font-size: 13px;
    color: #666;
}

.formulario-resumen p {
    margin: 6px 0;
    display: flex;
    justify-content: space-between;
}

.resumen-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.resumen-item img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    flex-shrink: 0;
}

.resumen-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.resumen-item-nombre {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resumen-item-cantidad {
    font-size: 11px;
    color: #aaa;
}

.resumen-item-precio {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
}

.formulario-resumen .total {
    color: #222;
    font-weight: 700;
    margin-top: 14px;
    font-size: 15px;
}

.formulario-divisor {
    height: 1px;
    background: #ececec;
    margin: 24px 0;
}

.formulario-nota {
    font-size: 12px;
    color: #999;
    line-height: 1.7;
    margin-bottom: 28px;
    font-style: italic;
}

.formulario-nota a {
    color: #999;
    transition: color 0.25s ease;
}

.formulario-nota a:hover {
    color: #D4AF37;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 8px;
}

/* Filas en columnas para aprovechar el ancho del formulario */
.form-row {
    display: grid;
    gap: 24px;
    margin-bottom: 0;
}

.form-row .form-group {
    margin-bottom: 22px;
}

.form-row-2 {
    grid-template-columns: 1fr 1fr;
}

.form-row-3 {
    grid-template-columns: 2fr 1fr 1fr;
}

.form-section-label {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #bbb;
    margin: 4px 0 18px 0;
    padding-top: 18px;
    border-top: 1px solid #ececec;
}

@media (max-width: 600px) {
    .form-row-2,
    .form-row-3 {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 0;
    border: none;
    border-bottom: 1px solid #ddd;
    background: transparent;
    font-size: 14px;
    color: #444;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group textarea {
    resize: none;
    min-height: 44px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #D4AF37;
}

.form-group input.error,
.form-group textarea.error {
    border-color: #8a8a8a;
    border-bottom-width: 2px;
}

.form-error {
    display: none;
    color: #8a8a8a;
    font-size: 11px;
    font-style: italic;
    margin-top: 6px;
}

.form-error.visible {
    display: block;
}

.form-checkbox {
    margin: 4px 0 22px 0;
}

.form-checkbox label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #999;
    cursor: pointer;
    line-height: 1.4;
}

.form-checkbox input[type="checkbox"] {
    accent-color: #D4AF37;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
}

.btn-pagar {
    width: 100%;
    padding: 16px;
    background: transparent;
    color: #666;
    border: 1.5px solid #ccc;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.25s ease;
    margin-top: 12px;
    animation: pulsoTextoPagar 2.8s ease-in-out infinite;
}

.btn-pagar:hover:not(:disabled) {
    border-color: #D4AF37;
}

.btn-pagar:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    animation: none;
}

@keyframes pulsoTextoPagar {
    0%, 100% { color: #666; }
    50%      { color: #D4AF37; }
}

.formulario-nota-final {
    font-size: 11px;
    color: #aaa;
    line-height: 1.7;
    text-align: center;
    margin: 22px 0 0 0;
    font-style: italic;
}

@media (max-width: 768px) {
    .modal-header,
    .modal-body {
        padding-left: 22px;
        padding-right: 22px;
    }
}


/* ============================================
   MODAL DE POLÍTICAS
   ============================================ */
.politica-cuerpo p {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
    margin: 0 0 16px 0;
}

.politica-cuerpo p:last-child {
    margin-bottom: 0;
}

.politica-cuerpo strong {
    color: #444;
    font-weight: 500;
}

.politica-cuerpo a {
    color: #999;
    transition: color 0.25s ease;
}

.politica-cuerpo a:hover {
    color: #D4AF37;
}

/* Links de políticas en el footer */
.footer-politicas {
    margin-top: 18px;
    font-size: 11px;
    letter-spacing: 0.3px;
}

.footer-politicas a {
    color: #999;
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer-politicas a:hover {
    color: #D4AF37;
}

.footer-separador {
    color: #ccc;
    margin: 0 10px;
}
