/**
 * LP RHiD - Estilos do Configurador de Planos
 * Araponto / Control iD
 * ===================================
 */

/* ========== SEÇÃO DO CONFIGURADOR ========== */
.kit-section {
    padding: 6rem 1.5rem;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.kit-header {
    text-align: center;
    margin-bottom: 3rem;
}

.kit-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}

.kit-badge svg {
    width: 20px;
    height: 20px;
}

.kit-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.kit-title span {
    color: var(--primary-red);
}

.kit-subtitle {
    color: var(--text-gray);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ========== LAYOUT DO CONFIGURADOR ========== */
.kit-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    align-items: start;
}

.kit-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ========== STEP CARD - PREMIUM MINIMAL ========== */
.kit-step {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.25s ease;
    scroll-margin-top: 100px; /* Compensar header fixo */
}

.kit-step-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.kit-step-content {
    padding: 0 1.25rem 1.25rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.25s ease;
}

/* Step ativo (expandido) */
.kit-step.active {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 1px var(--primary-red);
    overflow: visible;
}

.kit-step.active .kit-step-content {
    max-height: 1200px; /* Aumentado para caber os cards */
    opacity: 1;
    padding-top: 0.75rem;
    padding-bottom: 2rem;
    overflow: visible;
}

.kit-step.active .kit-step-chevron {
    transform: rotate(180deg);
}

.kit-step.active .kit-step-number {
    background: var(--primary-red);
    color: #fff;
}

/* Step preenchido (completed) */
.kit-step.completed {
    border-color: #22c55e;
}

.kit-step.completed .kit-step-number {
    background: #22c55e;
    color: #fff;
}

/* Step bloqueado (waiting) */
.kit-step.locked {
    opacity: 0.4;
    pointer-events: none;
}

/* Chevron */
.kit-step-chevron {
    width: 16px;
    height: 16px;
    margin-left: auto;
    color: #94a3b8;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.kit-step.completed .kit-step-chevron,
.kit-step.locked .kit-step-chevron {
    display: none;
}

/* Valor selecionado (só aparece quando completed) */
.kit-step-value {
    margin-left: auto;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    display: none;
}

.kit-step.completed .kit-step-value {
    display: block;
}

/* Número do step */
.kit-step-number {
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.25s ease;
}

.kit-step-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
}

.kit-step.locked .kit-step-title {
    color: #94a3b8;
}

/* Descrição dentro do step */
.kit-step-desc {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
}

/* Botão Continuar - Minimalista */
.kit-step-continue-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 1.25rem;
    padding: 0.625rem 1rem;
    background: transparent;
    color: var(--primary-red);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--primary-red);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kit-step-continue-btn:hover {
    background: var(--primary-red);
    color: #fff;
}

.kit-step-continue-btn svg {
    width: 14px;
    height: 14px;
}

/* ========== EQUIPAMENTOS ========== */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding-bottom: 1.5rem;
}

.equipment-card {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: visible;
}

.equipment-card:hover {
    border-color: var(--primary-red);
    transform: translateY(-2px);
}

.equipment-card.selected {
    border-color: var(--primary-red);
    background: rgba(179, 21, 0, 0.03);
}

.equipment-card.selected::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--primary-red);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
    background-size: 16px;
    background-position: center;
    background-repeat: no-repeat;
}

/* Badge de aviso para REPs homologados - Premium Design */
.equipment-rep-badge {
    position: absolute;
    bottom: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #f8fafc;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.5rem 0.9rem;
    border-radius: 100px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    white-space: nowrap;
    z-index: 2;
    transition: all 0.2s ease;
}

.equipment-rep-badge:hover {
    transform: translateX(-50%) translateY(-1px);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.equipment-rep-badge::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Aviso de REP no step de CNPJs - Premium com Destaque */
.rep-notice-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    border: 1px solid #10b981;
    border-radius: 100px;
    padding: 0.7rem 1.3rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.rep-notice-inline svg {
    width: 18px;
    height: 18px;
    color: #ffffff;
    flex-shrink: 0;
}

.rep-notice-inline span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.01em;
}

/* Aviso REP no modal - Premium Minimalista */
.modal-rep-notice {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 100px;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
}

