/* ============================================================
   Eigene Elementor-Widgets – token-basiert
   ------------------------------------------------------------
   Alle Widgets liegen auf Website-Inhaltsbreite (--rm-container),
   zentriert, mit seitlichem Gutter auf kleinen Screens. So können
   sie in einem Full-Width-Container (Padding 0) platziert werden
   und richten sich selbst aus.
   ============================================================ */
.rm-hero,
.rm-heading-widget,
.rm-products-widget,
.rm-mediatext,
.rm-textbox {
  width: min(100% - 2 * var(--rm-space-4), var(--rm-container));
  margin-inline: auto;
}

/* ---------- Hero ---------- */
.rm-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 460px;
  overflow: hidden;
  border-radius: var(--rm-radius-lg);
  color: #fff;
  text-decoration: none;
}

/* Text bleibt auch beim Hover weiß (globale a:hover-Regel überschreiben) */
.rm-hero:hover,
.rm-hero:focus {
  color: #fff;
}

.rm-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Beere-Kasten unten: halbtransparent (Bild scheint leicht durch),
   kein Verlauf/Übergang – nur der Kasten. Untere Ecken rundet das Hero. */
.rm-hero__content {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: clamp(1.25rem, 4vw, 3rem);
  background: rgba(121, 57, 79, .85);
}

.rm-hero__sub {
  display: block;
  margin-bottom: .35em;
  font-weight: var(--rm-weight-bold);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: clamp(.85rem, 1.6vw, 1.25rem);
}

.rm-hero__title {
  display: block;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.02;
  font-size: clamp(2rem, 6vw, 4.5rem);
}

/* Eck-Banderole (diagonal, oben rechts) – groß, flacher Winkel */
.rm-hero__badge {
  position: absolute;
  z-index: 3;
  top: 40px;
  right: -84px;
  width: 380px;
  padding: .85rem 0;
  transform: rotate(30deg);
  background: var(--rm-primary);
  box-shadow: var(--rm-shadow);
  text-align: center;
}

.rm-hero__badge-text {
  display: block;
  padding: 0 96px;
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: var(--rm-fs-500);
  line-height: 1.2;
}

@media (max-width: 600px) {
  .rm-hero {
    min-height: 320px;
  }
  .rm-hero__badge {
    top: 30px;
    right: -90px;
    width: 310px;
    padding: .6rem 0;
  }
  .rm-hero__badge-text {
    padding: 0 92px;
    font-size: var(--rm-fs-300);
  }
}

/* ---------- Überschrift ---------- */
.rm-heading {
  display: flex;
  align-items: center;
  gap: var(--rm-space-5);
}

.rm-heading--center {
  justify-content: center;
}

.rm-heading--left {
  justify-content: flex-start;
}

.rm-heading--right {
  justify-content: flex-end;
}

.rm-heading__text {
  margin: 0;
  color: var(--rm-primary);
  font-weight: var(--rm-weight-bold);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.2;
  white-space: nowrap;
}

.rm-heading__line {
  flex: 1 1 auto;
  height: 0;
  border-top: 2px dotted var(--rm-primary);
}

/* Ausrichtung: jeweils nur die sinnvolle Linie zeigen */
.rm-heading--left .rm-heading__line--before {
  display: none;
}

.rm-heading--right .rm-heading__line--after {
  display: none;
}

/* Text unter der Überschrift */
.rm-heading__sub {
  width: 100%;
  margin: var(--rm-space-3) 0 0;
  text-align: center;
  font-family: var(--rm-font);
  font-size: 17px;
  font-weight: 400;
  color: var(--rm-primary);
}

.rm-heading__sub > :first-child {
  margin-top: 0;
}

.rm-heading__sub > :last-child {
  margin-bottom: 0;
}

.rm-heading-widget--center .rm-heading__sub {
  text-align: center;
  margin-inline: auto;
}

.rm-heading-widget--left .rm-heading__sub {
  text-align: left;
  margin-inline: 0;
}

.rm-heading-widget--right .rm-heading__sub {
  text-align: right;
  margin-inline: 0 0 0 auto;
}

@media (max-width: 600px) {
  .rm-heading__line {
    display: none;
  }
  .rm-heading__text {
    white-space: normal;
    text-align: center;
  }
}

