:root {
    /* ── Sistema de diseño compartido (vidrio, estructuras e inicio) ── */
    /* Marca */
    --primary: #0a2e5c;
    --primary-light: #e0f2fe;
    --primary-hover: #1e3a8a;
    --accent: #f4911e;
    --accent-hover: #e67e00;
    --accent-strong: #c2410c;
    /* naranja para texto o fondo con texto blanco (5,2:1) */
    /* Superficies */
    --bg-light: #f1f5f9;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --card-bg: var(--surface);
    /* Texto */
    --text-main: #0a2e5c;
    --text: var(--text-main);
    --text-dim: #5b6577;
    /* 5,4:1 también sobre --bg-light */
    --text-muted: #94a3b8;
    /* Bordes */
    --border: #cbd5e1;
    --border-soft: #e2e8f0;
    --glass-border: var(--border-soft);
    /* Estados */
    --success: #059669;
    --success-bright: #10b981;
    /* solo decoración: con texto blanco usar --success-strong */
    --success-strong: #047857;
    --danger: #ef4444;
    --danger-text: #b91c1c;
    --danger-bg: #fee2e2;
    --danger-border: #fecaca;
    --warning: #f59e0b;
    --warning-text: #b45309;
    --info: #0ea5e9;
    --info-text: #0369a1;
    --info-strong: var(--info-text);
    /* Foco visible (teclado) */
    --focus-ring: 0 0 0 3px rgba(245, 158, 11, 0.55);
    --focus-outline: 3px solid var(--warning);
    /* Radios */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 999px;
    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(10, 46, 92, 0.08);
    --shadow-md: 0 4px 12px rgba(10, 46, 92, 0.10);
    --glass-shadow: 0 10px 30px rgba(10, 46, 92, 0.08);
}



#hidden-mode-trigger {

    position: fixed;

    top: 0;

    right: 0;

    width: 80px;

    height: 80px;

    z-index: 9999;

}



/* Tasa BCV Flotante (Escritorio) */

.bcv-badge {

    position: fixed;

    bottom: 2rem;

    right: 2rem;

    background: #ffffff;

    border: 2px solid var(--primary);

    padding: 0.8rem 1.2rem;

    border-radius: var(--radius-md);

    z-index: 1400;

    display: flex;

    flex-direction: column;

    align-items: center;

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);

}



.bcv-label {

    font-size: 0.7rem;

    color: var(--text-dim);

    text-transform: uppercase;

    font-weight: 700;

    letter-spacing: 0.5px;

}



.bcv-value {

    font-size: 1.1rem;

    font-weight: 800;

    color: var(--primary);

}



.bcv-date {

    font-size: 0.65rem;

    font-weight: 700;

    color: var(--accent);

    margin-top: 2px;

}



* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

    font-family: 'Outfit', sans-serif;

}



body {

    background-color: var(--bg-light);

    color: var(--text-main);

    min-height: 100vh;

    display: flex;

    justify-content: center;

    align-items: center;

}



/* Sticky nav redesign */

.sticky-nav {

    position: fixed;

    top: 0;

    left: 0;

    width: 100%;

    background: #ffffff;

    z-index: 1000;

    border-bottom: 2px solid var(--primary);

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);

}



.nav-content {

    max-width: 1300px;

    margin: 0 auto;

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 0.8rem 1.5rem;

    gap: 1rem;

}



.nav-left,

.nav-right {

    display: flex;

    align-items: center;

    gap: 1rem;

}



.nav-btn {

    padding: 0.6rem 1.2rem !important;

    font-size: 0.9rem !important;

    white-space: nowrap;

}



.nav-info {

    flex: 1;

    text-align: center;

    display: flex;

    flex-direction: column;

    justify-content: center;

}



#stepIndicator {

    font-weight: 800;

    color: var(--primary);

    font-size: 0.85rem;

    text-transform: uppercase;

    letter-spacing: 1px;

}



.nav-bcv {

    display: none;

    /* Oculto en escritorio */

    flex-direction: column;

    align-items: flex-start;

    line-height: 1;

    padding-left: 1rem;

    border-left: 2px solid var(--border-soft);

}



.nav-bcv .bcv-label {

    font-size: 0.6rem;

    color: var(--text-dim);

    font-weight: 800;

    margin-bottom: 2px;

}



