/* =========================================================================
   BRITTLE A+ CONTENT — specification sheet + image cards
   ========================================================================= */

.bpa {
  --bpa-plum: #3B203D;
  --bpa-ink: #241521;
  --bpa-muted: #756B73;
  --bpa-line: rgba(59, 32, 61, 0.12);
  --bpa-paper: #FFFDF9;
  --bpa-cream: #F7F2E8;
  --bpa-brass-tint: #F6EBD6;
  --bpa-brass-dark: #8A6423;

  box-sizing: border-box;
  margin: 0 0 48px;
  color: var(--bpa-ink);
  font-family: inherit;
}

.bpa *,
.bpa *::before,
.bpa *::after {
  box-sizing: border-box;
}

.bpa-wrap > .bpa:last-child {
  margin-bottom: 0;
}

.bpa .bpa__title {
  margin: 0 0 18px !important;
  padding: 0 !important;
  color: var(--bpa-plum) !important;
  font-family: inherit !important;
  font-size: clamp(22px, 2vw, 28px) !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.01em;
  text-transform: none !important;
}


/* -------------------------------------------------------------------------
   Specification sheet: label | value rows, two columns on wide screens
   ------------------------------------------------------------------------- */

.bpa-specs__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
  margin: 0;
  padding: 8px 24px;
  border: 1px solid var(--bpa-line);
  border-radius: 20px;
  background: var(--bpa-paper);
}

.bpa-specs__row {
  display: grid;
  grid-template-columns: minmax(110px, 38%) minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--bpa-line);
}

/* no line under the last row of each column */
.bpa-specs__row:nth-last-child(1),
.bpa-specs__row:nth-last-child(2):nth-child(odd) {
  border-bottom: 0;
}

.bpa-specs__row dt {
  margin: 0;
  color: var(--bpa-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.bpa-specs__row dd {
  margin: 0;
  color: var(--bpa-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* a line without a label: a note across the whole sheet */
.bpa-specs__row--note {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
}

.bpa-specs__row--note dd {
  color: var(--bpa-muted);
  font-weight: 400;
}


/* -------------------------------------------------------------------------
   Image cards
   ------------------------------------------------------------------------- */

.bpa-cards__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 1, 2 or 4 cards: a layout that fits them, so there's no lonely half-empty row */
.bpa-cards__grid--1 { grid-template-columns: minmax(0, 1fr); }
.bpa-cards__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bpa-cards__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.bpa-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--bpa-line);
  border-radius: 20px;
  background: var(--bpa-paper);
  list-style: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bpa-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px -18px rgba(59, 32, 61, 0.28);
}

.bpa-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bpa-cream);
}

/* one card on its own: a wide banner instead of a huge square */
.bpa-cards__grid--1 .bpa-card {
  flex-direction: row;
}

.bpa-cards__grid--1 .bpa-card__media {
  flex: 0 0 50%;
}

.bpa-cards__grid--1 .bpa-card__body {
  align-self: center;
  padding: 28px 32px;
}

/* !important: Elementor sets images to "height: auto", which would break the frame */
.bpa .bpa-card__img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.bpa-card:hover .bpa-card__img {
  transform: scale(1.04);
}

.bpa-card__body {
  padding: 18px 20px 22px;
}

.bpa .bpa-card__title {
  margin: 0 0 6px !important;
  padding: 0 !important;
  color: var(--bpa-plum) !important;
  font-family: inherit !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  text-transform: none !important;
}

.bpa .bpa-card__text {
  margin: 0 !important;
  color: var(--bpa-muted) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}


/* -------------------------------------------------------------------------
   Screen sizes
   ------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .bpa-cards__grid,
  .bpa-cards__grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .bpa {
    margin-bottom: 36px;
  }

  .bpa-specs__list {
    grid-template-columns: minmax(0, 1fr);
    padding: 4px 18px;
  }

  /* one column: every row gets a line except the very last */
  .bpa-specs__row:nth-last-child(2):nth-child(odd) {
    border-bottom: 1px solid var(--bpa-line);
  }

  .bpa-cards__grid,
  .bpa-cards__grid--2,
  .bpa-cards__grid--4 {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .bpa-cards__grid--1 .bpa-card {
    flex-direction: column;
  }

  .bpa-cards__grid--1 .bpa-card__body {
    padding: 18px 20px 22px;
  }
}

