.item-root {
  min-height: 60vh;
}

.item-grid {
  align-items: flex-start;
}

.image-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.image-gallery .main-image {
  background: #fff;
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
  overflow: hidden;
  position: relative;
  min-height: 640px;
}

.image-gallery .main-image img {
  width: 100%;
  height: min(80vh, 900px);
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  touch-action: pan-y;
  transition: transform 0.08s ease;
}

.image-gallery .main-image img.zoomable {
  will-change: transform;
  cursor: zoom-in;
}

.image-gallery .main-image img.zoomed {
  cursor: zoom-out;
}

.image-gallery .main-image .slide-layer {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 8px;
  bottom: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

/* Item-Seite: konstanter Abstand unter der fixen Navbar */
.container-fluid.main-content {
  padding-top: 0 !important;
  margin-top: 14px;
}

@media (max-width: 768px) {
  .container-fluid.main-content {
    margin-top: 10px;
  }
}

@media (max-width: 576px) {
  .container-fluid.main-content {
    margin-top: 8px;
  }
}

.image-gallery .thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(120px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding: 10px;
  scroll-snap-type: x mandatory;
}

.image-gallery .thumbs .thumb {
  scroll-snap-align: start;
}

.image-gallery .thumb {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 6px;
  min-height: 112px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, outline-color .15s ease;
}

/* Aktiven Ring als "Focus Ring" via Schatten zeichnen, damit er umlaufend und mit Rundung sichtbar ist */
.image-gallery .thumb.active {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 1), 0 0 0 6px rgba(13, 110, 253, 0.25);
  border-color: rgba(13, 110, 253, 0.5);
}

/* Beim Tastaturfokus denselben Ring verwenden */
.image-gallery .thumb:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.9);
  border-color: rgba(13, 110, 253, 0.35);
}

.image-gallery .thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.image-gallery .thumb img {
  width: 100%;
  height: 92px;
  object-fit: contain;
}

.image-gallery .thumbs.single {
  max-width: 220px;
  margin-left: auto;
  margin-right: auto;
  grid-auto-columns: minmax(140px, 1fr);
  justify-content: center;
}

.image-gallery .thumbs.single .thumb {
  min-width: 140px;
}

/* Desktop: noch etwas größer, damit Ränder nicht abgeschnitten wirken */
@media (min-width: 992px) {
  .image-gallery .thumbs {
    grid-auto-columns: minmax(150px, 1fr);
    gap: 14px;
    padding: 12px;
  }

  .image-gallery .thumb {
    padding: 8px;
    border-radius: 14px;
    min-height: 128px;
  }

  .image-gallery .thumb img {
    height: 104px;
  }

  .image-gallery .thumbs.single {
    max-width: 260px;
  }
}

@media (max-width: 576px) {
  .image-gallery .thumbs.single {
    max-width: 160px;
    grid-auto-columns: minmax(120px, 1fr);
  }
}

.detail-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
}

.detail-card h3 {
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px !important;
}

.merchant-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.merchant-logo-img {
  max-width: 140px;
  max-height: 40px;
  object-fit: contain;
}

.detail-card .badge.bg-danger {
  font-size: 1rem;
  padding: 0.4rem 0.6rem;
}

.detail-card .stats-inline {
  white-space: nowrap;
}

.detail-card .current-price {
  font-size: 2.2rem;
}

.detail-card .coupon-percent {
  font-size: .95rem;
  font-weight: 700;
  color: #0f5132;
  background: #e9f7ef;
  border: 1px solid #c7efd8;
  padding: 2px 6px;
  border-radius: 4px;
}

.shipping-box {
  border: 1px solid #eee;
  background: #fafafa;
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 8px;
}

.seller {
  margin-top: 12px;
  border-top: 1px solid #eee;
  padding-top: 12px;
}

/* Bewertungen */
.rating-box {
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin-top: 0;
  margin-bottom: 8px;
}

.rating-box.rating-compact {
  padding: 6px 10px;
  background: #fff;
}

.rating-stars {
  display: inline-block;
  position: relative;
  line-height: 1;
  font-size: 1.25rem;
}

.rating-stars .stars-outer {
  color: #e3e5ea;
}

.rating-stars .stars-inner {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  overflow: hidden;
  color: #f39c12;
}

.rating-count {
  font-size: .95rem;
}

.rating-avg {
  font-size: 1rem;
  color: #555;
  font-weight: 600;
}

/* Histogramm entfernt – Styles bewusst gestrippt */

/* Zahlungsarten */
.payment-box {
  border: 1px solid #eee;
  background: #fafafa;
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 8px;
}

.payment-box h6 {
  margin: 0 0 6px 0;
}

.pm-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pm-chip {
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.9rem;
}

/* Availability & Delivery */
.availability {
  margin: 4px 0;
}

.delivery-box {
  border: 1px solid #eee;
  background: #fafafa;
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 8px;
}

.delivery-box h6 {
  margin: 0 0 6px 0;
}

.coupon-box {
  border: 1px solid #e6f4ea;
  background: #f4fbf6;
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 8px;
}