.nav-bcv .bcv-value {

    font-size: 0.9rem;

    font-weight: 800;

    color: var(--accent-strong);

}



.container {

    padding-top: 100px;

    width: 100%;

    max-width: 1300px;

    margin: 0 auto;

    padding-left: 20px;

    padding-right: 20px;

}



.header {

    text-align: center;

    margin-bottom: 3rem;

}



.header h1 {

    font-size: 2.5rem;

    font-weight: 800;

    color: var(--primary);

    text-transform: uppercase;

    letter-spacing: -1px;

}



/* Keyboard & Modal Visibility */

.keyboard-hidden {

    display: none !important;

}



/* Modal Overlay */

.modal-overlay {

    position: fixed;

    top: 0;

    left: 0;

    width: 100vw;

    height: 100vh;

    background: rgba(10, 46, 92, 0.4);

    backdrop-filter: blur(8px);

    display: flex;

    justify-content: center;

    align-items: center;

    /* Aling to top to avoid clipping when tall */

    z-index: 2000;

    overflow-y: auto;

    padding: 3rem 1rem;

}

#idle-modal {
    z-index: 4000;
}



.modal-content {

    margin: auto;

    /* Centrado inteligente: si es alto, empieza desde arriba */

    background: #ffffff;

    border: 2px solid var(--primary);

    padding: 2.5rem 2rem;

    border-radius: var(--radius-xl);

    text-align: center;

    max-width: 450px;

    width: 100%;

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);

    max-height: calc(100vh - 2rem);

    overflow-y: auto;

    /* Scroll interno si es necesario */

    position: relative;

}



.modal-content h2 {

    font-size: 2rem;

    margin-bottom: 1rem;

    color: var(--primary);

}



#idle-timer {

    color: var(--danger);

    font-weight: 800;

}



/* Card Styling */

.card {

    background: var(--card-bg);

    border: 1px solid var(--glass-border);

    border-radius: var(--radius-lg);

    padding: 3rem;

    box-shadow: var(--glass-shadow);

}



/* Progress Bar */

.progress-container {

    height: 6px;

    background: var(--border-soft);

    width: 100%;

}



.progress-bar {

    height: 100%;

    background: var(--accent);

    transition: width 0.4s ease;

}



/* Steps */

.step {

    display: none;

    animation: fadeIn 0.4s ease;

}



.step.active {

    display: block;

}



@keyframes fadeIn {

    from {

        opacity: 0;

        transform: translateY(5px);

    }



    to {

        opacity: 1;

        transform: translateY(0);

    }

}



.step-title {

    font-size: 1.8rem;

    font-weight: 700;

    margin-bottom: 0.5rem;

    text-align: center;

    color: var(--primary);

}



.step-subtitle {

    color: var(--text-dim);

    text-align: center;

    margin-bottom: 2.5rem;

    font-weight: 500;

}



/* Inputs */

.dimensions-inputs {

    display: flex;

    gap: 3rem;

    justify-content: center;

    margin: 3rem 0;

}



.input-group {

    display: flex;

    flex-direction: column;

    align-items: center;

}



.input-group label {

    font-size: 1.1rem;

    color: var(--primary);

    font-weight: 700;

    margin-bottom: 0.8rem;

    text-transform: uppercase;

    letter-spacing: 1px;

}



.virtual-keyboard-input {

    background: #ffffff;

    border: 3px solid var(--border-soft);

    border-radius: var(--radius-lg);

    padding: 1.5rem 2rem;

    color: var(--primary);

    font-size: 2.5rem;

    font-weight: 800;

    text-align: center;

    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);

    width: 250px;

}



.virtual-keyboard-input:focus {

    outline: none;

    border-color: var(--accent);

    box-shadow: 0 10px 15px -3px rgba(244, 145, 30, 0.2);

    transform: translateY(-2px);

    background: #fff;

}



.qty-input {

    width: 150px;

    background: #fff;

    border: 3px solid var(--border-soft);

    color: var(--primary);

    padding: 1rem;

    border-radius: var(--radius-lg);

    font-size: 2.5rem;

    font-weight: 800;

    text-align: center;

    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);

}



/* Options Grid */

.options-grid {

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));

    gap: 1.5rem;

    margin-bottom: 2.5rem;

    margin-top: 2.5rem;

}



/* Search Box */

