/* Shared content templates: shop, product taxonomies, products, buyer guides, localized pages and legal pages. */

.vm-content-template {
  background: var(--black);
}

.vm-content-template .vm-secondary-main {
  background: var(--paper);
  min-height: 70vh;
}

.vm-content-hero {
  color: white;
  min-height: 390px;
  overflow: hidden;
  position: relative;
}

.vm-content-hero-shade,
.vm-blog-hero-media,
.vm-legal-hero-media,
.vm-detail-hero-media,
.vm-article-hero-media {
  inset: 0;
  position: absolute;
}

.vm-content-hero-shade {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.97) 0%, rgba(0, 0, 0, 0.82) 46%, rgba(0, 0, 0, 0.28) 78%, rgba(0, 0, 0, 0.18) 100%);
  z-index: 1;
}

.vm-content-hero-copy {
  left: var(--gutter);
  max-width: 900px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.vm-content-hero h1 {
  color: white;
  font-family: var(--display);
  font-size: clamp(56px, 6vw, 86px);
  font-weight: 900;
  letter-spacing: -0.018em;
  line-height: 0.9;
  margin: 0 0 20px;
  max-width: 980px;
  text-transform: uppercase;
}

.vm-content-hero-copy > p:not(.section-kicker):not(.vm-article-meta) {
  border-top: 2px solid var(--red);
  color: #ededed;
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  max-width: 660px;
  padding-top: 14px;
}

.vm-product-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  inset: 0;
  position: absolute;
}

.vm-product-hero-grid img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.vm-blog-hero-media {
  background: url("images/capacity-workstation.webp") center 48% / cover no-repeat;
}

.vm-legal-hero-media {
  background: url("images/factory-exterior.webp") center 55% / cover no-repeat;
}

.vm-detail-hero-media img {
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  width: 100%;
}

.vm-detail-hero-fallback,
.vm-article-hero-media {
  background: url("images/hero-factory.webp") center 45% / cover no-repeat;
}

/* Independent Spanish and Brazilian Portuguese page shells */
.vm-localized-content {
  background: var(--paper);
  color: #25221f;
  min-height: 420px;
  padding: 52px var(--gutter) 72px;
}

.vm-localized-content > .elementor,
.vm-localized-content > .entry-content {
  margin: 0 auto;
  max-width: 1240px;
}

.vm-localized-content h2,
.vm-localized-content h3 {
  color: var(--black);
}

.vm-localized-content a:not(.elementor-button) {
  text-decoration-color: var(--red);
  text-underline-offset: 4px;
}

.vm-localized-content .elementor-button {
  border-radius: 0;
}

@media (max-width: 620px) {
  .vm-localized-content { padding-bottom: 52px; padding-top: 36px; }
}

.vm-hero-back-link {
  color: white;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-top: 6px;
  text-transform: uppercase;
}

.vm-hero-back-link:hover { color: var(--red); }

/* Products archive and taxonomy pages */
.vm-archive-intro {
  background: #101010;
  color: #d9d9d9;
  display: grid;
  gap: 18px;
  padding: 42px var(--gutter);
}

