/* Fuentes personalizadas */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* Estilos generales */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html {
    scroll-behavior: smooth;
    touch-action: manipulation;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f4f7f6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    position: relative;
    height: 50vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(15, 32, 39, 0.8) 0%, rgba(32, 58, 67, 0.8) 50%, rgba(44, 83, 100, 0.8) 100%),
                url('https://images.unsplash.com/photo-1516035069371-29a1b244cc32?auto=format&fit=crop&q=80&w=2070') center/cover no-repeat;
    color: white;
    text-align: center;
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-logo {
    width: 150px;
    height: auto;
    margin-bottom: 2rem;
}

.pricing-toggle-container {
    margin: 1rem 0;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.pricing-toggle {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 8px;
    display: inline-flex;
    gap: 8px;
}

.pricing-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: white;
    font-size: 1rem;
}

.pricing-btn.active {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

/* Títulos y Controles Globales */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin: 2rem 0;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #3a7bd5, #3a6073); 
}

.global-controls-section {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(91, 104, 122, 0.1);
    margin-bottom: 2rem;
    text-align: center;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}
.control-group .slider {
    -webkit-appearance: none;
    width: 100%;
    max-width: 300px;
    height: 8px;
    background: #ddd;
    outline: none;
    border-radius: 5px;
    transition: opacity .2s;
}

.control-group .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #3a7bd5;
    cursor: pointer;
    border-radius: 50%;
}

.control-group .slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #3a7bd5;
    cursor: pointer;
    border-radius: 50%;
}


/* Secciones de categorías y tarjetas */
.category-section { margin-bottom: 2rem; }

.category-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}

.category-title i { font-size: 1.8rem; color: #3a7bd5; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 1rem;
}

.service-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
}

.service-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); }
.service-card.selected { border-color: #4caf50; background: linear-gradient(135deg, #f8fff8 0%, #e8f5e8 100%); }
.service-image { height: 80px; border-radius: 8px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%); }
.service-image i { font-size: 3rem; color: #3a7bd5; }
.service-card h4 { font-size: 1.3rem; font-weight: 600; margin-bottom: 8px; color: #333; }
.service-description { color: #666; font-size: 0.9rem; margin-bottom: 15px; line-height: 1.4; flex-grow: 1; }
.service-price { font-size: 1.8rem; font-weight: 700; color: #3a7bd5; transition: all 0.3s ease; }

/* Controles Dinámicos dentro de las tarjetas */
.dynamic-controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: auto; padding-top: 10px; }
.dynamic-controls label { font-size: 0.9rem; font-weight: 600; }
.dynamic-controls input { width: 60px; text-align: center; border: 1px solid #ccc; border-radius: 8px; padding: 5px; font-size: 1rem; font-weight: 600; }
.dynamic-controls button { width: 30px; height: 30px; border-radius: 50%; border: none; background-color: #e0e0e0; font-weight: bold; cursor: pointer; transition: background-color 0.2s; }
.dynamic-controls button:hover { background-color: #d0d0d0; }
.dynamic-controls input:disabled, .dynamic-controls button:disabled { background-color: #f5f5f5; cursor: not-allowed; opacity: 0.6; }

/* Configurador de Producto */
.product-configurator {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(91, 104, 122, 0.1);
}
.config-step { margin-bottom: 2rem; }
.config-step h4 { 
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}
.style-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}
.style-option {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.style-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #3a7bd5;
}
.style-option.selected {
    border-color: #4caf50;
    background: #f8fff8;
}
.style-option i { font-size: 2.5rem; color: #3a7bd5; margin-bottom: 1rem; }
.style-option h5 { font-size: 1.1rem; margin: 0.5rem 0; }
.style-option p { font-size: 0.9rem; color: #666; }

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.option-group { display: flex; flex-direction: column; gap: 8px; }
.option-group label { font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 8px;}
.option-group i { color: #3a7bd5; }
.option-group select, .option-group input[type="text"] {
    width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 8px; font-size: 1rem;
    -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text;
}
.option-group.checkbox { flex-direction: row; align-items: center; }
.option-group input[type="checkbox"] { width: 20px; height: 20px; }

.quoting-controls { display: flex; gap: 10px; align-items: center; }
.quoting-controls input { flex-grow: 1; -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text; padding: 12px; border: 1px solid #ccc; border-radius: 8px; }
.quoting-controls .btn-add { width: auto; flex-shrink: 0; }
.feedback-message {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #4caf50;
    font-weight: 600;
}

/* NUEVOS ESTILOS: Tabla de Precios y Ahorros */
#product-pricing-tiers-container {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.pricing-tier-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.pricing-tier-table th, .pricing-tier-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.pricing-tier-table th {
    font-weight: 600;
    color: #333;
}

.pricing-tier-table tr:last-child td {
    border-bottom: none;
}

.pricing-tier-table .tier-savings {
    font-weight: 600;
    color: #4caf50;
    background-color: #e8f5e9;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.85em;
    display: inline-block;
}
/* Fin de nuevos estilos */

/* Botones y Resumen */
.btn-add {
    width: 100%; background: linear-gradient(45deg, #3a7bd5, #3a6073); color: white; border: none;
    padding: 12px 20px; border-radius: 25px; font-weight: 600; cursor: pointer;
    transition: all 0.3s ease; font-size: 1rem; box-shadow: 0 4px 15px rgba(58, 123, 213, 0.3); margin-top: 15px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-add:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(58, 123, 213, 0.4); }
.btn-add.added { background: linear-gradient(45deg, #4caf50, #66bb6a); box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3); }

.summary-section { background: white; padding: 30px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); margin-top: 3rem; position: sticky; top: 20px; }
.summary-title { text-align: center; font-size: 1.8rem; margin-bottom: 20px; color: #333; font-weight: 600; }
.summary-items { margin-bottom: 20px; min-height: 100px; max-height: 50vh; overflow-y: auto;}
.empty-summary { text-align: center; color: #999; padding: 2rem 0; }
.empty-summary i { font-size: 3rem; margin-bottom: 1rem; display: block; }
.summary-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed #e0e0e0; font-size: 1rem; }
.total-price-container { border-top: 2px solid #e0e0e0; padding-top: 20px; margin-bottom: 20px; }
.total-price-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.total-price { font-size: 2.2rem; font-weight: 700; color: #3a7bd5; transition: all 0.3s ease; }
.btn-presupuesto { width: 100%; background: linear-gradient(45deg, #4caf50, #66bb6a); color: white; border: none; padding: 15px 20px; border-radius: 25px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; font-size: 1.1rem; box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3); }
.btn-presupuesto:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4); }
.btn-presupuesto:disabled { background: #ccc; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-presupuesto i { margin-right: 8px; }

.summary-product-quote {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    background: #f9f9f9;
}
.summary-product-quote h5 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #333;
}
.summary-product-quote p {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 15px 0;
    font-style: italic;
}
.product-options-table {
    width: 100%;
    border-collapse: collapse;
}
.product-options-table th, .product-options-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9rem;
}
.product-options-table th {
    font-weight: 600;
}
.product-options-table td:last-child {
    text-align: right;
    font-weight: 700;
    color: #3a7bd5;
}