.product-modal-content {
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative; /* Для индикатора прокрутки */
}

.product-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7); /* Более контрастный фон */
    color: white;
    width: 48px; /* Увеличено */
    height: 48px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-medium);
    z-index: 10;
}

.product-modal-close:hover {
    transform: scale(1.1);
    background: var(--primary);
    color: white;
}

.product-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.product-modal-title {
    font-size: 26px;
    color: var(--secondary);
    margin: 0;
    padding-right: 40px;
}

.product-modal-popular-badge {
    position: absolute;
    right: 70px;
    top: 20px;
    background: var(--accent);
    color: var(--text-dark);
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 700;
}

.product-modal-body {
    display: flex;
    flex-direction: row;
    padding: 0;
}

.product-modal-image-container {
    width: 50%;
    max-height: 500px;
    overflow: hidden;
    background: #f5f5f5;
    position: relative; /* Для иконки зума */
}

.product-modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-modal-image:hover {
    transform: scale(1.05); /* Эффект масштабирования */
}

/*.product-modal-image-container::before {
    content: '\f00e';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    z-index: 10;
}*/

.product-modal-image-container:hover::before {
    opacity: 1;
}

.product-modal-info {
    width: 50%;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 25px; /* Увеличено с 20px */
}

.product-modal-description {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    margin: 0;
}

.product-modal-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-modal-sizes-container h4,
.product-modal-nutrition h4,
.product-modal-share-container h4 {
    font-size: 18px;
    color: var(--secondary);
    margin: 0 0 10px 0;
}

.product-modal-sizes {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.product-modal-sizes .size-option {
    flex: 1;
    min-width: 100px; /* Увеличено с 80px */
    max-width: 120px;
    padding: 12px 10px; /* Больше отступов */
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-medium);
    background: #fff;
    box-shadow: var(--shadow-sm);
    text-align: center;
    touch-action: manipulation; /* Уменьшает задержку касания */
}

.product-modal-sizes .size-option:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.product-modal-sizes .size-option.selected {
    border: 2px solid var(--primary);
    background: rgba(255, 90, 0, 0.15);
    box-shadow: 0 4px 12px rgba(255, 90, 0, 0.2);
}

.product-modal-actions {
    margin-top: 15px;
}

.product-modal-add-to-cart {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    transition: all var(--transition-medium);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(255, 90, 0, 0.3);
}

.product-modal-add-to-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 90, 0, 0.4);
}

.product-modal-add-to-cart i {
    font-size: 18px;
    transition: transform var(--transition-fast);
}

.product-modal-add-to-cart:hover i {
    transform: scale(1.2);
}

.product-modal-add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.product-composition {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 15px 0;
}

.nutrition-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.nutrition-item {
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
}

.nutrition-name {
    display: block;
    font-size: 12px;
    color: #777;
}

.nutrition-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary);
}

.product-modal-share-container {
    margin-top: 15px;
}

.product-modal-share {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 48px; /* Увеличено с 40px */
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: white;
    cursor: pointer;
    transition: all var(--transition-medium);
    font-size: 18px; /* Крупнее иконки */
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.share-btn.vk {
    background: #4C75A3;
}

.share-btn.telegram {
    background: #0088cc;
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.copy-link {
    background: #5a6268; /* Более яркий серый */
}

.share-btn::after {
    content: attr(aria-label);
    position: absolute;
    top: -30px;
    background: var(--secondary);
    color: white;
    padding: 5px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.share-btn:hover::after {
    opacity: 1;
}

/* Стили для аккордеона */
.accordion-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 10px 0;
    cursor: pointer;
    text-align: left;
}

.accordion-toggle h4 {
    margin: 0;
}

.accordion-toggle i {
    transition: transform 0.3s ease;
}

.accordion-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-toggle[aria-expanded="true"] + .accordion-content {
    max-height: 500px; /* Достаточно для контента */
}

/* Стили для лайтбокса */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.lightbox-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: white;
    color: var(--secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Индикатор прокрутки */
.product-modal-content::after {
    content: '\f078'; /* FontAwesome chevron-down */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary);
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-modal-content.scrollable::after {
    opacity: 1; /* Показываем, если контент прокручиваемый */
    animation: scroll-indicator-bounce 1.5s ease-in-out infinite;
}

/* Стили для курсора при наведении на карточку товара */
.menu-item {
    cursor: pointer;
}

.menu-item .add-to-cart,
.menu-item .size-option {
    cursor: pointer;
    z-index: 5;
    position: relative;
}

/* Анимация для раскрытия модального окна */
.modal {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    transform: translateY(-50px);
    transition: all 0.4s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

/* Для эффекта скругления изображения и наложения тени */
.product-modal-image-container {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Анимация для индикатора прокрутки */
@keyframes scroll-indicator-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Для плавного появления модального окна */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.active {
    animation: fadeIn 0.3s forwards;
}

/* Медиа-запросы для мобильных устройств */
@media (max-width: 768px) {
    .product-modal-body {
        flex-direction: column;
    }

    .product-modal-image-container {
        width: 100%;
        max-height: 400px; /* Увеличено с 350px */
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }

    .product-modal-image {
        object-fit: contain; /* Сохраняем пропорции */
    }

    .product-modal-info {
        width: 100%;
        padding: 25px; /* Увеличено с 20px */
        gap: 30px; /* Еще больше пространства */
    }

    .product-modal-title {
        font-size: 22px;
    }

    .product-modal-description {
        font-size: 14px;
    }

    .product-modal-sizes-container h4,
    .product-modal-nutrition h4,
    .product-modal-share-container h4 {
        font-size: 16px;
    }

    .product-modal-sizes .size-option {
        min-width: 100px;
        max-width: 150px;
        padding: 12px 10px;
    }

    .product-modal-add-to-cart {
        padding: 16px 20px;
        font-size: 15px;
    }

    .share-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .share-btn::after {
        display: none; /* Отключаем tooltip на мобильных */
    }

    .product-modal-close {
        position: fixed; /* Фиксируем на мобильных */
        top: 10px;
        right: 10px;
        z-index: 100;
    }

    .product-modal-content {
        width: 100%; /* Полная ширина */
        border-radius: 0; /* Без скруглений для полноэкранного эффекта */
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 15px 10px -10px rgba(0, 0, 0, 0.2);
    }

    .product-modal-content::-webkit-scrollbar {
        width: 8px; /* Увеличено */
    }

    .product-modal-content::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .product-modal-content::-webkit-scrollbar-thumb {
        background: #aaa; /* Более контрастный */
        border-radius: 10px;
    }

    .product-modal-content::-webkit-scrollbar-thumb:hover {
        background: #888;
    }

    .product-modal-content.scrollable::after {
        animation: scroll-indicator-bounce 1.5s ease-in-out infinite;
    }
}

@media (max-width: 480px) {
    .product-modal-content {
        width: 100%;
    }

    .product-modal-title {
        font-size: 20px;
    }

    .product-modal-description {
        font-size: 13px;
    }

    .product-modal-sizes .size-option {
        min-width: 90px;
        max-width: 130px;
    }

    .product-modal-add-to-cart {
        padding: 14px 18px;
        font-size: 14px;
    }

    .share-btn {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
}
