/* ============================================
   CAD3D Solutions | Orçamento 3D — styles.css
   Mantém design tokens do site principal
   ============================================ */

:root {
    --bg-base: #020617;
    --bg-surface: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.75);
    --brand-primary: #e11d48;
    --brand-secondary: #f97316;
    --brand-accent: #10b981;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius: 20px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ---- Navbar ---- */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 100;
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 14px 0;
}
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; }
.logo img { height: 30px; border-radius: 6px; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-item { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; }
.nav-item:hover { color: white; }
.btn-wa {
    background: var(--brand-accent); color: white; padding: 9px 22px;
    border-radius: 100px; font-weight: 600; font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(16,185,129,0.3); transition: 0.3s;
}
.btn-wa:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,185,129,0.45); }

/* ---- Hero ---- */
.hero-compact {
    padding: 118px 0 56px;
    text-align: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(225,29,72,0.1) 0%, transparent 65%);
    border-bottom: 1px solid var(--glass-border);
}
.hero-badge {
    display: inline-block;
    background: rgba(225,29,72,0.12); border: 1px solid rgba(225,29,72,0.3);
    color: #f87171; padding: 5px 16px; border-radius: 100px;
    font-size: 0.82rem; font-weight: 600; margin-bottom: 20px; letter-spacing: 0.05em;
}
.hero-compact h1 {
    font-size: 2.8rem; font-weight: 900; line-height: 1.15;
    margin-bottom: 14px; letter-spacing: -0.03em;
}
.hero-compact h1 span {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-compact p { color: var(--text-secondary); font-size: 1.05rem; max-width: 580px; margin: 0 auto; }

/* ---- Main Layout ---- */
.main-content { padding: 44px 0 80px; }
.layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

/* ---- Cards ---- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 26px;
    backdrop-filter: blur(10px);
    box-shadow: var(--glass-shadow);
    margin-bottom: 20px;
    transition: border-color 0.3s;
}
.card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 18px; color: white; }
.card-subtitle { color: var(--text-secondary); font-size: 0.88rem; margin-top: -12px; margin-bottom: 18px; }

/* ---- Upload Zone ---- */
.upload-card {
    padding: 0; overflow: hidden; cursor: pointer;
    min-height: 260px; display: flex; flex-direction: column; justify-content: center;
}
.upload-card:hover { border-color: rgba(225,29,72,0.5); }
.upload-card.dragover {
    border-color: var(--brand-primary);
    background: rgba(225,29,72,0.05);
    box-shadow: 0 0 0 3px rgba(225,29,72,0.12), var(--glass-shadow);
}
.upload-inner {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 44px 24px; gap: 10px; text-align: center;
}
.upload-icon {
    width: 64px; height: 64px;
    background: rgba(225,29,72,0.1); border: 1px solid rgba(225,29,72,0.25);
    border-radius: 16px; display: flex; align-items: center; justify-content: center;
    color: var(--brand-primary); margin-bottom: 6px; transition: 0.3s;
}
.upload-card:hover .upload-icon { background: rgba(225,29,72,0.18); transform: translateY(-3px); }
.upload-icon svg { width: 30px; height: 30px; }
.upload-inner h3 { font-size: 1.15rem; font-weight: 700; }
.upload-inner p { color: var(--text-secondary); font-size: 0.92rem; }
.upload-hint { font-size: 0.78rem !important; color: rgba(148,163,184,0.55) !important; }
.btn-upload {
    margin-top: 10px;
    background: transparent; border: 1px solid var(--glass-border);
    color: var(--text-secondary); padding: 9px 24px; border-radius: 100px;
    font-family: 'Inter', sans-serif; font-size: 0.88rem; font-weight: 500;
    cursor: pointer; transition: 0.3s;
}
.btn-upload:hover { border-color: var(--brand-primary); color: white; background: rgba(225,29,72,0.1); }

/* ---- Preview 3D ---- */
.preview-card { padding: 20px; }
.preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.file-info { font-size: 0.83rem; color: var(--text-secondary); font-weight: 600; }
.file-info strong { color: white; }
.btn-remove {
    background: rgba(225,29,72,0.1); border: 1px solid rgba(225,29,72,0.25);
    color: #f87171; padding: 5px 14px; border-radius: 100px;
    font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: 0.3s;
}
.btn-remove:hover { background: rgba(225,29,72,0.22); }
.canvas-wrapper {
    position: relative; border-radius: 12px; overflow: hidden;
    background: linear-gradient(135deg, #0a0f1e, #131b2e);
    border: 1px solid var(--glass-border);
    aspect-ratio: 4/3;
}
#preview-canvas { width: 100%; height: 100%; display: block; }
.canvas-hint {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    font-size: 0.72rem; color: rgba(255,255,255,0.3); white-space: nowrap;
    pointer-events: none;
}
.model-metrics {
    display: grid; grid-template-columns: repeat(3,1fr);
    gap: 12px; margin-top: 16px;
}
.metric {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px; padding: 12px; text-align: center;
}
.metric-label { display: block; font-size: 0.72rem; color: var(--text-secondary); margin-bottom: 4px; }
.metric-value { display: block; font-size: 0.9rem; font-weight: 700; color: white; }

/* ---- Parâmetros ---- */
.param-group { margin-bottom: 18px; }
.param-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.input-styled {
    width: 100%; background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border); border-radius: 10px;
    color: white; padding: 10px 14px;
    font-family: 'Inter', sans-serif; font-size: 0.92rem;
    transition: 0.3s; outline: none; appearance: none;
}
.input-styled:focus { border-color: var(--brand-primary); background: rgba(225,29,72,0.05); }
.input-styled option { background: #0f172a; }
select.input-styled { cursor: pointer; }

/* Slider */
.slider-wrapper { display: flex; align-items: center; gap: 12px; }
.slider-label { font-size: 0.75rem; color: var(--text-secondary); white-space: nowrap; }
.slider-styled {
    flex: 1; -webkit-appearance: none; appearance: none;
    height: 6px; border-radius: 3px;
    background: linear-gradient(to right, var(--brand-primary) var(--pct, 10%), rgba(255,255,255,0.1) var(--pct, 10%));
    outline: none; cursor: pointer;
}
.slider-styled::-webkit-slider-thumb {
    -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
    background: var(--brand-primary); cursor: pointer;
    box-shadow: 0 0 8px rgba(225,29,72,0.5); transition: 0.2s;
}
.slider-styled::-webkit-slider-thumb:hover { transform: scale(1.2); }
.infill-value { color: var(--brand-primary); font-weight: 700; }

.infill-presets { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.preset-btn {
    padding: 5px 14px; border-radius: 100px; font-size: 0.78rem; font-weight: 600;
    border: 1px solid var(--glass-border); background: transparent;
    color: var(--text-secondary); cursor: pointer; transition: 0.2s;
    font-family: 'Inter', sans-serif;
}
.preset-btn:hover, .preset-btn.active {
    border-color: var(--brand-primary); color: white; background: rgba(225,29,72,0.12);
}

/* ---- Resultado ---- */
.result-placeholder {
    text-align: center; padding: 24px;
    color: var(--text-secondary); font-size: 0.9rem;
    background: rgba(255,255,255,0.02); border-radius: 12px;
    border: 1px dashed var(--glass-border);
}
.result-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.9rem;
}
.result-row span:first-child { color: var(--text-secondary); }
.result-row span:last-child { font-weight: 600; color: white; }
.result-divider { border-top: 1px solid var(--glass-border); margin: 8px 0; }
.price-unit { font-size: 1rem !important; }
.price-unit span:last-child { font-size: 1.2rem !important; color: var(--brand-secondary) !important; }
.price-total { font-size: 1.05rem !important; margin-top: 4px; }
.price-highlight {
    font-size: 1.8rem !important; font-weight: 900 !important;
    color: var(--brand-accent) !important;
    animation: price-pop 0.35s ease;
}
@keyframes price-pop {
    0% { transform: scale(0.9); opacity: 0.5; }
    60% { transform: scale(1.06); }
    100% { transform: scale(1); opacity: 1; }
}
.result-disclaimer {
    margin-top: 14px; font-size: 0.75rem; color: rgba(148,163,184,0.6);
    background: rgba(249,115,22,0.05); border: 1px solid rgba(249,115,22,0.15);
    border-radius: 8px; padding: 10px 12px;
}

/* ---- Formulário ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.full-width { grid-column: 1 / -1; }

/* ---- CTAs ---- */
.cta-group { display: flex; flex-direction: column; gap: 12px; }
.btn-primary {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: linear-gradient(135deg, var(--brand-accent), #059669);
    color: white; padding: 16px 28px; border-radius: 14px;
    font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 700;
    border: none; cursor: pointer; transition: 0.3s;
    box-shadow: 0 8px 24px rgba(16,185,129,0.3);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(16,185,129,0.45); }
.btn-secondary {
    display: flex; align-items: center; justify-content: center;
    padding: 14px 28px; border-radius: 14px;
    border: 1px solid var(--glass-border); color: var(--text-secondary);
    font-size: 0.88rem; font-weight: 500; transition: 0.3s; text-align: center;
    background: transparent; cursor: pointer;
}
.btn-secondary:hover { border-color: var(--brand-primary); color: white; background: rgba(225,29,72,0.07); }

/* ---- Footer ---- */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 32px 0; background: var(--bg-surface);
}
.footer-content {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.85rem; color: var(--text-secondary);
}
.footer-content a:hover { color: white; }

/* ---- Loading spinner ---- */
.spinner-overlay {
    position: absolute; inset: 0; background: rgba(2,6,23,0.7);
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 12px; border-radius: 12px; z-index: 10;
}
.spinner {
    width: 36px; height: 36px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--brand-primary);
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-overlay p { font-size: 0.85rem; color: var(--text-secondary); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .layout-grid { grid-template-columns: 1fr; }
    .hero-compact h1 { font-size: 2rem; }
    .model-metrics { grid-template-columns: repeat(3,1fr); }
    .form-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; gap: 8px; text-align: center; }
}
@media (max-width: 480px) {
    .nav-links .nav-item { display: none; }
    .model-metrics { grid-template-columns: 1fr 1fr; }
    .metric:last-child { grid-column: 1 / -1; }
}
