/* Products overview + AC / DC category pages */

/* ---------- Heroes ---------- */
/* Heights on wide screens: Products as tall as the home page's header (a 16:9 band, at most 80% of the window, never
   shorter than its words, with the same space above the words); AC and DC 40% as tall as the window is wide, at least
   504 px (Support and Contact's), so their chargers show whole below the menu bar (taller only if their words need
   it). Phones and tablets: the words, then the picture under them (main.css). */
@media (min-width: 961px) {
  .hero--products { min-height: min(56.25vw, 80vh); padding-top: calc(var(--header-h) + 40px); }
  .hero--category { min-height: max(504px, 40vw); padding-top: calc(var(--header-h) + 40px); padding-bottom: 48px; }
}
.hero--products h1 { font-size: clamp(36px, 3.6vw, 52px); line-height: 1.3; }
.hero--products h1 .text-blue--line { display: block; margin-top: 6px; font-size: .5em; line-height: 1.3; } /* blue words that are the whole last line (inc/header-fields.php) */
.hero--products .lead { margin-top: 18px; max-width: 360px; }
.hero--products .btn-row { margin-top: 28px; }
.hero__more { margin-top: 22px; font-size: 18px; }
.hero--category h1 { font-size: clamp(32px, 3.1vw, 44px); line-height: 1.3; }
.hero--category .lead { margin-top: 14px; max-width: 400px; font-size: 17px; line-height: 1.5; }
.hero--ac .hero__content { max-width: 480px; }
.hero--ac h1 { text-shadow: 0 0 24px rgba(255, 255, 255, .9); }
@media (max-width: 960px) {
  .hero--products h1 .text-blue--line { font-size: .6em; }
}

