/* ================================================
   WEBBUILDER COMMON STYLES
   Estilos unificados para todas las vistas del webbuilder
   ================================================ */

/* ── ROOT VARIABLES ── */
:root {
    --wb-primary: #0A2540;
    --wb-secondary: #006b5a;
    --wb-text-dark: #181c1e;
    --wb-bg-light: #f7fafd;
    --wb-teal: #006b5a;
    --wb-orange: #FF6B00;
    --wb-shadow: 0 4px 12px rgba(10, 37, 64, 0.12);
    --wb-shadow-light: 0 2px 14px rgba(0, 0, 0, 0.06);
    --wb-radius: 12px;
    --wb-radius-full: 9999px;
}

/* ── RESET & BASE ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Nunito', system-ui, -apple-system, sans-serif;
    background: var(--wb-bg-light);
    color: var(--wb-text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

input,
select,
textarea {
    font-family: inherit;
}

/* ── TOPBAR (optional) ── */
.wb-topbar {
    background: var(--wb-primary);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.78rem;
    padding: 0.35rem 0;
    display: none;
}

.wb-topbar a {
    color: rgba(255, 255, 255, 0.8);
}

.wb-topbar a:hover {
    color: #fff;
}

@media (min-width: 768px) {
    .wb-topbar {
        display: block;
    }
}

/* ── NAVBAR ── */
.wb-navbar,
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e5e8eb;
}

.wb-navbar {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    gap: 1rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.wb-navbar .navbar-brand,
.brand {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--wb-primary);
    flex: 1;
}

.wb-navbar .navbar-brand img,
.brand img {
    height: 36px;
    object-fit: contain;
}

.wb-navbar .nav-link,
.nav-links a {
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.wb-navbar .nav-link:hover,
.wb-navbar .nav-link.active,
.nav-links a:hover,
.nav-links a.active {
    color: var(--wb-primary);
    background: rgba(0, 15, 34, 0.06);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    padding: 0.4rem 0.75rem;
    border-radius: 50px;
    background: #f1f4f7;
    white-space: nowrap;
}

.back-btn:hover {
    background: #e5e8eb;
}

/* ── BOTTOM NAVIGATION ── */
.bnav {
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    z-index: 100;
    background: #fff;
    border-top: 1px solid rgba(10, 37, 64, 0.08);
    box-shadow: 0 -2px 10px rgba(10, 37, 64, 0.08);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    text-align: center;
}

.bnav-item.active {
    color: var(--wb-primary);
    font-weight: 700;
}

.ms {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    direction: ltr;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

.ms-fill {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

@media (min-width: 768px) {
    .bnav {
        display: none;
    }
    body {
        padding-bottom: 0 !important;
    }
}

@media (max-width: 767px) {
    body {
        padding-bottom: 64px;
    }
}

/* ── SECTION HEADERS ── */
.wb-section-badge {
    display: inline-block;
    background: color-mix(in srgb, var(--wb-primary) 12%, transparent);
    color: var(--wb-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0.25rem 0.85rem;
    border-radius: 50px;
    margin-bottom: 0.6rem;
}

.wb-section-title {
    font-weight: 800;
    font-size: 1.9rem;
    color: var(--wb-primary);
}

.sc-page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--wb-primary);
    margin-bottom: 0.4rem;
}

.sc-page-subtitle {
    font-size: 0.9rem;
    color: var(--wb-text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.wb-divider {
    display: block;
    width: 48px;
    height: 3px;
    background: var(--wb-secondary);
    border-radius: 2px;
    margin: 0.6rem auto 0;
}

/* ── CARDS ── */
.product-card,
.sc-form-card,
.phone-summary {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--wb-shadow-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--wb-shadow);
}

.product-card .img-wrap {
    position: relative;
    background: #f5f5f8;
    overflow: hidden;
}

.product-card .img-wrap img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.4s;
}

.product-card:hover .img-wrap img {
    transform: scale(1.05);
}

.product-card .img-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #f0f4ff, #e8ecf5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #c5cae0;
}

.product-card .badge-top,
.product-card .badge-stock {
    position: absolute;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.28rem 0.65rem;
    border-radius: 50px;
}

.product-card .badge-top {
    top: 0.75rem;
    right: 0.75rem;
}

.product-card .badge-stock {
    bottom: 0.75rem;
    left: 0.75rem;
}

.product-card .card-body-inner {
    padding: 1rem;
}

.product-card .prod-name {
    font-weight: 700;
    font-size: 0.93rem;
    line-height: 1.3;
    margin-bottom: 0.2rem;
}

.product-card .prod-price {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--wb-secondary);
}

.product-card .card-actions {
    padding: 0.5rem 1rem 0.9rem;
    display: flex;
    gap: 0.5rem;
}

.product-card .card-actions a {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50px;
    text-align: center;
    padding: 0.5rem 0.75rem;
}