.search-input {

    width: 100%;

    background: var(--surface-alt);

    border: 2px solid var(--border-soft);

    border-radius: var(--radius-md);

    padding: 1.2rem 2rem;

    color: var(--primary);

    font-size: 1.1rem;

    font-weight: 600;

    transition: all 0.3s;

}



.search-input:focus {

    outline: none;

    border-color: var(--primary);

    box-shadow: 0 0 0 4px rgba(10, 46, 92, 0.1);

}



.option-content {

    background: #ffffff;

    border: 2px solid var(--border-soft);

    border-radius: var(--radius-md);

    padding: 1.5rem;

    transition: all 0.2s;

    text-align: center;

}



.option-card input {

    display: none;

}



.option-card {

    cursor: pointer;

    display: block;

}



.option-card input:checked+.option-content {

    border-color: var(--accent);

    background: #fffaf0;

    box-shadow: 0 4px 15px rgba(244, 145, 30, 0.15);

}



.option-name {

    font-weight: 800;

    color: var(--primary);

    margin-bottom: 0.5rem;

    text-transform: uppercase;

    font-size: 0.9rem;

}



.option-price {

    font-size: 1.3rem;

    color: var(--accent-strong);

    font-weight: 800;

}



/* Keyboards */

#numeric-keypad,

#alpha-keyboard {

    position: fixed;

    background: #ffffff;

    z-index: 3000;

    /* Lower than modal overlay to avoid overlapping issues when not intended */

    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);

    border-top: 3px solid var(--primary);

    padding: 1.5rem;

    transition: transform 0.3s ease;

}



#numeric-keypad {

    bottom: 20px;

    right: 20px;

    width: auto;

    border: 2px solid var(--primary);

    border-radius: var(--radius-xl);

}



.keypad-grid {

    display: grid;

    grid-template-columns: repeat(3, 70px);

    gap: 0.8rem;

}



#alpha-keyboard {

    bottom: 0;

    left: 0;

    width: 100%;

    display: flex;

    flex-direction: column;

    gap: 0.8rem;

}



.keyboard-row {

    display: flex;

    justify-content: center;

    gap: 0.5rem;

}



.key,

.num-key {

    background: var(--bg-light);

    border: 1px solid var(--border-soft);

    color: var(--primary);

    min-width: 60px;

    height: 60px;

    border-radius: var(--radius-md);

    font-size: 1.2rem;

    font-weight: 700;

    cursor: pointer;

    display: flex;

    justify-content: center;

    align-items: center;

}



.key:hover,

.num-key:hover {

    background: var(--primary);

    color: #ffffff;

    transform: translateY(-2px);

}



.key-del {

    background: var(--danger-bg) !important;

    color: var(--danger) !important;

    border-color: var(--danger-border) !important;

}



.key-done {

    background: var(--primary) !important;

    color: white !important;

}



/* Result Display */

.summary-details {

    background: var(--surface-alt);

    border: 1px solid var(--border-soft);

    border-radius: var(--radius-md);

    padding: 2rem;

    color: var(--primary);

}



.summary-item {

    border-bottom: 1px solid var(--border-soft);

    padding: 0.8rem 0;

}



.total-price h3 {

    font-size: 4rem;

    color: var(--accent);

    font-weight: 900;

}



/* Buttons */

.btn {

    padding: 1rem 2.5rem;

    border-radius: var(--radius-sm);

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    cursor: pointer;

    border: none;

    transition: all 0.2s;

}



.btn-primary {

    background: var(--primary);

    color: #ffffff;

}



.btn-primary:hover {

    background: var(--primary-hover);

    box-shadow: 0 6px 20px rgba(10, 46, 92, 0.2);

}



.btn-accent {

    background: var(--accent-strong);

    color: #ffffff;

}



.btn-accent:hover {

    background: var(--accent-hover);

}



.btn-whatsapp {

    background: #15803d;
    /* verde WhatsApp oscurecido: 5:1 con texto blanco */

    color: white;

}



.btn-whatsapp:hover {

    background: #128C7E;

    transform: translateY(-2px);

    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);

}



.btn-secondary {

    background: #ffffff;

    border: 2px solid var(--border-soft);

    color: var(--primary);

}



/* Max Limit Toast */

.max-limit-toast {

    background: var(--primary) !important;

    border-bottom: 4px solid var(--accent);

    font-weight: 700;

}