/* ---------- Overview: section titles in caps + product cards ---------- */
.catalogue { padding-top: 64px; }
.catalogue .section-title p { font-size: 18px; }
.catalogue__group { margin-top: 72px; scroll-margin-top: 110px; }
.section-title--caps h2 { font-size: clamp(26px, 2.8vw, 36px); text-transform: uppercase; }
.catalogue__grid { display: grid; gap: 48px; justify-content: center; }
.catalogue__grid--dc { grid-template-columns: repeat(3, minmax(0, 230px)); }
.catalogue__grid--ac { grid-template-columns: repeat(5, minmax(0, 230px)); gap: 48px 48px; }
.product-card { display: flex; flex-direction: column; height: 100%; padding: 20px 20px 18px; border-color: #e9f0f6; box-shadow: none; color: var(--navy); }
.product-card__img { display: block; height: 250px; margin-bottom: 20px; }
.product-card__img img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s; }
.product-card:hover .product-card__img img { transform: scale(1.04); }
.product-card__name { font-size: 17px; font-weight: 700; line-height: 1.3; }
.product-card__power { margin-top: 12px; margin-bottom: 24px; font-size: 16px; font-weight: 700; color: var(--blue); }
.product-card__arrow { align-self: flex-end; display: grid; place-items: center; width: 46px; height: 46px; margin-top: auto; border: 1px solid var(--line); border-radius: 50%; color: var(--blue); transition: background .2s, color .2s, border-color .2s; }
.product-card__arrow .icon { width: 20px; height: 20px; stroke-width: 2.6; }
.product-card:hover .product-card__arrow { background: var(--blue); border-color: var(--blue); color: #fff; }
@media (max-width: 1340px) { .catalogue__grid--ac { grid-template-columns: repeat(auto-fit, minmax(200px, 230px)); gap: 32px; } }
@media (max-width: 760px) {
  .catalogue__grid, .catalogue__grid--dc, .catalogue__grid--ac { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .product-card { padding: 14px; }
  .product-card__img { height: 170px; margin-bottom: 14px; }
  .product-card__name { font-size: 15px; }
  .product-card__power { font-size: 14px; margin-top: 6px; }
  .product-card__arrow { width: 38px; height: 38px; }
  .catalogue__group { margin-top: 48px; }
  .section-title h2::before, .section-title h2::after { width: 28px; }
}

/* ---------- Features ---------- */
.features { padding-top: 24px; }
.features__title { text-align: center; font-size: clamp(24px, 2.6vw, 32px); color: var(--blue); margin-bottom: 44px; }
.features__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
.feature-card { display: flex; flex-direction: column; align-items: center; padding: 24px 16px 28px; text-align: center; border-color: #d7e8f3; border-width: 2px; box-shadow: none; }
.feature-card__icon { width: 120px; height: 120px; margin-bottom: 18px; }
.feature-card h3 { font-size: 21px; font-weight: 400; color: var(--ink); line-height: 1.3; }
.feature-card p { margin-top: 14px; font-size: 18px; line-height: 1.35; }
@media (max-width: 1024px) { .features__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .features__grid { grid-template-columns: 1fr; } .feature-card__icon { width: 96px; height: 96px; } .feature-card p { font-size: 16px; } }

/* ---------- Category: filter tabs ---------- */
.category { padding: 40px 0 24px; }
.filter-tabs { display: flex; width: max-content; max-width: 100%; margin: 0 auto 64px; padding: 3px; overflow-x: auto; scrollbar-width: none; background: #fff; border: 2px solid #e1ebf3; border-radius: 12px; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tabs button { flex: none; padding: 12px 26px; border: 0; border-radius: 10px; background: none; font-size: 20px; color: var(--text); cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.filter-tabs button:hover { color: var(--blue); }
.filter-tabs button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.hero--ac + .category .filter-tabs button { padding: 10px 14px; font-size: 17px; }
@media (max-width: 760px) {
  .category { padding-top: 28px; }
  .filter-tabs { width: auto; margin: 0 calc(var(--gutter) * -1) 36px; border-radius: 0; border-width: 2px 0; padding: 3px var(--gutter); }
  .filter-tabs button, .hero--ac + .category .filter-tabs button { padding: 10px 16px; font-size: 15px; }
}

/* ---------- Product panels ---------- */
.product-panel { scroll-margin-top: 110px; }
.product-panel[hidden] { display: none; }
.product-panel__card { display: grid; grid-template-columns: minmax(0, 1fr) 373px; grid-template-areas: "head ." "gallery info"; column-gap: 78px; padding: 48px 48px 44px; background: #fff; border: 2px solid #e1ebf3; border-radius: 22px; }
.product-panel + .product-panel .product-panel__card { margin-top: -2px; }
.product-panel--flip { background: #eef6fd; }
.product-panel--flip .product-panel__card { grid-template-columns: 373px minmax(0, 1fr); grid-template-areas: "head gallery" "info gallery"; align-items: start; background: transparent; }
.product-panel__head { grid-area: head; margin-bottom: 20px; }
.product-panel__head h2 { font-size: 20px; font-weight: 400; color: var(--navy); line-height: 1.3; }
.product-panel__power { margin-top: 12px; font-size: 29px; font-weight: 700; color: var(--blue); line-height: 1.2; }
.product-panel__info { grid-area: info; display: flex; flex-direction: column; align-self: stretch; padding-top: 0; }
.product-panel:not(.product-panel--flip) .product-panel__info { margin-top: -48px; }
.product-panel__tagline { font-size: 20px; line-height: 2.1; color: var(--navy); margin-bottom: 18px; }
.product-panel__specs { display: flex; flex-wrap: wrap; gap: 14px 16px; }
.product-panel__specs .chip { min-height: 56px; min-width: 120px; padding: 10px 16px; border-width: 2px; border-color: #e1ebf3; border-radius: 8px; font-size: 16px; }
.product-panel__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: auto; padding-top: 24px; }
.product-panel__actions .btn { min-height: 56px; padding: 12px 18px; font-size: 15px; }
.product-panel__actions .btn--outline { font-size: 14px; }
.product-panel__actions .btn--outline .icon { width: 26px; height: 26px; color: var(--blue); }
.product-panel--flip .product-panel__actions { margin-top: 0; padding-top: 48px; }
.product-panel--flip .product-panel__card { padding-top: 48px; padding-bottom: 60px; }
.product-panel--flip .product-gallery { margin-top: 0; }
.product-panel--flip + .product-panel .product-panel__card { margin-top: 0; }

/* Gallery (white framed carousel) */
.product-gallery { grid-area: gallery; align-self: start; height: 370px; background: #fff; border: 2px solid #e1ebf3; border-radius: 20px; overflow: hidden; }
.product-panel--flip .product-gallery { height: 500px; }
.product-gallery .carousel__viewport, .product-gallery__track { height: 100%; }
.product-gallery__slide { height: 100%; margin: 0; padding: 24px 110px 40px; }
.product-gallery__slide img { width: 100%; height: 100%; object-fit: contain; }
.product-gallery__counter { position: absolute; top: 22px; right: 36px; z-index: 1; font-size: 20px; color: var(--text); }
.product-gallery .round-btn { position: absolute; top: 50%; z-index: 1; width: 64px; height: 64px; margin-top: -32px; border-width: 2px; border-color: #e1ebf3; color: var(--navy); }
.product-gallery .round-btn .icon { width: 30px; height: 30px; stroke-width: 1.8; }
.product-gallery__prev { left: 16px; }
.product-gallery__next { right: 16px; }
.product-gallery__dots { position: absolute; left: 0; right: 0; bottom: 14px; }

@media (max-width: 1180px) {
  .product-panel__card, .product-panel--flip .product-panel__card { grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "head head" "gallery info"; column-gap: 40px; }
  .product-panel--flip .product-panel__card { grid-template-columns: 320px minmax(0, 1fr); grid-template-areas: "head head" "info gallery"; }
  .product-panel:not(.product-panel--flip) .product-panel__info { margin-top: 0; }
  .product-panel--flip .product-gallery { height: 400px; }
  .product-panel--flip .product-panel__actions { padding-top: 24px; margin-top: auto; }
}
@media (max-width: 860px) {
  .product-panel__card, .product-panel--flip .product-panel__card { grid-template-columns: 1fr; grid-template-areas: "head" "gallery" "info"; padding: 28px 20px; border-radius: 18px; }
  .product-panel--flip { background: #eef6fd; padding: 8px 0; }
  .product-panel + .product-panel { margin-top: 16px; }
  .product-panel__head { margin-bottom: 16px; }
  .product-panel__power { font-size: 24px; margin-top: 6px; }
  .product-gallery, .product-panel--flip .product-gallery { height: 300px; }
  .product-gallery__slide { padding: 44px 60px 36px; }
  .product-gallery .round-btn { width: 44px; height: 44px; margin-top: -22px; }
  .product-gallery .round-btn .icon { width: 22px; height: 22px; }
  .product-gallery__prev { left: 8px; }
  .product-gallery__next { right: 8px; }
  .product-gallery__counter { top: 14px; right: 18px; font-size: 16px; }
  .product-panel__info { margin-top: 24px !important; }
  .product-panel__tagline { font-size: 17px; line-height: 1.6; margin-bottom: 14px; }
  .product-panel__specs { gap: 10px; }
  .product-panel__specs .chip { min-height: 44px; min-width: 0; font-size: 14px; }
  .product-panel__actions, .product-panel--flip .product-panel__actions { padding-top: 22px; }
  .product-panel__actions .btn { flex: 1 1 180px; min-height: 50px; }
}

/* ---------- Resources ---------- */
.resources { padding: 64px 0 24px; text-align: center; }
.resources__title { font-size: clamp(26px, 2.6vw, 34px); color: var(--blue); }
.resources__lead { margin-top: 10px; font-size: 20px; }
.resource-card { display: inline-flex; align-items: center; gap: 24px; margin-top: 30px; padding: 20px 56px; border-width: 2px; border-color: #e1ebf3; border-radius: 20px; box-shadow: none; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.resource-card strong { display: block; font-size: 20px; font-weight: 400; color: var(--navy); }
.resource-card span span { font-size: 20px; color: var(--text); }
.pdf-badge { position: relative; display: block; width: 64px; height: 80px; color: var(--blue); }
.pdf-badge svg { width: 100%; height: 100%; }
.pdf-badge span { position: absolute; left: 0; right: 0; bottom: 17px; text-align: center; font-size: 15px; font-weight: 700; color: var(--blue) !important; }
@media (max-width: 640px) {
  .resources__lead { font-size: 16px; }
  .resource-card { padding: 16px 28px; gap: 18px; }
  .resource-card strong, .resource-card span span { font-size: 17px; }
}