/* ---------- Produkt-Grid ---------- */
.rm-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--rm-space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.rm-products__item {
  display: flex;
}

.rm-product {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--rm-bg);
  border-radius: var(--rm-radius-lg);
  box-shadow: var(--rm-shadow);
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow .2s ease, transform .2s ease;
}

.rm-product:hover {
  box-shadow: var(--rm-shadow-lg);
  transform: translateY(-3px);
}

.rm-product__media {
  position: relative;
  overflow: hidden;
}

.rm-product__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* „Stark reduziert"-Banderole (Ecke oben rechts) */
.rm-product__badge {
  position: absolute;
  top: 16px;
  right: -42px;
  transform: rotate(45deg);
  padding: 5px 44px;
  background: var(--rm-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  box-shadow: var(--rm-shadow);
}

.rm-product__title {
  margin: var(--rm-space-4) var(--rm-space-4) var(--rm-space-2);
  text-align: center;
  color: var(--rm-primary);
  font-size: var(--rm-fs-500);
  font-weight: var(--rm-weight-bold);
  line-height: 1.25;
}

.rm-product__price {
  margin: 0 var(--rm-space-4) var(--rm-space-5);
  text-align: center;
  font-size: var(--rm-fs-500);
  font-weight: var(--rm-weight-bold);
  color: var(--rm-ink);
}

/* WooCommerce-Preis: alter Preis durchgestrichen, neuer Preis hervorgehoben */
.rm-product__price del {
  display: block;
  color: var(--rm-muted-2);
  font-weight: 400;
  text-decoration: line-through;
  font-size: var(--rm-fs-400);
}

.rm-product__price ins {
  text-decoration: underline;
  color: var(--rm-ink);
}

/* Kategorie-Kacheln (Oberkategorie → Unterkategorien) */
.rm-product--cat {
  text-align: center;
}

.rm-product--cat .rm-product__title a {
  color: var(--rm-primary);
  text-decoration: none;
}

.rm-product--cat .rm-product__title a:hover {
  text-decoration: underline;
}

.rm-product__desc {
  margin: 0 var(--rm-space-4) var(--rm-space-4);
  color: var(--rm-primary);
  font-size: var(--rm-fs-400);
  line-height: 1.4;
}

.rm-product__cat-actions {
  margin-top: auto;
  padding: var(--rm-space-2) var(--rm-space-4) var(--rm-space-5);
}

/* Button unter dem Grid */
.rm-products__more {
  margin-top: var(--rm-space-6);
  text-align: center;
}

.rm-products__btn {
  display: inline-block;
  padding: var(--rm-space-2) var(--rm-space-4);
  border-radius: var(--rm-radius-pill);
  background: var(--rm-primary);
  color: #fff;
  font-size: var(--rm-fs-300);
  font-weight: var(--rm-weight-bold);
  text-decoration: none;
  transition: background-color .15s ease;
}

.rm-products__btn:hover {
  background: var(--rm-primary-dark);
}

@media (max-width: 600px) {
  .rm-products {
    gap: var(--rm-space-4);
  }
}

/* ---------- Text + Bild ---------- */
.rm-mediatext {
  display: flex;
  flex-wrap: wrap;
  border-radius: var(--rm-radius-lg);
  overflow: hidden;
}

.rm-mediatext__content {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 3vw, 3rem);
}

.rm-mediatext__media {
  flex: 1 1 50%;
  min-width: 0;
  min-height: 280px;
  overflow: hidden;
}

.rm-mediatext__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

/* Kleine Hover-Animation: sanfter Bild-Zoom */
.rm-mediatext:hover .rm-mediatext__media img {
  transform: scale(1.05);
}

.rm-mediatext--img-left .rm-mediatext__media {
  order: -1;
}

.rm-mediatext__heading {
  width: 100%;
  margin-bottom: var(--rm-space-4);
}

/* Überschrift im Block: kleiner und umbrechbar (schmale Textspalte) */
.rm-mediatext .rm-heading__text {
  white-space: normal;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.25;
}

.rm-mediatext__body > :first-child {
  margin-top: 0;
}

.rm-mediatext__body > :last-child {
  margin-bottom: 0;
}

.rm-mediatext__body p {
  margin: 0 0 var(--rm-space-4);
}