.modal-rep-notice svg {
    width: 16px;
    height: 16px;
    color: #22c55e;
    flex-shrink: 0;
}

.modal-rep-notice span {
    font-size: 0.8rem;
    font-weight: 500;
    color: #22c55e;
    letter-spacing: 0.01em;
}

/* Container da imagem com posição relativa para o badge */
.equipment-image-container {
    position: relative;
    width: 100%;
    margin-bottom: 0.5rem;
}

.equipment-image {
    width: 100%;
    height: 280px;
    object-fit: contain;
    object-position: center center;
    border-radius: 8px;
    background: #fff;
    display: block;
}

.equipment-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 0.2rem;
}

.equipment-type {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-bottom: 0.4rem;
}

.equipment-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--primary-red);
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.equipment-details-btn:hover {
    text-decoration: underline;
}

.equipment-details-btn img {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ========== DROPDOWNS CUSTOMIZADOS ========== */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 3rem 1rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.custom-select:hover {
    border-color: var(--primary-red);
}

.custom-select:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(179, 21, 0, 0.1);
}

.custom-select option {
    padding: 0.75rem;
    font-weight: 500;
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-gray);
    pointer-events: none;
    transition: all 0.2s ease;
}

.custom-select:hover + .select-arrow {
    color: var(--primary-red);
}

/* ========== INPUTS CUSTOMIZADOS ========== */
.custom-input-wrapper {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(179, 21, 0, 0.03);
    border: 1px solid rgba(179, 21, 0, 0.2);
    border-radius: 10px;
}

.custom-input-wrapper label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.custom-input-group {
    display: flex;
    gap: 0.5rem;
}

.custom-input {
    flex: 1;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    font-family: inherit;
    transition: all 0.2s ease;
}

.custom-input:hover {
    border-color: var(--primary-red);
}

.custom-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(179, 21, 0, 0.1);
}

.custom-input-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-red);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.custom-input-btn:hover {
    background: var(--primary-red-hover);
    transform: translateY(-1px);
}

.custom-input-btn svg {
    width: 18px;
    height: 18px;
}

.custom-input-note {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* ========== RESUMO LATERAL ========== */
.kit-summary {
    background: linear-gradient(145deg, var(--primary-dark) 0%, #0a0d15 100%);
    border-radius: 16px;
    padding: 1.25rem;
    position: sticky;
    top: 90px;
    color: #fff;
    transition: box-shadow 0.3s ease, transform 0.3s ease, border 0.3s ease;
    border: 2px solid rgba(179, 21, 0, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    scroll-margin-top: 100px;
}

/* Animação de destaque quando plano completo */
.kit-summary.highlight-pulse {
    animation: summaryPulse 0.6s ease-out;
}

@keyframes summaryPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(34, 197, 94, 0);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
        transform: scale(1);
    }
}

/* Estado completo do resumo */
.kit-summary.complete {
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.kit-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.kit-summary-title {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}

.kit-summary-title svg {
    width: 18px;
    height: 18px;
    color: var(--primary-red);
}

/* Indicador de progresso */
.kit-progress-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-red);
    background: rgba(179, 21, 0, 0.15);
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    border: 1px solid rgba(179, 21, 0, 0.3);
    transition: all 0.3s ease;
}

.kit-summary-items {
    margin-bottom: 0.75rem;
}

.kit-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.kit-summary-item:last-child {
    border-bottom: none;
}

.kit-summary-label {
    color: #64748b;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.kit-summary-value {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.8rem;
    text-align: right;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kit-summary-check {
    width: 14px;
    height: 14px;
    color: #22c55e;
    flex-shrink: 0;
}

.kit-summary-item.completed .kit-summary-label {
    color: #e2e8f0;
}

.kit-summary-item.completed .kit-summary-value {
    color: #fff;
    font-weight: 600;
}

/* ========== BADGE DE COMPLETO ========== */
.kit-complete-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.2) 100%);
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeInScale 0.3s ease;
}

.kit-complete-badge svg {
    width: 24px;
    height: 24px;
    color: #22c55e;
    flex-shrink: 0;
}

