/* Карточка товара «Гаражные ворота» — commerce PDP в стиле interior_door. */

body.garage-door-product {
  --footer-w: var(--storefront-content-max, 1248px);
  --gd-workspace: var(--storefront-workspace-bg, #edf1f6);
  --gd-panel: var(
    --storefront-text-card-bg,
    linear-gradient(180deg, #fbfcff 0%, #f5f8fe 100%)
  );
  --gd-panel-solid: var(--storefront-text-card-bg-solid, #f5f8fe);
  --gd-panel-border: var(--storefront-text-card-border, #d9e1ee);
  --gd-panel-radius: var(--storefront-text-card-radius, 7px);
  --gd-panel-accent: #0b3a91;
  --gd-navy: #0d2d63;
  --gd-blue: #0068b7;
  --gd-muted: #5a7390;
  background: #f7f9fd;
}

body.garage-door-product main {
  background: #f7f9fd;
}

body.garage-door-product .bd-home-main {
  margin: 9px 0 16px;
  background: transparent;
}

body.garage-door-product .bd-home-main__wrap {
  padding-bottom: 0;
}

body.garage-door-product .bd-home-main__inner {
  padding: clamp(18px, 2.5vw, 28px);
}

body.garage-door-product .bd-home-main__shell {
  max-width: var(--storefront-content-max, 1248px);
  border: 1px solid var(--gd-panel-border);
  border-radius: 4px;
  box-shadow: none;
  background: #fff;
}

body.garage-door-product .bd-home-main__shell::after {
  display: none;
}

.gd-product {
  color: #12324f;
  font-family: var(--font-sans);
}

.gd-product--commerce {
  padding-bottom: 88px;
}

.gd-product__nav {
  display: grid;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 18px;
}

.gd-product__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  padding: 6px 12px 6px 8px;
  border: 1px solid rgba(0, 104, 183, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--gd-blue);
  font-size: var(--text-caption);
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 47, 102, 0.08);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.gd-product__back:hover {
  border-color: rgba(0, 104, 183, 0.42);
  box-shadow: 0 10px 24px rgba(0, 47, 102, 0.12);
  transform: translateY(-1px);
}

.gd-product__back-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gd-blue);
  color: #fff;
  font-size: var(--text-small);
  line-height: 1;
}

.gd-product__breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  min-height: 24px;
  padding: 4px 0 0 2px;
  color: #7892a8;
  font-size: var(--text-caption);
  font-weight: 700;
  line-height: 1.35;
}

.gd-product__breadcrumbs a {
  color: #557997;
  text-decoration: none;
}

.gd-product__breadcrumbs a:hover {
  color: var(--gd-blue);
}

.gd-product__sep {
  color: #a5b7c7;
  font-weight: 800;
}

.gd-product__workspace {
  display: grid;
  gap: clamp(12px, 1.8vw, 20px);
}

.gd-product--commerce .gd-product__workspace {
  padding: clamp(12px, 1.8vw, 20px);
  border: 1px solid var(--storefront-workspace-border, #c2cfdf);
  border-radius: 4px;
  background: var(--gd-workspace);
  box-shadow: none;
}

.gd-product__commerce {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(12px, 1.8vw, 20px);
  align-items: start;
}

.gd-product__panel {
  min-width: 0;
  border: 1px solid var(--gd-panel-border);
  border-top: 3px solid var(--gd-panel-accent);
  border-radius: var(--gd-panel-radius);
  background: var(--gd-panel);
  box-shadow: none;
}

.gd-product__gallery {
  position: sticky;
  top: 20px;
  align-self: start;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: clamp(12px, 1.5vw, 18px);
  background: #fff;
  border-color: #c9d4e3;
}

.gd-product__gallery:not(:has(.gd-product__thumbs)) {
  grid-template-columns: minmax(0, 1fr);
}

.gd-product__thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(70vh, 560px);
  overflow-y: auto;
  padding-right: 2px;
}

.gd-product__thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d5e5f3;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gd-product__thumb.is-active,
.gd-product__thumb:hover {
  border-color: var(--gd-blue);
  box-shadow: 0 0 0 2px rgba(0, 104, 183, 0.15);
}

.gd-product__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gd-product__stage {
  border-radius: 10px;
  background: #f7fafc;
  padding: 10px;
}

.gd-product__frame {
  display: grid;
  place-items: center;
  min-height: min(56vh, 520px);
  overflow: hidden;
  border: 1px solid #e2ebf3;
  border-radius: 8px;
  background: #fff;
  background-image: none;
  box-shadow: 0 8px 24px rgba(18, 66, 103, 0.06);
}

.gd-product__frame img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(62vh, 560px);
  margin: 0 auto;
  object-fit: contain;
}

