/* =========================================
   1. ГЛОБАЛЬНІ ПРАВИЛА (ТІЛЬКИ СКРОЛБАР)
   ========================================= */
::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
* { -ms-overflow-style: none !important; scrollbar-width: none !important; }

/* Відновлені критичні класи для JS (повідомлення) */
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; border: 0 !important; }
.toast-container { position: fixed; bottom: 30px; right: 30px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #18181b; border: 1px solid #f97316; color: #fff; padding: 15px 25px; border-radius: 12px; font-size: 0.95rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); transform: translateX(120%); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.toast.show { transform: translateX(0); }


/* =========================================
   2. АБСОЛЮТНА ІЗОЛЯЦІЯ СТОРІНКИ ТОВАРУ
   ========================================= */
.product-page-scope {
  width: 100%;
  display: block;
}

.product-page-scope *, 
.product-page-scope *::before, 
.product-page-scope *::after {
  box-sizing: border-box !important; 
}

.product-page-scope img {
  max-width: 100%;
  height: auto;
}

/* =========================================
   3. УТИЛІТИ (Тільки всередині Scope)
   ========================================= */
.product-page-scope .top-spacing { height: 40px; }
.product-page-scope .product-mb-15 { margin-bottom: 15px; }
.product-page-scope .product-mb-30 { margin-bottom: 30px; }
.product-page-scope .product-w-full { width: 100%; }

/* =========================================
   4. ТЕКСТИ ТА ТИПОГРАФІКА
   ========================================= */
.product-page-scope .product-breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.4); margin-bottom: 25px; }
.product-page-scope .product-breadcrumbs a { color: inherit; text-decoration: none; }
.product-page-scope .product-breadcrumbs .is-current { color: rgba(255, 255, 255, 0.8); }

