/**
 * The winery block under a product — the banner half of it.
 *
 * The markup and most of the look are innowine's own `.boraszat-*` / `.ar-*`
 * rules in the Etch global stylesheet. What is here is only the part that had
 * to catch up with the brand archive's hero: a brand with no banner of its own
 * now gets the shop's stand-in instead of an empty column, and the mark sits on
 * the banner as a centred white tab, the same shape the hero gives it.
 *
 * Selectors are two classes deep wherever they land on an `img`, because shop
 * pages carry the `woocommerce` body class and `.woocommerce img { height: auto }`
 * is one class plus one element — it beats a single-class rule.
 */

/*
 * The tab moved from above the banner onto it, so the 50px that used to make
 * room for it above would now only push the banner out of line with the text
 * beside it.
 */
.boraszat-inner .ar-borito,
.boraszat-inner .ar-content-wrapper {
  margin-block-start: 0;
}

/*
 * The two columns are a stretch row, so without this the banner's box grows to
 * the height of the description beside it and the part the picture does not
 * reach shows as a grey panel. Hugging the picture instead keeps the banner at
 * its own proportions — the archive hero can fill its half because its image is
 * `block-size: 100%`, and cropping a 1024x538 banner to a column of text is not
 * worth copying.
 */
.boraszat-inner .ar-borito {
  position: relative;
  align-self: flex-start;
  align-items: flex-start;
  overflow: hidden;
  border-radius: 10px;
  background-color: #f2f2f2;
}

.boraszat-inner .ar-borito .boraszat-borito {
  display: block;
  inline-size: 100%;
  border-radius: 10px;
  object-fit: cover;
}

/*
 * A stand-in is banded at 200px rather than shown full height, exactly as the
 * category and brand archives band theirs: it reads as "no picture yet" instead
 * of as this winery's own vineyard.
 */
.boraszat-inner .ar-borito[data-placeholder="1"] .boraszat-borito {
  max-block-size: 200px;
}

/*
 * The mark, as a white tab hanging off the top edge of the banner: square where
 * it meets the edge, rounded below, centred on the banner's width. The logo
 * itself falls back to the shop's own, so the tab is part of the banner's shape
 * rather than something that appears only for the brands that sent a file.
 */
