.product-page {
  width: 100%;
  line-height: var(--line-height-body);
}

.product-title {
  font-size: var(--font-size-plus-3);
  font-weight: 700;
  margin: 0;
}
/* Sits inside a gapped flex column, so no margin of its own. */
.product-heading {
  font-size: var(--font-size-plus-2);
  font-weight: 700;
  margin: 0;
}
.product-inline-heading {
  font-weight: 700;
}

.product-ratings {
  display: flex;
  flex-flow: row wrap;
  gap: 1rem;
  font-size: var(--font-size-sub-1);
  font-weight: 500;
}
.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
  min-width: 0;
}
.product-rating__label {
  white-space: nowrap;
}

.product-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-stack > p {
  margin: 0;
}

/* Hero: packshot beside the ruled list. Both halves may shrink, so the row never overflows a 375px viewport. */
.product-hero {
  display: flex;
  gap: 16px;
  align-items: center;
}
.product-hero__image {
  flex: 1 1 55%;
  min-width: 0;
  position: relative;
}
.product-hero__packshot {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 22rem;
  margin: 0 auto;
}
.product-award {
  position: absolute;
  top: 0;
  right: 0;
  width: 5rem;
  height: auto;
}
.product-hero__facts {
  flex: 1 1 45%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--font-size-sub-1);
}
.product-hero__facts li {
  border-bottom: 1px solid #dcdfe1;
  padding-bottom: 4px;
  overflow-wrap: anywhere;
}
.product-hero__facts li:last-child {
  border-bottom: 0;
}
.product-hero__action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.product-hero__action-icon {
  display: inline-flex;
  flex-shrink: 0;
}
.product-hero__action-icon .svg-icon {
  width: 1em;
  height: 1em;
  max-width: none;
  margin: 0;
}

/* Comments */
.product-comments > .product-heading {
  margin-bottom: 1rem;
}
.product-new-comment {
  margin-bottom: 1.5rem;
}
.product-modal-section {
  padding: 1.5rem 0 0;
}
.product-modal-actions {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-top: 1rem;
}
.product-comments__note {
  font-size: var(--font-size-sub-1);
}
.product-comments-forum-link {
  margin-top: 1rem;
}

/* Specifications: two columns of value over label */
.product-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}
.product-specs__item {
  display: flex;
  flex-direction: column-reverse;
  min-width: 0;
}
.product-specs__value {
  margin: 0;
  font-size: var(--font-size-plus-1);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.product-specs__label {
  font-size: var(--font-size-sub-1);
  color: #787c7e;
}
html[data-theme="dark"] .product-specs__label {
  color: #818384;
}

/* Small screens: the right column stacks under the main one, so it continues its 16px rhythm and opens with a section rule (core's dg-rule-top) */
@media (max-width: 639px) {
  .product-page .dg-layout-default__rhs {
    gap: 16px;
  }
  .product-right-column > :first-child,
  .product-right-column > .product-shop-column:first-child + * {
    border-top: 3px solid #dcdfe1;
    padding-top: 1rem;
  }
  .product-right-column > .product-shop-column:first-child {
    border-top: 0;
    padding-top: 0;
  }
}

@media (min-width: 640px) {
  .product-right-column {
    align-self: flex-start;
    padding: 1rem;
    background: #f6f6f6;
  }
  html[data-theme="dark"] .product-right-column {
    background: #2a2a2a;
  }
}

/* ============================================================
   Difford's Shop block
   From php-phalcon-cocktail's cocktail.css (itself ported from legacy-www
   module/_shop.scss). The shop is its own branded bubble: exempt from the
   site-wide font-size scale, light in dark mode apart from the panel border.
   ============================================================ */
.shopify-head {
  background: #151515;
  border-radius: 0.125rem 0.125rem 0 0;
  padding: 0.75rem 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
.shopify-head > img {
  width: 10rem;
  height: 1.75rem;
}
@media (min-width: 640px) {
  .shopify-head > img {
    width: 8rem;
    height: 1.25rem;
  }
}
.shopify-container {
  padding: 0.5rem;
  border: 1px solid #151515;
  border-radius: 0 0 0.125rem 0.125rem;
  background: #fff;
  color: #151515;
}
/* Dark theme, as cocktail.css: light text, a grey border, the page tone inside the right column
   from 640px and no background below it, and outline buttons. The `a` and `a:visited` variants
   are spelled out because the theme's anchor rule outranks a bare class. */
html[data-theme="dark"] .shopify-container {
  border-color: #787878;
  background: transparent;
  color: #e8e8e8;
}
@media (min-width: 640px) {
  html[data-theme="dark"] .shopify-container {
    background: #1a1a1a;
  }
}
html[data-theme="dark"] .shopify-item__button,
html[data-theme="dark"] a.shopify-item__button,
html[data-theme="dark"] a.shopify-item__button:visited {
  background: transparent;
  border-color: #e8e8e8;
  color: #e8e8e8;
}
html[data-theme="dark"][data-whatintent="mouse"] .shopify-item__button:hover,
html[data-theme="dark"][data-whatintent="mouse"] a.shopify-item__button:hover {
  background: #e8e8e8;
  color: #151515;
}
.shopify-head,
.shopify-container {
  font-size: 1rem;
  word-spacing: 0.001em;
  font-family: 'Shop default', Geneva, Arial, sans-serif;
  font-weight: 300;
  font-feature-settings: "kern" 1;
  font-kerning: normal;
  line-height: normal;
}
.shopify-muted {
  color: #787878;
}
.shopify-item__heading {
  margin: 0;
  font-weight: 500;
}
.shopify-sku__name {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
}
.shopify-item__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}
.shopify-item__row p {
  margin: 0;
}
.shopify-item__price {
  font-size: 1.25rem;
  font-weight: 500;
}
.shopify-item__button {
  display: inline-flex;
  align-items: center;
  height: 2rem;
  padding: 0 1rem;
  border: 1px solid #151515;
  border-radius: 1rem;
  background: #fff;
  color: #151515;
  font-size: 0.75rem;
  font-weight: 500;
}
a.shopify-item__button {
  color: #151515;
  text-decoration: none;
}
.shopify-note {
  margin: 1rem 0 0;
  font-size: 0.75rem;
}
.shopify-footer {
  margin-top: 1.5rem;
  font-size: 0.75rem;
}
a.shopify-link {
  color: #787878;
  font-weight: 300;
}
[data-whatintent="mouse"] a.shopify-item__button:hover {
  background: #151515;
  color: #fff;
}
[data-whatintent="mouse"] .shopify-head:hover {
  opacity: 0.8;
}