/* small phones: two cards side by side would be cramped, keep one column; tablets get 2 */
@media (min-width: 480px) and (max-width: 767px) {
  .bpa-cards__grid,
  .bpa-cards__grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .bpa-card,
  .bpa .bpa-card__img {
    transition: none;
  }
}


/* =========================================================================
   PRODUCT TABS AS AN ACCORDION — [brittle_product_tabs]
   (WooCommerce tabs + tabs from Tab Manager and similar plugins)
   ========================================================================= */

.bpt {
  --bpt-plum: #3B203D;
  --bpt-ink: #241521;
  --bpt-muted: #756B73;
  --bpt-line: rgba(59, 32, 61, 0.14);
  --bpt-paper: #FFFDF9;
  --bpt-cream: #F7F2E8;
  --bpt-coral: #E99A8A;

  margin: 0;
  border-top: 1px solid var(--bpt-line);
  color: var(--bpt-ink);
  font-family: inherit;
}

.bpt * {
  box-sizing: border-box;
}

.bpt-item {
  margin: 0;
  border-bottom: 1px solid var(--bpt-line);
}

.bpt-item__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 4px;
  color: var(--bpt-plum);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.bpt-item__head::-webkit-details-marker {
  display: none;
}

.bpt-item__head::marker {
  content: "";
}

.bpt-item__head:hover .bpt-item__title {
  color: var(--bpt-ink);
}

.bpt-item__head:focus-visible {
  outline: 2px solid var(--bpt-coral);
  outline-offset: 2px;
  border-radius: 8px;
}

.bpt-item__title {
  flex: 1 1 auto;
  min-width: 0;
}

.bpt-item__title .count {
  margin-left: 4px;
  color: var(--bpt-muted);
  font-size: 14px;
}

/* tab key, only shown to admins with keys="1" */
.bpt-item__key {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bpt-cream);
  color: var(--bpt-muted);
  font-size: 12px;
}

/* + that turns into − */
.bpt-item__icon {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.bpt-item__head:hover .bpt-item__icon {
  background: var(--bpt-cream);
}

.bpt-item__icon::before,
.bpt-item__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
  border-radius: 2px;
  background: var(--bpt-plum);
  transition: transform 0.2s ease;
}

.bpt-item__icon::after {
  transform: rotate(90deg);
}

.bpt-item[open] .bpt-item__icon::after {
  transform: rotate(0deg);
}

/* the content */
.bpt-item__body {
  padding: 0 4px 22px;
  color: var(--bpt-ink);
  font-size: 15px;
  line-height: 1.7;
}

.bpt-item__body > :first-child {
  margin-top: 0 !important;
}

.bpt-item__body > :last-child {
  margin-bottom: 0 !important;
}

/* the tab's own repeated title (some tab plugins add one) */
.bpt-item__body > h2:first-child {
  display: none;
}

.bpt-item__body p {
  margin: 0 0 12px;
}

.bpt-item__body h2,
.bpt-item__body h3,
.bpt-item__body h4 {
  margin: 18px 0 8px;
  color: var(--bpt-plum);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.bpt-item__body ul,
.bpt-item__body ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.bpt-item__body li {
  margin: 0 0 6px;
}

.bpt-item__body li::marker {
  color: var(--bpt-coral);
}

.bpt-item__body a {
  color: var(--bpt-plum);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bpt-item__body img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

/* tables (Additional information, size charts …) */
.bpt-item__body table {
  width: 100%;
  margin: 0 0 12px;
  border: 1px solid var(--bpt-line) !important;
  border-collapse: separate !important;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bpt-paper);
}

.bpt-item__body table th,
.bpt-item__body table td {
  padding: 12px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--bpt-line) !important;
  background: transparent !important;
  font-size: 14px;
  text-align: left;
  vertical-align: top;
}

.bpt-item__body table tr:last-child th,
.bpt-item__body table tr:last-child td {
  border-bottom: 0 !important;
}

.bpt-item__body table th {
  width: 36%;
  color: var(--bpt-muted);
  font-weight: 500;
}

.bpt-item__body table td {
  font-weight: 600;
}

.bpt-item__body table td p {
  margin: 0;
}

@media (max-width: 767px) {
  .bpt-item__head {
    padding: 16px 2px;
    font-size: 16px;
  }

  .bpt-item__body {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bpt-item__icon,
  .bpt-item__icon::before,
  .bpt-item__icon::after {
    transition: none;
  }
}