.boraszat-inner .ar-logo-mobil {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-block-start: 0;
  padding: 10px 25px;
  border-end-start-radius: 10px;
  border-end-end-radius: 10px;
  background-color: var(--white, #fff);
  translate: -50% 0;
}

.boraszat-inner .ar-logo-mobil .ar-logo-mobil-img {
  display: block;
  inline-size: auto;
  block-size: 44px;
  max-inline-size: 220px;
  aspect-ratio: auto;
  object-fit: contain;
}

/* The banner is a band on a phone, where the two columns stack. */
@media (width <= 991px) {
  .boraszat-inner .ar-borito .boraszat-borito {
    max-block-size: 220px;
  }
}


/* ================================================== the dark winery block

   "A borászatról" under a product (#102, .single-product) and, since
   2026-09-28, the hero of the brand archive (#994, .tax-product_brand, with
   .marka-hero on the band). One set of rules for both, so the two cannot drift
   apart; the archive-only differences follow at the end. Moved here from
   innowine-single-product.css, which only loads on product pages. */

:is(.single-product, .tax-product_brand) .boraszat-blokk {
  padding-block: var(--space-l, 4.5rem);
  padding-inline: var(--space-s, 2rem);
  background-color: #111;
  color: var(--white, #fff);
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-l, 4.5rem);
  align-items: center;
  inline-size: 100%;
  max-inline-size: var(--innowine-oldal, 1140px);
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__media {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background-color: #2a2a2a;
}

/* Two classes plus the element: `.woocommerce img` is on this page too. */
:is(.single-product, .tax-product_brand) .boraszat-blokk__media img.boraszat-blokk__kep {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* The shop's stand-in, not this winery's photo: a band, as on the archives. */
:is(.single-product, .tax-product_brand) .boraszat-blokk__media[data-placeholder="1"] img.boraszat-blokk__kep {
  aspect-ratio: 16 / 7;
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__media:has(img.boraszat-blokk__kep[src=""]) {
  display: none;
}

/* Since 2026-09-28 the archive leaves an empty picture out altogether
   (innowine-seo-archive.php), so the box can be empty rather than hold an
   empty img. */
:is(.single-product, .tax-product_brand) .boraszat-blokk__media:not(:has(img)) {
  display: none;
}

/*
 * The winery's own logo, as a white plate in the photo's bottom-left corner.
 * Only drawn when the brand has a logo of its own (no shop fallback here).
 */
:is(.single-product, .tax-product_brand) .boraszat-blokk__logo {
  position: absolute;
  inset-block-end: 20px;
  inset-inline-start: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 2px;
  background-color: var(--white, #fff);
  box-shadow: 0 6px 20px rgb(0 0 0 / 25%);
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__logo img.boraszat-blokk__logo-kep {
  display: block;
  inline-size: auto;
  block-size: 56px;
  max-inline-size: 160px;
  object-fit: contain;
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__tartalom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__felirat {
  color: #d9a93f;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__nev {
  margin: 14px 0 0;
  color: var(--white, #fff);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.15;
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__adatok {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  inline-size: 100%;
  margin: 24px 0 0;
  padding: 14px 0;
  border-block: 1px solid rgb(255 255 255 / 18%);
  list-style: none;
  font-size: 13px;
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__adat {
  margin: 0;
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__adat-ertek {
  color: var(--white, #fff);
  font-weight: 600;
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__adat-cimke {
  color: rgb(255 255 255 / 65%);
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__adat-cimke::before {
  content: "\00b7";
  margin-inline: 5px;
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__leiras {
  margin-block-start: 24px;
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__leiras:has(.boraszat-blokk__leiras-szoveg:empty) {
  display: none;
}

/* About eight lines, then an ellipsis. */
:is(.single-product, .tax-product_brand) .boraszat-blokk__leiras-szoveg {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
  line-clamp: 8;
  overflow: hidden;
  margin: 0;
  color: rgb(255 255 255 / 85%);
  font-size: 16px;
  line-height: 1.7;
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__gomb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-block-start: 28px;
  padding: 14px 22px;
  border: 1px solid var(--white, #fff);
  color: var(--white, #fff);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease;
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__gomb:is(:hover, :focus-visible) {
  background-color: var(--white, #fff);
  color: #111;
}

:is(.single-product, .tax-product_brand) .boraszat-blokk__gomb[href=""] {
  display: none;
}

@media (width <= 991px) {
  :is(.single-product, .tax-product_brand) .boraszat-blokk__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-m, 3rem);
  }
}

@media (width <= 767px) {
  :is(.single-product, .tax-product_brand) .boraszat-blokk {
    padding-block: var(--space-m, 3rem);
    padding-inline: var(--space-xs, 1.33rem);
  }

  :is(.single-product, .tax-product_brand) .boraszat-blokk__nev {
    font-size: 30px;
  }

  :is(.single-product, .tax-product_brand) .boraszat-blokk__logo {
    inset-block-end: 12px;
    inset-inline-start: 12px;
    padding: 8px 14px;
  }

  :is(.single-product, .tax-product_brand) .boraszat-blokk__logo img.boraszat-blokk__logo-kep {
    block-size: 40px;
  }
}

/* ------------------------------------------ brand archive only (.marka-hero)
   `data-hero` is {term.hero}, see innowine_archive_hero_layout(): `kep` with a
   banner, `logo` with only the winery's mark, `kozep` with neither. */

/* As wide as the listing under it, so the photo and the sidebar share an edge. */
.tax-product_brand .marka-hero {
  --innowine-oldal: 1450px;
}

/* Every archive cover is capped at 360px tall (a standing request); past that
   the photo is cropped, not squashed. */
.tax-product_brand .marka-hero .boraszat-blokk__media img.boraszat-blokk__kep {
  aspect-ratio: 3 / 2;
  max-block-size: 360px;
}

/* Here the mark keeps the archive's shape (user request): a white tab hanging
   off the top edge of the banner, centred, square above and rounded below. */
.tax-product_brand .marka-hero[data-hero="kep"] .boraszat-blokk__logo {
  inset-block: 0 auto;
  inset-inline-start: 50%;
  padding: 15px 25px;
  border-radius: 0 0 10px 10px;
  box-shadow: none;
  translate: -50% 0;
}

.tax-product_brand .marka-hero[data-hero="kep"] .boraszat-blokk__logo img.boraszat-blokk__logo-kep {
  block-size: 44px;
  max-inline-size: 220px;
}

/* This is the winery's own page: the whole description, not eight lines. */
.tax-product_brand .marka-hero .boraszat-blokk__leiras-szoveg {
  display: block;
  -webkit-line-clamp: none;
  line-clamp: none;
  overflow: visible;
}

.tax-product_brand .marka-hero .boraszat-blokk__leiras-szoveg p {
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.tax-product_brand .marka-hero .boraszat-blokk__leiras-szoveg p + p {
  margin-block-start: 0.8em;
}

.tax-product_brand .marka-hero .boraszat-blokk__leiras-szoveg a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Only the mark, no banner: the white plate stands on its own in the photo's
   column, sized to the mark rather than to a 3:2 frame. */
.tax-product_brand .marka-hero[data-hero="logo"] .boraszat-blokk__inner {
  grid-template-columns: auto minmax(0, 1fr);
}

/* One class deeper than the shared "no photo, no media box" rule, whose
   `:has()` counts as two classes and an element. */
.tax-product_brand .marka-hero[data-hero="logo"] .boraszat-blokk__inner .boraszat-blokk__media {
  display: block;
  overflow: visible;
  background: none;
}

.tax-product_brand .marka-hero[data-hero="logo"] .boraszat-blokk__media img.boraszat-blokk__kep {
  display: none;
}

.tax-product_brand .marka-hero[data-hero="logo"] .boraszat-blokk__logo {
  position: static;
  padding: 28px 36px;
}

.tax-product_brand .marka-hero[data-hero="logo"] .boraszat-blokk__logo img.boraszat-blokk__logo-kep {
  block-size: auto;
  max-block-size: 120px;
  max-inline-size: 220px;
}

/* Neither: the words alone, in a readable measure. */
.tax-product_brand .marka-hero[data-hero="kozep"] .boraszat-blokk__inner {
  grid-template-columns: minmax(0, 80ch);
}

@media (width <= 991px) {
  .tax-product_brand .marka-hero[data-hero="logo"] .boraszat-blokk__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-s, 2rem);
  }

  .tax-product_brand .marka-hero[data-hero="logo"] .boraszat-blokk__media {
    justify-self: start;
  }

  .tax-product_brand .marka-hero .boraszat-blokk__media img.boraszat-blokk__kep {
    max-block-size: 260px;
  }
}

@media (width <= 767px) {
  .tax-product_brand .marka-hero[data-hero="logo"] .boraszat-blokk__logo {
    padding: 16px 22px;
  }

  .tax-product_brand .marka-hero[data-hero="logo"] .boraszat-blokk__logo img.boraszat-blokk__logo-kep {
    max-block-size: 72px;
    max-inline-size: 160px;
  }
}
