/* VARIABLES Y RESET */
:root {
    --primary-color: #00A99D;
    /* Teal */
    --primary-dark: #008C82;
    --secondary-color: #ffffff;
    --background-gradient: linear-gradient(135deg, #00c4b4 0%, #008C82 100%);
    --surface-color: #ffffff;
    --text-color: #333333;
    --text-secondary: #666666;
    --border-radius: 1rem;
    --btn-radius: 50px;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --font-family: 'Figtree', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background: var(--background-gradient);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 120px;
    /* Espacio para el panel sticky */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    height: 50px;
    width: auto;
}

.main-header h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
}

/* SECCIONES */
.configurator-container {
    padding: 40px 0;
    max-width: 900px;
    margin: 0 auto;
}

.step-section {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 25px;
    position: relative;
    padding-left: 50px;
}

.step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 35px;
    height: 35px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    font-weight: 800;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* TABS */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
}

.tab-btn.active {
    background: rgba(0, 169, 157, 0.1);
    color: var(--primary-color);
}

.tab-btn:hover {
    color: var(--primary-color);
}

/* GRIDS DE OPCIONES */
.options-grid {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.options-grid.active {
    display: grid;
}

.option-card {
    border: 2px solid transparent;
    background: #f9f9f9;
    border-radius: var(--border-radius);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 169, 157, 0.3);
}

.option-card.selected {
    border-color: var(--primary-color);
    background: rgba(0, 169, 157, 0.05);
}

.option-card.selected::after {
    content: '\f00c';
    /* Check icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.card-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.card-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* MÓVILES */
.mobile-adder {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

select {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: var(--btn-radius);
    font-family: var(--font-family);
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-secondary {
    background: var(--text-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: var(--btn-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #000;
    transform: scale(1.02);
}

.added-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.added-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.remove-btn {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
}

.remove-btn:hover {
    background: rgba(255, 68, 68, 0.1);
    border-radius: 4px;
}

/* TV SECTION */
.tv-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tv-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tv-link:hover {
    text-decoration: underline;
}

/* RESUMEN STICKY */
.summary-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--surface-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    z-index: 90;
    border-top: 1px solid #eee;
}

.summary-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-breakdown {
    flex: 1;
    margin-right: 30px;
}

.price-breakdown h3 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

#summary-items {
    font-size: 0.9rem;
    color: var(--text-color);
    max-height: 60px;
    overflow-y: auto;
}

.total-action {
    display: flex;
    align-items: center;
    gap: 20px;
}

.total-price {
    text-align: right;
}

.total-price span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.total-price strong {
    display: block;
    font-size: 2rem;
    color: var(--primary-color);
    line-height: 1;
    font-weight: 900;
}

.total-price small {
    font-size: 0.7rem;
    color: #999;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: var(--btn-radius);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 169, 157, 0.3);
    text-transform: uppercase;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    border-radius: var(--btn-radius);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: var(--transition);
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    width: 95%;
    max-width: 700px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f0f0f0;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
}

.modal.show .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 800;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    background-color: rgba(0, 169, 157, 0.05);
}

/* Portability Section in Form */
.portability-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.portability-section h4 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 1rem;
}

.modal-summary {
    background: rgba(0, 169, 157, 0.05);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid rgba(0, 169, 157, 0.1);
}

.modal-summary h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.modal-summary ul {
    list-style: none;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.modal-total {
    font-weight: 800;
    text-align: right;
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .summary-content {
        flex-direction: column;
        gap: 15px;
    }

    .price-breakdown {
        width: 100%;
        margin-right: 0;
        text-align: center;
    }

    .total-action {
        width: 100%;
        justify-content: space-between;
    }

    body {
        padding-bottom: 180px;
    }

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

    .form-group.full-width {
        grid-column: span 1;
    }
}
/* COMPARADOR MULTIOPERADOR - colores provisionales de Avatel y Redi */
body { transition: background .3s ease; }
body[data-provider="misterwifi"] { --primary-color:#00A99D; --primary-dark:#008C82; --background-gradient:linear-gradient(140deg,#d9f7ed,#a0e6d7); --tint:rgba(0,169,157,.09); }
body[data-provider="avatel"] { --primary-color:#833491; --primary-dark:#63236f; --background-gradient:linear-gradient(140deg,#f5eafa,#dfc0e8); --tint:rgba(131,52,145,.09); }
body[data-provider="redi"] { --primary-color:#4800fa; --primary-dark:#2b00a8; --background-gradient:linear-gradient(140deg,#ebe7ff,#c7bcff); --tint:rgba(72,0,250,.09); }
.provider-picker { background:#fff; border-radius:1rem; padding:26px; margin-bottom:25px; box-shadow:var(--shadow); text-align:center; }
.provider-picker h2 { margin-bottom:18px; font-size:1.35rem; }
.provider-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.provider-choice { background:#fff; border:2px solid #e1e4e8; border-radius:14px; min-height:112px; padding:12px; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:8px; cursor:pointer; font-family:inherit; }
.provider-choice img { max-width:100%; width:auto; height:52px; object-fit:contain; }
.provider-choice.active { background:var(--tint); border-color:var(--primary-color); box-shadow:0 0 0 1px var(--primary-color); }
.provider-choice strong { font-size:.96rem; }
.offer-note { margin-top:17px; font-size:.85rem; color:#5a5060; line-height:1.5; }
.option-card { text-align:left; font-family:inherit; color:inherit; width:100%; border:2px solid #ececec; gap:10px; }
.option-card.selected { background:var(--tint); }
.option-card:hover { border-color:var(--primary-color); }
.tab-btn.active,.modal-summary { background:var(--tint); }
.option-card small { display:block; color:#555; font-size:.82rem; }
#price-after,#price-comparison { display:block; margin-top:4px; color:#444; font-size:.72rem; }
.logo { max-width:160px; object-fit:contain; }
[hidden] { display:none !important; }
.form-group input { display:block; width:100%; padding:12px; border:1px solid #ddd; border-radius:9px; font:inherit; }
.modal { border-radius:0; }
.close-modal { background:transparent; border:0; }
@media(max-width:650px) { .provider-choices{gap:6px} .provider-choice{padding:7px;min-height:88px} .provider-choice img{height:40px} .provider-picker{padding:14px} .provider-picker h2{font-size:1.05rem} .configurator-container{padding:16px} .step-section{padding:18px} .main-header h1{font-size:.93rem} .logo{max-width:100px} .provider-choice strong{font-size:.78rem} }
