// ── Variables ─────────────────────────────────────────────────
$orange:      #f26522;
$orange-dark: #d4551a;
$bg:          #f5f5f5;
$white:       #ffffff;
$border:      #e0e0e0;
$text:        #1a1a1a;
$muted:       #888;
$radius-sm:   6px;
$radius-md:   10px;
$radius-lg:   16px;
$transition:  0.2s ease;

// ── Wrapper ───────────────────────────────────────────────────
.wrapper {
  font-family: "Segoe UI", sans-serif;
  background: $bg;
  border-radius: $radius-lg;
  max-width: 1336px;
  margin: 0 auto;
  color: $text;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 16px;
}

// ── Body Bar (TOP) ────────────────────────────────────────────
.bodyBar {
  background: $white;
  border-radius: $radius-lg;
  border: 1px solid $border;
  padding: 14px 20px;
}

.sectionLabel {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: $muted;
  margin: 0 0 10px;
}

// ── Main Layout ───────────────────────────────────────────────
.main {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;

  @media (max-width: 860px) {
    grid-template-columns: 1fr;
  }
}

// ── Car Wrapper ───────────────────────────────────────────────
.carWrapper {
  position: relative;
  background: $white;
  border-radius: $radius-lg;
  overflow: hidden;
  border: 1px solid $border;
}

.carImage {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
}

// ── Dots ──────────────────────────────────────────────────────
.dot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: $orange;
  border: 3px solid $white;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform $transition, background $transition;
  padding: 0;

  &:hover {
    transform: translate(-50%, -50%) scale(1.25);
    background: $orange-dark;
  }

  &.dotActive {
    background: $white;
    border-color: $orange;
    box-shadow: 0 0 0 3px $orange;

    .dotRipple {
      animation: ripple 1.2s ease-out infinite;
    }
  }
}

.dotRipple {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid $orange;
  opacity: 0;
}

@keyframes ripple {
  0%   { inset: -4px; opacity: 0.8; }
  100% { inset: -16px; opacity: 0; }
}

// ── Tooltip ───────────────────────────────────────────────────
.tooltip {
  position: absolute;
  transform: translate(-50%, -100%);
  background: rgba(0, 0, 0, 0.78);
  color: $white;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  margin-top: -8px;
  z-index: 10;

  &::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.78);
  }
}

// ── Right Panel ───────────────────────────────────────────────
.panel {
  background: $white;
  border-radius: $radius-lg;
  border: 1px solid $border;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 90vh;
  overflow-y: auto;
}

// ── Body Grid ─────────────────────────────────────────────────
.bodyGrid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;

  @media (max-width: 860px) {
    grid-template-columns: repeat(5, 1fr);
  }

  @media (max-width: 480px) {
    grid-template-columns: repeat(3, 1fr);
  }
}

.bodyCard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  background: $bg;
  border: 2px solid $border;
  border-radius: $radius-md;
  cursor: pointer;
  transition: border-color $transition, box-shadow $transition;

  &:hover {
    border-color: $orange;
    box-shadow: 0 2px 8px rgba($orange, 0.15);
  }

  &.active {
    border-color: $orange;
    background: lighten($orange, 45%);
  }
}

.bodyIcon {
  font-size: 1.3rem;
  line-height: 1;
}

.bodyIcon {
max-height: 30px;
max-width: 30px;
  img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
}
.productGridContainer {
  max-height: 400px; /* Yüksekliği buradan ayarlayabilirsiniz */
  overflow-y: auto;
  padding-right: 10px; /* Kaydırma çubuğu için boşluk */
}

.bodyLabel {
  font-size: 0.6rem;
  font-weight: 600;
  text-align: center;
  color: $text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.activeDot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: $orange;
}

// ── Package Tabs ──────────────────────────────────────────────
.pkgTabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid $border;
  padding-bottom: 12px;
}

.pkgTab {
  flex: 1;
  padding: 6px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  border: none;
  background: none;
  color: $muted;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -14px;
  transition: color $transition, border-color $transition;

  &:hover { color: $orange; }

  &.pkgActive {
    color: $orange;
    border-bottom-color: $orange;
  }
}

// ── Zone Image ────────────────────────────────────────────────
.zoneImageWrapper {
  position: relative;
  border-radius: $radius-md;
  overflow: hidden;
  height: 140px;
  background: #000;
}

.zoneImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.9;
  transition: opacity $transition;

  &:hover { opacity: 1; }
}

.zoneImageLabel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  color: $white;
  font-size: 0.78rem;
  font-weight: 700;
}

// ── Product List ──────────────────────────────────────────────
.productList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zoneTitle {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: $text;
}

.emptyMsg {
  font-size: 0.78rem;
  color: $muted;
  font-style: italic;
  margin: 0;
}

.productRow {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: $bg;
  border-radius: $radius-sm;
  border-left: 3px solid $orange;
}

.productName {
  font-size: 0.78rem;
  color: $text;
  font-weight: 500;
}

.productCalc {
  font-size: 0.74rem;
  color: $muted;
}

.subtotal {
  color: $orange-dark;
}

.totalRow {
  font-size: 0.85rem;
  font-weight: 700;
  color: $text;
  padding-top: 4px;
  border-top: 1px solid $border;
  text-align: right;

  strong {
    color: $orange;
    font-size: 1rem;
  }
}

// ── Action Buttons ────────────────────────────────────────────
.actionButtons {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.btnBuy {
  flex: 1;
  padding: 10px;
  background: $orange;
  color: $white;
  border: none;
  border-radius: $radius-sm;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background $transition;

  &:hover { background: $orange-dark; }
}

.btnView {
  flex: 1;
  padding: 10px;
  background: $white;
  color: $orange;
  border: 2px solid $orange;
  border-radius: $radius-sm;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background $transition, color $transition;

  &:hover {
    background: $orange;
    color: $white;
  }
}