@media (max-width: 767px) {
  .elf-product-gallery {
    display: flex !important;
    gap: 16px !important;
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding: 0 1.5rem 1rem;
  }

  .elf-product-gallery > * {
    flex: 0 0 88%;
    scroll-snap-align: center;
    margin-top: 0 !important;
  }

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

  .elf-product-gallery::-webkit-scrollbar {
    display: none;
  }

  .elf-product-gallery {
    scrollbar-width: none;
  }

  .elf-product-gallery-hint {
    flex: 0 0 auto;
    align-self: center;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(62, 44, 28, 0.48);
    padding: 8px 0;
  }
}

@media (min-width: 768px) {
  .elf-product-gallery-hint {
    display: none;
  }
}

.elf-product-info-panel {
  border-bottom: 1px solid #d9cfbe;
}

.elf-product-info-summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 0;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #3e2c1c;
}

.elf-product-info-summary::-webkit-details-marker {
  display: none;
}

.elf-product-info-summary::after {
  content: "+";
  float: right;
  letter-spacing: 0;
  color: rgba(62, 44, 28, 0.65);
}

[dir="rtl"] .elf-product-info-summary::after {
  float: left;
}

.elf-product-info-panel[open] .elf-product-info-summary::after {
  content: "−";
}

.elf-product-info-content {
  padding-bottom: 1rem;
}

.elf-product-details-list {
  margin: 0;
}

.elf-product-detail-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(217, 207, 190, 0.6);
  font-size: 0.875rem;
}

.elf-product-detail-row:last-child {
  border-bottom: 0;
}

.elf-product-detail-row dt {
  color: rgba(62, 44, 28, 0.55);
}

.elf-product-detail-row dd {
  margin: 0;
  color: #15130f;
}

@media (max-width: 520px) {
  .elf-product-detail-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

/* Product page stability fixes */
@media (max-width: 767px) {
  .elf-product-gallery {
    align-items: stretch !important;
  }

  .elf-product-gallery > .elf-product-slide,
  .elf-product-gallery > *:not(.elf-product-gallery-hint) {
    flex: 0 0 88% !important;
    display: block !important;
  }

  .elf-product-gallery .elf-product-slide figure,
  .elf-product-gallery > *:not(.elf-product-gallery-hint) figure {
    height: 100% !important;
  }

  .elf-product-gallery .elf-product-slide figure > div,
  .elf-product-gallery > *:not(.elf-product-gallery-hint) figure > div {
    aspect-ratio: 4 / 5 !important;
    height: auto !important;
    min-height: 390px !important;
  }

  .elf-product-gallery .elf-product-slide img,
  .elf-product-gallery > *:not(.elf-product-gallery-hint) img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
  }
}

@media (max-width: 430px) {
  .elf-product-gallery .elf-product-slide figure > div,
  .elf-product-gallery > *:not(.elf-product-gallery-hint) figure > div {
    min-height: 360px !important;
  }
}

@media (min-width: 768px) {
  .elf-product-summary > div {
    position: static !important;
    top: auto !important;
  }
}

.elf-product-info-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.elf-product-info-summary::after {
  float: none !important;
  flex: 0 0 auto;
}

.elf-product-info-content {
  display: block;
}
