/* PMX Ductwork - Catalog & Fitting Pages */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap&text=');
/* font-display:swap via &text= query forces swap behavior */
:root {
    --pmx-blue: #1a3a5c;
    --pmx-blue-light: #2c5a8c;
    --pmx-orange: #e87722;
    --pmx-gray: #f5f5f5;
    --pmx-dark: #222;
    --pmx-border: #ddd;
    --pmx-green: #2e7d32;
    --accent: #3b82f6;
    --blue: #0ea5e9;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --fs-accent: #1a3a5c;
    --fs-accent-hover: #2c5a8c;
    --fs-text: #222;
    --fs-border-light: #e5e5e5;
    --fs-bg-hover: #f9f9f9;
    --fs-success: #2e7d32;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--pmx-dark); line-height: 1.6; }
a { color: var(--pmx-blue); text-decoration: none; }
a:hover { color: var(--pmx-orange); }

/* Voxx Header */
.voxx-hdr { background: #0a0e17; color: #fff; padding: 0 16px; height: 52px; display: flex; align-items: center; gap: 12px; }
.voxx-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #fff; font-weight: 400; font-size: 22px; letter-spacing: 1px; font-family: 'Georgia', 'Times New Roman', serif; }
.voxx-logo-icon { width: 28px; height: 28px; background: var(--blue); border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.voxx-logo-icon svg { width: 16px; height: 16px; fill: #fff; }
.voxx-logo span { color: var(--blue); }
.voxx-hdr .sep { width: 1px; height: 24px; background: rgba(255,255,255,.15); }
.voxx-hdr .hdr-title { font-size: 12px; color: rgba(255,255,255,.6); font-weight: 400; letter-spacing: .04em; }
.voxx-hdr .hdr-phone { font-size: 13px; color: rgba(255,255,255,.6); white-space: nowrap; }
.voxx-hdr .hdr-phone a { color: #fff; text-decoration: none; }
.hdr-wave { flex: 1; height: 36px; overflow: hidden; display: flex; align-items: center; }
.hdr-wave svg { width: 100%; height: 100%; }

/* Waveform strip */
.waveform-strip { width: 100%; height: 60px; background: #0a0e17; }
.waveform-strip svg { width: 100%; height: 100%; }

/* Nav bar */
.dd-nav { background: var(--pmx-gray); border-bottom: 1px solid var(--pmx-border); display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dd-nav a { padding: 10px 14px; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: #333;
    text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; min-height: 40px; display: flex; align-items: center; }
.dd-nav a:hover { color: #000; }
.dd-nav a.active { color: var(--pmx-blue); border-bottom-color: var(--pmx-blue); font-weight: 700; }
.nav-tagline { margin-left: auto; padding: 6px 14px; font-size: 12px; color: #555; text-align: right; white-space: nowrap; display: flex; align-items: center; }
.nav-tagline strong { color: #222; margin-right: 4px; }

/* Breadcrumb */
.pmx-breadcrumb { padding: 8px 24px; font-size: 13px; color: #94a3b8; background: #fff; border-bottom: 1px solid #f1f5f9; }
.pmx-breadcrumb a { color: #3b82f6; text-decoration: none; }
.pmx-breadcrumb a:hover { text-decoration: underline; }

/* Related Fittings */
.pmx-related { margin: 32px 0; padding-top: 24px; border-top: 1px solid #e5e7eb; }
.pmx-related h3 { font-size: 1.1rem; color: #1e293b; margin-bottom: 12px; }
.pmx-related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.pmx-related-grid a { display: block; padding: 12px 16px; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 8px; text-decoration: none; color: #1e293b; font-weight: 500; font-size: 14px; transition: border-color .15s, background .15s; }
.pmx-related-grid a:hover { border-color: #3b82f6; background: #eff6ff; color: #1a3a5c; }
.pmx-related-grid a span { display: block; font-size: 12px; color: #94a3b8; font-weight: 400; margin-top: 2px; }

/* FAQ */
.pmx-faq { margin: 24px 0 32px; }
.pmx-faq h3 { font-size: 1.2rem; margin-bottom: 12px; color: #1e293b; }
.pmx-faq details { border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 8px; }
.pmx-faq summary { padding: 12px 16px; font-weight: 500; cursor: pointer; font-size: 14px; color: #1e293b; }
.pmx-faq summary:hover { background: #f8fafc; }
.pmx-faq details[open] summary { border-bottom: 1px solid #e5e7eb; }
.pmx-faq details p { padding: 12px 16px; font-size: 14px; color: #475569; margin: 0; }

/* Footer */
.dd-footer { background: var(--pmx-gray); border-top: 1px solid var(--pmx-border); text-align: center; padding: 12px 16px; font-size: 12px; color: #666; }
.dd-footer a { color: #333; text-decoration: none; }

/* Hero / Page Header */
.pmx-hero { background: linear-gradient(135deg, var(--pmx-blue) 0%, var(--pmx-blue-light) 100%); color: #fff; padding: 40px 24px; text-align: center; }
.pmx-hero h1 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.pmx-hero p { font-size: 1.1rem; color: rgba(255,255,255,0.85); max-width: 700px; margin: 0 auto; }

/* Material Tabs */
.mat-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid #e5e7eb; }
.mat-tab { padding: 12px 24px; font-size: 14px; font-weight: 600; letter-spacing: .02em; color: #64748b; background: none; border: none; border-bottom: 3px solid transparent; cursor: pointer; transition: color .15s, border-color .15s; margin-bottom: -2px; }
.mat-tab:hover { color: #1e293b; }
.mat-tab.active { color: var(--pmx-blue); border-bottom-color: var(--pmx-blue); }
.mat-panel { display: none; }
.mat-panel.active { display: grid; }

/* Catalog Grid */
.pmx-container { max-width: 1400px; margin: 0 auto; padding: 32px 24px; }
.pmx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pmx-card { background: var(--fs-bg); border: 1px solid var(--fs-border); border-radius: 8px; overflow: hidden; transition: box-shadow 0.2s, transform 0.15s; text-align: center; }
.pmx-card:hover { box-shadow: var(--fs-shadow-lg); transform: translateY(-2px); }
.pmx-card a { display: block; padding: 20px; }
.pmx-card img { max-width: 100%; height: 200px; object-fit: contain; margin-bottom: 12px; }
.pmx-card h3 { font-size: 1.1rem; color: var(--fs-text); margin-bottom: 4px; }
.pmx-card p.card-desc { font-size: 0.85rem; color: var(--fs-text-secondary); }

/* Fitting Detail Page */
.pmx-fitting-header { display: flex; gap: 32px; margin-bottom: 32px; flex-wrap: wrap; }
.pmx-fitting-image { flex: 0 0 350px; text-align: center; }
.pmx-fitting-image img { max-width: 100%; border-radius: 8px; border: 1px solid var(--fs-border); }
.pmx-fitting-info { flex: 1; min-width: 300px; }
.pmx-fitting-info h2 { font-size: 1.5rem; margin-bottom: 12px; color: var(--fs-text); }
.pmx-fitting-info ul { list-style: disc; margin-left: 20px; color: var(--fs-text-body); }
.pmx-fitting-info li { margin-bottom: 4px; }

/* Designer iframe container */
.pmx-designer-iframe { margin-bottom: 8px; }
.pmx-designer-iframe iframe { width: 100%; height: 700px; border: none; border-radius: 8px; border: 1px solid var(--fs-border); }

/* Voice Designer Panel (kept for standalone pages) */
.pmx-designer { background: var(--fs-bg-inset); border: 1px solid var(--fs-border); border-radius: 8px; padding: 24px; margin-bottom: 32px; }
.pmx-designer-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pmx-designer-header h3 { font-size: 1.2rem; }
.pmx-mic-btn { width: 48px; height: 48px; border-radius: 50%; background: var(--fs-accent); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.pmx-mic-btn:hover { background: var(--fs-accent-hover); }
.pmx-mic-btn.recording { background: var(--fs-error); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,0.4); } 50% { box-shadow: 0 0 0 12px rgba(192,57,43,0); } }
.pmx-mic-btn svg { width: 24px; height: 24px; fill: #fff; }

.pmx-designer-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.pmx-field { display: flex; flex-direction: column; }
.pmx-field label { font-size: 0.8rem; font-weight: 600; color: var(--fs-text-secondary); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.pmx-field select, .pmx-field input { padding: 8px 10px; border: 1px solid var(--fs-border); border-radius: 4px; font-size: 0.95rem; font-family: var(--fs-font); }
.pmx-field select:focus, .pmx-field input:focus { outline: none; border-color: var(--fs-accent); box-shadow: 0 0 0 2px rgba(17,17,17,0.1); }

.pmx-design-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px; background: var(--fs-accent); color: #fff; border: none; border-radius: 4px; font-size: 1rem; font-weight: 600; cursor: pointer; margin-top: 12px; transition: background 0.2s; }
.pmx-design-btn:hover { background: var(--fs-accent-hover); }

/* 3D/CAD/ISO Result Panel */
.pmx-result { display: none; background: var(--fs-bg); border: 1px solid var(--fs-border); border-radius: 8px; margin-bottom: 32px; overflow: hidden; animation: slideDown 0.3s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.pmx-result.visible { display: block; }
.pmx-result-tabs { display: flex; background: var(--fs-accent); }
.pmx-result-tabs button { flex: 1; padding: 10px; background: transparent; color: rgba(255,255,255,0.7); border: none; font-size: 0.95rem; font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; }
.pmx-result-tabs button.active { color: #fff; border-bottom-color: #fff; }
.pmx-result-body { padding: 20px; min-height: 350px; }
.pmx-result-panel { display: none; }
.pmx-result-panel.active { display: block; }
.pmx-result-panel canvas { width: 100%; height: 350px; }
.pmx-result-footer { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-top: 1px solid var(--fs-border); background: var(--fs-bg-inset); }
.pmx-result-footer .price { font-size: 1.4rem; font-weight: 700; color: var(--fs-success); }
.pmx-result-footer .desc { font-size: 0.9rem; color: var(--fs-text-secondary); }
.pmx-add-cart { padding: 10px 24px; background: var(--fs-accent); color: #fff; border: none; border-radius: 4px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.pmx-add-cart:hover { background: var(--fs-accent-hover); }

/* Specifications Table */
.pmx-specs { margin-bottom: 32px; }
.pmx-specs h3 { font-size: 1.2rem; margin-bottom: 12px; color: var(--fs-text); }
.pmx-table-wrap { overflow-x: auto; }
.pmx-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.pmx-table thead { background: #3b82f6; color: #fff; }
.pmx-table th { padding: 10px 12px; text-align: left; font-weight: 600; white-space: nowrap; }
.pmx-table td { padding: 8px 12px; border-bottom: 1px solid var(--fs-border-light); }
.pmx-table tbody tr:hover { background: var(--fs-bg-hover); }
.pmx-table .price-col { font-weight: 700; color: var(--fs-success); white-space: nowrap; }
.pmx-table .cart-btn { padding: 6px 14px; background: #3b82f6; color: #fff; border: none; border-radius: 4px; font-size: 0.85rem; cursor: pointer; white-space: nowrap; transition: background 0.2s; }
.pmx-table .cart-btn:hover { background: #2563eb; }

/* SEO Content */
.pmx-seo { max-width: 900px; margin: 0 auto 40px; }
.pmx-seo h2 { font-size: 1.5rem; color: var(--fs-text); margin-bottom: 12px; }
.pmx-seo h3 { font-size: 1.1rem; color: var(--fs-text-body); margin: 16px 0 8px; }
.pmx-seo p { color: var(--fs-text-secondary); margin-bottom: 12px; }

/* Footer */
.pmx-footer { background: var(--fs-text); color: var(--fs-text-muted); padding: 32px 24px; text-align: center; font-size: 0.85rem; }
.pmx-footer a { color: #ccc; }

/* Responsive */
@media (max-width: 768px) {
    .pmx-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .pmx-hero h1 { font-size: 1.5rem; }
    .pmx-fitting-header { flex-direction: column; }
    .pmx-fitting-image { flex: 0 0 auto; }
    .pmx-designer-form { grid-template-columns: 1fr 1fr; }
    .pmx-nav a { padding: 8px 12px; font-size: 0.85rem; }
    .pmx-designer-iframe iframe { height: 500px; }
    [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
    .pmx-grid { grid-template-columns: 1fr; }
    .pmx-designer-form { grid-template-columns: 1fr; }
    .pmx-designer-iframe iframe { height: 450px; }
}