.kit-complete-badge span {
    color: #4ade80;
    font-weight: 600;
    font-size: 0.95rem;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========== PREÇO ========== */
.kit-price-box {
    background: rgba(179, 21, 0, 0.15);
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    text-align: center;
    border: 1px solid rgba(179, 21, 0, 0.2);
}

.kit-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.kit-price-period {
    font-size: 0.9rem;
    font-weight: 400;
    color: #94a3b8;
}

.kit-price-note {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.35rem;
}

/* ========== BOTÃO WHATSAPP ========== */
.kit-whatsapp-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #25d366;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.kit-whatsapp-btn:hover {
    background: #20bd5a;
    transform: translateY(-2px);
}

.kit-whatsapp-btn svg {
    width: 20px;
    height: 20px;
}

/* ========== MODAL DE EQUIPAMENTO ========== */
.equipment-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
    overflow-y: auto;
}

.equipment-modal.active {
    display: flex;
}

.equipment-modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 550px;
    width: 100%;
    position: relative;
    margin: auto;
}

.equipment-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bg-light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.equipment-modal-close:hover {
    background: var(--primary-red);
    color: #fff;
}

.equipment-modal-close svg {
    width: 20px;
    height: 20px;
}

.equipment-modal-image {
    width: 100%;
    height: 260px;
    object-fit: contain;
    object-position: center;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px 16px 0 0;
    padding: 1.25rem 2rem;
}

.equipment-modal-body {
    padding: 1.25rem 1.5rem;
}

.equipment-modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.equipment-modal-subtitle {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.equipment-modal-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.equipment-modal-feature {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-dark);
}

.equipment-modal-feature svg {
    width: 14px;
    height: 14px;
    color: #22c55e;
    flex-shrink: 0;
}

.equipment-modal-specs {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 0.75rem;
}

.equipment-modal-specs h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.equipment-modal-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
}

.equipment-modal-spec {
    font-size: 0.75rem;
}

.equipment-modal-spec strong {
    color: var(--text-dark);
}

.equipment-modal-spec span {
    color: var(--text-gray);
}

/* ========== MOBILE SUMMARY FOOTER (estilo iFood) ========== */
.mobile-summary-footer {
    display: none; /* Escondido por padrão no desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(145deg, var(--primary-dark) 0%, #0a0d15 100%);
    border-top: 1px solid rgba(179, 21, 0, 0.3);
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.mobile-summary-footer.visible {
    transform: translateY(0);
}

.mobile-summary-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    gap: 1rem;
}

.mobile-summary-info {
    flex: 1;
    min-width: 0;
}

.mobile-summary-equipment {
    font-size: 0.8rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.mobile-summary-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.mobile-price-label {
    font-size: 0.75rem;
    color: #64748b;
}

.mobile-price-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
}

.mobile-summary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary-red);
    color: #fff;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.mobile-summary-btn:hover {
    background: var(--primary-red-hover);
}

.mobile-summary-btn.complete {
    background: #25d366;
}

.mobile-summary-btn.complete:hover {
    background: #20bd5a;
}

.mobile-summary-btn svg {
    flex-shrink: 0;
}

/* Handle para arrastar */
.mobile-summary-bar {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0 0.25rem;
    cursor: pointer;
}

.mobile-summary-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    transition: background 0.2s ease;
}

.mobile-summary-bar:hover .mobile-summary-handle {
    background: rgba(255, 255, 255, 0.5);
}

/* Painel expandido */
.mobile-summary-expanded {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-summary-footer.expanded .mobile-summary-expanded {
    max-height: 400px;
}

.mobile-summary-footer.expanded .mobile-summary-handle {
    background: var(--primary-red);
}

.mobile-summary-footer.expanded .mobile-expanded-close svg {
    transform: rotate(180deg);
}

.mobile-expanded-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.mobile-expanded-header h4 {
    color: #1a1a2e;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.mobile-expanded-close {
    background: #e2e8f0;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.mobile-expanded-close:hover {
    background: #cbd5e1;
    color: #1a1a2e;
}

.mobile-expanded-close svg {
    transition: transform 0.3s ease;
    width: 18px;
    height: 18px;
}

.mobile-expanded-items {
    padding: 0.5rem 1rem;
    background: #fff;
}

.mobile-expanded-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-expanded-item:last-child {
    border-bottom: none;
}

.mobile-expanded-label {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
}

.mobile-expanded-value {
    color: #1a1a2e;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: right;
}

.mobile-expanded-note {
    text-align: center;
    padding: 0 1rem 1rem;
    color: #94a3b8;
    font-size: 0.75rem;
}

/* Barra de progresso */
.mobile-summary-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-red) 0%, #ff6b5b 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.mobile-progress-bar.complete {
    background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
}