/* ── FORM ELEMENTS ── */
.field-group {
    margin-bottom: 1rem;
}

.field-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #43474d;
    margin-bottom: 0.4rem;
}

.field-input,
.field-select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid #c4c6ce;
    border-radius: 8px;
    background: #f7fafd;
    font-size: 0.95rem;
    color: #181c1e;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.field-input:focus,
.field-select:focus {
    border-color: var(--wb-teal);
    box-shadow: 0 0 0 3px rgba(0, 107, 90, 0.12);
}

.field-input::placeholder {
    color: #74777e;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 600px) {
    .field-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── BUTTONS ── */
.sc-submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--wb-orange);
    color: #fff;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(255, 107, 0, 0.3);
    transition: background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.sc-submit-btn:hover {
    background: #e65f00;
}

.sc-submit-btn:active {
    transform: scale(0.97);
}

.btn-wa {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #25d366;
    color: #fff;
    border-radius: var(--wb-radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    transition: transform 0.2s;
}

.btn-wa:hover {
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    .btn-wa {
        display: flex;
    }
}

/* ── ALERTS & NOTICES ── */
.security-notice {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: rgba(0, 107, 90, 0.06);
    border: 1px solid rgba(0, 107, 90, 0.2);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.security-notice .ms {
    color: var(--wb-teal);
    font-size: 1.3rem;
    flex-shrink: 0;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.security-notice p {
    font-size: 0.82rem;
    color: #43474d;
    line-height: 1.5;
}

/* ── TRUST PILLS ── */
.trust-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.trust-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #43474d;
    background: #fff;
    border: 1px solid #e5e8eb;
    border-radius: 50px;
    padding: 0.4rem 0.9rem;
}

.trust-pill .ms {
    font-size: 1rem;
    color: var(--wb-teal);
}

/* ── FOOTER ── */
footer,
.wb-footer {
    background: var(--wb-primary);
    color: rgba(255, 255, 255, 0.75);
    padding: 2rem 1rem 1rem;
}

.footer-inner,
.wb-footer {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top,
.wb-footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
    .footer-top {
        grid-template-columns: 1.5fr 1fr 1fr;
    }
}

.footer-brand,
.wb-footer-logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand img {
    height: 30px;
    width: auto;
}

.footer-desc {
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-col h5,
.footer-col h6 {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col ul li a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ── FLOATING WHATSAPP ── */
.wb-float-wa,
.wb-whatsapp-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 40;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    transition: transform 0.2s;
}

.wb-float-wa:hover,
.wb-whatsapp-fab:hover {
    transform: scale(1.08);
}

.wb-float-wa svg,
.wb-whatsapp-fab i {
    width: 26px;
    height: 26px;
    fill: #fff;
}

.wb-whatsapp-fab i {
    font-size: 1.8rem;
}

/* ── PAGINATION ── */
.wb-pagination .page-item .page-link,
.pagination .page-link {
    border-radius: 50px;
    margin: 0 0.2rem;
    border: none;
    color: #555;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s;
}

.wb-pagination .page-item.active .page-link,
.pagination .page-item.active .page-link {
    background: var(--wb-primary);
    color: #fff;
}

/* ── CONTAINER ── */
.wb-container,
.sc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

@media (min-width: 768px) {
    .wb-container,
    .sc-container {
        padding: 2rem 1.5rem;
    }
}

/* ── SUMMARY CARDS ── */
.phone-summary {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.phone-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #ebeef1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.phone-icon .ms {
    font-size: 2rem;
    color: var(--wb-primary);
}

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

.phone-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #74777e;
}

.phone-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--wb-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.phone-price {
    font-size: 0.85rem;
    color: var(--wb-teal);
    font-weight: 600;
}

.cuota-badge {
    flex-shrink: 0;
    text-align: center;
    background: rgba(0, 107, 90, 0.08);
    border: 1px solid rgba(0, 107, 90, 0.25);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
}

.cuota-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--wb-teal);
}

.cuota-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--wb-teal);
    line-height: 1.2;
}

/* ── SUCCESS STATE ── */
.sc-success {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--wb-shadow-light);
}

.check-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 107, 90, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.check-circle .ms {
    font-size: 2.5rem;
    color: var(--wb-teal);
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.sc-success h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--wb-primary);
    margin-bottom: 0.75rem;
}

.sc-success p {
    font-size: 0.95rem;
    color: #43474d;
    max-width: 360px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.go-home {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--wb-primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.go-home:hover {
    opacity: 0.9;
}

/* ── LAYOUT ── */
@media (max-width: 767px) {
    body {
        padding-bottom: 80px;
    }
}

/* ── DARK MODE SUPPORT (optional) ── */
@media (prefers-color-scheme: dark) {
    /* Future dark mode support */
}