.product-page-scope .product-head { margin-bottom: 30px; }
.product-page-scope .product-head-meta { display: flex; gap: 12px; margin-bottom: 15px; }
.product-page-scope .section-badge { display: inline-block; background: rgba(249, 115, 22, 0.1); color: #f97316; padding: 4px 12px; border-radius: 8px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; }

.product-page-scope .product-page-title { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.2; margin: 0; color: #fff; word-wrap: break-word; }
.product-page-scope .section-title { font-size: 1.5rem; color: #fff; margin: 0 0 20px 0; }
.product-page-scope .text-formatted { line-height: 1.7; color: rgba(255, 255, 255, 0.8); font-size: 1.05rem; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; width: 100%; display: block; }

/* =========================================
   5. КАРТКИ ТА СІТКИ (Безпечні)
   ========================================= */
.product-page-scope .glass-card { background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 1.5rem; padding: clamp(1.25rem, 3vw, 2rem); width: 100%; min-width: 0; overflow: hidden; }

.product-page-scope .product-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); margin-bottom: 40px; width: 100%; }
.product-page-scope .product-gallery, .product-page-scope .product-buy-panel { min-width: 0; width: 100%; }
.product-page-scope .content-layout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.product-page-scope .content-main, .product-page-scope .content-side { min-width: 0; width: 100%; }
.product-page-scope .sticky-element { position: sticky; top: 20px; }

/* =========================================
   6. ГАЛЕРЕЯ
   ========================================= */
.product-page-scope .image-stage { width: 100%; aspect-ratio: 1 / 1; background: #fff; border-radius: 1rem; display: flex; align-items: center; justify-content: center; margin-bottom: 15px; overflow: hidden; }
.product-page-scope .image-stage img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.product-page-scope .gallery-thumbs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; width: 100%; }
.product-page-scope .gallery-thumbs::-webkit-scrollbar { display: none; }
.product-page-scope .thumb-btn { flex: 0 0 70px; height: 70px; border-radius: 12px; border: 2px solid transparent; background: #fff; cursor: pointer; padding: 4px; }
.product-page-scope .thumb-btn.is-active { border-color: #f97316; }
.product-page-scope .thumb-btn img { width: 100%; height: 100%; object-fit: contain; }

/* =========================================
   7. ПАНЕЛЬ КУПІВЛІ ТА КНОПКИ
   ========================================= */
.product-page-scope .price-header { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; margin-bottom: 20px; }
.product-page-scope .price-current { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; color: #f97316; line-height: 1; }
.product-page-scope .price-old { font-size: 1.2rem; text-decoration: line-through; color: rgba(255,255,255,0.4); }
.product-page-scope .badge-sale { background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; padding: 4px 8px; border-radius: 8px; font-weight: bold; }

.product-page-scope .status-badge { display: inline-block; padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 20px; }
.product-page-scope .status-badge.success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.product-page-scope .status-badge.warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

/* --- НОВИЙ ДИЗАЙН ДЛЯ БРЕНДУ, МОДЕЛІ ТА АРТИКУЛУ --- */
.product-page-scope .product-meta { 
    margin-bottom: 25px; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}
.product-page-scope .meta-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 0.95rem; 
    color: rgba(255,255,255,0.7); 
    background: rgba(255,255,255,0.02); 
    padding: 12px 16px; 
    border: 1px solid rgba(255,255,255,0.05); 
    border-radius: 12px; 
    transition: 0.3s ease; 
}
.product-page-scope .meta-row:hover { 
    background: rgba(255,255,255,0.04); 
    border-color: rgba(249, 115, 22, 0.3); 
    transform: translateY(-2px); 
}
.product-page-scope .meta-label { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}
.product-page-scope .meta-label svg { 
    color: #f97316; 
}
.product-page-scope .meta-value { 
    color: #fff; 
    font-weight: 800; 
    font-size: 1rem; 
    text-align: right; 
}
/* --- КІНЕЦЬ НОВОГО ДИЗАЙНУ --- */

.product-page-scope .buy-actions { display: flex; flex-direction: column; gap: 15px; }
.product-page-scope .action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.product-page-scope .btn { display: flex; align-items: center; justify-content: center; padding: 16px; border-radius: 14px; font-weight: 700; cursor: pointer; border: none; transition: 0.3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-page-scope .btn-primary { background: #f97316; color: #fff; font-size: 1.1rem; }
.product-page-scope .btn-secondary { background: rgba(255,255,255,0.05); color: #fff; border: 1px solid rgba(255,255,255,0.1); }
.product-page-scope .btn-secondary.is-active { color: #f97316; border-color: #f97316; }

.product-page-scope .benefits-list { margin-top: 25px; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.product-page-scope .benefit-row { display: flex; gap: 10px; color: rgba(255,255,255,0.7); font-size: 0.9rem; }

/* =========================================
   8. СПЕЦИФІКАЦІЇ ТА ФОРМИ
   ========================================= */
.product-page-scope .specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.product-page-scope .spec-box h3 { color: #f97316; font-size: 1.1rem; margin-bottom: 8px; }

.product-page-scope .form-group { margin-bottom: 15px; }
.product-page-scope .form-group label { display: block; margin-bottom: 8px; color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.product-page-scope .form-control { width: 100%; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 15px; color: #fff; font-family: inherit; }
.product-page-scope .file-upload-label { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; color: #fff; cursor: pointer; font-size: 0.9rem; transition: 0.3s; }

.product-page-scope .comments-list { display: flex; flex-direction: column; gap: 20px; }
.product-page-scope .comment-item { padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.product-page-scope .comment-head { display: flex; justify-content: space-between; margin-bottom: 10px; color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.product-page-scope .comment-head strong { color: #fff; font-size: 1rem; }

/* =========================================
   9. СХОЖІ ТОВАРИ
   ========================================= */
.product-page-scope .similar-list { display: flex; flex-direction: column; gap: 15px; }
.product-page-scope .similar-card { display: flex; align-items: center; gap: 12px; padding: 10px; background: rgba(255,255,255,0.03); border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); text-decoration: none; transition: 0.3s; }
.product-page-scope .similar-img { width: 60px; height: 60px; flex-shrink: 0; background: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-page-scope .similar-img img { width: 90%; height: 90%; object-fit: contain; }
.product-page-scope .similar-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.product-page-scope .similar-title { color: rgba(255,255,255,0.8); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-page-scope .similar-price { color: #f97316; font-weight: 700; margin-top: 4px; }

/* =========================================
   10. АДАПТАЦІЯ (MOBILE & TABLET)
   ========================================= */
@media (max-width: 1024px) {
  .product-page-scope .content-layout-grid { grid-template-columns: minmax(0, 1fr); }
  .product-page-scope .sticky-element { position: static; }
}

@media (max-width: 768px) {
  .product-page-scope .product-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .product-page-scope .action-grid { grid-template-columns: 1fr; }
  .product-page-scope .specs-grid { grid-template-columns: 1fr; }
  
  .product-page-scope .similar-list { flex-direction: row; overflow-x: auto; padding-bottom: 10px; margin: 0 -15px; padding-left: 15px; padding-right: 15px; scroll-snap-type: x mandatory; }
  .product-page-scope .similar-list::-webkit-scrollbar { display: none; }
  .product-page-scope .similar-card { min-width: 260px; scroll-snap-align: start; }
}

/* =========================================
   ТАЙМЕР ЗНИЖКИ НА СТОРІНЦІ ТОВАРУ
   ========================================= */
.product-page-scope .discount-timer-wrap {
    background: linear-gradient(145deg, rgba(249, 115, 22, 0.1) 0%, rgba(20, 20, 28, 0) 100%);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.product-page-scope .timer-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-page-scope .timer-label::before {
    content: "⏳ "; 
}

.product-page-scope .timer-value {
    font-family: 'Courier New', Courier, monospace; 
    font-size: 2.2rem;
    font-weight: 900;
    color: #f97316; 
    line-height: 1;
    letter-spacing: 4px;
    text-shadow: 0 0 15px rgba(249, 115, 22, 0.5); 
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}