/* ========== RESPONSIVE ========== */

/* Tablet landscape (1024px) */
@media (max-width: 1024px) {
    /* Mostrar footer mobile */
    .mobile-summary-footer {
        display: block;
    }

    /* Esconder resumo lateral quando footer mobile ativo */
    .kit-summary {
        display: none;
    }

    .kit-container {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .kit-steps {
        order: 0;
        padding-bottom: 100px; /* Espaço para o footer fixo */
    }

    .equipment-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kit-section {
        padding: 4rem 1.5rem;
    }
}

/* Tablet portrait (768px) */
@media (max-width: 768px) {
    .kit-section {
        padding: 3rem 1rem;
    }

    .kit-header {
        margin-bottom: 2rem;
    }

    .kit-badge {
        padding: 0.625rem 1.25rem;
        font-size: 0.8rem;
    }

    .kit-title {
        font-size: 2rem;
    }

    .kit-subtitle {
        font-size: 1rem;
    }

    .kit-container {
        gap: 1.5rem;
    }

    .kit-summary {
        padding: 1rem;
        border-radius: 12px;
    }

    .kit-summary-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .kit-summary-title {
        font-size: 0.9rem;
    }

    .kit-price {
        font-size: 1.5rem;
    }

    .kit-price-box {
        padding: 0.625rem;
    }

    .kit-whatsapp-btn {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }

    .equipment-image {
        height: 220px;
    }

    .equipment-card {
        padding: 0.625rem;
    }

    /* Badge REP no tablet - posição relativa */
    .equipment-rep-badge {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        font-size: 0.6rem;
        padding: 0.4rem 0.75rem;
        margin-top: 0.5rem;
        display: inline-flex;
    }

    .equipment-image-container {
        text-align: center;
    }

    .kit-step-header {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }

    .kit-step-title {
        font-size: 0.875rem;
    }

    .kit-step-number {
        width: 26px;
        height: 26px;
        min-width: 26px;
        font-size: 0.75rem;
    }

    .quantity-stepper {
        max-width: 260px;
    }
}

/* ========== QUANTITY STEPPER (HYBRID +/- BUTTONS) ========== */
.quantity-stepper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 280px;
    margin: 0 auto;
}

.quantity-stepper-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px; /* WCAG 2.5.8 AA - mínimo tap target */
    background: var(--primary-red);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    user-select: none;
}

.quantity-stepper-btn:hover:not(:disabled) {
    background: var(--primary-red-hover);
    transform: scale(1.05);
}

.quantity-stepper-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.quantity-stepper-btn:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
}

.quantity-stepper-input {
    flex: 1;
    height: 44px;
    min-height: 44px; /* WCAG 2.5.8 AA */
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    padding: 0 0.75rem;
    transition: all 0.2s ease;
}

.quantity-stepper-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(179, 21, 0, 0.1);
}

.quantity-stepper-input::-webkit-inner-spin-button,
.quantity-stepper-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-stepper-input[type=number] {
    -moz-appearance: textfield;
}

/* Label descritivo abaixo do stepper */
.quantity-stepper-label {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-top: 0.5rem;
    min-height: 1.25rem;
}

/* Variação para funcionários (incremento maior) */
.quantity-stepper.employee-stepper .quantity-stepper-input {
    letter-spacing: -0.02em;
}