/* Quick Measures */

.quick-measures {

    display: flex;

    gap: 1rem;

    margin-top: 2rem;

    max-width: 600px;

    margin-left: auto;

    margin-right: auto;

}



.btn-quick {

    background: var(--surface-alt);

    border: 2px solid var(--glass-border);

    padding: 1.2rem;

    border-radius: var(--radius-md);

    color: var(--primary);

    font-weight: 700;

    cursor: pointer;

    transition: all 0.2s;

}



.btn-quick:hover {

    border-color: var(--accent);

    background: #fffaf0;

    transform: translateY(-2px);

}



/* Floating Toasts */

.toasts-container {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 1000;
    pointer-events: none;
}

.quotes-dock {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    pointer-events: auto;
    max-width: 60px;
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.quotes-dock.expanded {
    max-width: 450px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Botón Toggle (Parte izquierda) */
.dock-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    width: 60px;
    padding: 0.8rem 0;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

.dock-toggle:hover {
    background: var(--primary-hover);
}

.dock-icon {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
}

.dock-badge {
    background: var(--accent-strong);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    padding: 2px 6px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.dock-arrow {
    font-size: 0.7rem;
    margin-top: 0.5rem;
    opacity: 0.8;
    transition: transform 0.4s ease;
}

.quotes-dock.expanded .dock-arrow {
    transform: rotate(180deg);
}

/* Contenido Expandible (Parte derecha) */
.dock-content {
    display: flex;
    flex-direction: column;
    width: 320px;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 1rem 1.2rem;
    overflow: hidden;
    box-sizing: border-box;
}

.quotes-dock.expanded .dock-content {
    opacity: 1;
    transition: opacity 0.3s ease 0.15s;
}

.dock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1.5px solid var(--bg-light);
    padding-bottom: 0.6rem;
    margin-bottom: 0.6rem;
}

.dock-header strong {
    font-size: 0.95rem;
    color: var(--text-main);
}

.dock-header span {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
}

.dock-items {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

.dock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.8rem;
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.dock-item:hover {
    background: var(--bg-light);
    transform: translateX(3px);
}

.dock-item .item-title {
    font-size: 0.85rem;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.dock-item .item-price {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
}



/* Final Summary Styles */

.final-quotes-summary {

    display: flex;

    flex-direction: column;

    gap: 2rem;

    margin: 2.5rem 0;

}



.summary-card {

    background: #ffffff;

    border: 1px solid var(--border-soft);

    border-radius: var(--radius-lg);

    overflow: hidden;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);

}



.summary-card-header {

    background: var(--surface-alt);

    border-bottom: 1px solid var(--border-soft);

    padding: 1rem 1.5rem;

    display: flex;

    justify-content: space-between;

    align-items: center;

}



.header-main-info {

    display: flex;

    align-items: center;

    gap: 1rem;

}



.vidrio-idx {

    background: var(--primary);

    color: white;

    font-size: 0.75rem;

    font-weight: 800;

    padding: 4px 12px;

    border-radius: var(--radius-xl);

    text-transform: uppercase;

}



.vidrio-title {

    font-size: 0.9rem;

    color: var(--primary);

    text-transform: uppercase;

    font-weight: 700;

}



.header-actions {

    display: flex;

    gap: 0.8rem;

}



.btn-edit-item,

.btn-remove-item {

    width: 32px;

    height: 32px;

    border-radius: 50%;

    border: none;

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    transition: all 0.2s;

    font-size: 0.9rem;

}



.btn-edit-item {

    background: var(--border-soft);

    color: var(--primary);

}



.btn-remove-item {

    background: var(--danger-bg);

    color: var(--danger);

}



.summary-card-body {

    padding: 1.5rem;

    display: flex;

    flex-direction: column;

    gap: 0.8rem;

}



.summary-line {

    display: flex;

    justify-content: space-between;

    padding-bottom: 0.8rem;

    border-bottom: 1px solid var(--bg-light);

}



.summary-line:last-child {

    border-bottom: none;

}



.summary-line span {

    color: var(--text-dim);

    font-size: 0.9rem;

}



.summary-line strong {

    color: var(--primary);

    font-weight: 700;

}



.summary-qty-row {

    margin-top: 1rem;

    padding-top: 1rem;

    border-top: 1px dashed var(--border-soft);

    display: flex;

    justify-content: space-between;

    align-items: center;

}



.qty-stepper {

    display: flex;

    align-items: center;

    gap: 1.2rem;

}



.qty-stepper button {

    width: 30px;

    height: 30px;

    border-radius: 50%;

    border: 1px solid var(--border);

    background: white;

    font-weight: 700;

    cursor: pointer;

}



.qty-val {

    font-weight: 800;

    color: var(--primary);

    font-size: 1.1rem;

}



.summary-card-footer {

    background: #fffaf0;

    padding: 1.2rem 1.5rem;

    display: flex;

    justify-content: space-between;

    align-items: center;

    border-top: 2px dashed var(--accent);

}



.summary-card-footer span {

    font-weight: 700;

    color: var(--text-dim);

}



.summary-card-footer strong {

    font-size: 1.3rem;

    color: var(--accent);

    font-weight: 900;

}



/* Total Summary Card (Big Blue Box) */

.total-summary-card {

    background: var(--primary);

    color: white;

    padding: 3rem;

    border-radius: var(--radius-xl);

    text-align: center;

    margin-top: 3.5rem;

    box-shadow: 0 15px 35px rgba(10, 46, 92, 0.2);

}



.grand-total-display>span {

    display: block;

    font-size: 1.1rem;

    opacity: 0.9;

    margin-bottom: 0.8rem;

    text-transform: uppercase;

    letter-spacing: 1.5px;

    font-weight: 600;

}



.grand-total-display h2 {

    font-size: 5rem;

    font-weight: 950;

    color: var(--accent);

    margin: 0;

    line-height: 1;

}



/* Pay Now Button (Special Highlight) */

.btn-pay-now {

    background: var(--success-strong);

    color: white;

    width: 100%;

    max-width: 400px;

    height: 70px;

    border-radius: var(--radius-lg);

    border: none;

    font-size: 1.4rem;

    font-weight: 900;

    cursor: pointer;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 1rem;

    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);

    transition: all 0.3s;

    letter-spacing: 1px;

}



.btn-pay-now:hover {

    background: var(--success);

    transform: translateY(-3px);

    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4);

}



.btn-pay-now:active {

    transform: translateY(-1px);

}



.secondary-step-actions {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));

    gap: 1rem;

    max-width: 900px;

    margin: 0 auto;

}