.gd-product__frame.is-variant-image img {
  max-width: min(100%, 78%);
  max-height: 440px;
}

.gd-product__image-empty {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 420px;
  grid-column: 1 / -1;
  overflow: hidden;
  border: 1px solid #e2ebf3;
  border-radius: 8px;
  background: #fff;
  color: #7795af;
  text-align: center;
}

.gd-product__image-empty .material-symbols-outlined {
  font-size: var(--text-5xl);
}

.gd-product__rail {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.gd-product__buybox {
  position: sticky;
  top: 20px;
  z-index: 2;
  padding: clamp(18px, 2.2vw, 26px);
}

.gd-product__eyebrow {
  margin: 0 0 8px;
  color: var(--gd-blue);
  font-size: var(--text-caption);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gd-product__buybox h1 {
  margin: 0 0 12px;
  color: var(--gd-navy);
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.gd-product__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin-bottom: 8px;
}

.gd-product__price strong {
  color: var(--gd-blue);
  font-size: var(--text-3xl);
  font-weight: 800;
}

.gd-product__price del {
  color: #8fa3b5;
  font-size: var(--text-body);
}

.gd-product__price span {
  flex-basis: 100%;
  color: var(--gd-muted);
  font-size: var(--text-caption);
  font-weight: 600;
}

.gd-product__meta {
  margin: 0 0 14px;
  color: var(--gd-muted);
  font-size: var(--text-caption);
}

.gd-product__sku {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef5fb;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.gd-product__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  color: var(--gd-muted);
  font-size: var(--text-caption);
  font-weight: 700;
}

.gd-product__trust a {
  color: var(--gd-blue);
  text-decoration: none;
}

.gd-product__trust a:hover {
  text-decoration: underline;
}

.gd-product__configure {
  padding: clamp(16px, 2vw, 22px);
}

.gd-configurator {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.gd-configurator__heading h2 {
  margin: 0;
  color: var(--gd-navy);
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: var(--fw-title);
}

.gd-configurator__heading p {
  margin: 6px 0 16px;
  color: var(--gd-muted);
  font-family: var(--font-sans);
  font-size: var(--text-small);
  line-height: 1.45;
}

.gd-configurator__group {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.gd-configurator__group + .gd-configurator__group {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid #e1edf7;
}

.gd-configurator__group legend {
  margin-bottom: 9px;
  color: #69849c;
  font-size: var(--text-caption);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gd-configurator__option {
  display: grid;
  gap: 5px;
}

.gd-configurator__option-title {
  color: #244b6d;
  font-size: var(--text-body);
  font-weight: 700;
}

.gd-configurator__option-title em {
  margin-left: 4px;
  color: var(--gd-blue);
  font-size: var(--text-caption);
  font-style: normal;
  text-transform: uppercase;
}

.gd-configurator select {
  width: 100%;
  min-height: 44px;
  padding: 0 36px 0 12px;
  border: 1px solid #bdd5e8;
  border-radius: 8px;
  background: #fff;
  color: #163b5b;
  font: inherit;
  font-size: var(--text-body);
  cursor: pointer;
}

.gd-configurator select:focus {
  border-color: var(--gd-blue);
  outline: 3px solid rgba(0, 104, 183, 0.14);
}

.gd-configurator select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.gd-configurator__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gd-configurator__choice {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid #bdd5e8;
  border-radius: 8px;
  background: #fff;
  color: #163b5b;
  font-size: var(--text-small);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.gd-configurator__choice input {
  accent-color: var(--gd-blue);
}

.gd-configurator__choice:has(input:checked) {
  border-color: var(--gd-blue);
  box-shadow: 0 0 0 3px rgba(0, 104, 183, 0.12);
}

.gd-configurator__choice:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.55;
}

.gd-configurator__choices--swatch {
  gap: 10px;
}

.gd-configurator__choice--swatch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.gd-configurator__choice--with-label {
  flex-direction: column;
  align-items: stretch;
  width: 96px;
  min-height: 132px;
  padding: 7px;
}

.gd-configurator__swatch-media {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  background: #f4f8fc;
}

.gd-configurator__swatch-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gd-configurator__choice-label {
  display: block;
  min-width: 0;
  padding-top: 4px;
  color: #163b5b;
  font-size: var(--text-caption);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}

.gd-configurator__status {
  min-height: 16px;
  margin: 12px 0 0;
  color: #55738d;
  font-size: var(--text-caption);
}

.gd-configurator__status.is-error {
  color: #b12828;
}

.gd-configurator__messages {
  margin: 7px 0 0;
  padding-left: 14px;
  color: #8a4b00;
  font-size: var(--text-caption);
}

.gd-configurator__breakdown {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #d9e8f4;
}

.gd-configurator__breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--text-caption);
}

.gd-configurator__breakdown .is-total {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid #b9c8dd;
  font-weight: 700;
}

.gd-product__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.gd-product__actions--buybox .gd-product__btn--primary {
  min-width: min(100%, 220px);
  min-height: 48px;
  padding-inline: 22px;
  font-size: var(--text-body);
}

.gd-product__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: var(--text-small);
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.gd-product__btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.gd-product__btn--primary {
  background: var(--gd-blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 104, 183, 0.22);
}

.gd-product__btn--primary:not(:disabled):hover {
  transform: translateY(-1px);
}

.gd-product__btn--ghost {
  background: #fff;
  color: var(--gd-blue);
  border: 1px solid #b9d4ea;
}

.gd-product__cart-status {
  flex: 1 1 100%;
  margin: 0;
  font-size: var(--text-caption);
  color: #55738d;
}

.gd-product__cart-status.is-error {
  color: #b12828;
}

/* Tabs */
.gd-product__tabs {
  padding: 0;
  overflow: hidden;
}

.gd-product__tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--gd-panel-border);
  background: var(--gd-panel-solid);
}

.gd-product__tab {
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--gd-muted);
  font: inherit;
  font-size: var(--text-body);
  font-weight: 700;
  cursor: pointer;
}

