/* ═══════════════════════════════════════════
   CMD Metal Pro — Frontend CSS
   Premium industrial design
   ═══════════════════════════════════════════ */

:root {
  --navy: #1A2744;
  --navy-dark: #111B30;
  --navy-light: #243352;
  --rust: #D47B1F;
  --rust-dark: #B8691A;
  --rust-light: #E8922E;
  --steel: #64748b;
  --steel-light: #94a3b8;
  --text: #1e293b;
  --text-light: #475569;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-warm: #fffbf5;
  --border: #e2e8f0;
  --shadow: 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.1);
  --radius: 12px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; transition: color .2s; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ── Top Bar ── */
.topbar { background: var(--navy-dark); color: rgba(255,255,255,.7); font-size: 13px; padding: 8px 0; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: rgba(255,255,255,.8); }
.topbar a:hover { color: #fff; }
.topbar-sep { margin: 0 12px; opacity: .3; }

/* ── Header ── */
.header { background: var(--navy); padding: 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(0,0,0,.2); }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.logo { display: flex; align-items: baseline; gap: 8px; font-weight: 800; font-size: 24px; }
.logo-cmd { color: #fff; }
.logo-metal { color: var(--rust); }
.nav-main { display: flex; align-items: center; gap: 8px; }
.nav-main a { color: rgba(255,255,255,.8); padding: 8px 16px; font-weight: 500; font-size: 14px; border-radius: 8px; transition: all .2s; }
.nav-main a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-main a.active { color: #fff; background: rgba(255,255,255,.12); }
.btn-cta { background: var(--rust) !important; color: #fff !important; padding: 10px 24px !important; border-radius: 8px !important; font-weight: 600 !important; box-shadow: 0 2px 8px rgba(212,123,31,.3); }
.btn-cta:hover { background: var(--rust-dark) !important; transform: translateY(-1px); }

/* Hamburger */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .3s; }

/* ── Hero ── */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, var(--navy-dark) 100%); color: #fff; padding: 80px 0; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; right: -20%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(212,123,31,.15) 0%, transparent 70%); }
.hero-content { max-width: 700px; position: relative; z-index: 1; }
.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.15; margin-bottom: 20px; }
.hero h1 span { color: var(--rust); }
.hero p { font-size: 18px; color: rgba(255,255,255,.7); margin-bottom: 32px; line-height: 1.7; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-hero { display: inline-flex; align-items: center; gap: 8px; padding: 16px 36px; border-radius: 10px; font-weight: 700; font-size: 16px; transition: all .3s; }
.btn-hero-primary { background: var(--rust); color: #fff; box-shadow: 0 4px 16px rgba(212,123,31,.4); }
.btn-hero-primary:hover { background: var(--rust-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212,123,31,.5); }
.btn-hero-outline { border: 2px solid rgba(255,255,255,.3); color: #fff; }
.btn-hero-outline:hover { border-color: #fff; background: rgba(255,255,255,.05); }

/* ── Section ── */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 32px; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.section-subtitle { font-size: 16px; color: var(--steel); margin-bottom: 40px; }
.section-header { text-align: center; margin-bottom: 48px; }

/* ── Layout with Sidebar ── */
.layout-sidebar { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }

/* ── Sidebar ── */
.sidebar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; position: sticky; top: 92px; }
.sidebar-title { background: var(--navy); color: #fff; padding: 16px 20px; font-weight: 700; font-size: 15px; }
.sidebar-nav { padding: 8px 0; }
.sidebar-link { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; font-size: 14px; font-weight: 500; color: var(--text); border-left: 3px solid transparent; transition: all .2s; }
.sidebar-link:hover { background: var(--bg-alt); color: var(--rust); border-left-color: var(--rust); }
.sidebar-link.active { background: var(--bg-warm); color: var(--rust); border-left-color: var(--rust); font-weight: 600; }
.sidebar-count { font-size: 11px; color: var(--steel-light); background: var(--bg-alt); padding: 2px 8px; border-radius: 10px; }
.sidebar-sub { padding: 0 0 8px 0; }
.sidebar-sub a { display: block; padding: 6px 20px 6px 36px; font-size: 13px; color: var(--text-light); transition: all .2s; }
.sidebar-sub a:hover, .sidebar-sub a.active { color: var(--rust); }
.badge-new { background: var(--rust); color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 999px; font-weight: 700; margin-left: 8px; }

/* ── Cards Grid ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all .3s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--rust); }
.card-img { width: 100%; height: 220px; object-fit: cover; }
.card-img-placeholder { width: 100%; height: 220px; background: linear-gradient(135deg, #f1f5f9, #e2e8f0); display: flex; align-items: center; justify-content: center; font-size: 48px; color: var(--steel-light); }
.card-body { padding: 20px; }
.card-body h3 { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.card-body p { font-size: 13px; color: var(--text-light); line-height: 1.6; }
.card-img-wrap { position: relative; overflow: hidden; }
.card-img-wrap .badge-new { position: absolute; top: 12px; right: 12px; }
.card-img-wrap img { transition: transform .4s; }
.card:hover .card-img-wrap img { transform: scale(1.05); }

/* ── Product Page ── */
.product-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.product-gallery { border-radius: var(--radius); overflow: hidden; }
.gallery-main { width: 100%; height: 400px; object-fit: cover; border-radius: var(--radius); cursor: zoom-in; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; }
.gallery-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: border-color .2s; opacity: .7; }
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--rust); opacity: 1; }
.product-info h1 { font-size: 28px; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.product-summary { font-size: 15px; color: var(--text-light); margin-bottom: 24px; line-height: 1.7; }

/* Colors */
.color-swatches { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.color-swatch { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border: 2px solid var(--border); border-radius: 8px; font-size: 13px; cursor: pointer; transition: all .2s; }
.color-swatch:hover { border-color: var(--rust); }
.color-dot { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }

/* Specs table */
.specs-table { width: 100%; }
.specs-table tr:nth-child(even) { background: var(--bg-alt); }
.specs-table td { padding: 10px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
.specs-table td:first-child { font-weight: 600; color: var(--navy); width: 40%; }

/* Content blocks */
.content-block { margin-bottom: 48px; }
.block-text-image, .block-image-text { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.block-image-text .block-img { order: -1; }
.block-img img { border-radius: var(--radius); width: 100%; }
.block-text h3 { font-size: 22px; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.block-text p { color: var(--text-light); line-height: 1.7; }
.block-highlight { background: var(--bg-warm); border-left: 4px solid var(--rust); padding: 24px 28px; border-radius: 0 var(--radius) var(--radius) 0; }
.block-banner img { width: 100%; border-radius: var(--radius); }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { padding: 16px 0; font-weight: 600; color: var(--navy); cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.faq-q::after { content: '+'; font-size: 20px; color: var(--rust); transition: transform .3s; }
.faq-q.open::after { transform: rotate(45deg); }
.faq-a { padding: 0 0 16px; color: var(--text-light); font-size: 14px; line-height: 1.7; display: none; }
.faq-a.open { display: block; }

/* ── Blog ── */
.post-card .card-body time { font-size: 12px; color: var(--steel-light); }
.post-content { max-width: 800px; margin: 0 auto; }
.post-content h1 { font-size: 36px; margin-bottom: 16px; }
.post-content .post-meta { color: var(--steel); font-size: 14px; margin-bottom: 32px; }
.post-content .body { font-size: 16px; line-height: 1.8; }
.post-content .body h2, .post-content .body h3 { color: var(--navy); margin: 32px 0 12px; }
.post-content .body p { margin-bottom: 16px; }
.post-content .body ul, .post-content .body ol { margin: 16px 0 16px 24px; }
.post-content .body li { margin-bottom: 8px; }
.post-content .body img { border-radius: var(--radius); margin: 24px 0; }

/* ── Contact Form ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; font-family: var(--font); transition: border-color .2s; background: #fff; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--rust); box-shadow: 0 0 0 3px rgba(212,123,31,.1); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px; background: var(--rust); color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; transition: all .3s; font-family: var(--font); }
.form-btn:hover { background: var(--rust-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(212,123,31,.3); }
.contact-info h3 { font-size: 20px; color: var(--navy); margin-bottom: 20px; }
.contact-item { display: flex; gap: 12px; margin-bottom: 16px; font-size: 15px; }
.contact-item .icon { font-size: 20px; }

/* ── CTA Band ── */
.cta-band { background: linear-gradient(135deg, var(--rust), var(--rust-light)); padding: 60px 0; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-inner h2 { font-size: 28px; color: #fff; font-weight: 800; }
.cta-inner p { color: rgba(255,255,255,.85); font-size: 15px; margin-top: 8px; }
.cta-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-white { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; background: #fff; color: var(--navy); border-radius: 8px; font-weight: 700; font-size: 14px; transition: all .2s; }
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.btn-outline-white { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border: 2px solid rgba(255,255,255,.5); color: #fff; border-radius: 8px; font-weight: 600; font-size: 14px; transition: all .2s; }
.btn-outline-white:hover { border-color: #fff; background: rgba(255,255,255,.1); }

/* ── Footer ── */
.footer { background: var(--navy-dark); color: rgba(255,255,255,.7); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-logo { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-logo span { color: var(--rust); }
.footer p { font-size: 13px; line-height: 1.7; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 16px; font-weight: 700; }
.footer ul li { margin-bottom: 8px; }
.footer ul a { font-size: 13px; color: rgba(255,255,255,.6); transition: color .2s; }
.footer ul a:hover { color: var(--rust); }
.footer-contact { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.footer-contact a, .footer-contact span { font-size: 13px; }
.footer-contact a:hover { color: var(--rust); }
.whatsapp-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 20px; background: #25D366; color: #fff; border-radius: 8px; font-weight: 600; font-size: 13px; transition: all .2s; }
.whatsapp-btn:hover { background: #1fb855; transform: translateY(-1px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding: 20px 0; text-align: center; font-size: 12px; }
.footer-bottom a { color: var(--rust); }

/* ── Breadcrumb ── */
.breadcrumb { padding: 16px 0; font-size: 13px; color: var(--steel); }
.breadcrumb a { color: var(--steel); }
.breadcrumb a:hover { color: var(--rust); }
.breadcrumb span { margin: 0 8px; opacity: .4; }

/* ── Features Grid ── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.feature-card { text-align: center; padding: 32px 24px; border-radius: var(--radius); border: 1px solid var(--border); transition: all .3s; }
.feature-card:hover { border-color: var(--rust); transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon { font-size: 40px; margin-bottom: 16px; }
.feature-card h3 { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--text-light); }

/* ── Page Header ── */
.page-header { background: var(--navy); color: #fff; padding: 48px 0; }
.page-header h1 { font-size: 36px; font-weight: 800; }
.page-header p { color: rgba(255,255,255,.7); font-size: 16px; margin-top: 8px; }

/* ── Empty state ── */
.empty { text-align: center; padding: 60px 24px; color: var(--steel); }
.empty .icon { font-size: 48px; margin-bottom: 12px; }

/* ── Gallery page (portfolio) ── */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }

/* ── 404 ── */
.page-404 { text-align: center; padding: 120px 24px; }
.page-404 h1 { font-size: 120px; color: var(--navy); font-weight: 800; opacity: .1; }
.page-404 h2 { font-size: 24px; color: var(--navy); margin-bottom: 12px; }
.page-404 p { color: var(--steel); margin-bottom: 24px; }
.page-404 a { color: var(--rust); font-weight: 600; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .layout-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .product-hero { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .topbar { display: none; }
  .hero h1 { font-size: 32px; }
  .hero { padding: 48px 0; }
  .section { padding: 40px 0; }
  .section-title { font-size: 24px; }
  .nav-main { display: none; position: fixed; top: 72px; left: 0; right: 0; bottom: 0; background: var(--navy); flex-direction: column; padding: 24px; gap: 4px; z-index: 99; }
  .nav-main.open { display: flex; }
  .nav-main a { padding: 12px 16px; font-size: 16px; }
  .hamburger { display: block; }
  .features-grid { grid-template-columns: 1fr; }
  .block-text-image, .block-image-text { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
}

/* ── Honeypot ── */
.ohnohoney { position: absolute; left: -9999px; }

/* ── Rich content from admin ── */
.rich-content h2 { font-size: 24px; font-weight: 700; color: var(--navy); margin: 32px 0 12px; }
.rich-content h3 { font-size: 20px; font-weight: 600; color: var(--navy); margin: 24px 0 10px; }
.rich-content p { margin-bottom: 16px; color: var(--text-light); line-height: 1.7; }
.rich-content ul, .rich-content ol { margin: 16px 0 16px 24px; }
.rich-content li { margin-bottom: 6px; color: var(--text-light); }
.rich-content img { border-radius: var(--radius); margin: 24px 0; }


/* ── Header Search ── */
.header-search { display:flex; align-items:center; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.15); border-radius:8px; overflow:hidden; transition:all .3s; max-width:260px; }
.header-search:focus-within { background:rgba(255,255,255,.15); border-color:var(--rust); box-shadow:0 0 0 3px rgba(212,123,31,.2); max-width:320px; }
.header-search-input { background:none; border:none; color:#fff; padding:8px 12px; font-size:13px; width:100%; outline:none; font-family:inherit; }
.header-search-input::placeholder { color:rgba(255,255,255,.5); }
.header-search-btn { background:none; border:none; color:rgba(255,255,255,.6); padding:8px 12px; cursor:pointer; display:flex; align-items:center; transition:color .2s; }
.header-search-btn:hover { color:var(--rust); }
@media(max-width:768px) {
  .header-search { max-width:100%; order:10; width:100%; margin-top:12px; }
  .header-inner { flex-wrap:wrap; }
}