.vm-archive-intro > * { margin: 0; }
.vm-archive-intro > p { font-size: 15px; line-height: 1.65; max-width: 1120px; }
.vm-archive-intro > p:first-child { color: white; font-size: 18px; }
.vm-archive-intro h2 { color: white; font-family: var(--display); font-size: 38px; margin-top: 16px; text-transform: uppercase; }
.vm-archive-intro h3 { color: white; font-size: 16px; margin-bottom: 8px; }
.vm-archive-intro a { color: white; font-weight: 800; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.vm-archive-intro .wp-block-columns { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.vm-archive-intro .wp-block-column { border-left: 2px solid var(--red); padding: 4px 0 4px 18px; }

.vm-commerce-grid {
  background: var(--paper);
  padding: 52px var(--gutter) 72px;
}

.vm-commerce-grid .woocommerce-notices-wrapper:empty { display: none; }
.vm-commerce-grid .woocommerce-result-count { color: #5a5550; font-size: 12px; font-weight: 700; margin: 12px 0 22px; }
.vm-commerce-grid .woocommerce-ordering { margin: 0 0 22px auto; max-width: 250px; }
.vm-commerce-grid .woocommerce-ordering select {
  background: white;
  border: 1px solid #c8bfb5;
  border-radius: 0;
  min-height: 44px;
  padding: 8px 12px;
  width: 100%;
}

.vm-commerce-grid ul.products {
  display: grid !important;
  gap: 28px 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
}

.vm-commerce-grid ul.products::before,
.vm-commerce-grid ul.products::after { display: none !important; }

.vm-commerce-grid ul.products li.product {
  background: white;
  border: 1px solid #d8d0c7;
  display: flex;
  flex-direction: column;
  float: none !important;
  margin: 0 !important;
  padding: 0 0 20px !important;
  width: auto !important;
}

.vm-commerce-grid ul.products li.product > a:first-child { display: block; }
.vm-commerce-grid ul.products li.product img {
  aspect-ratio: 1 / 1;
  background: #e8e3db;
  height: auto !important;
  margin: 0 0 18px !important;
  object-fit: cover;
  width: 100% !important;
}

.vm-commerce-grid ul.products li.product h2,
.vm-commerce-grid ul.products li.product .woocommerce-loop-product__title {
  color: var(--black);
  font-size: 15px !important;
  line-height: 1.35;
  margin: 0;
  min-height: 64px;
  padding: 0 18px !important;
}

.vm-commerce-grid ul.products li.product .button {
  align-self: flex-start;
  background: var(--red);
  border-radius: 0;
  color: white;
  font-size: 11px;
  margin: auto 18px 0 !important;
  min-height: 40px;
  padding: 10px 14px;
}

.vm-commerce-grid ul.products li.product .button:hover { background: var(--red-dark); }
.vm-commerce-grid .page-numbers { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; list-style: none; margin: 40px 0 0; padding: 0; }
.vm-commerce-grid .page-numbers a,
.vm-commerce-grid .page-numbers span { align-items: center; background: #111; color: white; display: inline-flex; justify-content: center; min-height: 42px; min-width: 42px; padding: 8px 12px; }
.vm-commerce-grid .page-numbers .current { background: var(--red); }

/* Product detail */
.vm-detail-hero { min-height: 430px; }
.vm-detail-hero .vm-content-hero-copy { max-width: 1000px; }
.vm-detail-hero h1 { font-size: clamp(48px, 5.3vw, 76px); }

.vm-single-product {
  background: var(--paper);
  color: #242220;
  padding: 58px var(--gutter) 78px;
}

.vm-single-product .product { margin: 0 auto; max-width: 1200px; }
.vm-single-product .woocommerce-product-gallery,
.vm-single-product .summary { margin-bottom: 48px !important; }
.vm-single-product .woocommerce-product-gallery img { background: white; }
.vm-single-product .summary h2,
.vm-single-product .woocommerce-tabs h2,
.vm-single-product .related h2,
.vm-single-product .up-sells h2 {
  color: var(--black);
  font-family: var(--display);
  font-size: clamp(32px, 3.2vw, 48px);
  line-height: 0.95;
  text-transform: uppercase;
}

.vm-single-product .summary p,
.vm-single-product .woocommerce-tabs p,
.vm-single-product .woocommerce-tabs li { font-size: 15px; line-height: 1.7; }
.vm-single-product .product_meta { border-top: 1px solid #cfc6bc; display: grid; gap: 8px; margin-top: 24px; padding-top: 18px; }
.vm-single-product .woocommerce-tabs ul.tabs { border-bottom: 2px solid #111; padding-left: 0 !important; }
.vm-single-product .woocommerce-tabs ul.tabs li { background: transparent !important; border: 0 !important; margin: 0 8px 0 0 !important; }
.vm-single-product .woocommerce-tabs ul.tabs li a { color: #111 !important; font-weight: 800 !important; padding: 12px 16px !important; }
.vm-single-product .woocommerce-tabs ul.tabs li.active a { background: var(--red); color: white !important; }
.vm-single-product .related ul.products,
.vm-single-product .up-sells ul.products { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }

/* Buyer guides */
.vm-blog-listing {
  background: var(--paper);
  padding: 58px var(--gutter) 76px;
}

.vm-blog-grid {
  display: grid;
  gap: 28px 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vm-blog-card {
  background: white;
  border: 1px solid #d8d0c7;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.vm-blog-card-media { background: #111; display: block; overflow: hidden; }
.vm-blog-card-media img { aspect-ratio: 16 / 10; height: auto; object-fit: cover; transition: transform 400ms ease; width: 100%; }
.vm-blog-card:hover .vm-blog-card-media img { transform: scale(1.025); }
.vm-blog-card-copy { display: flex; flex: 1; flex-direction: column; padding: 24px; }
.vm-card-meta { color: #776f68; font-size: 10px; font-weight: 800; letter-spacing: 0.07em; margin: 0 0 13px; text-transform: uppercase; }
.vm-blog-card h2 { color: var(--black); font-size: 21px; line-height: 1.22; margin: 0 0 14px; }
.vm-blog-card h2 a:hover { color: var(--red); }
.vm-blog-card-copy > p:not(.vm-card-meta) { color: #4d4843; font-size: 13px; line-height: 1.6; margin: 0 0 20px; }
.vm-card-link { color: #111; font-size: 11px; font-weight: 900; margin-top: auto; text-transform: uppercase; }
.vm-card-link:hover { color: var(--red); }

.vm-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 42px; }
.vm-pagination .page-numbers { align-items: center; background: #111; color: white; display: inline-flex; justify-content: center; min-height: 42px; min-width: 42px; padding: 8px 12px; }
.vm-pagination .current { background: var(--red); }

/* Single buyer guide */
.vm-article-hero { min-height: 500px; }
.vm-article-hero h1 { font-size: clamp(44px, 5.2vw, 74px); max-width: 1080px; }
.vm-article-meta { color: #ddd; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; margin: 0; text-transform: uppercase; }

.vm-article-layout {
  background: var(--paper);
  display: grid;
  gap: clamp(36px, 5vw, 84px);
  grid-template-columns: 250px minmax(0, 780px);
  justify-content: center;
  padding: 64px var(--gutter) 78px;
}

.vm-article-aside { align-self: start; border-top: 3px solid var(--red); position: sticky; top: 24px; padding-top: 18px; }
.vm-article-aside > p:not(.section-kicker) { color: #4b4743; font-size: 12px; line-height: 1.6; }
.vm-article-aside .button { font-size: 11px; margin-top: 12px; width: 100%; }

.vm-article-content { color: #282522; font-size: 16px; line-height: 1.78; min-width: 0; }
.vm-article-content > *:first-child { margin-top: 0; }
.vm-article-content h2,
.vm-article-content h3 {
  color: var(--black);
  font-family: var(--display);
  letter-spacing: -0.01em;
  line-height: 1;
  text-transform: uppercase;
}
.vm-article-content h2 { border-top: 2px solid var(--red); font-size: clamp(34px, 3.4vw, 48px); margin: 52px 0 18px; padding-top: 16px; }
.vm-article-content h3 { font-size: 27px; margin: 34px 0 14px; }
.vm-article-content p { margin: 0 0 21px; }
.vm-article-content a { color: #b50c11; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.vm-article-content img { height: auto; max-width: 100%; }
.vm-article-content figure { margin: 32px 0; }
.vm-article-content figcaption { color: #66605a; font-size: 11px; margin-top: 8px; }
.vm-article-content table { border-collapse: collapse; display: block; margin: 28px 0; max-width: 100%; overflow-x: auto; }
.vm-article-content th,
.vm-article-content td { border: 1px solid #c9c0b5; min-width: 140px; padding: 12px 14px; text-align: left; vertical-align: top; }
.vm-article-content th { background: #111; color: white; }

.vm-post-navigation {
  background: #111;
  color: white;
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr 1fr;
  padding: 30px var(--gutter);
}
.vm-post-navigation > div:last-child { text-align: right; }
.vm-post-navigation a { font-size: 12px; font-weight: 800; line-height: 1.45; }
.vm-post-navigation a:hover { color: var(--red); }

/* Legal pages */
.vm-legal-hero { min-height: 330px; }
.vm-legal-layout {
  background: var(--paper);
  display: grid;
  gap: clamp(40px, 6vw, 90px);
  grid-template-columns: 260px minmax(0, 800px);
  justify-content: center;
  padding: 64px var(--gutter) 82px;
}

.vm-legal-aside { align-self: start; border-top: 3px solid var(--red); padding-top: 18px; position: sticky; top: 24px; }
.vm-legal-aside h2 { color: var(--black); font-family: var(--display); font-size: 34px; line-height: 1; margin: 0 0 16px; text-transform: uppercase; }
.vm-legal-aside > p:not(.section-kicker) { color: #514c47; font-size: 12px; line-height: 1.6; }
.vm-legal-aside a { color: #b50c11; font-weight: 800; }

.vm-legal-content { color: #2a2724; font-size: 15px; line-height: 1.72; }
.vm-legal-content > *:first-child { margin-top: 0; }
.vm-legal-content h2,
.vm-legal-content blockquote {
  border: 0;
  border-top: 2px solid var(--red);
  color: var(--black);
  font-family: var(--display);
  font-size: 34px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  margin: 42px 0 17px;
  padding: 15px 0 0;
  text-transform: uppercase;
}
.vm-legal-content blockquote p { margin: 0; }
.vm-legal-content p { margin: 0 0 18px; }
.vm-legal-content a { color: #b50c11; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.vm-content-cta { margin: 0; max-width: none; }

@media (max-width: 1040px) {
  .vm-commerce-grid ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vm-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vm-article-layout,
  .vm-legal-layout { grid-template-columns: 220px minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .vm-content-hero { min-height: 470px; }
  .vm-content-hero-copy { left: 32px; right: 32px; }
  .vm-content-hero h1 { font-size: clamp(48px, 12vw, 66px); }
  .vm-product-hero-grid { grid-template-columns: 1fr 1fr; }
  .vm-product-hero-grid img:nth-child(n+3) { display: none; }
  .vm-archive-intro { padding-left: 32px; padding-right: 32px; }
  .vm-commerce-grid { padding-left: 32px; padding-right: 32px; }
  .vm-commerce-grid ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vm-single-product { padding-left: 32px; padding-right: 32px; }
  .vm-single-product .related ul.products,
  .vm-single-product .up-sells ul.products { grid-template-columns: repeat(2, 1fr); }
  .vm-blog-listing { padding-left: 32px; padding-right: 32px; }
  .vm-article-layout,
  .vm-legal-layout { grid-template-columns: 1fr; padding-left: 32px; padding-right: 32px; }
  .vm-article-aside,
  .vm-legal-aside { position: static; }
}

@media (max-width: 520px) {
  .vm-content-hero { min-height: 520px; }
  .vm-content-hero-copy { left: 22px; right: 22px; }
  .vm-content-hero h1 { font-size: clamp(44px, 13.5vw, 60px); overflow-wrap: anywhere; }
  .vm-archive-intro { padding: 36px 22px; }
  .vm-archive-intro .wp-block-columns { grid-template-columns: 1fr; }
  .vm-commerce-grid { padding: 40px 22px 56px; }
  .vm-commerce-grid ul.products { grid-template-columns: 1fr; }
  .vm-commerce-grid ul.products li.product h2,
  .vm-commerce-grid ul.products li.product .woocommerce-loop-product__title { min-height: 0; }
  .vm-single-product { padding: 40px 22px 58px; }
  .vm-single-product .related ul.products,
  .vm-single-product .up-sells ul.products { grid-template-columns: 1fr; }
  .vm-blog-listing { padding: 40px 22px 58px; }
  .vm-blog-grid { grid-template-columns: 1fr; }
  .vm-article-hero { min-height: 580px; }
  .vm-article-layout,
  .vm-legal-layout { padding: 42px 22px 58px; }
  .vm-post-navigation { grid-template-columns: 1fr; padding-left: 22px; padding-right: 22px; }
  .vm-post-navigation > div:last-child { border-top: 1px solid #3a3a3a; padding-top: 20px; text-align: left; }
}