.gd-product__tab.is-active {
  color: var(--gd-navy);
  border-bottom-color: var(--gd-blue);
  background: rgba(255, 255, 255, 0.72);
}

.gd-product__tab:focus-visible {
  outline: 3px solid rgba(0, 104, 183, 0.25);
  outline-offset: -3px;
}

.gd-product__tabpanel {
  padding: clamp(18px, 2.4vw, 28px);
}

.gd-product__tabpanel[hidden] {
  display: none !important;
}

.gd-product__description-body {
  max-width: 760px;
  color: #2a4460;
  font-size: var(--text-md);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.gd-product__description-body img,
.gd-product__description-body table {
  max-width: 100%;
  height: auto;
}

.gd-product__description-body table {
  display: block;
  overflow-x: auto;
}

.gd-product__description-body p {
  margin: 0 0 12px;
}

.gd-features-list {
  margin: 0;
  max-width: 720px;
}

.gd-features-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e6eef6;
}

.gd-features-list > div:last-child {
  border-bottom: 0;
}

.gd-features-list dt {
  color: var(--gd-muted);
  font-size: var(--text-body);
}

.gd-features-list dt small {
  display: block;
  margin-top: 2px;
  font-size: var(--text-caption);
  opacity: 0.8;
}

.gd-features-list dd {
  margin: 0;
  color: var(--gd-navy);
  font-size: var(--text-body);
  font-weight: 700;
  text-align: right;
}

.gd-product__service {
  max-width: 640px;
  color: #2a4460;
  font-size: var(--text-md);
  line-height: 1.6;
}

.gd-product__service a {
  color: var(--gd-blue);
  font-weight: 700;
}

.gd-product__sticky-bar {
  display: none;
}

@media (max-width: 1024px) {
  .gd-product__commerce {
    grid-template-columns: 1fr;
  }

  .gd-product__gallery {
    position: static;
    grid-template-columns: minmax(0, 1fr);
  }

  .gd-product__thumbs {
    flex-direction: row;
    order: 2;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .gd-product__stage {
    order: 1;
  }

  .gd-product__buybox {
    position: static;
  }
}

@media (max-width: 767px) {
  body.garage-door-product .bd-home-main__inner {
    padding: 14px;
  }

  .gd-product--commerce {
    padding-bottom: 92px;
  }

  .gd-product__breadcrumbs {
    display: none;
  }

  .gd-product__frame,
  .gd-product__image-empty {
    min-height: 300px;
  }

  .gd-product__buybox h1 {
    font-size: clamp(28px, 4vw, 36px);
  }

  .gd-product__tab {
    flex: 1 1 auto;
    padding-inline: 12px;
    font-size: var(--text-small);
  }

  .gd-features-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .gd-features-list dd {
    text-align: left;
  }

  .gd-product__actions--buybox {
    display: none;
  }

  .gd-product__sticky-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--gd-panel-border);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -10px 28px rgba(9, 39, 91, 0.1);
    backdrop-filter: blur(8px);
  }

  .gd-product__sticky-price {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .gd-product__sticky-price strong {
    color: var(--gd-blue);
    font-size: var(--text-xl);
    font-weight: 800;
  }

  .gd-product__sticky-price span {
    color: var(--gd-muted);
    font-size: var(--text-caption);
    font-weight: 600;
  }

  .gd-product__sticky-bar .gd-product__btn--primary {
    min-height: 46px;
    min-width: 120px;
    font-size: var(--text-body);
  }
}
