.cake-calculator-wrapper * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* font-family: 'Segoe UI', system-ui, sans-serif; */
}

.cake-calculator-wrapper {
  /* background: linear-gradient(135deg, #fdf6e3, #fcecd9); */
  color: #4a3c30;
  padding: 20px;
}

.cake-calculator-wrapper .container {
  display: flex;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
}

/* Левая панель */
.preview-side {
  /* flex: 1; */
  min-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  
  height: fit-content;
}

.cake-container {
  position: relative;
  width: 320px;
  height: 320px;
  margin-bottom: 20px;
}

.cake-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.addon-icon {
  position: absolute;
  font-size: 22px;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10;
  pointer-events: none;
}
.addon-icon.visible { opacity: 1; transform: scale(1); }

.cake-title {
  font-size: 22px;
  font-weight: bold;
  color: hsl(var(--primary));
  text-align: center;
}

/* Правая панель */
.controls-side {
  flex: 1;
  min-width: 300px;
  padding: 30px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.controls-side h2 {
  margin-bottom: 24px;
  color: hsl(var(--primary));
  font-size: 26px;
  text-align: center;
}

.section { margin-bottom: 28px; }
.section h3 {
  margin-bottom: 14px;
  color: hsl(var(--primary));
  font-size: 18px;
}

/* Сетка основ */
.cakes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}

.cake-option {
  border: 2px solid #E0E1C7;
  border-radius: calc(var(--radius) + 4px);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  background-color: hsl(var(--primary) / .1);;
}
.cake-option:hover {
  color: hsl(var(--primary));
  transform: translateY(-3px);
}
.cake-option.selected {
  border-color: hsl(var(--primary) / .6);
  background-color: hsl(var(--primary) / .1);
  box-shadow: 0 4px 8px rgba(230, 126, 34, 0.2);
}
.cake-option img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: calc(var(--radius) + 4px);
  margin-bottom: 8px;
}
.cake-option .price {
  font-weight: bold;
  color: hsl(var(--primary));
  font-size: 14px;
}

/* Опции */
.param-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.param-group label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 16px;
  border: 1px solid #E0E1C7;
  border-radius: calc(var(--radius) + 4px);
  background-color: hsl(var(--card));
  transition: all 0.2s;
}
.param-group input[type="radio"] { display: none; }
.param-group input:checked + span {
  background-color: hsl(var(--primary) / .1);
  color: white;
}

/* Дополнения */
.addon-list label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #E0E1C7;
  cursor: pointer;
}
.addon-list label:hover { background: #fafafa; }

/* Итог */
.total-box {
  margin-top: 30px;
  padding: 22px;
  background-color: hsl(var(--card));
  border-radius: calc(var(--radius) + 4px);
  text-align: center;
  font-size: 24px;
  color: hsl(var(--primary));
  font-weight: bold;
  border: 2px dashed #E0E1C7;
}
.total-note {
  font-size: 14px;
  color: hsl(var(--primary));
  margin-top: 8px;
  font-style: italic;
}

.order-btn {
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  background-color: hsl(var(--primary) / .1);
  color: white;
  border: none;
  border-radius: calc(var(--radius) + 4px);
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.order-btn:hover { background-color: hsl(var(--primary) / .1); }
/* Ваш CSS + дополнение для цен дополнений */
.addon-list label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f5f0e9;
  cursor: pointer;
}

.addon-list label:hover { 
  background-color: hsl(var(--card)); 
}

.addon-price {
  font-weight: bold;
  color: hsl(var(--primary));;
  margin-right: 15px;
}
/* Чтобы label работал как кнопка */
.cake-option {
  cursor: pointer;
  display: block;
}

.cake-option input[type="radio"] {
  display: none;
}

/* Выделение выбранной основы/начинки */
.cake-option.selected {
  border-color: hsl(var(--primary));;
  background: #fff8e1;
  box-shadow: 0 4px 8px rgba(230, 126, 34, 0.2);
}
/* Адаптив */
@media (max-width: 900px) {
  .cake-calculator-wrapper .container {
    flex-direction: column;
  }
  .cake-container {
    width: 280px;
    height: 280px;
  }
}
@media (min-width:900px){
    .preview-side{
        position: sticky;
        top:85px;
    }
}