/* =========================
   PRODUCT DETAIL PAGE
========================= */

.product-detail-page {
  padding: 6rem 0;
}

.product-detail__layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 2rem;
  align-items: start;
}

.product-detail__main,
.product-detail__sidebar {
  min-width: 0;
}

.product-detail__sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background-color: #ffffff;
  padding: 1.5rem;


  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* =========================
   BACK LINK
========================= */

.product-detail__back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 400;
  text-decoration: none;
}

.product-detail__back-link:hover {
  color: var(--color-accent);
}

.product-detail__back-link svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

/* =========================
   PRODUCT CARD
========================= */

.product-detail__card {
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  
}

.product-detail__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  padding: 1.5rem;
}

.product-detail__image-wrap {
  width: 100%;
  aspect-ratio: 4 / 6;
  overflow: hidden;
  border-radius: 8px;
  background: #f3f4f6;
}

.product-detail__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail__info {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.product-detail__category-badge {
  align-self: flex-start;
}

.product-detail__title {
  margin: 0.3rem 0 0.6rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.product-detail__description {
  margin: 0.5rem 0;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.4;
}

/* =========================
   VARIANT SELECT
========================= */

.product-detail__configuration {
  display: flex;
  flex-direction: column;
}

.product-detail__selection-group {
  min-inline-size: 0;
  margin: 1rem 0 1rem;
  padding: 0;
  border: 0;
}

.product-detail__section-title {
  margin: 1rem 0 0.5rem;
  font-weight: 400;
}

.product-detail__select-wrap {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 1.5rem;
}

.product-detail__variant-select {
  width: 100%;
  min-height: 54px;
  padding: 0 48px 0 16px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 1rem;
  font-weight: 300;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-detail__variant-select:hover {
  border-color: #bdbdbd;
}

.product-detail__variant-select:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 46, 166, 0.14);
}

.product-detail__select-icon {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 16px;
  height: 16px;
  pointer-events: none;
  transform: translateY(-50%);
}

/* =========================
   PRICE, STOCK AND CTA
========================= */

.product-detail__price-wrap {
  display: flex;
  flex-direction: column;
  margin-top: 1.6rem;
}

.product-detail__price {
  color: var(--color-accent);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.product-detail__price-note {
  margin-top: 0.45rem;
  margin-left: 0.1rem;
  color: var(--color-text-light);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.25;
}

.product-detail__stock {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.2rem;
}

.stock-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.stock-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
}

.stock-dot--green {
  background: #22c55e;
}

.stock-dot--red {
  background: #ef4444;
}

.product-detail__cta {
  margin-top: 1rem;
}

.product-detail__cta svg {
  width: 18px;
  height: 18px;
  margin-bottom: 0.13rem;
  color: #fff;
}

/* =========================
   Product Description
========================= */
.product-description-specs {
  margin-left: 1.5rem;
  margin-bottom: 2rem;
}

/* =========================
   SPECIFICATIONS
========================= */

.product-tabs {
  padding: 1.5rem;
  background: #fff;
}

.product-tabs__title {
  margin: 0 0 1.5rem;
  color: #111;
  font-size: 1.125rem;
  font-weight: 700;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid #e5e7eb;
}

.detail-row span:first-child {
  color: #4b5563;
}

.detail-row span:last-child {
  justify-self: end;
  color: #111;
  font-weight: 300;
  text-align: right;
}

/* =========================
   SERVICE SIDEBAR
========================= */

.product-detail__sidebar h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0.3rem 0;
  font-size: 1.2rem;
}

.product-detail__sidebar h3 .card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--color-accent);
  
}

.product-detail__sidebar h3 .card__icon svg {
  width: 100%;
  height: 100%;
}

.product-detail__sidebar p {
  margin: 0 0.3rem 2rem 0.3rem;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.4;
  color: var(--color-text);
}

.service-options {
  padding: 0;
  margin-bottom: 3rem;
}

.service-card__title {
  color: #111;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.service-card__duration:empty {
  display: none;
}

.service-card__duration {
  margin: 0;
  color: var(--color-text-light);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.3;
}

.maintenance-card__price {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: max-content;
  text-align: right;
}

.service-card__price {
  color: var(--color-accent);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.service-summary:empty,
.service-card__features:empty {
  display: none;
}

.service-selected-box {
  margin-top: 2rem;
}

.service-selected-box__description {
  margin: 0rem 0.3rem 1rem 0.3rem;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.4;
  color: var(--color-text);
}

.service-selected-box__material {
  margin: 0rem 0.3rem 2rem 0.3rem;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text-light);
}