.secondary-step-actions .btn {

    padding: 0.8rem 1.5rem;

    font-size: 0.85rem;

    height: 50px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 0.5rem;

}



/* Checkout Modal Styles */

.checkout-modal-content {

    max-width: 900px !important;

    padding: 2.5rem !important;

    width: 95% !important;

    max-height: 90vh;

    overflow-y: auto;

}

/* Ocultar badge de disponibilidad dentro del modal de pago/cotización — no aplica para monedas */
#checkout-modal .stock-badge {
    display: none !important;
}



.checkout-main-grid {

    display: grid;

    grid-template-columns: 1.2fr 1fr;

    gap: 2.5rem;

    align-items: start;

    text-align: left;

}



.checkout-nif-container {

    display: flex;

    gap: 0.5rem;

    width: 100%;

}



.checkout-select {

    width: 80px;

    background: var(--bg-light);

    border: 2px solid var(--border-soft);

    border-radius: var(--radius-md);

    font-weight: 700;

    color: var(--primary);

    padding: 0 10px;

}



.checkout-input-nif {

    flex: 1;

    padding: 0.8rem 1.2rem;

    font-size: 1.5rem;

    height: 55px;

}



.btn-check-client {

    padding: 0 20px;

    height: 55px;

}



.checkout-input-full {

    width: 100%;

    align-items: flex-start;

    margin-bottom: 1.5rem;

}



.checkout-input {

    width: 100%;

    padding: 0.8rem 1.2rem;

    font-size: 1.2rem;

    height: 50px;

}



.checkout-grid-twocols {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 1.5rem;

}



.checkout-textarea {

    width: 100%;

    padding: 1rem 1.2rem;

    height: 80px;

    border-radius: var(--radius-md);

}



.checkout-currency-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;

}



.checkout-price-box {

    margin-top: 1.5rem;

    padding: 2rem;

    background: var(--surface-alt);

    border-radius: var(--radius-xl);

    border: 2px solid var(--border-soft);

    text-align: center;

}



