/*
Theme Name: Mountingear Ergonomics
Theme URI: https://mountingear.com/
Author: Mountingear
Description: Custom product showcase theme for Mountingear.
Version: 1.3.0
Text Domain: mountingear
*/

:root {
  --accent: #ee174f;
  --ink: #111;
  --muted: #666;
  --line: #e8e8e8;
  --surface: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--surface); font-family: Montserrat, Arial, sans-serif; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.nav-row { min-height: 98px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand img { width: 210px; height: auto; }
.main-nav { display: flex; align-items: center; gap: 24px; font-weight: 700; font-size: 15px; }
.main-nav a { padding: 8px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a:focus { border-color: var(--accent); }
.nav-products { position: relative; }
.products-toggle { min-height: 40px; padding: 8px 0; border: 0; border-bottom: 2px solid transparent; color: var(--ink); background: transparent; font: inherit; cursor: pointer; }
.products-toggle:hover, .products-toggle:focus, .nav-products.open .products-toggle { border-color: var(--accent); }
.products-toggle span { margin-left: 3px; font-size: 11px; }
.products-menu { position: absolute; top: calc(100% + 10px); left: 50%; display: none; width: 250px; padding: 8px; background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 35px rgba(0,0,0,.12); transform: translateX(-50%); }
.nav-products:hover .products-menu, .nav-products:focus-within .products-menu, .nav-products.open .products-menu { display: grid; }
.products-menu a { padding: 11px 12px; border: 0; font-size: 13px; line-height: 1.35; }
.products-menu a:hover, .products-menu a:focus { color: #fff; background: var(--accent); border: 0; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; font-size: 28px; cursor: pointer; }

.hero { position: relative; min-height: clamp(420px, 44vw, 610px); overflow: hidden; background: #07131a; }
.slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; background-size: cover; background-position: center; transition: opacity .8s ease; }
.slide.active { opacity: 1; }
.hero-dots { position: absolute; z-index: 2; left: 50%; bottom: 24px; display: flex; gap: 10px; transform: translateX(-50%); }
.hero-dot { width: 10px; height: 10px; padding: 0; border: 1px solid #fff; border-radius: 50%; background: transparent; cursor: pointer; }
.hero-dot.active { background: #fff; }

.section { padding: 82px 0; }
.section-title { margin: 0 0 12px; text-align: center; font-size: clamp(32px, 4vw, 50px); line-height: 1.1; font-weight: 700; }
.section-title .soft { color: #d9d9d9; }
.section-title .accent { color: var(--accent); }
.section-kicker { margin: 0 0 42px; text-align: center; color: var(--accent); font-size: 18px; }
.about-copy { max-width: 1050px; margin: 0 auto 28px; color: var(--muted); text-align: center; font-size: 17px; }
.wide-button { display: block; width: 100%; padding: 13px 24px; color: #fff; background: #050505; text-align: center; font-weight: 700; transition: background .2s ease; }
.wide-button:hover { background: var(--accent); }

.products { background: #f7f7f7; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card { position: relative; overflow: hidden; min-height: 385px; background: #ddd; }
.product-card img { width: 100%; height: 385px; object-fit: cover; transition: transform .45s ease; }
.product-card:hover img { transform: scale(1.04); }
.product-card h3 { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 22px 16px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.82)); text-align: center; font-size: 18px; }

.why { background: #0d1115; color: #fff; }
.why .section-title { color: #fff; }
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: #34383c; border: 1px solid #34383c; }
.why-item { padding: 34px; background: #0d1115; }
.why-item h3 { margin: 0 0 10px; color: var(--accent); font-size: 18px; }
.why-item p { margin: 0; color: #c5c8ca; }

.contact-band { padding: 50px 0; background: var(--accent); color: #fff; }
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.contact-row h2 { margin: 0; font-size: 28px; }
.contact-row a { padding: 12px 28px; border: 2px solid #fff; font-weight: 700; }
.site-footer { padding: 30px 0; color: #777; background: #fff; text-align: center; font-size: 13px; }

.catalog-hero { padding: 68px 0 54px; color: #fff; background: #101418; }
.catalog-hero h1 { margin: 0 0 10px; font-size: clamp(34px, 5vw, 58px); line-height: 1.1; }
.catalog-hero p { max-width: 720px; margin: 0; color: #c5c8ca; font-size: 17px; }
.catalog-nav { position: sticky; top: 98px; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.catalog-nav .wrap { display: flex; gap: 24px; overflow-x: auto; padding-top: 14px; padding-bottom: 14px; white-space: nowrap; }
.catalog-nav a { color: #555; font-weight: 700; font-size: 13px; }
.catalog-nav a.active, .catalog-nav a:hover { color: var(--accent); }
.catalog-section { padding: 60px 0 78px; background: #f6f6f6; }
.catalog-count { margin: 0 0 28px; color: #777; }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.catalog-card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid #e4e4e4; }
.catalog-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; }
.catalog-card-content { padding: 17px 18px 20px; border-top: 1px solid #ededed; }
.catalog-card h2 { min-height: 46px; margin: 0 0 13px; font-size: 16px; line-height: 1.45; }
.catalog-card a { display: inline-flex; align-items: center; min-height: 36px; padding: 8px 13px; color: #fff; background: #111; font-size: 12px; font-weight: 700; }
.catalog-card a:hover { background: var(--accent); }

.page-hero { padding: 76px 0; color: #fff; background: #101418; }
.page-hero h1 { margin: 0; font-size: clamp(38px, 5vw, 60px); line-height: 1.1; }
.page-content { padding: 72px 0 84px; }
.lead { max-width: 920px; margin: 0 0 42px; color: #555; font-size: 18px; }
.story-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; margin-bottom: 68px; }
.story-grid.reverse { grid-template-columns: .9fr 1.1fr; }
.story-grid h2 { margin: 0 0 16px; font-size: 30px; }
.story-grid p { color: #5c5c5c; }
.story-grid img { width: 100%; max-height: 520px; object-fit: cover; }
.feature-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.feature-list article { padding: 28px; background: #f4f4f4; border-top: 3px solid var(--accent); }
.feature-list h3 { margin: 0 0 10px; font-size: 18px; }
.feature-list p { margin: 0; color: #666; }
.faq-list { display: grid; max-width: 980px; margin: 0 auto; gap: 12px; }
.faq-list details { background: #f5f5f5; border: 1px solid #e6e6e6; }
.faq-list summary { padding: 20px 52px 20px 22px; font-weight: 700; cursor: pointer; }
.faq-list details p { margin: 0; padding: 0 22px 22px; color: #5d5d5d; }
.news-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.news-card { overflow: hidden; background: #fff; border: 1px solid #e2e2e2; }
.news-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.news-card div { padding: 20px; }
.news-card h2 { margin: 0 0 16px; font-size: 18px; line-height: 1.45; }
.news-card a { color: var(--accent); font-size: 13px; font-weight: 700; }
.news-detail { max-width: 920px; margin: 0 auto; }
.news-detail img { width: 100%; margin-bottom: 34px; }
.news-detail p { color: #555; font-size: 17px; }
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 54px; }
.contact-form { display: grid; gap: 18px; }
.contact-form label { display: grid; gap: 7px; font-weight: 700; font-size: 13px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 13px 14px; border: 1px solid #ccc; border-radius: 0; font: inherit; }
.contact-form textarea { min-height: 170px; resize: vertical; }
.contact-form button { min-height: 48px; border: 0; color: #fff; background: #111; font-weight: 700; cursor: pointer; }
.contact-form button:hover { background: var(--accent); }
.contact-details { padding: 32px; color: #fff; background: #101418; }
.contact-details h2 { margin-top: 0; }
.contact-details p { padding-bottom: 18px; border-bottom: 1px solid #34383c; }
.notice { margin: 0 0 22px; padding: 14px 16px; background: #e7f7ec; border-left: 4px solid #299447; }
.notice.error { background: #fdecec; border-color: #cc3b3b; }

@media (max-width: 900px) {
  .nav-row { min-height: 76px; }
  .brand img { width: 165px; }
  .menu-toggle { display: grid; place-items: center; }
  .main-nav { position: absolute; top: 76px; left: 0; right: 0; display: none; padding: 20px 24px 28px; background: #fff; border-top: 1px solid var(--line); flex-direction: column; align-items: flex-start; gap: 10px; }
  .main-nav.open { display: flex; }
  .nav-products { width: 100%; }
  .products-toggle { width: 100%; text-align: left; }
  .products-menu { position: static; width: 100%; margin-top: 4px; padding: 4px 0 4px 14px; border: 0; box-shadow: none; transform: none; }
  .nav-products:hover .products-menu, .nav-products:focus-within .products-menu { display: none; }
  .nav-products.open .products-menu { display: grid; }
  .hero { min-height: 52vw; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-nav { top: 76px; }
  .catalog-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .story-grid, .story-grid.reverse, .contact-grid { grid-template-columns: 1fr; }
  .feature-list, .news-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 580px) {
  .wrap { width: min(100% - 28px, 1180px); }
  .section { padding: 58px 0; }
  .hero { min-height: 62vw; }
  .product-grid, .why-grid { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .catalog-card-content { padding: 14px; }
  .catalog-card h2 { min-height: 42px; font-size: 14px; }
  .feature-list, .news-grid { grid-template-columns: 1fr; }
  .product-card, .product-card img { min-height: 330px; height: 330px; }
  .contact-row { align-items: flex-start; flex-direction: column; }
}
