/* Herba Drug — globálna úprava detailu produktu pre Shoptet
   Vzhľad a obsah → Editor → HTML kód → Záhlavie.
   Pred nasadením najprv otestovať v Návrhárovi šablón. */
:root {
  --hd-detail-ink: #20233a;
  --hd-detail-accent: #435f50;
  --hd-detail-soft: #f5f4ef;
  --hd-detail-line: #e5e5df;
  --hd-detail-muted: #6f756f;
  --hd-detail-sale: #bb463f;
}


/* Brand accents are selected automatically from the brand link on the product. */
body.type-detail:has(.ratings-and-brand a[href*="/znacka/carpathia-herbarium/"]) {
  --hd-detail-ink: #27382f;
  --hd-detail-accent: #55705b;
  --hd-detail-soft: #f2f2e8;
}
body.type-detail:has(.ratings-and-brand a[href*="/znacka/dixi"]) {
  --hd-detail-ink: #132344;
  --hd-detail-accent: #173b70;
  --hd-detail-soft: #eef2f7;
}
body.type-detail:has(.ratings-and-brand a[href*="/znacka/dixi-sviste/"]) {
  --hd-detail-ink: #283549;
  --hd-detail-accent: #cf755f;
  --hd-detail-soft: #fbf1ed;
}
body.type-detail:has(.ratings-and-brand a[href*="/znacka/easy-hair/"]) {
  --hd-detail-ink: #2f3046;
  --hd-detail-accent: #7771a4;
  --hd-detail-soft: #f2f0f8;
}
body.type-detail:has(.ratings-and-brand a[href*="/znacka/fiju/"]) {
  --hd-detail-ink: #24363a;
  --hd-detail-accent: #49898c;
  --hd-detail-soft: #eef6f5;
}
body.type-detail:has(.ratings-and-brand a[href*="/znacka/herbamyl/"]) {
  --hd-detail-ink: #34402d;
  --hd-detail-accent: #71854e;
  --hd-detail-soft: #f1f3e9;
}
body.type-detail:has(.ratings-and-brand a[href*="/znacka/umy/"]) {
  --hd-detail-ink: #45342e;
  --hd-detail-accent: #bf805d;
  --hd-detail-soft: #f8f1eb;
}
body.type-detail:has(.ratings-and-brand a[href*="/znacka/nubian/"]) {
  --hd-detail-ink: #36231c;
  --hd-detail-accent: #9a623c;
  --hd-detail-soft: #f6f0e6;
}
body.type-detail:has(.ratings-and-brand a[href*="/znacka/ezo/"]) {
  --hd-detail-ink: #1e3f42;
  --hd-detail-accent: #159b9b;
  --hd-detail-soft: #edf7f5;
}
body.type-detail:has(.ratings-and-brand a[href*="/znacka/barbus/"]) {
  --hd-detail-ink: #142b4c;
  --hd-detail-accent: #28538e;
  --hd-detail-soft: #eef3f8;
}

.type-detail .p-detail-inner {
  display: grid !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: clamp(30px, 5vw, 76px);
  align-items: start;
}
.type-detail .p-image-wrapper {
  grid-column: 1; grid-row: 1; min-width: 0;
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
}
.type-detail .p-data-wrapper {
  grid-column: 2; grid-row: 1;
  display: flex; flex-direction: column;
  min-width: 0;
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
}
.type-detail .p-detail-inner-header-mobile { display: none !important; }
.type-detail .p-detail-inner-header { order: 0; }
.type-detail .p-data-wrapper .p-short-description { order: 2; }
.type-detail .p-data-wrapper form.pr-action { order: 1; }
.type-detail .p-data-wrapper .buttons-wrapper { order: 3; }

