/* src\components\product\style\product-variations.css */

.variation-block {
  display: flex;
  flex-direction: column;
  gap: var(--calculator-gap, 30px);
}

.variation-section {
  margin-bottom: 0;
}

.variation-label {
  font-weight: bold;
  font-size: 13px;
  margin: 0 0 5px;
  color: var(--grey);
}

.variation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Базовые стили для всех элементов вариаций */
.variation-btn {
  min-width: 60px;
  text-align: center;
  padding: var(--option-padding-v) var(--option-padding-h);
  border: var(--option-border-thickness) solid var(--option-border-color);
  border-radius: var(--option-border-radius);
  text-decoration: none;
  color: var(--option-text-color);
  font-size: var(--option-font-size);
  background-color: var(--option-bg-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition-property: color, background;
  transition-duration: 0.5s;
  transition-timing-function: ease;
}

/* Hover только для неактивных */
.variation-btn:hover:not(.active) {
  border: 1px solid var(--option-border-color-hover);
}

/* Фокус */
.variation-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Активное состояние — выглядит как выбранное, но не кликабельное */
.variation-btn.active {
  border: var(--option-border-thickness-active) solid var(--option-border-color-active);
  background-color: var(--option-bg-color-active);
  color: var(--option-text-color-active);
  cursor: default;
  pointer-events: none;
}/* src\components\product\style\product-addons.css */

.addons-section {
    padding: 20px;
    border-radius: var(--border-radius-middle);
    background-color: var(--color-surface);
}

.addons-title {
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.addons-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.addon-item {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s;
}

/* Недоступный аддон */
.addon-item[data-unavailable="true"] {
    opacity: 0.6;
    cursor: not-allowed;
}

.addon-item[data-unavailable="true"] .addon-name {
    text-decoration: line-through;
    color: var(--color-muted);
}

.addon-item[data-unavailable="true"] .addon-price {
    color: var(--color-error);
}

/* Колонка 1: Чекбокс */
.addon-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

/* Скрываем нативный чекбокс */
.addon-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Кастомный чекбокс */
.addon-checkmark {
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-small);
    background: var(--color-bg);
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.addon-checkbox:checked+.addon-checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.addon-checkbox:checked+.addon-checkmark::after {
    content: "✓";
    color: white;
    position: absolute;
    left: 4px;
    top: -1px;
    font-size: 14px;
}

/* Недоступный чекбокс */
.addon-checkbox:disabled+.addon-checkmark {
    background: var(--color-surface);
    border-color: var(--color-border);
    cursor: not-allowed;
}

.addon-checkbox:disabled+.addon-checkmark::after {
    color: var(--color-muted);
}

/* Колонка 2: Картинка */
.addon-img {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--img-border-radius-small);
    background: var(--color-surface);
    flex-shrink: 0;
}

/* Колонка 3: Инфо */
.addon-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.addon-name-link {
    min-width: 0;
}

.addon-name {
    line-height: 1.3;
    display: block;
}

.addon-variation {
    color: var(--grey);
    font-weight: 400;
}

.addon-price {
    color: var(--grey);
    font-weight: 600;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.addon-unavailable {
    font-size: 11px;
    font-weight: 400;
    color: var(--color-error);
}/* src\components\product\style\product-calculator.css */

/* Скрывает блоки микроразметки от пользователя */
.schema-hidden {
    display: none;
}

.product-calculator {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-middle);
    padding: 24px;
    --calculator-gap: 30px;
}

.calculator-header {
    display: flex;
    flex-direction: column;
    gap: var(--calculator-gap);
}

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

.calculator-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.calculator-short-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--grey);
}

.calculator-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    font-size: 14px;
}

.status-out-of-stock {
    background: var(--bg-red);
    color: var(--color-error);
}

.status-in-stock {
    background: var(--bg-green);
    color: var(--color-success);
}

.status-pre-order {
    background: var(--bg-yellow);
    color: var(--color-warning);
}

.sku-label {
    font-size: 14px;
    color: var(--grey);
}

.calculator-body {
    display: flex;
    flex-direction: column;
    gap: var(--calculator-gap);
}

/* ============================================================================
   ORDER SUMS
   ============================================================================ */

.calculator-sums {
    display: flex;
    gap: 16px;
    margin-top: var(--calculator-gap);
}

.sum-card {
    flex: 1;
    padding: 10px 15px 0;
    border-radius: var(--border-radius-middle);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sum-label {
    color: var(--grey);
    text-align: left;
}

.sum-value {
    text-align: center;
    line-height: 1.2;
    font-size: larger;
    font-weight: 700;
    padding: 10px 0;
}

.sum-card.base {
    background: var(--bg-blue);
}

.sum-card.addons {
    background: var(--bg-yellow);
}

.sum-card.grand {
    background: var(--bg-green);
}

/* ============================================================================
   ACTION ROW
   ============================================================================ */

.action-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.quantity-block {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.quantity-label {
    font-size: 13px;
    color: var(--grey);
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-middle);
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--color-surface);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background 0.15s ease;
    user-select: none;
}

