* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Modal de Éxito */
.modal-exito {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
    pointer-events: none; /* No bloquear clicks cuando está oculto */
}

.modal-exito.mostrar,
.modal-exito[style*="display: flex"] {
    pointer-events: auto; /* Permitir clicks cuando está visible */
}

.modal-exito.mostrar,
.modal-exito.cerrando {
    display: flex;
}

.modal-exito.mostrar {
    opacity: 1;
}

.modal-exito.cerrando {
    opacity: 0;
}

.modal-exito-contenido {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateY(0);
    opacity: 1;
    margin: 0 auto;
}

.modal-exito.mostrar .modal-exito-contenido {
    animation: slideUp 0.3s ease forwards;
}

.modal-exito.cerrando .modal-exito-contenido {
    animation: slideDown 0.3s ease forwards;
}

.modal-exito-icono {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    animation: scaleIn 0.5s ease;
}

.modal-exito-icono svg {
    width: 80px;
    height: 80px;
    stroke-width: 3;
}

.modal-exito-titulo {
    font-size: 2rem;
    color: #28a745;
    margin-bottom: 15px;
    font-weight: 700;
}

.modal-exito-mensaje {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.6;
}

.modal-exito-boton {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.modal-exito-boton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.modal-exito-boton:active {
    transform: translateY(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(50px);
        opacity: 0;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* Header */
.header {
    background: rgba(95, 240, 139, 0.95);
    color: #3c4043;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e8e8ed;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #f0f0f0;
    transform: translateY(-2px);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Header Buttons Container */
.header-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-left: 1rem;
}

/* Intranet Button */
.intranet-btn,
.tienda-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: inline-block;
}

.intranet-btn:hover,
.tienda-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.intranet-btn.active,
.tienda-btn.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Hero Section - Google Labs Style with Animated Background */
.hero {
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    color: white;
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 50vh;
    display: flex;
    align-items: center;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255,255,255,0.05) 0%, transparent 50%);
    animation: floatBubbles 10s ease-in-out infinite;
}

@keyframes floatBubbles {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.6;
    }
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideInUp 1s ease-out;
    backdrop-filter: blur(10px);
}

.hero-badge::before {
    content: '🧪';
    margin-right: 8px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
    color: white;
    line-height: 1.2;
    animation: slideInUp 1s ease-out 0.2s both;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero-title-highlight {
    background: linear-gradient(45deg, #fff, #f0f8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
    text-shadow: none;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    animation: slideInUp 1s ease-out 0.4s both;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideInUp 1s ease-out 0.6s both;
}

.cta-button-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cta-button-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.cta-button-secondary {
    background: transparent;
    color: white;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    backdrop-filter: blur(10px);
}

.cta-button-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
    flex-wrap: wrap;
    animation: slideInUp 1s ease-out 0.8s both;
}

.hero-feature {
    text-align: center;
    max-width: 150px;
}

.hero-feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.hero-feature-icon:hover {
    transform: translateY(-3px) scale(1.05);
    background: rgba(255, 255, 255, 0.3);
}

.hero-feature h3 {
    font-size: 0.9rem;
    color: white;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hero-feature p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Floating particles effect */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.3), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 20s linear infinite;
}

@keyframes sparkle {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(200px);
    }
}