.checkout-ves-price {

    font-size: 2.8rem;

    font-weight: 900;

    color: var(--primary);

}



/* MOBILE ADJUSTMENTS */

@media (max-width: 800px) {

    .nav-content {

        padding: 0.4rem 0.8rem;

        gap: 0.5rem;

    }



    .nav-btn {

        padding: 0.4rem 0.8rem !important;

        font-size: 0.8rem !important;

    }



    .bcv-badge {

        display: none;

        /* Oculto en m¨®vil */

    }



    .nav-bcv {

        display: flex;

        /* Visible en m¨®vil */

        padding-left: 0.5rem;

        border-left: 1px solid var(--border-soft);

    }



    .nav-bcv .bcv-value {

        font-size: 0.75rem;

    }



    #stepIndicator {

        font-size: 0.7rem;

    }



    .header h1 {

        font-size: 1.5rem;

        margin-top: 1rem;

    }



    .quick-measures {

        flex-direction: column;

        gap: 0.5rem;

    }



    .total-price h3 {

        font-size: 2.2rem;

    }



    .grand-total-display h2 {

        font-size: 2.8rem;

    }



    .card {

        padding: 1.5rem;

    }



    .virtual-keyboard-input,

    .qty-input {

        width: 100%;

        font-size: 1.8rem;

    }



    .dimensions-inputs {

        flex-direction: column;

        gap: 1.2rem;

    }



    #numeric-keypad,

    #alpha-keyboard {

        display: none !important;

    }



    .sticky-nav {

        position: fixed;

    }



    .container {

        padding-top: 80px;

    }



    .total-summary-card {

        padding: 2rem 1rem;

        margin-top: 2rem;

    }



    .grand-total-display h2 {

        font-size: 2.8rem;

    }



    .options-grid {

        grid-template-columns: 1fr;

        gap: 1rem;

    }



    .option-content {

        padding: 1.2rem;

    }



    .option-name {

        font-size: 0.8rem;

    }



    .option-price {

        font-size: 1.1rem;

    }



    .checkout-modal-content {

        padding: 1.2rem 1rem !important;

        max-height: 85vh;

        width: 95% !important;

        overflow-y: auto;

        display: flex !important;

        flex-direction: column;

        margin: 0.5rem auto;

    }



    .checkout-main-grid {

        grid-template-columns: 1fr;

        gap: 1.2rem;

        display: flex;

        flex-direction: column;

    }



    .checkout-input-nif {

        font-size: 1.1rem;

        height: 48px;

    }



    .checkout-input {

        font-size: 0.95rem;

        height: 45px;

    }



    .checkout-price-box {

        padding: 1rem;

        margin-top: 0.8rem;

    }



    .checkout-ves-price {

        font-size: 1.8rem;

    }



    .secondary-step-actions {

        grid-template-columns: 1fr;

    }

}



.btn-confirm {

    width: 100%;

    justify-content: center;

    background: var(--success-bright) !important;

    height: 55px;

    border-radius: var(--radius-md);

    font-size: 1.1rem;

    display: flex;

    align-items: center;

}



.btn-confirm:hover {

    background: var(--success) !important;

}



@media print {



    .sticky-nav,

    .quotes-toast,

    .btn-remove,

    .step-actions,

    #hidden-mode-trigger {

        display: none !important;

    }

}



@keyframes fadeIn {

    from {

        opacity: 0;

        transform: translateY(-10px);

    }



    to {

        opacity: 1;

        transform: translateY(0);

    }

}



@keyframes pulse-hint {

    0% {

        opacity: 0.7;

        transform: scale(1);

    }



    50% {

        opacity: 1;

        transform: scale(1.02);

    }



    100% {

        opacity: 0.7;

        transform: scale(1);

    }

}



#check-nif-instruction {

    animation: pulse-hint 2s infinite ease-in-out;

}



/* Ensure SweetAlert2 is always on top of our modals */

.swal2-container {

    z-index: 10000 !important;

}

/* Fixes for Calculator */

/* 1. Visibility of quantity input in perforations step */
.option-card.quantity-mode .qty-input {
    display: block !important;
    width: 120px;
    margin: 10px auto;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 5px;
    height: auto;
    font-size: 1.5rem;
    text-align: center;
    background: #ffffff;
}