.coupon-box h6 {
  margin: 0 0 6px 0;
  color: #1e7e34;
  font-weight: 700;
}

.coupon-item {
  padding: 6px 0;
  border-bottom: 1px dashed rgba(30, 126, 52, 0.25);
}

.coupon-item:last-child {
  border-bottom: 0;
}

.coupon-code {
  background: #fff;
  border: 1px dashed #1e7e34;
  color: #1e7e34;
  border-radius: 8px;
  padding: 4px 8px;
  font-weight: 700;
  cursor: pointer;
  user-select: all;
}

.coupon-code:active {
  transform: scale(0.98);
}

@media (max-width: 768px) {
  .image-gallery .main-image {
    min-height: 320px;
  }

  .image-gallery .main-image img {
    height: min(68vh, 560px);
  }
}


/* === YouTube Addon Drawer === */
/* Varianten Dropdown-UI */
.variant-box {
  margin-top: 8px;
}

.variant-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.variant-select {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e3e3e3;
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 600;
}

.variant-select .variant-select-label {
  color: #6c757d;
  font-weight: 600;
}

.variant-select .variant-select-value {
  color: #2c3e50;
}

.variant-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
  padding: 6px 2px;
}

.variant-option {
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.9rem;
  cursor: pointer;
}

.variant-option.active {
  outline: 2px solid #008FB3;
}

.variant-option.disabled {
  opacity: .5;
  cursor: not-allowed;
}

.variant-option.oos {
  color: #6c757d;
  text-decoration: line-through;
  border-color: #ececec;
}

.variant-option .oos-note {
  font-size: 0.8em;
  color: #9aa0a6;
  margin-left: 4px;
}

.yt-drawer-toggle {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 2050;
  border-radius: 18px;
  background: #ff0000;
  color: #fff;
  border: none;
  padding: 10px 14px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.yt-drawer {
  position: fixed;
  top: var(--navbar-height, 100px);
  right: 0;
  bottom: 0;
  width: min(560px, 96vw);
  transform: translateX(100%);
  transition: transform 180ms ease-out;
  background: #fff;
  border-left: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: -6px 0 18px rgba(0, 0, 0, 0.12);
  z-index: 2040;
  display: flex;
  flex-direction: column;
}

.yt-drawer.open {
  transform: translateX(0);
}

.yt-drawer-header {
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
  display: flex;
  gap: 8px;
  align-items: center;
}

.yt-drawer-header input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 8px 10px;
}

.yt-drawer-header .btn {
  border-radius: 12px;
}

.yt-drawer-content {
  padding: 12px;
  overflow-y: auto;
}

.yt-video-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 10px;
  transition: box-shadow .15s;
}

.yt-video-item:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.yt-video-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}

.yt-video-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.yt-video-meta {
  font-size: .9rem;
  color: #6c757d;
}

@media (max-width: 768px) {
  .yt-drawer {
    top: var(--navbar-height, 60px);
    width: 100vw;
  }

  .yt-video-item {
    grid-template-columns: 120px 1fr;
  }

  .yt-video-thumb {
    height: 80px;
  }
}

/* === YouTube Sektion unten === */
.yt-section {
  border: 1px solid #eee;
  border-radius: 12px;
}

.yt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.yt-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .15s ease;
}

.yt-card:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
}

.yt-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
}

.yt-thumb {
  position: relative;
}

.yt-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.yt-play::after {
  content: "";
  width: 64px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  display: block;
  mask: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 68 48\"><path d=\"M66.52 7.04a8 8 0 0 0-5.64-5.66C56.8 0 34 0 34 0S11.2 0 7.12 1.38a8 8 0 0 0-5.64 5.66A84.2 84.2 0 0 0 0 24a84.2 84.2 0 0 0 1.48 16.96 8 8 0 0 0 5.64 5.66C11.2 48 34 48 34 48s22.8 0 26.88-1.38a8 8 0 0 0 5.64-5.66A84.2 84.2 0 0 0 68 24a84.2 84.2 0 0 0-1.48-16.96ZM45 24 27 14v20l18-10Z\" fill=\"%23fff\"/></svg>') center/36px 24px no-repeat;
}

.yt-thumb:hover .yt-play::after {
  background: rgba(0, 0, 0, 0.7);
}

.yt-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
}

.yt-card-title {
  padding: 8px 10px;
  font-weight: 600;
  font-size: .95rem;
  color: #2c3e50;
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
}

.yt-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
}

.yt-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
}

