/*
Theme Name: Industrial Caster Wheel
Theme URI: https://example.com/
Author: Local Development
Description: Responsive industrial caster catalogue and inquiry theme.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: industrial-caster
*/

:root {
  --icw-primary: #ed292c;
  --icw-dark: #111827;
  --icw-muted: #667085;
  --icw-line: #e5e7eb;
  --icw-surface: #f5f7fa;
  --icw-radius: 10px;
  --icw-container: 1200px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--icw-dark); background: #fff; font-family: Arial, Helvetica, sans-serif; line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.icw-container { width: min(100% - 32px, var(--icw-container)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid var(--icw-line); background: rgba(255,255,255,.97); }
.header-inner { display: flex; min-height: 78px; align-items: center; gap: 28px; }
.site-branding { display: flex; align-items: center; flex: 0 0 auto; font-weight: 800; }
.custom-logo { width: auto; max-height: 52px; }
.site-title { font-size: 20px; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; padding: 26px 0; font-weight: 700; }
.primary-nav .sub-menu { position: absolute; top: 100%; left: -18px; display: none; width: 250px; padding: 10px 0; border: 1px solid var(--icw-line); border-radius: 8px; background: #fff; box-shadow: 0 18px 40px rgba(15,23,42,.14); }
.primary-nav .sub-menu a { padding: 9px 18px; font-weight: 600; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: block; }
.header-cta, .icw-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 10px 22px; border: 0; border-radius: 7px; background: var(--icw-primary); color: #fff; font-weight: 800; cursor: pointer; }
.menu-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--icw-line); border-radius: 7px; background: #fff; font-size: 23px; }
.hero { position: relative; min-height: 460px; display: grid; align-items: center; overflow: hidden; background: #064a9c center/cover no-repeat; color: #fff; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg,rgba(0,31,76,.92),rgba(0,62,136,.42),rgba(0,0,0,.08)); }
.hero-content { position: relative; z-index: 1; max-width: 680px; padding-block: 70px; }
.hero h1 { margin: 0 0 18px; font-size: clamp(36px,5vw,66px); line-height: 1.08; text-transform: uppercase; }
.hero p { max-width: 600px; margin: 0 0 28px; font-size: 19px; }
.section { padding: 72px 0; }
.section-muted { background: var(--icw-surface); }
.section-heading { margin: 0 0 34px; text-align: center; }
.section-heading h2 { margin: 0 0 8px; font-size: clamp(28px,3vw,40px); line-height: 1.2; text-transform: uppercase; }
.section-heading p { margin: 0; color: var(--icw-muted); }
.category-grid, .product-grid, .post-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px; }
.category-card, .product-card, .post-card { overflow: hidden; border: 1px solid var(--icw-line); border-radius: var(--icw-radius); background: #fff; box-shadow: 0 4px 18px rgba(15,23,42,.05); }
.category-card { padding: 22px; text-align: center; }
.category-card img { width: 100%; aspect-ratio: 4/3; object-fit: contain; }
.category-card h3 { margin: 16px 0 0; font-size: 18px; }
.product-card { display: flex; flex-direction: column; }
.product-card-media { display: block; overflow: hidden; background: #f7f7f7; }
.product-card-media img { width: 100%; aspect-ratio: 1/1; object-fit: contain; transition: transform .3s ease; }
.product-card:hover img { transform: scale(1.035); }
.product-card-body { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.product-card h2, .product-card h3 { margin: 0 0 12px; font-size: 19px; line-height: 1.4; }
.product-meta { margin: 0 0 18px; color: var(--icw-muted); font-size: 14px; }
.product-card .icw-button { margin-top: auto; width: 100%; }
.page-header { padding: 52px 0; background: #111827; color: #fff; }
.page-header h1 { margin: 0; font-size: clamp(30px,4vw,48px); line-height: 1.2; }
.breadcrumbs { margin-bottom: 12px; color: #b8c0cc; font-size: 14px; }
.product-detail { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 54px; align-items: start; }
.product-gallery { position: sticky; top: 104px; border: 1px solid var(--icw-line); border-radius: var(--icw-radius); background: #fff; padding: 18px; }
.product-gallery img { width: 100%; aspect-ratio: 1/1; object-fit: contain; }
.product-summary h1 { margin: 0 0 18px; font-size: clamp(30px,4vw,46px); line-height: 1.25; }
.product-summary .lead { color: var(--icw-muted); font-size: 17px; }
.spec-table { width: 100%; margin: 26px 0; border-collapse: collapse; }
.spec-table th, .spec-table td { padding: 12px 14px; border: 1px solid var(--icw-line); text-align: left; }
.spec-table th { width: 38%; background: var(--icw-surface); }
.content-area { min-height: 50vh; }
.entry-content { overflow-wrap: anywhere; }
.entry-content img { margin-block: 20px; }
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers { padding: 8px 13px; border: 1px solid var(--icw-line); border-radius: 6px; }
.pagination .current { background: var(--icw-primary); color: #fff; border-color: var(--icw-primary); }
.site-footer { padding: 52px 0 24px; background: #101827; color: #dbe1ea; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 42px; }
.site-footer h2, .site-footer h3 { color: #fff; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer a { color: #dbe1ea; }
.site-info { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 14px; }
.inquiry-overlay { position: fixed; inset: 0; z-index: 99999; display: none; place-items: center; padding: 18px; background: rgba(8,20,38,.7); backdrop-filter: blur(3px); }
.inquiry-overlay.is-open { display: grid; }
.inquiry-dialog { position: relative; width: min(100%,560px); max-height: calc(100vh - 36px); overflow: auto; padding: 30px; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.inquiry-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f1f4f8; font-size: 25px; cursor: pointer; }
.inquiry-dialog h2 { margin: 0 46px 8px 0; }
.inquiry-product { margin: 18px 0; padding: 12px 14px; border-left: 4px solid var(--icw-primary); border-radius: 6px; background: var(--icw-surface); font-weight: 700; }
.inquiry-form { display: grid; gap: 13px; }
.inquiry-form label { display: grid; gap: 5px; font-weight: 700; }
.inquiry-form input, .inquiry-form textarea { width: 100%; padding: 11px 12px; border: 1px solid #d2d8e1; border-radius: 7px; font: inherit; }
.inquiry-form textarea { min-height: 120px; resize: vertical; }
.inquiry-status { display: none; margin: 0; font-weight: 700; }
.inquiry-status.is-visible { display: block; }
.inquiry-status.is-error { color: #b42318; }
.inquiry-status.is-success { color: #168044; }
@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .header-cta { display: none; }
  .primary-nav { position: fixed; inset: 78px 0 auto; display: none; max-height: calc(100vh - 78px); overflow: auto; border-top: 1px solid var(--icw-line); background: #fff; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: block; padding: 10px 20px 22px; }
  .primary-nav a { padding: 12px 0; }
  .primary-nav .sub-menu { position: static; display: block; width: auto; margin-left: 16px; padding: 0; border: 0; box-shadow: none; }
  .category-grid, .product-grid, .post-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .product-detail { grid-template-columns: 1fr; }
  .product-gallery { position: static; }
}
@media (max-width: 560px) {
  .icw-container { width: min(100% - 24px,var(--icw-container)); }
  .hero { min-height: 390px; }
  .hero-content { padding-block: 52px; }
  .section { padding: 50px 0; }
  .category-grid, .product-grid, .post-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .inquiry-dialog { padding: 24px 18px; }
}
