

.page-product-inner {
  padding-block: var(--space-6) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}

.product-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

@media (min-width: 600px) {
  .product-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-7);
  }

  .product-gallery,
  .product-info {
    flex: 1 1 0;
    min-width: 0;
  }
}

.product-gallery-main {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-image);
  overflow: hidden;
  background: var(--color-bg-cream);
}

.product-gallery-zoom-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
}

.product-gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-round);
  background: var(--color-bg-white);
  color: var(--color-dark-green);
  cursor: pointer;
  opacity: 0.9;
}

.product-gallery-nav .icon {
  width: 20px;
  height: 20px;
}

.product-gallery-nav--prev {
  left: var(--space-2);
}

.product-gallery-nav--next {
  right: var(--space-2);
}

.product-gallery-nav[hidden] {
  display: none;
}

.product-gallery-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  padding-block-start: var(--space-3);
}

.product-gallery-dot {
  width: 20px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.product-gallery-dot::before {
  content: '';
  display: block;
  margin-block-start: 20px;
  height: 4px;
  border-radius: var(--radius-sm);
  background: var(--color-border);
}

.product-gallery-dot.is-current::before {
  background: var(--color-dark-green);
}

.product-gallery-dots[hidden] {
  display: none;
}

.product-gallery-thumbs {
  display: none;
}

.product-gallery-thumbs[hidden] {
  display: none;
}

.product-gallery-thumb {
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-image);
  overflow: hidden;
  cursor: pointer;
  background: var(--color-bg-cream);
}

.product-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery-thumb.is-current {
  border-color: var(--color-dark-green);
}

@media (min-width: 600px) {
  .product-gallery-dots {
    display: none;
  }

  .product-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 64px));
    gap: var(--space-2);
    padding-block-start: var(--space-3);
  }
}

.product-gallery-dialog {
  position: fixed;
  inset: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: var(--color-darkest-green);
  color: var(--color-bg-white);
}

.product-gallery-dialog::backdrop {
  background: var(--color-darkest-green);
}

.product-gallery-dialog[open] {
  display: flex;
}

.product-gallery-dialog-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: var(--space-6) var(--space-7);
}

.product-gallery-dialog-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.product-gallery-dialog-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-round);
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-bg-white);
  cursor: pointer;
}

.product-gallery-dialog .product-gallery-nav {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-bg-white);
}

.product-category-link {
  font-family: var(--font-subheading);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

.product-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.product-title {
  margin-block: var(--space-2) var(--space-3);
}

.product-heart {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-block-start: var(--space-2);
  border-radius: var(--radius-round);
  border: none;
  background: var(--color-bg-cream);
  color: var(--color-dark-green);
  cursor: pointer;
}

.product-heart .icon {
  width: 22px;
  height: 22px;
}

.product-heart[aria-pressed='true'] .icon path {
  fill: currentColor;
}

.product-archived-note {
  display: inline-flex;
  padding-inline: var(--space-3);
  padding-block: var(--space-2);
  border-radius: var(--radius-card);
  background: var(--color-bg-cream);
  color: var(--color-text-muted);
  font-family: var(--font-subheading);
  font-size: var(--text-sm);
}

.product-price {
  margin-block: 0 var(--space-5);
  font-family: var(--font-subheading);
  font-size: var(--text-xl);
  color: var(--color-heading);
}

.product-purchase {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-block-end: var(--space-6);
  border-block-end: 1px solid var(--color-border);
}

.product-field-label {
  display: block;
  margin-block-end: var(--space-2);
  font-family: var(--font-subheading);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-heading);
}

.product-sizes {
  border: none;
  padding: 0;
  margin: 0;
}

.product-size-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.product-size-option {
  position: relative;
  display: inline-flex;
}

.product-size-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.product-size-option-label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--space-4);
  border-radius: var(--radius-button);
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.product-size-input:checked + .product-size-option-label {
  background: var(--color-selected-bg);
  color: var(--color-selected-text);
  border-color: var(--color-selected-bg);
}

.product-size-input:focus-visible + .product-size-option-label {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.product-quantity-control {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.product-quantity-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-round);
  border: 1px solid var(--color-border);
  background: var(--color-bg-white);
  font-size: var(--text-lg);
  line-height: 1;
  cursor: pointer;
}

