/**
 * Стили карточки товара V2
 * /new/assets/css/product.css
 */

/* Скрываем пустой sidebar и расширяем контент на полную ширину */
#sidebar.zone2.grid_3 { display: none !important; width: 0 !important; padding: 0 !important; margin: 0 !important; }
.container_12 .grid_9,
.container_12 .zone3,
.container_12 .zone4,
.container_12 .zone-content-all { width: 100% !important; max-width: 100% !important; float: none !important; margin-left: 0 !important; }

.product-v2 { max-width: 1140px; margin: 0 auto; padding: 20px 30px; }

/* Хлебные крошки */
.product-v2-breadcrumbs { margin-bottom: 20px; font-size: 13px; color: #666; }
.product-v2-breadcrumbs a { color: #0066cc; text-decoration: none; }
.product-v2-breadcrumbs a:hover { text-decoration: underline; }
.product-v2-breadcrumbs .sep { margin: 0 8px; color: #999; }
.product-v2-breadcrumbs .current { color: #333; }

/* Основной блок */
.product-v2-main { display: flex; gap: 50px; margin-bottom: 20px; }
.product-v2-left { flex: 0 0 700px; }
.product-v2-right { flex: 1; }

/* Короткое описание */
.product-v2-short-desc { padding: 16px 24px; background: #f8f9fa; border-radius: 10px; font-size: 15px; line-height: 1.5; color: #444; margin-bottom: 20px; }

/* Длинные характеристики */
.product-v2-param-block { margin-bottom: 20px; padding: 16px 24px; background: #fff; border: 1px solid #e8eef3; border-radius: 10px; }
.product-v2-param-label { font-weight: 600; color: #0147b1; font-size: 14px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.3px; }
.product-v2-param-value { font-size: 14px; line-height: 1.6; color: #444; }

/* Фото */
.product-v2-photo { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 50px; min-height: 580px; display: flex; align-items: center; justify-content: center; }
.product-v2-photo-img { max-width: 100%; max-height: 580px; height: auto; }

/* Заголовок */
.product-v2-title { font-size: 26px; font-weight: 600; margin: 0 0 20px; color: #222; line-height: 1.3; }
/* Опции вариантов (формы, дозировки, количества) */
.product-v2-variant-options { margin-bottom: 24px; }
.variant-option-group { margin-bottom: 16px; }
.variant-option-label { font-size: 13px; color: #666; margin-bottom: 8px; font-weight: 500; }
.variant-option-values { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-option-btn { display: inline-block; padding: 10px 18px; background: #f5f7fa; border: 2px solid #e0e5eb; border-radius: 8px; font-size: 14px; color: #333; text-decoration: none; transition: all 0.2s; cursor: pointer; font-weight: 500; }
.variant-option-btn:hover { background: #e8f4ff; border-color: #1976d2; color: #1976d2; }
.variant-option-btn.active { background: #1976d2; border-color: #1976d2; color: #fff; cursor: default; }
.variant-option-btn .opt-stock { font-size: 11px; font-weight: 400; opacity: 0.7; margin-left: 4px; }
.variant-option-btn.active .opt-stock { opacity: 0.85; }

/* Комбинированный список вариантов */
.variant-list-group { margin-top: 20px; }
.variant-list { display: flex; flex-direction: column; gap: 8px; }
.variant-list-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 12px 16px; 
    background: #f5f7fa; 
    border: 2px solid #e0e5eb; 
    border-radius: 10px; 
    text-decoration: none; 
    color: #333; 
    transition: all 0.2s;
}
.variant-list-item:hover { 
    background: #e8f4ff; 
    border-color: #1976d2; 
}
.variant-list-item.active { 
    background: #1976d2; 
    border-color: #1976d2; 
    color: #fff; 
    cursor: default;
}
.variant-list-label { 
    font-size: 14px; 
    font-weight: 500; 
}
.variant-list-price { 
    font-size: 15px; 
    font-weight: 600; 
    color: #0d6efd;
}
.variant-list-item.active .variant-list-price { 
    color: #fff; 
}

/* Fallback варианты */
.product-v2-variants { margin-bottom: 20px; }
.product-v2-variants-label { font-size: 13px; color: #666; margin-bottom: 10px; }
.product-v2-variants-list { display: flex; flex-wrap: wrap; gap: 8px; }
.product-v2-variant { display: inline-flex; flex-direction: column; padding: 8px 14px; background: #f5f5f5; border: 1px solid #e0e0e0; border-radius: 8px; text-decoration: none; transition: all 0.2s; }
.product-v2-variant:hover { background: #e8f4ff; border-color: #0066cc; }
.product-v2-variant.out-stock { opacity: 0.5; }
.product-v2-variant .variant-name { font-size: 13px; color: #333; }
.product-v2-variant .variant-price { font-size: 12px; color: #0066cc; margin-top: 2px; }

/* Покупка */
.product-v2-purchase { background: #f8f9fa; border-radius: 12px; padding: 24px; margin-bottom: 20px; }
.product-v2-price { margin-bottom: 8px; }
.product-v2-price-from { color: #666; font-size: 14px; }
.product-v2-price-value { font-size: 36px; font-weight: 700; color: #e53935; }
.product-v2-price-currency { font-size: 24px; color: #e53935; }
.product-v2-availability { margin-bottom: 10px; font-size: 14px; }
.product-v2-instock { color: #2e7d32; font-weight: 500; }
.product-v2-stores-count { color: #666; }
.product-v2-outstock { color: #c62828; }
.product-v2-other-cities { font-size: 13px; color: #666; margin-bottom: 15px; padding: 10px; background: #fff3e0; border-radius: 6px; }

/* Кнопки */
.product-v2-actions { display: flex; gap: 12px; margin-top: 20px; }
.product-v2-btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 28px; font-size: 16px; font-weight: 600; border: none; border-radius: 10px; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.product-v2-btn-cart { background: #1976d2; color: #fff; flex: 1; }
.product-v2-btn-cart:hover { background: #1565c0; }
.product-v2-btn-cart .btn-icon { margin-right: 8px; }
.product-v2-btn-buy { background: #43a047; color: #fff; }
.product-v2-btn-buy:hover { background: #388e3c; }

/* Табы */
.product-v2-tabs { margin-bottom: 40px; }
.product-v2-tabs-nav { display: flex; gap: 4px; border-bottom: 2px solid #e0e0e0; margin-bottom: 20px; }
.tab-btn { padding: 12px 24px; font-size: 15px; font-weight: 500; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; color: #666; transition: all 0.2s; }
.tab-btn:hover { color: #333; }
.tab-btn.active { color: #1976d2; border-bottom-color: #1976d2; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Список аптек */
.product-v2-stores-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.product-v2-store { padding: 14px 16px; background: #fff; border: 1px solid #e8e8e8; border-radius: 10px; }
.store-address { font-weight: 500; color: #222; margin-bottom: 6px; line-height: 1.3; }
.store-details { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.store-worktime { font-size: 13px; color: #888; }

.stock-qty { display: inline-block; padding: 4px 12px; background: #e8f5e9; color: #2e7d32; border-radius: 20px; font-size: 13px; font-weight: 500; }

.price-value { font-size: 15px; font-weight: 700; color: #e53935; }
.no-stores { color: #666; padding: 20px; text-align: center; }

/* Отзывы */
.product-v2-reviews { padding: 20px 0; }
.no-reviews { color: #666; margin-bottom: 20px; text-align: center; font-size: 15px; }
.reviews-summary { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding: 16px; background: #f8f9fa; border-radius: 10px; }
.reviews-rating { display: flex; align-items: center; gap: 10px; }
.rating-value { font-size: 32px; font-weight: 700; color: #333; }
.rating-stars { font-size: 20px; color: #ffc107; }
.star-empty { color: #ddd; }
.star-half { background: linear-gradient(90deg, #ffc107 50%, #ddd 50%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.reviews-count { color: #666; font-size: 14px; }
.reviews-badge { display: inline-block; padding: 2px 8px; background: #1976d2; color: #fff; border-radius: 10px; font-size: 12px; margin-left: 6px; }
.reviews-write { margin-bottom: 24px; }
.product-v2-btn-review { background: #f5f5f5; color: #333; border: 2px solid #ddd; }
.product-v2-btn-review:hover { background: #e0e0e0; border-color: #ccc; }
.reviews-list { display: flex; flex-direction: column; gap: 16px; }
.review-item { padding: 20px; background: #fff; border: 1px solid #e8e8e8; border-radius: 10px; }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.review-author { font-weight: 600; color: #333; }
.review-date { font-size: 13px; color: #888; }
.review-rating { margin-bottom: 10px; font-size: 16px; color: #ffc107; }
.review-text { color: #444; line-height: 1.6; }
.review-reply { margin-top: 16px; padding: 16px; background: #e3f2fd; border-radius: 8px; border-left: 3px solid #1976d2; }
.reply-header { font-weight: 600; color: #1976d2; margin-bottom: 8px; font-size: 13px; }
.reply-text { color: #333; line-height: 1.6; }

/* Описание */
.product-v2-description { line-height: 1.7; color: #333; }
.product-v2-description p { margin-bottom: 12px; }

/* Похожие товары */
.product-v2-analogs { margin-top: 40px; }
.product-v2-analogs h2 { font-size: 22px; margin-bottom: 20px; color: #222; }

/* Сетка — 2 строки по 6 */
.product-v2-analogs-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }

/* Слайдер — горизонтальная прокрутка */
.product-v2-analogs-slider { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
.product-v2-analogs-slider .analog-card { flex: 0 0 160px; scroll-snap-align: start; }
.product-v2-analogs-slider::-webkit-scrollbar { height: 6px; }
.product-v2-analogs-slider::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 3px; }
.product-v2-analogs-slider::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.product-v2-analogs-slider::-webkit-scrollbar-thumb:hover { background: #aaa; }
.analogs-scroll-hint { text-align: center; color: #999; font-size: 12px; margin-top: 8px; }

/* Карточка аналога */
.analog-card { display: block; padding: 16px; background: #fff; border: 1px solid #e8e8e8; border-radius: 10px; text-decoration: none; transition: all 0.2s; }
.analog-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }
.analog-photo img { width: 100%; height: 120px; object-fit: contain; }
.analog-name { font-size: 13px; color: #222; font-weight: 500; margin-top: 10px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.analog-price { font-size: 14px; color: #e53935; font-weight: 600; margin-top: 8px; }

/* 404 */
.product-v2-not-found { text-align: center; padding: 60px 20px; }
.product-v2-not-found h1 { font-size: 28px; color: #333; margin-bottom: 20px; }

/* Мобильная версия */
@media (max-width: 1024px) and (min-width: 769px) {
    .product-v2-stores-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .product-v2-main { flex-direction: column; gap: 20px; }
    .product-v2-left { flex: none; }
    .product-v2-title { font-size: 20px; }
    .product-v2-price-value { font-size: 28px; }
    .product-v2-actions { flex-direction: column; }
    .product-v2-btn { width: 100%; }
    .product-v2-stores-list { grid-template-columns: 1fr; }
    .store-stock, .store-price { text-align: left; }
    .product-v2-tabs-nav { overflow-x: auto; }
    .tab-btn { white-space: nowrap; padding: 10px 16px; font-size: 14px; }
    .product-v2-analogs-grid { grid-template-columns: repeat(2, 1fr); }
    .product-v2-analogs-slider .analog-card { flex: 0 0 140px; }
    .analogs-scroll-hint { display: block; }
}

@media (min-width: 769px) {
    .analogs-scroll-hint { display: none; }
}

@media (max-width: 1200px) and (min-width: 769px) {
    .product-v2-analogs-grid { grid-template-columns: repeat(4, 1fr); }
}

}

}

/* Характеристики товара */
.product-v2-params-section { 
    margin: 30px 0; 
    padding: 20px; 
    background: #f9f9f9; 
    border-radius: 8px; 
}
.product-v2-params-title { 
    font-size: 18px; 
    font-weight: 600; 
    margin-bottom: 15px; 
    color: #222; 
}
.product-v2-params-list { 
    display: flex; 
    flex-direction: column; 
}

/* Каждый параметр */
.product-v2-param-item { 
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}
.product-v2-param-item:last-child { 
    border-bottom: none; 
}

/* Текст параметра */
.product-v2-param-text { 
    font-size: 14px; 
    line-height: 1.6; 
    color: #444;
}
.product-v2-param-text strong {
    color: #222;
}

/* Длинные параметры - сворачиваемые */
.product-v2-param-item.expandable { 
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

/* Свёрнутое состояние */
.product-v2-param-item.expandable.collapsed .product-v2-param-text {
    max-height: 4em;
    overflow: hidden;
}

/* Градиент только для свёрнутых длинных */
.product-v2-param-item.expandable.collapsed::after {
    content: '';
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    height: 1.5em;
    background: linear-gradient(to bottom, transparent, #f9f9f9);
    pointer-events: none;
}

/* Развёрнутое состояние */
.product-v2-param-item.expanded .product-v2-param-text {
    max-height: none;
}
.product-v2-param-item.expanded::after {
}

/* Блок "Также в категориях" */
.product-v2-also-categories {
    font-size: 13px;
    color: #666;
    margin: -8px 0 12px 0;
    padding: 0;
}

.product-v2-also-categories .also-label {
    color: #999;
}

.product-v2-also-categories a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s;
}

.product-v2-also-categories a:hover {
    color: #0056b3;
    text-decoration: underline;
}
/* Layout для страницы товара V2 */
.product-page-body .main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.product-page-body .main-content > .container {
    max-width: 100%;
    padding: 0;
}