.rm-mediatext__actions {
  margin-top: var(--rm-space-5);
}

.rm-mediatext__btn {
  display: inline-block;
  padding: var(--rm-space-2) var(--rm-space-4);
  border-radius: var(--rm-radius-pill);
  background: var(--rm-primary);
  color: #fff;
  font-size: var(--rm-fs-300);
  font-weight: var(--rm-weight-bold);
  text-decoration: none;
  transition: background-color .15s ease;
}

.rm-mediatext__btn:hover {
  background: var(--rm-primary-dark);
  color: #fff;
}

/* Variante: Hell (zarte Beere) */
.rm-mediatext--bg-soft .rm-mediatext__content {
  background: var(--rm-primary-soft);
}

.rm-mediatext--bg-soft .rm-mediatext__body {
  color: var(--rm-primary);
}

/* Fließtext generell in Beere, fett ebenfalls in Beere (kräftig) */
.rm-heading__sub strong,
.rm-heading__sub b,
.rm-mediatext--bg-soft .rm-mediatext__body strong,
.rm-mediatext--bg-soft .rm-mediatext__body b {
  color: var(--rm-primary);
  font-weight: var(--rm-weight-bold);
}

/* Variante: Beere (dunkel, weißer Text) */
.rm-mediatext--bg-berry .rm-mediatext__content {
  background: var(--rm-primary);
}

.rm-mediatext--bg-berry .rm-heading__text,
.rm-mediatext--bg-berry .rm-mediatext__body {
  color: #fff;
}

.rm-mediatext--bg-berry .rm-heading__line {
  border-color: rgba(255, 255, 255, .6);
}

.rm-mediatext--bg-berry .rm-mediatext__btn {
  background: var(--rm-primary-deep);
}

.rm-mediatext--bg-berry .rm-mediatext__btn:hover {
  background: var(--rm-primary-dark);
}

@media (max-width: 768px) {
  .rm-mediatext__content,
  .rm-mediatext__media {
    flex: 1 1 100%;
  }
  .rm-mediatext--img-left .rm-mediatext__media {
    order: 0;
  }
}

/* ---------- Textbox ---------- */
.rm-textbox {
  position: relative;
  overflow: hidden;
  border-radius: var(--rm-radius-lg);
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

.rm-textbox--bg-soft {
  background: var(--rm-primary-soft);
}

.rm-textbox--bg-berry {
  background: var(--rm-primary);
}

.rm-textbox__watermark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60%;
  max-width: 520px;
  transform: translate(-50%, -50%);
  opacity: .06;
  pointer-events: none;
}

.rm-textbox__inner {
  position: relative;
  z-index: 1;
}

.rm-textbox__heading {
  margin-bottom: var(--rm-space-4);
}

.rm-textbox__body {
  color: var(--rm-primary);
  font-size: 17px;
  line-height: 1.6;
}

.rm-textbox__body > :first-child {
  margin-top: 0;
}

.rm-textbox__body > :last-child {
  margin-bottom: 0;
}

.rm-textbox__body p {
  margin: 0 0 var(--rm-space-3);
}

.rm-textbox__body strong,
.rm-textbox__body b,
.rm-textbox__body h1,
.rm-textbox__body h2,
.rm-textbox__body h3,
.rm-textbox__body h4,
.rm-textbox__body h5,
.rm-textbox__body h6 {
  color: var(--rm-primary);
  font-weight: var(--rm-weight-bold);
}

/* Beere-Variante: weißer Text */
.rm-textbox--bg-berry .rm-heading__text,
.rm-textbox--bg-berry .rm-textbox__body,
.rm-textbox--bg-berry .rm-textbox__body strong,
.rm-textbox--bg-berry .rm-textbox__body b,
.rm-textbox--bg-berry .rm-textbox__body h1,
.rm-textbox--bg-berry .rm-textbox__body h2,
.rm-textbox--bg-berry .rm-textbox__body h3,
.rm-textbox--bg-berry .rm-textbox__body h4,
.rm-textbox--bg-berry .rm-textbox__body h5,
.rm-textbox--bg-berry .rm-textbox__body h6 {
  color: #fff;
}

.rm-textbox--bg-berry .rm-heading__line {
  border-color: rgba(255, 255, 255, .6);
}