/* 2. Floating rate badge movement when keyboard is open */
.bcv-badge {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

body.keyboard-open .bcv-badge {
    right: 350px !important;
    bottom: 32px !important;
}

@media (max-width: 800px) {
    body.keyboard-open .bcv-badge {
        display: none !important;
    }
}

/* 3. Print styles: Hide action buttons and nav */
@media print {

    .sticky-nav,
    .toasts-container,
    .header-actions,
    .primary-checkout-action,
    .secondary-step-actions,
    .btn-edit-item,
    .btn-remove-item,
    .bcv-badge,
    #hidden-mode-trigger {
        display: none !important;
    }

    .container {
        padding-top: 0 !important;
    }

    .summary-card {
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #eee !important;
    }
}

/* 4. Discount badge in checkout */
.discount-badge {
    display: inline-block;
    background: var(--success-strong);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 0.5rem;
    animation: fadeIn 0.3s ease;
}

/* 5. Start Screen Unified Styles */
.glass-type-mini-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    max-width: 450px;
}

.mini-card {
    background: white;
    border: 2px solid var(--glass-border);
    padding: 12px 15px;
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-dim);
}

.mini-card:hover {
    border-color: var(--primary);
    background: var(--surface-alt);
}

.mini-card.active {
    border-color: var(--primary) !important;
    background: rgba(10, 46, 92, 0.05) !important;
    color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(10, 46, 92, 0.1);
}

