/* ============================================================
   Paragraph Styles — bornemann theme
   ============================================================ */

/* --- Shared base --- */
.paragraph {
  padding: 3rem 0;
}

.paragraph + .paragraph {
  padding-top: 0;
}

.paragraph__container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

.paragraph__title {
  font-family: "MontserratSemibold", sans-serif;
  font-size: 1.75rem;
  color: var(--black);
  margin: 0 0 1rem;
  line-height: 1.2;
}

.paragraph__content {
  font-size: 1.05rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 0;
}

.paragraph__content p:last-child {
  margin-bottom: 0;
}

.paragraph__buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ============================================================
   Paragraph: Button
   ============================================================ */
.paragraph--type--button {
  display: inline-block;
  padding: 0;
}

.paragraph__buttons .button {
  padding: 0 1.5rem;
  display: inline-flex;
  width: auto;
  height: 44px;
  box-sizing: border-box;
}

/* ============================================================
   Paragraph: Content (title + text + buttons)
   ============================================================ */
.paragraph--content .paragraph__title {
  font-size: 2rem;
}

/* ============================================================
   Paragraph: Content with Image
   ============================================================ */
.paragraph--content-with-image .paragraph__inner {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.paragraph--content-with-image.image-position--left-top .paragraph__inner {
  flex-direction: row;
}

.paragraph--content-with-image.image-position--right-bottom .paragraph__inner {
  flex-direction: row-reverse;
}

.paragraph--content-with-image .paragraph__image {
  flex-shrink: 0;
}

.paragraph--content-with-image .paragraph__image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.paragraph--content-with-image .paragraph__text {
  flex: 1;
  min-width: 0;
}

/* ============================================================
   Paragraph: Gallery — CSS columns masonry
   ============================================================ */
.paragraph--gallery .paragraph__images {
  margin-top: 1.5rem;
}

.paragraph--gallery .gallery__items {
  columns: 3;
  column-gap: 1rem;
}

.paragraph--gallery .gallery__item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: 10px;
  overflow: hidden;
}

.paragraph--gallery .gallery__item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.paragraph--gallery .gallery__item:hover img {
  transform: scale(1.03);
}

/* ============================================================
   Paragraph: Product List
   ============================================================ */
.paragraph--product-list .paragraph__product-list {
  margin-top: 1.5rem;
}

/* View renders products as an unformatted list — make it a grid */
.paragraph--product-list .paragraph__product-list .views-element-container > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

/* Strip the views-row wrapper */
.paragraph--product-list .paragraph__product-list .views-row {
  display: contents;
}

/* Product card */
.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #efefef;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  position: relative;
}

.product-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Stretched link — covers the full card */
.product-card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Image */
.product-card__image-wrap {
  display: block;
  overflow: hidden;
  position: relative;
}


.product-card__image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card__image-wrap img {
  transform: scale(1.03);
}

.product-card__image--placeholder {
  width: 100%;
  height: 220px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 2rem;
}

/* Body */
.product-card__body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 1.1rem 1rem 1rem;
  flex: 1;
}

/* Categories — very subtle, above the title */
.product-card__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.3rem;
}

.product-card__categories a {
  position: relative;
  z-index: 2;
  font-size: 0.7rem;
  color: #bbb;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-card__categories a + a::before {
  content: "·";
  margin-right: 0.25rem;
  color: #ddd;
}

.product-card__categories a:hover {
  color: var(--red);
}

/* Title — the hero of the card */
.product-card__title a,
.product-card__title {
  font-family: "MontserratSemibold", sans-serif;
  font-size: 1.25rem;
  color: var(--black);
  text-decoration: none;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.product-card__title a {
  position: relative;
  z-index: 2;
}

.product-card:hover .product-card__title a {
  color: var(--red);
}

/* Price */
.product-card__price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: nowrap;
  margin-top: auto;
}

.product-card__price-actual {
  font-family: "MontserratSemibold", sans-serif;
  font-size: 1.15rem;
  color: var(--black);
  flex-shrink: 0;
}

/* Marker highlight when discounted */
.product-card__price--discounted .product-card__price-actual {
  background: #ffe44d;
  padding: 0.05rem 0.3rem;
  border-radius: 2px;
}

.product-card__price-retail {
  font-size: 0.8rem;
  color: #aaa;
  white-space: nowrap;
}

.product-card__price--discounted .product-card__price-retail {
  text-decoration: line-through;
}

/* Savings — small sub-note directly under the price row */
.product-card__savings {
  font-size: 0.75rem;
  color: #2a7a2a;
  margin: 0.2rem 0 0;
}

/* EU Omnibus prior price — legal disclosure, 30-day best price */
.product-card__prior-price {
  font-size: 0.72rem;
  color: #777;
  margin: 0.15rem 0 0;
}

/* CTA button — outline style matching site buttons */
.product-card__cta {
  position: relative;
  z-index: 2;
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  padding: 0.6rem 1rem;
  background: transparent;
  color: var(--black);
  border: 1px solid #ccc;
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  border-radius: 6px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.product-card__cta:hover {
  border-color: var(--red);
  color: var(--red);
}

@media (max-width: 900px) {
  .paragraph--product-list .paragraph__product-list .views-element-container > div {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .paragraph--product-list .paragraph__product-list .views-element-container > div {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Paragraph: Links
   ============================================================ */
.paragraph--links .paragraph__links-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
  list-style: none;
  padding: 0;
  margin-left: 0;
}

.paragraph--links .paragraph__links-list li {
  display: flex;
}

.paragraph--links .paragraph__links-list li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  color: var(--black);
  text-decoration: none;
  font-family: "MontserratSemibold", sans-serif;
  font-size: 1rem;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
  background-color: #fff;
}

.paragraph--links .paragraph__links-list li a:hover {
  border-color: var(--red);
  color: var(--red);
  background-color: #fdf5f5;
}

.paragraph--links .paragraph__links-list li a::before {
  content: "→";
  color: var(--red);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.paragraph--links .paragraph__links-list li a:hover::before {
  transform: translateX(3px);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .paragraph {
    padding: 2rem 0;
  }

  .paragraph__container {
    padding: 0 1.25rem;
  }

  .paragraph__title {
    font-size: 1.4rem;
  }

  .paragraph--content-with-image .paragraph__inner {
    flex-direction: column !important;
    gap: 2rem;
  }

  .paragraph--content-with-image .paragraph__image {
    width: 100% !important;
  }

  .paragraph--gallery .gallery__items {
    columns: 2;
  }

  .paragraph--links .paragraph__links-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .paragraph--gallery .gallery__items {
    columns: 1;
  }
}