.type-detail .p-detail-inner-header h1 {
  color: var(--hd-detail-ink);
  font-size: clamp(28px, 2.7vw, 40px);
  line-height: 1.12;
  letter-spacing: -.035em;
  margin: 0 0 14px;
}
.type-detail .p-detail-inner-header .ratings-and-brand { color: var(--hd-detail-muted); }
.type-detail .p-detail-inner-header .ratings-and-brand a { color: var(--hd-detail-accent); }
.type-detail .hd-product-volume {
  display: inline-block;
  margin: 12px 0 2px;
  padding: 7px 11px;
  border: 1px solid var(--hd-detail-line);
  color: var(--hd-detail-ink);
  font-size: 13px;
  font-weight: 650;
}
.type-detail .p-image {
  background: var(--hd-detail-soft);
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  display: block;
  overflow: hidden;
}
.type-detail .p-image #wrap,
.type-detail .p-image .p-main-image { width: 100% !important; }
.type-detail .p-image img {
  width: 100% !important;
  height: auto !important;
  max-height: none;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.type-detail .p-image .flags { z-index: 2; }
.type-detail .p-image .flag-discount { background: var(--hd-detail-ink); }
.type-detail .p-data-wrapper form.pr-action { margin-top: 18px; }
.type-detail .p-data-wrapper form.pr-action .availability-value { color: var(--hd-detail-accent); }
.type-detail .p-data-wrapper form.pr-action .price-final { color: var(--hd-detail-ink); font-size: 30px; font-weight: 700; }
.type-detail .p-data-wrapper form.pr-action .add-to-cart-button {
  min-height: 52px;
  background: var(--hd-detail-ink);
  border-color: var(--hd-detail-ink);
  border-radius: 2px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
}
.type-detail .p-data-wrapper form.pr-action .add-to-cart-button:hover,
.type-detail .p-data-wrapper form.pr-action .add-to-cart-button:focus {
  background: var(--hd-detail-accent);
  border-color: var(--hd-detail-accent);
}
.type-detail .p-data-wrapper .p-short-description {
  margin-top: 24px;
  color: #515951;
  line-height: 1.7;
  max-height: none;
  overflow: visible;
  position: relative;
}
.type-detail .p-data-wrapper .p-short-description::after {
  content: none;
  display: none;
}
.type-detail .p-detail-tabs-wrapper { margin-top: 34px; }
.type-detail #p-detail-tabs { border-bottom: 1px solid var(--hd-detail-line); }
.type-detail #p-detail-tabs li a { font-weight: 600; }
.type-detail .description-inner { max-width: none; margin-inline: 0; }
.type-detail .products-related-header,
.type-detail .products-alternative-header { color: var(--hd-detail-ink); }

@media (max-width: 767px) {
  .type-detail .p-detail-inner {
    display: flex !important;
    flex-direction: column;
    gap: 0;
  }
  .type-detail .p-image-wrapper { order: 0; width: 100%; }
  .type-detail .p-detail-inner-header-mobile {
    display: block !important;
    padding: 10px 0 16px;
  }
  .type-detail .p-detail-inner-header-mobile h1 {
    color: var(--hd-detail-ink);
    font-size: 27px;
    line-height: 1.13;
    letter-spacing: -.03em;
    margin: 0 0 10px;
  }
  .type-detail .p-detail-inner-header-mobile .ratings-and-brand { color: var(--hd-detail-muted); }
  .type-detail .p-image { min-height: 0; aspect-ratio: auto; }
  .type-detail .p-image img { max-height: 100%; max-width: 100%; }
  .type-detail .p-data-wrapper { order: 1; width: 100%; }
  .type-detail .p-data-wrapper > .p-detail-inner-header { display: none !important; }
  .type-detail .p-data-wrapper form.pr-action { margin-top: 14px; }
  .type-detail .p-data-wrapper .p-short-description { margin-top: 20px; max-height: none; }
  .type-detail .p-detail-tabs-wrapper { margin-top: 26px; }
  .type-detail .p-image .flags { top: 12px; left: 12px; }
}
