/*
Theme Name: Nordtank
Theme URI: https://nordtank.ee
Author: Nordtank
Description: Standalone WooCommerce storefront based on the supplied Nordtank prototypes.
Version: 1.0.0
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 8.3
Text Domain: nordtank
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* Shared integration rules. Page and component styles live in assets/css. */
:root {
  --gut: clamp(1rem, 3vw, 2.5rem);
  --nav-h: 69px;
  --admin-h: 0px;
  --warn: #8a4a00;
  --hist: #d3d6e2;
  --hist-on: #9fa7dd;
}
[hidden] {
  display: none !important;
}
html {
  scroll-padding-top: calc(var(--nav-h) + var(--admin-h) + 4rem);
}
body.lock {
  overflow: hidden;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
input,
select,
textarea,
.button {
  border-radius: 0;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
img {
  height: auto;
}
.icon-sprite {
  position: absolute;
  pointer-events: none;
}
.brand-text {
  color: var(--brand);
}
.muted {
  color: var(--text-2);
}
.sr,
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 1rem;
  top: -10rem;
  z-index: 99999;
  padding: 1rem;
  background: white;
  color: var(--brand);
}
.skip-link:focus {
  top: 1rem;
}
#main-content:focus {
  outline: none;
}
.admin-bar {
  --admin-h: 32px;
}
.nav {
  top: var(--admin-h);
}
.nav-menu > li > a {
  display: flex;
  align-items: center;
}
.nav-menu .current-menu-item > a,
.nav-menu .current-menu-item > .nav-item > a {
  border-bottom-color: var(--brand);
}
.nav-menu .sub-menu {
  list-style: none;
}
.nav-menu .sub-menu .sub-menu {
  top: 0;
  left: 100%;
}
.nav .icon-btn {
  text-decoration: none;
}
.foot-legal ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + env(safe-area-inset-bottom));
  transform: translate(-50%, 1rem);
  z-index: 120;
  background: var(--text);
  color: var(--surface);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.76rem;
  padding: 0.8rem 1.1rem;
  max-width: calc(100% - 2rem);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.grid-prod {
  list-style: none;
  margin-left: 0;
  margin-right: 0;
}
.grid-prod > li {
  min-width: 0;
  margin: 0;
  padding: 0;
}
.grid-prod::before,
.grid-prod::after {
  display: none;
}
.card .price {
  display: block;
}
.card ins,
.p-price ins {
  text-decoration: none;
}
.card del {
  display: block;
  font-size: 0.75rem;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--text-2);
}
.card .added_to_cart {
  font:
    0.7rem 'IBM Plex Mono',
    monospace;
}
.card .btn.loading {
  opacity: 0.5;
}
.card .btn.added::before {
  content: '✓';
}
.card-foot:has(.added_to_cart) {
  flex-wrap: wrap;
}
.home .factory-split {
  --cols: 1.15fr 1fr;
}
.home-products {
  background: var(--paper);
}
.home .grid-prod {
  margin-top: 2.5rem;
  border: 1px solid var(--line);
  padding: 0;
}
.home .card-title {
  font-size: 0.98rem;
}
.home .card .price {
  font-size: 1.25rem;
}
.home .card:hover .plate img {
  transform: none;
}
.home .card {
  box-shadow: 0 0 0 1px var(--line);
}
@media (min-width: 560px) {
  .home .grid-prod {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 960px) {
  .home .grid-prod {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 559px) {
  .home .card {
    display: grid;
    grid-template-columns: clamp(6rem, 32%, 9rem) 1fr;
  }
  .home .card .plate {
    aspect-ratio: auto;
  }
  .home .card .plate img {
    width: 82%;
    height: 82%;
  }
  .home .card-body {
    padding: 0.9rem 0.95rem 1rem;
  }
}
.post-type-archive-product h1,
.tax-product_cat h1,
.tax-product_tag h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
}
.cat-head .lede {
  font-size: clamp(1.02rem, 1.3vw, 1.15rem);
  max-width: 40rem;
}
.cat .thumb img {
  height: 88%;
}
.cat .thumb svg {
  height: 47%;
}
.filters fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}
.filters .fg {
  border-top: 1px solid var(--line);
}
.fg-head {
  list-style: none;
}
.fg-head::-webkit-details-marker {
  display: none;
}
.fg-head svg {
  margin-left: auto;
}
details:not([open]) > .fg-head svg {
  transform: rotate(-90deg);
}
.filter-submit {
  margin-top: 1rem;
  width: 100%;
}
.js .filter-submit {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.js .filter-submit:focus-visible {
  position: static;
  width: 100%;
  height: auto;
  clip-path: none;
}
.rin input[type='number'] {
  appearance: textfield;
}
.rin input::-webkit-inner-spin-button {
  appearance: none;
}
.range .fill {
  left: 0;
  right: 0;
}
.chip {
  text-decoration: none;
}
.results[aria-busy='true'] #catalog-results {
  opacity: 0.5;
}
.results .grid-prod {
  grid-template-columns: 1fr;
}
@container (min-width: 34rem) {
  .results .grid-prod {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@container (min-width: 52rem) {
  .results .grid-prod {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@container (min-width: 74rem) {
  .results .grid-prod {
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  }
}
.results .more a {
  margin-inline: auto;
}
.results .page-numbers {
  list-style: none;
  display: flex;
  gap: 0.4rem;
  padding: 0;
  justify-content: center;
}
.page-numbers a,
.page-numbers .current {
  border: 1px solid var(--line);
  padding: 0.5rem 0.9rem;
  text-decoration: none;
}
.page-numbers .current {
  background: var(--brand);
  color: white;
}
.single-product h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.65rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.single-product h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
}
.single-product h3 {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
}
.single-product .lede {
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  max-width: 42rem;
}
.single-product .shop-main > .product {
  box-shadow: none;
  display: block;
}
.summary.entry-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.summary .stock {
  margin: 0;
}
.gal {
  display: block;
  position: relative;
  align-self: start;
}
.woocommerce-product-gallery {
  position: relative;
  background: var(--plate);
  outline: 1px solid var(--line);
  outline-offset: -1px;
  margin: 0;
}
.woocommerce-product-gallery__wrapper {
  margin: 0;
  padding: 0;
}
.woocommerce-product-gallery__image,
.woocommerce-product-gallery__image--placeholder {
  aspect-ratio: 4/3;
  position: relative;
}
.woocommerce-product-gallery__image a {
  display: block;
  width: 100%;
  height: 100%;
}
.woocommerce-product-gallery__image img,
.woocommerce-product-gallery__image--placeholder img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: clamp(1rem, 3%, 2.5rem);
}
.woocommerce-product-gallery .zoomImg {
  padding: 0;
}
.woocommerce-product-gallery__trigger {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  text-decoration: none;
}
.woocommerce-product-gallery .flex-control-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0.75rem;
  margin: 0;
}
.flex-control-thumbs li {
  width: 4.5rem;
  cursor: pointer;
}
.flex-control-thumbs img {
  background: var(--plate);
  border: 1px solid var(--line);
  padding: 0.2rem;
}
.flex-control-thumbs .flex-active {
  border-color: var(--brand);
}
.summary form.cart,
.woocommerce-variation-add-to-cart {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
  flex-wrap: wrap;
  margin: 0;
}
.summary .quantity {
  display: flex;
  border: 1px solid var(--line);
  flex: none;
  max-width: 100%;
}
.summary .quantity input {
  width: 2.8rem;
  min-height: 3.15rem;
  border: none;
  background: none;
  text-align: center;
  padding: 0;
  font:
    0.95rem 'IBM Plex Mono',
    monospace;
  appearance: textfield;
}
.summary .quantity input::-webkit-inner-spin-button {
  appearance: none;
}
.quantity-step {
  width: 2.7rem;
  border: none;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.quantity-step:hover {
  background: var(--panel);
  color: var(--brand);
}
.single-product .summary .single_add_to_cart_button {
  flex: 1;
  min-height: 3.15rem;
  padding-inline: 0.8rem;
  white-space: nowrap;
  line-height: normal;
}
.summary .variations_form {
  display: block;
}
.variations {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}
.variations th {
  text-align: left;
  font-weight: 500;
  padding-right: 0.6rem;
}
.variations td {
  padding-block: 0.35rem;
}
.variations select {
  width: 100%;
  padding: 0.65rem;
  background: white;
  border: 1px solid var(--line);
}
.single_variation {
  margin-block: 0.75rem;
}
.woocommerce-variation-price {
  font-family: Jost, sans-serif;
  font-size: 1.4rem;
}
.reset_variations {
  font-size: 0.8rem;
  color: var(--brand);
}
.single_variation_wrap {
  width: 100%;
}
.pdp .p-price b {
  line-height: 1;
}
.pdp .p-price del {
  font-size: 1.2rem;
  color: var(--text-2);
  font-weight: 400;
}
.single-product .sec {
  border-top-width: 1px;
}
.single-product .toc {
  top: calc(var(--nav-h) + var(--admin-h));
}
.draw {
  margin: 1em 40px;
}
.draw .nordtank-drawing {
  width: 100%;
}
.draw svg {
  width: 100%;
  height: auto;
}
.doc {
  text-decoration: none;
}
.assur a {
  color: var(--brand);
}
@media (min-width: 1000px) {
  .summary.entry-summary {
    position: sticky;
    top: calc(var(--nav-h) + var(--admin-h) + 1rem);
    align-self: start;
  }
  .woocommerce-product-gallery__image,
  .woocommerce-product-gallery__image--placeholder {
    aspect-ratio: auto;
    height: min(62vh, 600px);
  }
}
@media (max-width: 999px) {
  .single-product .site-footer {
    padding-bottom: 6rem;
  }
  .single-product .toast {
    bottom: 5rem;
  }
}
@media (max-width: 1080px) {
  .nav-menu .sub-menu .sub-menu {
    position: static;
  }
  .filters.open {
    z-index: 100001;
  }
}
@media (max-width: 782px) {
  .admin-bar {
    --admin-h: 46px;
  }
}
@media (max-width: 600px) {
  .admin-bar .nav {
    top: 0;
  }
}
.no-js .nav-toggle {
  display: none;
}
.no-js .nav > nav {
  display: flex;
  position: static;
}
.no-js .nav-menu {
  flex-wrap: wrap;
}
.no-js .sub-menu {
  padding-left: 1rem;
  font-size: 0.85rem;
}
.no-js .menu-item-has-children {
  display: block;
}
.no-js .filters {
  display: block;
  position: static;
  max-height: none;
}
.no-js .mbar {
  display: none;
}
.no-js .woocommerce-product-gallery {
  opacity: 1 !important;
}
@media (max-width: 1080px) {
  .no-js .nav {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

.product-inclusions {
  display: grid;
  gap: 1.3rem;
  align-content: start;
}
.grid-prod {
  margin-bottom: 0;
}
.kit-options {
  color: var(--text-2);
}
@media (max-width: 1080px) {
  .filters.open > form {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }
}

/* Keep service rows aligned with the product design at desktop widths. */
@media (min-width: 1000px) {
  .assur li:last-child {
    min-height: 2lh;
  }
}
.woocommerce-product-gallery__trigger {
  font-size: 0;
}
.woocommerce-product-gallery__trigger > * {
  display: none;
}
.woocommerce-product-gallery__trigger::before {
  content: '';
  width: 11px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  transform: translate(-2px, -2px);
}
.woocommerce-product-gallery__trigger::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 1.5px;
  background: currentColor;
  transform: translate(5px, 5px) rotate(45deg);
}
.cat-layout:not(:has(.filters)) {
  grid-template-columns: minmax(0, 1fr);
}
.card .price:has(del) {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.45rem;
  color: var(--brand);
}
.card .price del {
  display: inline;
  order: 1;
  font-size: 0.72rem;
  font-weight: 400;
}
.card .price small {
  order: 2;
  flex-basis: 100%;
}
