/* coffee-presentation.css - Улучшение представления сортов кофе */

/* Общие стили для карточек кофе и деталей */
.coffee-card,
.coffee-detail {
  --roast-light: #E9D9B8;
  --roast-medium-light: #D7A15E;
  --roast-medium: #A66832;
  --roast-medium-dark: #734C29;
  --roast-dark: #4A2C1A;
  
  --acidity-high: #FF4D4D;
  --acidity-medium-high: #FF9E00;
  --acidity-medium: #FFCC00;
  --acidity-medium-low: #A1E056;
  --acidity-low: #5BBF21;
  
  --body-light: #C9E6F2;
  --body-medium-light: #92C9E3;
  --body-medium: #6A96C8;
  --body-medium-full: #4568B0;
  --body-full: #2C3E88;
  
  --flavor-fruity: #FF6B8B;
  --flavor-berry: #9C5C9C;
  --flavor-citrus: #FFCF55;
  --flavor-chocolate: #8B572A;
  --flavor-nutty: #B58044;
  --flavor-caramel: #E0A458;
  --flavor-floral: #F8D2FF;
  --flavor-herbal: #7DC383;
  --flavor-spicy: #E05D44;
  --flavor-sweet: #FF9ED2;
}

/* 1. Оптимизация изображений кофе */
.coffee-image {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  background-color: #f9f6f1;
}

.coffee-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.coffee-card:hover .coffee-image img {
  transform: scale(1.05);
}

.coffee-card .badge,
.coffee-detail .badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  z-index: 2;
}

.badge-new {
  background-color: var(--brand-primary, #C0592A);
  color: white;
}

.badge-limited {
  background-color: var(--brand-accent, #FFD700);
  color: #333;
}

/* 2. Улучшение представления характеристик кофе */
.coffee-attributes {
  margin: 20px 0;
  border-spacing: 0;
  width: 100%;
}

.coffee-attributes th {
  text-align: left;
  padding: 8px 16px 8px 0;
  font-weight: 600;
  color: #555;
  width: 40%;
  vertical-align: top;
}

.coffee-attributes td {
  padding: 8px 0;
  vertical-align: top;
}

/* Визуальные индикаторы для характеристик */
.attribute-visual {
  display: flex;
  align-items: center;
  margin-top: 5px;
}

.dots-container {
  display: flex;
  gap: 3px;
  margin-right: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ddd;
  transition: background-color 0.2s ease;
}

.dot.active {
  background-color: var(--brand-primary, #C0592A);
}

/* 3. Визуальные индикаторы для вкусовых профилей */
.taste-profile {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.taste-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  background-color: #f5f5f5;
  color: #333;
  transition: all 0.2s ease;
}

.taste-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.taste-tag.primary {
  background-color: var(--brand-primary, #C0592A);
  color: white;
}

.taste-tag.fruity { background-color: var(--flavor-fruity); color: white; }
.taste-tag.berry { background-color: var(--flavor-berry); color: white; }
.taste-tag.citrus { background-color: var(--flavor-citrus); color: #333; }
.taste-tag.chocolate { background-color: var(--flavor-chocolate); color: white; }
.taste-tag.nutty { background-color: var(--flavor-nutty); color: white; }
.taste-tag.caramel { background-color: var(--flavor-caramel); color: #333; }
.taste-tag.floral { background-color: var(--flavor-floral); color: #333; }
.taste-tag.herbal { background-color: var(--flavor-herbal); color: #333; }
.taste-tag.spicy { background-color: var(--flavor-spicy); color: white; }
.taste-tag.sweet { background-color: var(--flavor-sweet); color: #333; }

/* Визуализация обжарки */
.roast-level {
  position: relative;
  height: 20px;
  width: 100%;
  background: linear-gradient(to right, 
    var(--roast-light) 0%, 
    var(--roast-medium-light) 25%, 
    var(--roast-medium) 50%, 
    var(--roast-medium-dark) 75%, 
    var(--roast-dark) 100%
  );
  border-radius: 10px;
  margin-top: 5px;
}

.roast-indicator {
  position: absolute;
  top: -5px;
  transform: translateX(-50%);
  width: 10px;
  height: 30px;
  background-color: white;
  border: 2px solid var(--brand-primary, #C0592A);
  border-radius: 4px;
}

.roast-label {
  margin-top: 8px;
  display: block;
  font-size: 14px;
  color: #666;
}

/* 4. Стандартизация информации */
.coffee-info-box {
  background-color: #fcfaf7;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.coffee-info-box h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 18px;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.flavor-wheel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.flavor-category {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.flavor-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  background-color: #f9f6f1;
  transition: all 0.2s ease;
}

.flavor-circle:hover {
  transform: scale(1.1);
}

.flavor-circle i {
  font-size: 24px;
  color: var(--brand-primary, #C0592A);
}

.flavor-name {
  font-size: 13px;
  color: #555;
}

/* Рейтинговые звезды */
.rating-stars {
  color: var(--brand-primary, #C0592A);
  font-size: 18px;
  letter-spacing: 2px;
}

.coffee-card .rating-stars {
  font-size: 16px;
}

/* 5. Интерактивные элементы для исследования характеристик */
.coffee-characteristics {
  margin-top: 24px;
}

.coffee-characteristics-tabs {
  display: flex;
  border-bottom: 1px solid #eee;
  margin-bottom: 16px;
}

.characteristic-tab {
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.characteristic-tab.active {
  border-bottom-color: var(--brand-primary, #C0592A);
  color: var(--brand-primary, #C0592A);
}

.characteristic-content {
  display: none;
}

.characteristic-content.active {
  display: block;
}

/* Для раскрывающихся секций на мобильных */
.coffee-detail .collapsible-section {
  margin-bottom: 16px;
}

.coffee-detail .collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: #f9f6f1;
  border-radius: 8px;
  cursor: pointer;
}

.coffee-detail .collapsible-header h3 {
  margin: 0;
  font-size: 16px;
}

.coffee-detail .collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 16px;
}

.coffee-detail .collapsible-section.active .collapsible-content {
  max-height: 500px;
  padding: 16px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .coffee-detail-columns {
    flex-direction: column;
  }
  
  .coffee-attributes th,
  .coffee-attributes td {
    display: block;
    width: 100%;
    padding: 4px 0;
  }
  
  .coffee-attributes th {
    font-weight: 700;
    color: #333;
  }
  
  .flavor-wheel {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Медиа-запросы для планшетов */
@media (min-width: 768px) and (max-width: 1024px) {
  .coffee-detail-columns {
    display: flex;
    gap: 24px;
  }
  
  .coffee-detail-columns > div {
    flex: 1;
  }
  
  .coffee-detail .coffee-image {
    max-width: 350px;
  }
}