/* Services Section */
.services {
    padding: 80px 0;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 2px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

/* Process Section */
.process {
    padding: 80px 0;
    background: white;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    margin: 0 auto 1rem;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.step p {
    color: #666;
    max-width: 300px;
    margin: 0 auto;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.whatsapp-icon {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.whatsapp-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.contact-form {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.9);
    color: #333;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .header-buttons {
        flex-direction: column;
        gap: 0.5rem;
        margin-left: 0.5rem;
    }
    
    .intranet-btn,
    .tienda-btn {
        font-size: 0.85rem;
        padding: 8px 16px;
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Accesibilidad - Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

/* Screen Reader Only - Elementos ocultos visualmente pero accesibles */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Mantener estilo de enlaces tel: y mailto: igual que texto normal */
address a,
.contact-item a {
    color: inherit;
    text-decoration: none;
}

address a:hover,
.contact-item a:hover {
    text-decoration: underline;
    color: inherit;
}

/* Asegurar que address no cambie el estilo */
address {
    font-style: normal;
}

/* Banner Promocional Tienda */
.banner-promocional {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0 60px;
    text-align: center;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.banner-promocional::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.banner-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.banner-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.banner-cta {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 30px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.banner-cta:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Sección de Productos */
.productos-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

/* Tarjeta de Producto */
.producto-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.producto-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.producto-imagen {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.producto-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.producto-titulo {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.3;
}

.producto-codigo {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.producto-detalle {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.producto-precio {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.precio-moneda {
    font-size: 1rem;
    color: #667eea;
    font-weight: 600;
}

.precio-valor {
    font-size: 1.8rem;
    color: #667eea;
    font-weight: 700;
}

.btn-agregar-carrito {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 24px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-agregar-carrito:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-agregar-carrito:active {
    transform: translateY(0);
}

/* Responsive para Productos */
@media (max-width: 1200px) {
    .productos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .banner-title {
        font-size: 2rem;
    }
    
    .banner-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .productos-grid {
        grid-template-columns: 1fr;
    }
    
    .banner-promocional {
        padding: 80px 0 40px;
        margin-top: 70px;
    }
    
    .banner-title {
        font-size: 1.5rem;
    }
    
    .productos-section {
        padding: 60px 0;
    }
}

/* ============================================
   Estilos para Formulario de Login
   ============================================ */

.login-container {
    max-width: 500px;
    margin: 2rem auto 0;
    padding: 0;
    position: relative;
    z-index: 2;
}

.login-form-background {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-form .form-group {
    margin-bottom: 0;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.input-wrapper:focus-within {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-wrapper {
    position: relative;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #333;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    flex: 1;
}

.password-wrapper input {
    padding-right: 45px;
}

.login-form input:focus {
    outline: none;
    background: transparent;
}

.login-form input::placeholder {
    color: #999;
}

.input-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.3s ease;
    z-index: 10;
    border-radius: 6px;
    width: 32px;
    height: 32px;
}

.input-icon:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.input-icon:focus {
    outline: none;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.eye-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    display: block;
}

.login-form button[type="submit"] {
    margin-top: 0.5rem;
    width: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    padding: 14px 24px;
    font-weight: 600;
    border-radius: 12px;
}

.login-form button[type="submit"]:hover {
    background: linear-gradient(45deg, #5568d3, #653a8f);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #fcc;
    font-size: 0.9rem;
    text-align: center;
}

/* Responsive para login */
@media (max-width: 768px) {
    .login-container {
        max-width: 100%;
        margin: 1.5rem 1rem 0;
    }
    
    .login-form-background {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .login-form label {
        font-size: 0.9rem;
    }
    
    .login-form input {
        padding: 12px 14px;
        padding-right: 40px;
    }
    
    .input-icon {
        right: 10px;
        padding: 5px;
    }
}

/* Estilos para botones de confirmación */
.modal-confirmacion-botones {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.modal-confirmacion-boton {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 120px;
}

.modal-confirmacion-boton-aceptar {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.modal-confirmacion-boton-aceptar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.modal-confirmacion-boton-aceptar:active {
    transform: translateY(0);
}

.modal-confirmacion-boton-cancelar {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.modal-confirmacion-boton-cancelar:hover {
    background: #e2e6ea;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.modal-confirmacion-boton-cancelar:active {
    transform: translateY(0);
}

/* --- BANNER ROTATIVO (HERO) --- */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    margin-top: 80px;
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-track {
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.carousel-content {
    max-width: 800px;
    padding: 0 2rem;
    text-align: center;
    color: white;
    z-index: 2;
}

.carousel-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.carousel-content p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.carousel-btn:hover {
    background: rgba(255,255,255,0.4);
}

.carousel-btn.prev { left: 30px; }
.carousel-btn.next { right: 30px; }

.carousel-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.3);
}

/* --- PRODUCTOS TERMINADOS CAROUSEL --- */
.productos-carousel-section {
    padding: 80px 0;
    background: #e9ecef;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.products-carousel-track {
    display: flex;
    gap: 15px;
    animation: scrollProducts 60s linear infinite;
    width: max-content;
}

.products-carousel-track:hover {
    animation-play-state: paused;
}

.products-carousel-track .producto-card {
    min-width: 160px;
    max-width: 160px;
    flex-shrink: 0;
}

.products-carousel-track .producto-card .producto-imagen {
    height: 120px;
}

.products-carousel-track .producto-card h3 {
    font-size: 0.85rem;
    height: 2.4em;
    overflow: hidden;
}

.products-carousel-track .producto-card .producto-precio {
    font-size: 0.9rem;
}

.products-carousel-track .producto-card .btn-agregar-carrito {
    padding: 5px 10px;
    font-size: 0.75rem;
}

@keyframes scrollProducts {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Ocultar botones de navegación ya que el flujo es continuo */
.products-carousel-btn {
    display: none;
}

.view-all-container {
    text-align: center;
    margin-top: 40px;
}

.view-all-btn {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: #667eea;
    color: white;
}

/* --- SECCIONES DETALLADAS DE SERVICIOS --- */
.service-details {
    padding-bottom: 80px;
}

.service-detail-item {
    padding: 100px 0;
    border-bottom: 1px solid #f0f0f0;
}

.service-detail-item.alternate {
    background: #e9ecef;
}

.detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.detail-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    position: relative;
}

.detail-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 2px;
}

.detail-description {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #555;
    text-align: justify;
}

.detail-image-container {
    width: 100%;
    height: 400px;
    background: transparent;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    display: block;
    position: relative;
}

.detail-img {
    width: 110%;
    height: 110%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: inherit;
    transition: transform 0.5s ease;
    margin: -5%;
}

.detail-image-container:hover .detail-img {
    transform: scale(1.05);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dee2e6 0%, #ced4da 100%);
}

.placeholder-image .icon {
    font-size: 8rem;
    opacity: 0.8;
}

@media (max-width: 992px) {
    .detail-row {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .alternate .detail-row {
        display: flex;
        flex-direction: column-reverse;
    }
    
    .carousel-content h1 { font-size: 2.5rem; }
    .carousel-content p { font-size: 1.1rem; }
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 28px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #6c757d;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 50%;
  z-index: 2;
}

/* Text inside */
.slider::after {
  content: "No";
  color: white;
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  right: 2px;
  font-size: 11px;
  font-family: sans-serif;
  font-weight: bold;
}

input:checked + .slider {
  background-color: #28a745;
}

input:focus + .slider {
  box-shadow: 0 0 1px #28a745;
}

input:checked + .slider:before {
  -webkit-transform: translateX(32px);
  -ms-transform: translateX(32px);
  transform: translateX(32px);
}

input:checked + .slider::after {
  content: "Si";
  right: auto;
  left: 20px;
}

/* ============================================
   PHS - Modal de inspección tipo planilla
   ============================================ */

.phs-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(17, 24, 39, 0.66);
    backdrop-filter: blur(6px);
    overflow-y: auto;
}

.phs-modal-overlay.is-open {
    display: flex;
}

.phs-modal-open {
    overflow: hidden;
}

.phs-modal-panel {
    width: min(1320px, 100%);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
    position: relative;
    padding: 28px;
    border: 1px solid rgba(102, 126, 234, 0.14);
}

.phs-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.phs-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
    transform: scale(1.05);
}

.phs-modal-header {
    text-align: center;
    margin-bottom: 18px;
    padding-right: 36px;
}

.phs-modal-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.phs-modal-header h2 {
    font-size: 1.8rem;
    color: #1f2937;
    margin-bottom: 8px;
}

.phs-modal-subtitle {
    color: #6b7280;
    max-width: 820px;
    margin: 0 auto;
    font-size: 0.98rem;
}

.phs-inspection-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.phs-inspection-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.phs-summary-box {
    border: 1px solid #dbe3ff;
    background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
    border-radius: 14px;
    padding: 14px 16px;
}

.phs-summary-box span {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 6px;
}

.phs-summary-box strong {
    font-size: 1rem;
    color: #111827;
    word-break: break-word;
}

.phs-inspection-grid,
.phs-notes-grid,
.phs-signature-grid,
.phs-extra-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.phs-signature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.phs-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.phs-field-span-2 {
    grid-column: span 2;
}

.phs-field label,
.phs-choice-group span {
    font-size: 0.9rem;
    font-weight: 700;
    color: #374151;
}

.phs-field input,
.phs-field textarea {
    width: 100%;
    border: 1px solid #cfd8ff;
    border-radius: 12px;
    background: #ffffff;
    padding: 12px 14px;
    font: inherit;
    color: #111827;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.phs-field textarea {
    resize: vertical;
    min-height: 110px;
}

.phs-field input:focus,
.phs-field textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

.phs-sheet-wrap {
    border: 1px solid #1f2937;
    border-radius: 14px;
    overflow: auto;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(31, 41, 55, 0.04);
}

.phs-sheet-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.76rem;
    color: #111827;
}

.phs-sheet-table th,
.phs-sheet-table td {
    border: 1px solid #1f2937;
    padding: 5px 4px;
    text-align: center;
    vertical-align: middle;
}

.phs-sheet-table thead th {
    background: #ffffff;
    font-weight: 700;
}

.phs-sheet-table thead tr:first-child th {
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}

.phs-sheet-table thead tr:nth-child(2) th {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    height: 148px;
    min-width: 36px;
    padding: 8px 2px;
    white-space: nowrap;
}

.phs-sheet-table tbody td input[type="text"],
.phs-sheet-table tbody td input[type="date"],
.phs-sheet-table tbody td input[type="time"] {
    width: 100%;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 6px 4px;
    font-size: 0.74rem;
    text-align: center;
}

.phs-sheet-table tbody td input[type="text"]:focus,
.phs-sheet-table tbody td input[type="date"]:focus,
.phs-sheet-table tbody td input[type="time"]:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.phs-check-cell {
    padding: 0;
}

.phs-mini-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 36px;
    cursor: pointer;
}

.phs-mini-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.phs-mini-check span {
    width: 18px;
    height: 18px;
    border: 2px solid #374151;
    border-radius: 3px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.phs-mini-check input:checked + span {
    background: #16a34a;
    border-color: #16a34a;
}

.phs-mini-check input:checked + span::after {
    content: '✓';
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
}

.phs-extra-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.phs-choice-group {
    border: 1px solid #dbe3ff;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: center;
    background: #fbfcff;
}

.phs-choice-group label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
}

.phs-choice-group input {
    accent-color: #667eea;
}

.phs-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 6px;
}

.phs-inspection-shell {
    margin-top: 18px;
}

.phs-table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
}

.phs-table-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    margin: 0;
}

.phs-history-code,
.phs-history-date {
    white-space: nowrap;
}

.phs-history-code {
    width: 150px;
}

.phs-history-date {
    width: 120px;
    text-align: center;
}

.phs-inline-panel {
    background: #ffffff;
    border: 1px solid #dbe3ff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.phs-inline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.phs-inline-title {
    font-size: 1.35rem;
    color: #1f2937;
    margin: 2px 0 6px;
}

.phs-inline-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
    max-width: 900px;
}

.phs-btn-primary,
.phs-btn-secondary {
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.phs-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.24);
}

.phs-btn-primary:hover,
.phs-btn-secondary:hover {
    transform: translateY(-1px);
}

.phs-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.phs-btn-secondary-blue {
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.24);
}

.phs-btn-secondary-blue:hover {
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.3);
}

@media (max-width: 1200px) {
    .phs-modal-panel {
        padding: 22px;
    }

    .phs-inspection-summary,
    .phs-inspection-grid,
    .phs-notes-grid,
    .phs-signature-grid,
    .phs-extra-controls {
        grid-template-columns: 1fr;
    }

    .phs-field-span-2 {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .phs-modal-overlay {
        padding: 12px;
        align-items: flex-start;
    }

    .phs-modal-panel {
        padding: 18px;
        border-radius: 16px;
    }

    .phs-modal-header {
        padding-right: 44px;
    }

    .phs-modal-header h2 {
        font-size: 1.35rem;
    }

    .phs-modal-actions {
        flex-direction: column-reverse;
    }

    .phs-modal-actions .phs-btn-primary,
    .phs-modal-actions .phs-btn-secondary {
        width: 100%;
    }

    .phs-sheet-table {
        min-width: 980px;
    }

    .phs-inline-header {
        flex-direction: column;
    }
}