/* Mobile (640px) */
@media (max-width: 640px) {
    /* Prevenir overflow horizontal em todo o configurador */
    .kit-section,
    .kit-section *,
    .kit-section > .container,
    .kit-section > .container * {
        box-sizing: border-box;
    }

    .kit-section {
        padding: 2.5rem 0 !important;
        overflow-x: hidden;
        width: 100vw;
        max-width: 100vw;
        margin-left: 0;
        margin-right: 0;
    }

    .kit-section > .container {
        padding: 0 1rem !important;
        max-width: 100% !important;
        overflow-x: hidden;
        width: 100%;
    }

    .kit-header {
        margin-bottom: 1.5rem;
        padding: 0;
    }

    .kit-badge {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }

    .kit-badge svg {
        width: 16px;
        height: 16px;
    }

    .kit-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .kit-subtitle {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .kit-container {
        gap: 1.25rem;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .kit-steps {
        gap: 0.5rem;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .kit-step {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .kit-step-content {
        max-width: 100%;
        box-sizing: border-box;
    }

    .equipment-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .equipment-card {
        max-width: 100%;
        box-sizing: border-box;
    }

    .equipment-card {
        padding: 0.75rem;
    }

    .equipment-image {
        height: 200px;
    }

    .equipment-name {
        font-size: 0.85rem;
    }

    .equipment-type {
        font-size: 0.7rem;
    }

    /* Badge REP no mobile - posição relativa para não vazar */
    .equipment-rep-badge {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        font-size: 0.6rem;
        padding: 0.4rem 0.75rem;
        gap: 0.375rem;
        margin-top: 0.75rem;
        display: inline-flex;
        width: auto;
    }

    .equipment-rep-badge::before {
        width: 12px;
        height: 12px;
    }

    /* Container da imagem precisa centralizar o badge */
    .equipment-image-container {
        text-align: center;
    }

    .kit-step {
        border-radius: 10px;
    }

    .kit-step-header {
        padding: 0.75rem;
        gap: 0.625rem;
    }

    .kit-step-title {
        font-size: 0.8rem;
    }

    .kit-step-number {
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 0.7rem;
    }

    .kit-step-value {
        font-size: 0.75rem;
        max-width: 120px;
        text-overflow: ellipsis;
    }

    .kit-step-content {
        padding: 0 0.75rem 1rem;
    }

    .kit-step.active .kit-step-content {
        padding: 0.5rem 0.75rem 1.5rem 0.75rem;
        max-height: 2000px;
    }

    .kit-step-desc {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }

    .kit-step-continue-btn {
        margin-top: 1rem;
        padding: 0.75rem 1.25rem;
        font-size: 0.8rem;
        width: 100%;
        justify-content: center;
    }

    /* Summary mobile - layout distribuido */
    .kit-summary {
        padding: 1rem;
        border-radius: 12px;
    }

    .kit-summary-header {
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .kit-summary-title {
        font-size: 0.9rem;
        gap: 0.4rem;
    }

    .kit-summary-title svg {
        width: 18px;
        height: 18px;
    }

    .kit-progress-text {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }

    /* Items em grid 2x2 no mobile */
    .kit-summary-items {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem 1rem;
        margin-bottom: 0.75rem;
    }

    .kit-summary-item {
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 8px;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        border-bottom: none;
    }

    .kit-summary-label {
        font-size: 0.7rem;
        gap: 0.25rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .kit-summary-value {
        font-size: 0.85rem;
        max-width: 100%;
        white-space: normal;
        word-break: break-word;
        color: #e2e8f0;
    }

    .kit-summary-check {
        width: 12px;
        height: 12px;
    }

    /* Preco box mobile */
    .kit-price-box {
        padding: 0.875rem 1rem;
        margin-bottom: 0.75rem;
        border-radius: 10px;
        text-align: center;
    }

    .kit-price {
        font-size: 1.75rem;
    }

    .kit-price-period {
        font-size: 0.9rem;
    }

    .kit-price-note {
        font-size: 0.7rem;
        margin-top: 0.35rem;
    }

    /* Botao WhatsApp full width */
    .kit-whatsapp-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .kit-whatsapp-btn svg {
        width: 20px;
        height: 20px;
    }

    /* Quantity stepper mobile */
    .quantity-stepper {
        max-width: 100%;
        gap: 0.5rem;
    }

    .quantity-stepper-btn {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        font-size: 1.25rem;
    }

    .quantity-stepper-input {
        height: 48px;
        min-height: 48px;
        font-size: 1rem;
    }

    .quantity-stepper-label {
        font-size: 0.8rem;
        margin-top: 0.375rem;
    }

    /* REP Notice */
    .rep-notice-inline {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .rep-notice-inline svg {
        width: 16px;
        height: 16px;
    }

    .rep-notice-inline span {
        font-size: 0.75rem;
    }

    /* Modal mobile */
    .equipment-modal {
        padding: 1rem 0.75rem;
    }

    .equipment-modal-content {
        border-radius: 12px;
    }

    .equipment-modal-image {
        height: 200px;
        padding: 1rem;
        border-radius: 12px 12px 0 0;
    }

    .equipment-modal-body {
        padding: 1rem;
    }

    .equipment-modal-title {
        font-size: 1.1rem;
    }

    .equipment-modal-subtitle {
        font-size: 0.8rem;
    }

    .equipment-modal-features {
        grid-template-columns: 1fr;
        gap: 0.375rem;
    }

    .equipment-modal-feature {
        font-size: 0.75rem;
    }

    .equipment-modal-specs {
        padding: 0.625rem;
    }

    .equipment-modal-specs h4 {
        font-size: 0.75rem;
    }

    .equipment-modal-specs-grid {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .equipment-modal-spec {
        font-size: 0.7rem;
    }

    .equipment-modal-close {
        width: 32px;
        height: 32px;
        top: 0.75rem;
        right: 0.75rem;
    }

    .equipment-modal-close svg {
        width: 16px;
        height: 16px;
    }

    .modal-rep-notice {
        padding: 0.375rem 0.75rem;
        margin: 0.75rem 0;
    }

    .modal-rep-notice svg {
        width: 14px;
        height: 14px;
    }

    .modal-rep-notice span {
        font-size: 0.7rem;
    }

    /* Custom inputs */
    .custom-input-group {
        flex-direction: column;
    }

    .custom-input-btn {
        width: 100%;
        justify-content: center;
    }

    .custom-input-wrapper {
        padding: 0.75rem;
    }

    .custom-input-wrapper label {
        font-size: 0.8rem;
    }

    .custom-input {
        padding: 0.625rem;
        font-size: 0.875rem;
    }

    .custom-input-note {
        font-size: 0.7rem;
    }
}

/* Extra small mobile (380px) */
@media (max-width: 380px) {
    .kit-section {
        padding: 2rem 0.75rem;
    }

    .kit-title {
        font-size: 1.35rem;
    }

    .kit-subtitle {
        font-size: 0.85rem;
    }

    .kit-badge {
        padding: 0.4rem 0.875rem;
        font-size: 0.7rem;
    }

    .kit-summary {
        padding: 0.75rem;
    }

    /* Grid 1 coluna em telas muito pequenas */
    .kit-summary-items {
        grid-template-columns: 1fr;
        gap: 0.375rem;
    }

    .kit-summary-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .kit-summary-value {
        max-width: 50%;
        text-align: right;
    }

    /* Preco e botao empilhados */
    .kit-price-box {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .kit-price {
        font-size: 1.25rem;
    }

    .kit-whatsapp-btn {
        width: 100%;
        justify-content: center;
    }

    .equipment-image {
        height: 180px;
    }

    .kit-step-header {
        padding: 0.625rem;
    }

    .kit-step-title {
        font-size: 0.75rem;
    }

    .quantity-stepper-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
}

/* ========== FIDELITY LINK (VER MAIS) ========== */

/* Desktop - Link ao lado do texto de fidelidade */
.fidelity-link {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-red, #b31500);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
    position: relative;
}

.fidelity-link::after {
    content: '→';
    margin-left: 4px;
    font-size: 0.875rem;
    transition: transform 0.2s ease;
}

.fidelity-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.fidelity-link:hover::after {
    transform: translateX(2px);
}

/* Mobile - Link abaixo do texto de fidelidade */
.fidelity-link-mobile {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-red, #b31500);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.fidelity-link-mobile::after {
    content: '→';
    margin-left: 4px;
    font-size: 0.875rem;
}

.fidelity-link-mobile:active {
    opacity: 1;
}

/* Ajuste na nota de preço para flex layout */
.kit-price-note {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.mobile-expanded-note {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

/* Responsive - Mobile breakpoint */
@media (max-width: 640px) {
    .fidelity-link {
        font-size: 0.7rem;
    }
    
    .fidelity-link-mobile {
        font-size: 0.7rem;
    }
}
