.product-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 16px;
}

.product-item {
    background: white;
    border-radius: 35px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.imgnatti {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    margin: 15px 15px 15px 7px;
}

.product-item h3 {
    margin: 8px 0;
    font-family: "Montserrat", sans-serif;
}


.product-item .old-price {
    text-decoration: line-through;
    color: #888;
    font-size: 13px;
    margin-left: 8px;
}

.product-item .sizes {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    justify-content: center;
}


.add-to-cart-btn {
    display: flex;
    align-items: center;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 9px 15px;
    cursor: pointer;
    font-family: "DinL", sans-serif;
    font-weight: 600;
    width: 100px;
    transition: all 0.3s ease;
    position: relative;
    gap: 8px;
    white-space: nowrap;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
/* Эффект наведения */
.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.add-to-cart-btn.in-cart {
    position: relative;
    overflow: hidden;
    background: transparent; /* Убираем старый фон */
    color: rgb(255, 255, 255);
    -webkit-tap-highlight-color: transparent;
}
.add-to-cart-btn.in-cart::before {
    content: '';
    position: absolute;
    width: 120%; 
    height: 120%;
    background: url("./img/darioButton.png") center/cover no-repeat;
    transform: rotate(0deg);
    -webkit-tap-highlight-color: transparent;
    filter: brightness(0.7); /* 70% яркости (темнее) */
}
.add-to-cart-btn.in-cart:hover {
    box-shadow: 0 8px 24px rgba(136, 136, 136, 0.4);
}
.cart-count-badge.show {
    opacity: 1;
    transform: scale(1);
}

/* Анимация перехода */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.cart-controls {
    animation: fadeIn 0.3s ease;
}

.price-text {
    font-size: 22px;
    z-index: 10; /* Самый высокий слой */
    font-family: "DinR" , sans-serif;
}

.cart-icon {
    width: 20px;
    height: 20px;
    filter: invert(1);
}

.old-price {
    font-size: 13px;
    color: #aaa;
    text-decoration: line-through;
    margin-left: 5px;
}
/* Счетчик рядом с кнопкой */
.cart-counter {
    color: rgb(134, 132, 132);
    font-size: 14px;
    font-weight: bold;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}
.cart-counter.show {
    opacity: 1;
    transform: scale(1);
}
/* Обертка для кнопки и счетчика */

.cart-control-wrapper {
    gap: 2px;
    margin-top: 50px;
    position: relative;
    display: flex;
    align-items: center;    
}
.minimal-counter {
    color: rgb(116, 116, 116);
    font-size: 13px;
    font-weight: bold;
    width: 36px;
    height: 36px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
    gap: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transform-origin: center; 
}

/* Вместо этого добавьте: */
.minimal-counter.show {
    opacity: 1;
    transform: scale(1);
    transform-origin: center; 
    font-family: "DinR" , sans-serif;
}

.counter-value {
    font-size: 15px;
    font-weight: 800;
}
.counter-icon {
    font-size: 13px;
    opacity: 0.8;
}
/* Альтернативный вариант с вертикальным расположением цены */
.add-to-cart-btn.vertical {
    flex-direction: column;
    padding: 10px 15px;
    gap: 2px;
}
/* Анимация при добавлении */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.add-to-cart-btn.added {
    animation: pulse 0.5s ease;
}
.add-to-cart-btn.vertical .price-text {
    font-size: 16px;
    margin: 0;
}

.add-to-cart-btn.vertical .cart-icon {
    margin: 4px 0;
}

.add-to-cart-btn.vertical .old-price {
    font-size: 12px;
    margin: 0;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    width: 100%;
}

/* Левый блок с вертикальным расположением */
.leftvverh {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

/* Ваши существующие стили */
.vverhleftgray {
    font-size: 20px;
    font-family: "DinL", sans-serif;
    font-weight: 560;
    color: grey;
}

.vverhleftblack {
    font-size: 37px;
    font-family: "DinR", sans-serif;
    padding-bottom: 3px;
    padding-top: 3px;
}

/* Правый блок - исправленный */
.vverhrightblack {
    font-size: 14px;
    font-family: "Myg", sans-serif;
    font-weight: 550;
    color: white;
    background: #000000;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap; /* чтобы текст не переносился */
    align-self: flex-start; /* выравнивание по верху */
    
}
.vverhrightgray {
    font-size: 14px;
    font-family: "Myg", sans-serif;
    font-weight: 550;
    color: grey;
    padding-top: 3px;
}
.descriptor-badge {
    border-radius: 25px;
    cursor: pointer;
    padding: 1px 3px;
    border: 3px solid; /* Только border */
    background: transparent !important; /* Прозрачный фон */
    display: inline-block;
    font-weight: 500;
}
/* Контейнер для дескрипторов вкуса */
.taste-descriptors {
    font-family: "Myg", sans-serif;
    padding-top: 5px;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Контейнер для прогресс-баров */
.coffee-scales {
    display: flex;
    justify-content: space-between; /* Распределяет элементы по краям */
    gap: 15px; /* Отступ между колонками */
    margin: 40px 0;
    width: 100%;
}


.scale-item {
    display: flex;
    flex-direction: column;
}

.scale-label {
    font-size: 16px;
    font-family: "Myg", sans-serif;
    color: #333;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scale-value {
    font-size: 12px;
    color: #666;
    font-weight: bold;
}

/* Сам прогресс-бар */
.progress-bar {
    background: #e0e0e0;
    border-radius: 3px;
    height: 4px;
    width: 150px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    background: #000;
    border-radius: 3px;
    height: 100%;
    transition: width 0.3s ease;
}

/* Альтернативный вариант с цветными полосками */
.scale-item:nth-child(1) .progress-fill {
    background: #000000; 
}

.scale-item:nth-child(2) .progress-fill {
    background: #000000; 
}

/* Вариант с градиентом */
.progress-fill.gradient-density {
    background: linear-gradient(90deg, #D2691E, #8B4513);
}

.progress-fill.gradient-acidity {
    background: linear-gradient(90deg, #FFA07A, #CD5C5C);
}

/* Версия с цифрами */
.scale-item.with-value .scale-label {
    margin-bottom: 3px;
}

.scale-item.with-value .scale-value {
    align-self: flex-end;
    font-size: 11px;
    color: #888;
}

/* Анимация при загрузке */
@keyframes fillProgress {
    from { width: 100%; }
    to { width: var(--target-width); }
}

.progress-fill.animated {
    animation: fillProgress 1.3s ease-out forwards;
}
.item-sizes {
    display: flex;
    gap: 5px;
    margin: 5px 0 10px 0;
    font-size: 10px;
}
.discount {
  color: rgb(129, 129, 129);
  margin-left: 2px;
  font-size: 0.6em;
  vertical-align: super;

}
.size-btn {
    position: relative;
    padding: 10px;
    border: 1px #ccc;
    background-color: #fcfcfc;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    align-items: flex-start;
    white-space: nowrap;
}
.size-btn .discount {
  font-size: 0.7em;
  color: #888;
  line-height: 1; 
}
.size-btn.active {
 background-color: #f0f0f0; /* цвет выбранной кнопки */
}
.size-btn:hover {
  background-color: #f0f0f0;
}
.sostav1 {
    margin: 20px 0 15px 0;
    font-family: "DinR", sans-serif;
    font-size: 24px;

}
.sostav1 .word-chip {
  display: inline-block;
  padding: 0px 4px;
  margin: 3px 3px 3px 0;
  border: 3px solid #ddd;
  border-radius: 12px;
  line-height: 1.4;
  font-size: 0.9em;
  font-family: "DinR", sans-serif;
  background: #fff;
  color: #111;
  transition: transform .15s;
}
.sostav1 .word-chip:hover {
  transform: translateY(-1px);
}
/* Нейтральные слова (не ингредиенты) — серая рамка */
.sostav1 .word-chip.chip-muted {
  border-color: #ddd;
  color: #555;
}
/* Кастомный селект помола */
.custom-select {
    position: relative;    
    width: auto;
    margin: 10px 0;
    display: none;
}
.select-btn {
  display: flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px #ccc;
    border-radius: 8px;
    background-color: #f4f4f4;
    cursor: pointer;
    font-size: 14px;
}

.select-btn .select-img {
  width: 20px;
  height: 20px;
  padding-left: 3px;
}

.select-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 68%;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.select-options .option {
    padding: 6px 12px;
    cursor: pointer;
}

.select-options .option:hover {
  background-color: #f0f0f0;
}
.select-options.active {
  display: block;
  width: 100px;
  font-family: "Myg", sans-serif;
}
.select-img.rotated {
    transform: rotate(180deg);
}
.size-grind-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    flex-wrap: wrap;
    justify-content: space-between;
    display: none;
}
.scale-numbers {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 4px;
    font-size: 11px;
    color: #888;
    font-family: "Myg", sans-serif;
}

.scale-number-left {
    align-self: flex-start;
}

.scale-number-right {
    align-self: flex-end;
}
.packaging-info {
    gap: 8px;
    background: #eeeeee;
    border-radius: 8px;
    padding: 8px 12px;
    font-family: "Myg", sans-serif;
    font-size: 14px;
    color: #333;
    margin-top: 10px;
    width: 40px;
}
.packaging-text {
    font-weight: 500;
}
/* Блок подробностей */
.details-block {
    background: #f8f8f8;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    margin: 20px 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Заголовок */
.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    background: #f2f2f2;
    border-bottom: 1px solid #e0e0e0;
    user-select: none;
}

.details-header:hover {
    background: #e8e8e8;
}

.details-title {
    font-family: "DinR", sans-serif;
    font-weight: 600;
    font-size: 19px;
    color: #333;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

.details-arrow {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
}

/* Контент */
.details-content {
    padding: 15px;
    line-height: 1.5;
    color: #444;
    display: block; /* По умолчанию видим */
     /* Анимация */
    max-height: 1000px; /* Достаточно большое значение */
    opacity: 1;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0.4, 0.4, 0.2); /* Плавная кривая */
    padding-bottom: 12px;
}


/* Состояние свернуто */
.details-block.collapsed .details-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.details-block.collapsed .details-arrow {
    transform: rotate(-90deg);
}
.greyzagolovok {
    font-family: "DinR" , sans-serif;
    font-size: 19px;
}
.blackharact {
    font-family: "DinB" , sans-serif;
    margin-bottom: 8px;
    display: block; /* Добавьте это */
    font-size: 19px;
}
.description-simple {
    margin: 20px 0 0 10px;

}

.desc-title-simple {
    font-family: "DinR", sans-serif;
    font-weight: 600;
    font-size: 26px;
    color: #333;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.desc-text-simple {
    font-family: "DinR", sans-serif;
    font-size: 22px;
    line-height: 1.5;
    color: #444;
    margin-top: 15px;
    font-weight: 595;
}
.desc-image {
    margin: 10px 0;
    text-align: center;
}

.desc-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.minimal-footer {
    background: #000;
    color: #fff;
    padding: 30px 20px;
    margin-top: 50px;
    font-family: "DinL", sans-serif;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    font-family: "DinR", sans-serif;
    font-size: 24px;
    margin-bottom: 15px;
    color: #fff;
}

.footer-docs {
    margin-bottom: 20px;
    white-space: nowrap;
    display: flex;
    flex-wrap: nowrap;
    text-align: center;
    align-items: center;
    justify-content: center; /* по горизонтали */
}

.footer-docs a {
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    margin: 0 10px;
    white-space: nowrap;
    display: flex;
    flex-wrap: nowrap;
}
.footer-docs a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-info {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}

.footer-info p {
    margin: 5px 0;
}

@media (max-width: 768px) {
    .minimal-footer {
        padding: 20px 15px;
        margin-top: 30px;
    }
    
    .footer-docs a {
        white-space: nowrap;
        display: block;
    }
}