@media (min-width: 992px) {
  .yt-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1400px) {
  .yt-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Featured Video unter den Produktbildern (halbe Seitenbreite links) */
.yt-featured {
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.yt-featured .yt-thumb {
  aspect-ratio: 16/9;
}

.yt-featured .yt-card-title {
  padding: 10px 12px;
  font-weight: 700;
  font-size: 1rem;
}

/* === Similar Products Grid === */
.similar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.sim-card {
  display: block;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 10px;
  text-decoration: none;
  color: #2c3e50;
  transition: box-shadow .15s ease, transform .15s ease;
}

.sim-card:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.sim-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  background: #fff;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 8px;
}

.sim-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sim-title {
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
  margin-bottom: 4px;
}

.sim-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

@media (min-width: 768px) {
  .similar-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .similar-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* === Ähnliche Produkte: Landing-Style Slider (portiert) === */
.horizontal-slider {
  position: relative;
  overflow: visible;
  z-index: 100;
}

.horizontal-slider .slider-viewport {
  overflow-x: auto;
  overflow-y: visible;
  scroll-behavior: smooth;
  padding-top: 10px;
  padding-bottom: 6px;
  position: relative;
  z-index: 1;
}

.main-content #similarSectionWrap {
  margin-top: 0;
  margin-bottom: 2px;
}

@media (min-width: 992px) {
  .main-content #similarSectionWrap {
    margin-top: 0;
    margin-bottom: 2px;
  }
}

.horizontal-slider .slider-viewport::-webkit-scrollbar {
  display: none;
}

.horizontal-slider .slider-track {
  display: flex;
  gap: 12px;
  padding: 0;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.horizontal-slider .slider-item {
  flex: 0 0 auto;
  width: 240px;
  border-radius: 16px;
  overflow: visible;
  position: relative;
  z-index: 2;
}

.horizontal-slider .slider-item:hover {
  z-index: 1000;
}

.horizontal-slider .slide-btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  z-index: 3000;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  width: 36px;
  height: 36px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
}

.horizontal-slider .slide-btn.left {
  left: 6px;
}

.horizontal-slider .slide-btn.right {
  right: 6px;
}

.horizontal-slider:hover .slide-btn {
  opacity: 1;
  visibility: visible;
}

.horizontal-slider .slide-btn {
  opacity: 0.95;
  visibility: visible;
  transition: opacity 0.15s ease;
}

.deal-card {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
  transition: all 0.2s ease-in-out;
}

.deal-card:hover {
  transform: translateY(-3px);
}

.uvp-price {
  font-size: 0.95rem;
  color: #6c757d;
  text-decoration: line-through;
}

.discount-percent {
  font-size: 0.95rem;
  font-weight: 700;
  color: #dc3545;
  background-color: #ffebee;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #ffcdd2;
}

@media (max-width: 768px) {
  .horizontal-slider .slider-track {
    gap: 10px;
    padding: 4px;
  }

  .horizontal-slider .slider-item {
    width: 190px;
  }

  .horizontal-slider .card-img-top {
    height: 160px !important;
    object-fit: contain !important;
  }

  .deal-card h6 {
    font-size: 0.8em !important;
    height: 2.5em !important;
  }
}

@media (max-width: 400px) {
  .horizontal-slider .slider-item {
    width: 160px;
  }

  .horizontal-slider .card-img-top {
    height: 140px !important;
    object-fit: contain !important;
  }
}


/* === Skeleton Loading === */
.skeleton-item {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
}

.main-image-skeleton {
  width: 100%;
  height: min(80vh, 640px);
  border-radius: 16px;
  margin-bottom: 12px;
}

.skeleton-thumbs {
  display: flex;
  gap: 12px;
  overflow: hidden;
  padding: 10px 0;
}

.thumb-skeleton {
  flex: 0 0 120px;
  height: 112px;
  border-radius: 12px;
}

.skeleton-info .title-skeleton {
  height: 32px;
  width: 90%;
  margin-bottom: 12px;
}

.skeleton-info .brand-skeleton {
  height: 16px;
  width: 30%;
  margin-bottom: 16px;
}

.skeleton-info .rating-skeleton {
  height: 20px;
  width: 40%;
  margin-bottom: 20px;
}

.price-skeleton-wrap {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.skeleton-info .price-skeleton {
  height: 48px;
  width: 140px;
}

.skeleton-info .price-meta-skeleton {
  height: 24px;
  width: 80px;
}

.skeleton-info .badge-skeleton {
  height: 24px;
  width: 100px;
  margin-top: 12px;
}

.skeleton-info .line-skeleton {
  height: 18px;
  width: 100%;
  margin-top: 10px;
}

.skeleton-info .button-skeleton {
  height: 48px;
  width: 100%;
  border-radius: 30px;
}

.skeleton-info .seller-skeleton {
  height: 60px;
  width: 100%;
  border-top: 1px solid #eee;
  padding-top: 12px;
}

@media (max-width: 768px) {
  .main-image-skeleton {
    height: min(68vh, 320px);
  }

  .thumb-skeleton {
    flex: 0 0 100px;
    height: 90px;
  }
}

.skeleton-deal-card {
  width: 100%;
  height: 300px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.skeleton-deal-card .skeleton-img {
  width: 100%;
  height: 200px;
  margin-bottom: 12px;
}

.skeleton-deal-card .skeleton-text {
  height: 14px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-deal-card .skeleton-price {
  height: 20px;
  width: 60%;
}

.skeleton-yt-card {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eee;
}

.skeleton-yt-thumb {
  width: 100%;
  aspect-ratio: 16/9;
}

.skeleton-yt-title {
  height: 16px;
  width: 80%;
  margin: 10px;
}