.product-quantity-input {
  width: 3rem;
  height: 44px;
  text-align: center;
  border-radius: var(--radius-input);
  border: 1px solid var(--color-input-border);
  background: var(--color-input-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-sm);

  appearance: textfield;
  -moz-appearance: textfield;
}

.product-quantity-input::-webkit-outer-spin-button,
.product-quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-add-button {
  align-self: flex-start;
  min-width: 220px;
}

.product-add-button.is-added {
  background: var(--color-dark-green);
  color: var(--color-bg-white);
  border-color: var(--color-dark-green);
}

.product-swatches {
  border: none;
  padding: 0;
  margin: 0;
}

.product-swatch-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.product-swatch-option {
  position: relative;
  display: inline-flex;
}

.product-swatch-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.product-swatch-image {
  width: 44px;
  height: 55px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
}

.product-swatch-input:checked + .product-swatch-image {
  border-color: var(--color-dark-green);
}

.product-swatch-input:focus-visible + .product-swatch-image {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.product-personal-note {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.product-note-input {
  width: 100%;
  min-height: 4.5em;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-input);
  border: 1px solid var(--color-input-border);
  background: var(--color-input-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  resize: vertical;
}

.product-note-input:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.product-note-counter {
  margin: 0;
  align-self: flex-end;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.product-note-final {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.product-note-final[hidden] {
  display: none;
}

.product-stock-note {
  margin: 0;
  font-family: var(--font-subheading);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-dark-green);
}

.product-stock-note[hidden] {
  display: none;
}

.product-purchase-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.product-purchase-controls[hidden] {
  display: none;
}

.product-form-message {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-dark-green);
}

.product-form-message[hidden] {
  display: none;
}

.product-size-option.is-sold-out .product-size-option-label {
  color: var(--color-text-muted);
  text-decoration: line-through;
  cursor: not-allowed;
}

.product-size-input:disabled {
  cursor: not-allowed;
}

.product-notify {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.product-notify[hidden] {
  display: none;
}

.product-notify-heading {
  margin: 0;
  font-family: var(--font-subheading);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-heading);
}

.product-notify-text {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.product-notify-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.product-notify-input {
  flex: 1 1 200px;
  min-height: 44px;
  padding-inline: var(--space-3);
  border-radius: var(--radius-input);
  border: 1px solid var(--color-input-border);
  background: var(--color-input-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
}

.product-notify-input:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.product-notify-size[hidden] {
  display: none;
}

.product-notify-size {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.product-notify-message {
  margin: 0;
  font-size: var(--text-sm);
}

.product-notify-message:empty {
  display: none;
}

.product-notify-message.is-error {
  font-weight: var(--weight-medium);
  color: var(--color-dark-green);
}

.product-description {
  margin-block-start: var(--space-6);
  color: var(--color-text);
}

.product-details-heading {
  font-size: var(--text-lg);
  margin-block-end: var(--space-3);
}

.product-description p {
  margin-block: 0 var(--space-3);
}

.product-safety,
.product-category-safety {
  margin-block-start: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-card);
  background: var(--color-bg-cream);
  color: var(--color-text);
  font-size: var(--text-sm);
}

.product-care {
  margin-block-start: var(--space-5);
}

.product-care-link {
  font-family: var(--font-subheading);
  font-size: var(--text-sm);
  color: var(--color-dark-green);
}

.product-care-link--candles {
  display: none;
}

.product-care[data-category='candles'] .product-care-link--candles {
  display: inline-flex;
}

.product-care[data-category='candles'] .product-care-link--textiles {
  display: none;
}

.product-lines {
  margin-block-start: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.product-line {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.product-line a {
  color: var(--color-dark-green);
}

.product-related {
  padding-block-start: var(--space-6);
  border-block-start: 1px solid var(--color-border);
}

.product-related .section-heading-title {
  margin-block-end: var(--space-5);
  text-align: center;
}

.product-off-shop-note {
  padding-inline: var(--space-3);
  padding-block: var(--space-2);
  border-radius: var(--radius-card);
  background: var(--color-bg-cream);
  color: var(--color-text-muted);
  font-family: var(--font-subheading);
  font-size: var(--text-sm);
}

.product-off-shop-note[hidden] {
  display: none;
}
