/* Estilos generales */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
}

.header-logo img {
    width: 70px;
    height: 70px;
    margin-right: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    background: none;
}

.header-title {
    font-size: 26px;
    font-weight: 700;
    color: #2a2a2a;
    line-height: 1.2;
    letter-spacing: 0.5px;
    text-align: left;
    width: auto;
    padding-left: 0;
    border-left: none;
    background: none;
    border-radius: 0;
    box-shadow: none;
}

.exchange-rate {
    text-align: right;
    min-width: 190px;
}

.exchange-rate a {
    text-decoration: none;
    color: #000;
    font-weight: bold;
}

/* Estilos para las tarjetas de servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.service-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.service-image {
    width: 100%;
    height: 150px;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.service-selector {
    margin-bottom: 15px;
}

.service-selector select,
.service-selector input {
    width: 100%;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.service-prices {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.price-row {
    display: flex;
    justify-content: space-between;
}

.price-label {
    font-size: 14px;
    color: #666;
}

.price-value {
    font-size: 16px;
    font-weight: bold;
}

/* Estilos para el resumen de totales */
.totals-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px;
    margin-bottom: 20px;
}

.totals-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.totals-content {
    display: flex;
    justify-content: space-around;
}

.total-item {
    text-align: center;
}

.total-label {
    font-size: 16px;
    color: #666;
}

.total-value {
    font-size: 24px;
    font-weight: bold;
}

/* Estilos para botones */
.button-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#copyOrderBtn {
    font-size: 18px;
    padding: 12px 24px;
    background-color: #757575;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

#copyOrderBtn:hover {
    background-color: #616161;
    transform: scale(1.05);
}

#copyOrderBtn:active {
    transform: scale(0.95);
}

/* Estilos para el modal */
.modal {
    display: none;
    position: fixed;
    z-index: 20000; /* Z-index superior al del tooltip para garantizar que siempre esté por encima */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    overflow-y: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.modal-content h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.modal-content p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
}

#closeModal {
    background-color: #535353;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s;
}

#closeModal:hover {
    background-color: #757575;
}

/* Estilos para tooltips de error */
.error-tooltip {
    position: absolute;
    background-color: #f44336;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    z-index: 100;
    font-size: 14px;
    margin-top: 5px;
    display: none;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulseInfo {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.input-container {
    position: relative;
}

/* Animación de parpadeo */
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

.blinking {
    animation: blink 0.7s infinite;
}

/* Estilos del botón de WhatsApp */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    left: 15px;
    width: 60px;
    height: 60px;
    background-image: url('wa.png');
    background-size: 83%;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

/* Botón de información (exclamación) en la imagen del servicio */
.info-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5); /* Fondo más oscuro para mejor contraste */
    color: white; /* Texto blanco para mejor visibilidad */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Borde ligero para destacar */
    border-radius: 50%;
    width: 32px; /* Tamaño aumentado para facilitar la interacción en móviles */
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50; /* Alto z-index para asegurar que esté por encima */
    transition: all 0.2s ease;
    backdrop-filter: blur(3px);
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    touch-action: manipulation;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-appearance: none; /* Para iOS */
    appearance: none;
}

.info-btn:hover, .info-btn:active {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Tooltip de descripción del servicio */
.service-info-tooltip {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8); /* Fondo oscuro semi-transparente */
    color: white; /* Texto blanco para mejor contraste */
    padding: 15px;
    font-size: 15px;
    z-index: 10000;
    text-align: center;
    word-break: break-word;
    animation: fadeIn 0.2s;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-y: auto; /* Permitir scroll si el contenido es muy largo */
    border-radius: 0; /* Sin bordes redondeados */
    box-shadow: none; /* Sin sombra */
    transition: opacity 0.3s ease;
}

/* Contenedor para el contenido del tooltip */
.tooltip-content {
    max-width: 100%;
    line-height: 1.4;
    font-weight: 400;
    padding: 5px;
    overflow-y: auto;
    max-height: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.4) rgba(0,0,0,0.2);
}

/* Personalizar la barra de desplazamiento para navegadores WebKit */
.tooltip-content::-webkit-scrollbar {
    width: 6px;
}

.tooltip-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.tooltip-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.4);
    border-radius: 3px;
}

/* Animación para el tooltip */
@keyframes tooltipFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    .service-info-tooltip {
        font-size: 14px;
        padding: 12px;
        text-align: center;
        line-height: 1.4;
    }
    
    .info-btn {
        width: 36px; /* Mucho más grande para facilitar el toque */
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        font-size: 20px;
        bottom: 6px;
        right: 6px;
    }
}