.service-selected-box__title {
  margin: 0rem 0.3rem 1rem 0.3rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text);
}

/* =========================
   RELATED PRODUCTS
========================= */
#related-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.related-products {
  margin-top: 2rem;
}

.related-product-card {
  display: block;
  overflow: hidden;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.related-product-card__image {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.related-product-card__content {
  padding: 0.75rem;
}

.related-product-card h3 {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.related-product-card__price {
  color: var(--color-accent);
  font-weight: 700;
}

/* =========================
   VARIANT SELECTS
========================= */

.product-detail__variant-selects {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.product-detail__variant-group {
  display: grid;
  gap: 0;
}

.product-detail__variant-label {
  display: block;
  margin: 0 0 0.35rem 0.1rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
}

.product-detail__select-wrap {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
}

.product-detail__variant-select {
  width: 100%;
  min-height: 54px;
  padding: 0 48px 0 16px;

  appearance: none;
  -webkit-appearance: none;

  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: #111;

  font: inherit;
  font-weight: 300;
  font-size: 1rem;
  cursor: pointer;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.product-detail__variant-select:hover {
  border-color: #bdbdbd;
}

.product-detail__variant-select:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 46, 166, 0.14);
}

.product-detail__select-icon {
  position: absolute;
  top: 50%;
  right: 16px;

  display: block;
  width: 16px;
  height: 16px;

  color: #111;
  pointer-events: none;
  transform: translateY(-50%);
}

/* =========================================================
   SERVICE-OPTIONEN
========================================================= */

.product-detail__sidebar .type-service {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin-top: 0;

  width: 100%;
}

.product-detail__sidebar .type-btn {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 0.8rem 1.25rem;

  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: none;

  background: #fff;
  color: #111827;

  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.product-detail__sidebar .type-btn:hover {
  border-color: var(--color-accent, #ff0098);


  transform: translateY(-2px);
}

.product-detail__sidebar .type-btn.active,
.product-detail__sidebar .service-option-c.is-open > .type-btn {
  border-color: var(--color-accent, #ff0098);
  box-shadow: none;
  background: var(--color-accent, #ff0098);
  color: #fff;

}

.product-detail__sidebar .service-panel {
  display: none;
  flex-direction: column;

  width: 100%;
  margin-top: 0.75rem;
  padding: 1.5rem;
  box-sizing: border-box;

  border: 1px solid #e5e7eb;
  border-radius: 12px;

  background: #fff;
  color: #111827;

}


.product-detail__sidebar
  .service-option-c.is-open
  > .service-panel {
  display: flex;
  animation: serviceFade 0.25s ease;
}

.product-detail__sidebar .service-content {
  min-height: 0;
}

.product-detail__sidebar .service-panel h2 {
  margin: 0 0 0.8rem;

  color: #111827;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
}

.product-detail__sidebar .service-panel p {
  margin: 0;

  color: #4b5563;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.65;
}

.product-detail__sidebar .service-panel__divider {
  width: 100%;
  height: 1.5px;
  margin: 1rem 0 2rem;

  background: #e5e7eb;
}

.product-detail__sidebar .service-panel ul {
  margin: 0;
  padding: 0 0 0 1.2rem;

  list-style: disc;
  text-align: left;
}

.product-detail__sidebar .service-panel li {
  margin: 0 0 0.7rem;
  padding-left: 0.2rem;

  color: #374151;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.45;
}

.product-detail__sidebar .service-panel li:last-child {
  margin-bottom: 0;
}

.product-detail__sidebar .service-panel li::marker {
  color: var(--color-accent, #ff0098);
  font-size: 0.9rem;
}

/* =========================
RESPONSIVE
========================= */

@keyframes serviceFade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .product-detail__layout {
    grid-template-columns: 1fr;
  }
  
  .product-detail__top {
    grid-template-columns: 1fr;
  }
  .product-detail__sidebar .type-service {
    grid-template-columns: minmax(0, 1fr);
  }

  #related-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 640px) {
  #related-products-grid {
    grid-template-columns: 1fr;
  }

  .product-detail__sidebar .type-btn {
    min-height: 48px;
    padding: 0.75rem 0rem;
  }
  
  .product-detail__sidebar {
    padding: 1rem;
  }
  .product-detail-page {
    padding: 3rem 0;
  }
  
  .product-detail__top,
  .product-tabs {
    padding: 1rem;
  }

  .product-detail__layout,
  .product-detail__top {
    gap: 1rem;
  }

  .product-detail__price {
    font-size: 1.75rem;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .detail-row span:last-child {
    justify-self: start;
    text-align: left;
  }

  .product-description-specs {
    margin-left: 1rem;
  }

}