.sale-mode-divider {
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 20px 0 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.sale-mode-divider::before,
.sale-mode-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

/* Store Item Styles */
.store-item {
    background: var(--surface-alt);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.store-item:hover {
    background: var(--bg-light);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.store-item strong {
    color: var(--primary);
    font-size: 1rem;
}

.store-item span {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.store-badge {
    background: var(--accent-strong);
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.store-badge:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.mode-card:hover,
.lamina-card:hover,
.type-card:hover {
    border-color: var(--accent) !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.mode-card.active,
.lamina-card.active,
.type-card.active {
    border-color: var(--accent) !important;
    background: linear-gradient(135deg, rgba(244, 145, 30, 0.05), rgba(10, 46, 92, 0.05)) !important;
}

/* Responsive */
@media (max-width: 768px) {

    .mode-card,
    .lamina-card,
    .type-card {
        width: 100% !important;
        padding: 1.5rem !important;
    }

    .sale-mode-selector,
    .lamina-options,
    .glass-type-selector {
        flex-direction: column;
        align-items: center;
    }
}

/* Estilos para los nuevos selectores */
.mode-card:hover,
.lamina-card:hover,
.type-card:hover {
    border-color: var(--accent) !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.mode-card:active,
.lamina-card:active,
.type-card:active {
    transform: translateY(-2px);
}

.mode-card.active,
.lamina-card.active,
.type-card.active {
    border-color: var(--accent) !important;
    background: linear-gradient(135deg, rgba(244, 145, 30, 0.05), rgba(10, 46, 92, 0.05)) !important;
}

/* Animación sutil para los SVG */
.mode-card svg,
.lamina-card svg,
.type-card svg {
    transition: transform 0.3s ease;
}

.mode-card:hover svg,
.lamina-card:hover svg,
.type-card:hover svg {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {

    .mode-card,
    .lamina-card,
    .type-card {
        width: 100% !important;
        padding: 1.5rem !important;
    }

    .sale-mode-selector,
    .lamina-options,
    .glass-type-selector {
        flex-direction: column;
        align-items: center;
    }

    .mode-card svg,
    .lamina-card svg,
    .type-card svg {
        width: 80px;
        height: auto;
    }
}

/* Estilos para las sugerencias de lámina */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.lamina-option-btn {
    transition: all 0.2s ease;
}

.lamina-option-btn:hover {
    transform: scale(1.02);
    border-color: var(--primary) !important;
    background: var(--primary-light) !important;
}

/* ── Precios según el modo de moneda (assets/js/pricing.js) ──
   Modo BCV: "REF $" como importe principal y bolívares pequeños debajo. Modo USD: solo "$". */
.price-main {
    white-space: nowrap;
}

.price-bs {
    display: block;
    font-size: max(0.72rem, 0.55em);
    font-weight: 600;
    color: var(--text-dim);
    white-space: nowrap;
}

/* ── Selector de moneda BCV | USD (common_logic.js) ── */
.currency-switch {
    display: inline-flex;
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
}

.currency-switch-opt {
    border: none;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-weight: 800;
    font-size: 0.9rem;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    min-width: 64px;
    white-space: nowrap;
}

.currency-switch-opt.active {
    background: var(--primary);
    color: #fff;
}

.currency-switch-opt[data-mode="USD"].active {
    background: var(--accent-strong);
}

.currency-switch-opt:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: -3px;
}

/* ── Paneles flotantes sin tapar contenido ──
   La tasa BCV se muestra en la cabecera (también en escritorio) en lugar de una insignia
   flotante; el modo USD ya lo indica el selector BCV | USD. */
.bcv-badge {
    display: none !important;
}

.nav-bcv {
    display: flex;
}

/* Espacio al final para que los paneles flotantes inferiores (cotizaciones / carrito) no tapen contenido */
main.container {
    padding-bottom: 170px !important;
}

/* En el resumen de vidrio el panel de cotizaciones duplica la información */
body:has(.step.active[data-step="summary"]) .toasts-container {
    display: none !important;
}

/* ── Progreso y confirmación del pedido (assets/js/order_progress.js) ── */
.order-progress {
    list-style: none;
    margin: 0.5rem auto 0;
    padding: 0;
    text-align: left;
    max-width: 360px;
}

.op-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.45rem 0;
    font-size: 1rem;
    color: var(--text-muted);
}

.op-step.op-active {
    color: var(--primary);
    font-weight: 700;
}

.op-step.op-done {
    color: var(--success-bright);
}

.op-mark {
    width: 20px;
    display: inline-flex;
    justify-content: center;
    font-weight: 800;
}

.op-spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(10, 46, 92, 0.25);
    border-top-color: var(--primary);
    animation: opSpin 0.8s linear infinite;
}

@keyframes opSpin {
    to {
        transform: rotate(360deg);
    }
}

.op-note {
    margin-top: 1rem;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.op-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.op-success-label {
    color: var(--text-dim);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.op-success-number {
    font-size: 2.1rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 0.02em;
    user-select: all;
}

.op-copy {
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--primary);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.9rem;
    font: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.op-copy:hover,
.op-copy:focus-visible {
    border-color: var(--primary);
    outline: none;
}

.op-success-note {
    margin: 0.75rem 0 0;
}

.op-autoclose {
    display: block;
    margin-top: 0.75rem;
    color: var(--text-muted);
}

/* ===== Accesibilidad: foco visible para teclado en todo elemento interactivo ===== */
:where(a, button, input, select, textarea, summary, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: var(--focus-outline);
    outline-offset: 2px;
}

/* Bolívares sobre fondos oscuros (total a pagar): blanco suave en vez de gris */
#grandTotalFinal .price-bs,
.grand-total-display .price-bs {
    color: rgba(255, 255, 255, 0.85);
}

/* ===== Aviso de inactividad (vidrio y estructuras) ===== */
.idle-content {
    max-width: 420px;
    text-align: center;
    padding: 2rem 1.75rem;
}

.idle-content h2 {
    margin: 0.75rem 0 0.5rem;
    color: var(--primary);
}

.idle-content p {
    color: var(--text-dim);
    line-height: 1.5;
    margin: 0 0 1.25rem;
}

.idle-content strong {
    color: var(--primary);
}

.idle-ring {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto;
}

.idle-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.idle-ring-bg {
    fill: none;
    stroke: var(--border-soft);
    stroke-width: 6;
}

.idle-ring-fg {
    fill: none;
    stroke: var(--accent-strong);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.9s linear;
}

.idle-ring span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--primary);
}

.idle-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.idle-actions .btn {
    width: 100%;
    padding: 0.95rem 1rem;
    font-size: 1.05rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .idle-ring-fg {
        transition: none;
    }
}

/* Total a pagar del resumen de vidrio: importe principal grande y bolívares debajo */
.grand-total-display h2 .price-main {
    display: block;
    font-size: 3.6rem;
    line-height: 1.05;
    letter-spacing: -0.5px;
}

.grand-total-display h2 .price-bs {
    font-size: 1.5rem;
    margin-top: 0.5rem;
    text-transform: none;
}

@media (max-width: 800px) {
    .grand-total-display h2 .price-main {
        font-size: 2.6rem;
    }

    .grand-total-display h2 .price-bs {
        font-size: 1.15rem;
    }
}