@media (max-width: 480px) {
    .service-info-tooltip {
        font-size: 13px;
        padding: 10px 8px;
        text-align: center;
    }
    
    .info-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        font-size: 18px;
        bottom: 5px;
        right: 5px;
    }
}

/* Media queries para responsividad */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header {
        display: flex;
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        text-align: left !important;
        align-items: center !important;
        padding: 5px !important;
    }
    
    .header-logo {
        flex: 0 1 auto !important;
        gap: 5px !important;
        padding: 5px !important;
        background: none !important;
        box-shadow: none !important;
    }
    
    .header-logo img {
        width: 45px !important;
        height: 45px !important;
    }
    
    .header-title {
        font-size: 14px !important;
        line-height: 1.1 !important;
        background: none !important;
        box-shadow: none !important;
    }
    
    .exchange-rate {
        margin: 0 !important;
        padding: 0 !important;
        text-align: right !important;
        min-width: 80px !important;
    }
    
    .totals-content {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .service-title {
        font-size: 16px;
    }
    
    .service-image {
        height: 120px;
    }
    
    .header {
        padding: 3px !important;
    }
    
    .header-logo {
        gap: 3px !important;
        padding: 2px !important;
    }
    
    .header-logo img {
        width: 35px !important;
        height: 35px !important;
        margin: 0 !important;
    }
    
    .header-title {
        font-size: 11px !important;
        padding-left: 2px !important;
    }
    
    .exchange-rate {
        min-width: 60px !important;
        font-size: 10px !important;
    }
    
    #copyOrderBtn {
        font-size: 16px;
        padding: 10px 20px;
    }
}

/* Estilo para la nueva clase .nuevo-precio-badge */
.nuevo-precio-badge {
    position: absolute;
    top: 10px;
    left: -12px;
    background: linear-gradient(90deg, #ff512f 0%, #f9d423 100%);
    color: #fff;
    font-size: 0.78em;
    font-weight: bold;
    padding: 3px 13px 3px 10px;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.13);
    z-index: 2;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.10);
    border-left: 3px solid #fff3;
    border-top: 1px solid #fff3;
    border-bottom: 1px solid #fff3;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: badgeFadeIn 1.0s;
}

.nuevo-precio-badge::before {
    content: '\1F525'; /* Fuego emoji */
    font-size: 1em;
    margin-right: 2px;
    filter: drop-shadow(0 1px 1px #f9d42399);
}

@keyframes badgeFadeIn {
    from { opacity: 0; transform: translateX(-12px) scale(0.8); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

/* Estilo para la nueva clase .nuevo-producto-badge */
.nuevo-producto-badge {
    position: absolute;
    top: 10px;
    left: -12px;
    background: linear-gradient(90deg, #43cea2 0%, #185a9d 100%);
    color: #fff;
    font-size: 0.78em;
    font-weight: bold;
    padding: 3px 13px 3px 10px;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 2px 8px rgba(24, 90, 157, 0.13);
    z-index: 2;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.10);
    border-left: 3px solid #fff3;
    border-top: 1px solid #fff3;
    border-bottom: 1px solid #fff3;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: badgeFadeInProducto 1.0s;
}

.nuevo-producto-badge::before {
    content: '\1F195'; /* NEW emoji */
    font-size: 1em;
    margin-right: 2px;
    filter: drop-shadow(0 1px 1px #43cea299);
}

@keyframes badgeFadeInProducto {
    from { opacity: 0; transform: translateX(-12px) scale(0.8); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

/* Estilo para el sticker de oferta */
.oferta-sticker {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #ff4b2b 0%, #ff416c 100%);
    color: #fff;
    font-size: 0.95em;
    font-weight: bold;
    padding: 4px 32px 6px 32px;
    border-radius: 0 0 32px 32px;
    box-shadow: 0 4px 12px 0 rgba(255, 65, 108, 0.18);
    z-index: 10;
    letter-spacing: 2px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.13);
    border: none;
    min-width: 100px;
    max-width: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    filter: drop-shadow(0 3px 6px #ff4b2b33);
    animation: stickerPop 0.7s;
}

@keyframes stickerPop {
    from { opacity: 0; transform: translateX(-50%) scale(0.7); }
    to { opacity: 1; transform: translateX(-50%) scale(1); }
}