.quantity-btn:hover {
    background: var(--color-border);
}

.quantity-btn:active {
    background: var(--color-border);
    transform: scale(0.95);
}

.quantity-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.quantity-input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    appearance: textfield;
    background: var(--color-bg);
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ============================================================================
   PULSE AURA — анимация для кнопки "Добавить в корзину"
   ============================================================================ */

@keyframes pulse-aura {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
    }

    70% {
        box-shadow: 0 0 0 20px color-mix(in srgb, var(--accent) 0%, transparent);
    }

    100% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent);
    }
}

.pulse-aura {
    animation: pulse-aura 0.75s ease-out 3;
}

/* Мобильный */

@media (max-width: 768px) {
    .product-calculator {
        padding: 5px;
    }

    .calculator-sums {
        flex-direction: row;
        gap: 5px;
    }

    .sum-card {
        padding: 10px;
    }

    .sum-value {
        font-size: 18px;
    }

    .action-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    #add-to-cart-btn {
        width: 100%;
    }
}/* src\components\product\style\product-gallery.css */
.product-gallery .sticky {
    position: sticky;
    top: 90px;
}

.gallery-link {
    display: block;
    text-decoration: none;
    cursor: zoom-in;
    border: 0;
    padding: 0;
    background: none;
    width: 100%;
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
}

.product-gallery-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Скрытые ссылки-источники для fslightbox */
.gallery-lightbox-sources {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.gallery-lightbox-sources a {
    display: block;
}

/* Полоса миниатюр */
.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.gallery-thumb-btn {
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--img-border-radius-small, 4px);
    background: none;
    cursor: pointer;
    overflow: hidden;
    width: 100%;
    transition: border-color 0.15s ease;
}

.gallery-thumb-btn img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.gallery-thumb-btn:hover {
    border-color: var(--color-border);
}

.gallery-thumb-btn.active {
    border-color: var(--accent);
    cursor: default;
}

.gallery-thumb-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.no-image-placeholder {
    aspect-ratio: 3/2;
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
}/* src\components\product\style\product-related.css */

.related-title {
    font-size: 1.5rem;
    margin: 0 0 1rem;
    font-weight: 600;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-card {
    display: block;
    border-radius: var(--img-border-radius-small);
    overflow: hidden;
    text-decoration: none;
    outline: none;
}

.related-figure {
    position: relative;
    aspect-ratio: 3 / 2;
}

/* Изображение карточки */
.related-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.related-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 16px;
    text-align: center;
    transition: background 0.3s ease;
}

.related-card:hover .related-overlay,
.related-card:focus-visible .related-overlay {
    background: rgba(0, 0, 0, 0.7);
}

.related-info {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.related-card:hover .related-info,
.related-card:focus-visible .related-info {
    opacity: 1;
    transform: translateY(0);
}

.related-card-title {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.related-card-desc {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}/* src\components\product\style\product.css */

/* ============================================================================
   LAYOUT
   ============================================================================ */

.product-page {
  max-width: var(--width-wide);
  --product-gap: 40px;
}

.product-grid {
  display: grid;
  grid-template-columns: 3fr 4fr 2fr;
  gap: 40px;
}

/* Критически важно: разрешаем колонкам сжиматься */
.product-grid>* {
  min-width: 0;
}

/* ============================================================================
   CONTENT
   ============================================================================ */

.product-main {
  min-width: 0;
}

.product-description {
  margin-top: 2rem;
}

.product-description h2 {
  font-size: 1.5rem;
}

.product-page .buttons {
  margin-top: 2rem;
}

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

/* Планшет: убираем третью колонку */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 30px;
  }

  .product-related {
    display: none;
  }
}

/* Мобильный: одна колонка */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .product-gallery .sticky {
    position: static;
  }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}/* src\components\product\style\next.css */

.next-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.next-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.next-content {
    background-color: var(--color-bg);
    border-radius: var(--border-radius-middle);
    padding: 32px;
    min-width: 320px;
    max-width: 960px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.next-overlay.is-open .next-content {
    transform: scale(1);
}

.next-title {
    margin: 0 0 24px 0;
    font-size: 1.5rem;
    color: var(--color-text);
    font-weight: 600;
}

/* Desktop: 1×4 */
.next-grid {
    --next-thumb-width: 100px;
    display: grid;
    grid-template-columns: repeat(4, var(--next-thumb-width));
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
}

.next-thumb {
    width: var(--next-thumb-width);
    height: var(--next-thumb-width);
    border-radius: var(--img-border-radius-small);
    overflow: hidden;
    background: var(--color-surface);
}

.next-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Tablet: 2×2 */
@media (max-width: 900px) {
    .next-content {
        max-width: 500px;
        padding: 24px;
    }

    .next-grid {
        grid-template-columns: repeat(2, var(--next-thumb-width));
        grid-template-rows: repeat(2, var(--next-thumb-width));
    }
}

/* Mobile: 2×2 с адаптивной шириной */
@media (max-width: 480px) {
    .next-content {
        padding: 20px;
    }

    .next-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, auto);
        gap: 12px;
    }

    .next-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
    }
}