/* css/pages/3d-showcase.css */

:root {
    --color-primary:   #C22225;
    --color-secondary: #1D3557;
    --color-dark:      #232020;
    --color-light:     #F8F8F8;
    --color-gray:      #4D4D4D;
    --border-radius:   8px;
    --transition:      all 0.3s ease;
}

.section-padding { padding: 80px 0; }

/* ── Хлібні крихти ── */
.breadcrumbs {
    padding: 16px 0;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}
.breadcrumbs__list {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    gap: 4px;
}
.breadcrumbs__item:not(:last-child)::after {
    content: '/';
    margin: 0 8px;
    color: var(--color-gray);
}
.breadcrumbs__link {
    color: var(--color-gray);
    text-decoration: none;
    transition: var(--transition);
}
.breadcrumbs__link:hover { color: var(--color-primary); }
.breadcrumbs__item.active { color: var(--color-dark); font-weight: 500; }

/* ════════════════════════════════════════════
   HERO
════════════════════════════════════════════ */
.showcase-hero {
    background: linear-gradient(135deg, var(--color-dark) 0%, #1a1a2e 50%, var(--color-secondary) 100%);
    padding: 72px 0 64px;
    position: relative;
    overflow: hidden;
    color: #fff;
}
.showcase-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 60%, rgba(194,34,37,0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 20%, rgba(29,53,87,0.3) 0%, transparent 50%);
    pointer-events: none;
}
.showcase-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}
.showcase-hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: center;
}
.showcase-hero__label {
    display: inline-block;
    background: rgba(194,34,37,0.2);
    border: 1px solid rgba(194,34,37,0.5);
    color: #ff9a9a;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
}
.showcase-hero__title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 16px;
}
.showcase-hero__text {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
    max-width: 480px;
}
.showcase-hero__badge {
    flex-shrink: 0;
}
.showcase-badge {
    width: 156px;
    height: 156px;
    border-radius: 50%;
    border: 3px solid var(--color-primary);
    background: rgba(194,34,37,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    box-shadow: 0 0 0 8px rgba(194,34,37,0.06), 0 0 0 16px rgba(194,34,37,0.03);
}
.showcase-badge i {
    font-size: 2rem;
    color: var(--color-primary);
}
.showcase-badge span {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.5;
}

/* ════════════════════════════════════════════
   СЕКЦІЯ ПЕРЕГЛЯДАЧА
════════════════════════════════════════════ */
.showcase-3d-section {
    background: var(--color-light);
    padding: 60px 0 80px;
}

/* ── Селектор моделі ── */
.showcase-model-select {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}
.showcase-model-select label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-dark);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}
.model-select {
    padding: 11px 22px;
    font-size: 0.97rem;
    border: 1.5px solid #d0d5dd;
    border-radius: 50px;
    background: #fff;
    font-family: inherit;
    cursor: pointer;
    min-width: 320px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: var(--transition);
    color: var(--color-dark);
    font-weight: 500;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C22225' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 44px;
}
.model-select:hover,
.model-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(194,34,37,0.1);
}

/* ── Основний layout: переглядач + інфо ── */
.showcase-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

/* ── Переглядач ── */
.viewer-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    background: linear-gradient(145deg, #141820 0%, #1e2330 100%);
    aspect-ratio: 4/3;
    border: 1px solid rgba(255,255,255,0.06);
}

model-viewer {
    width: 100%;
    height: 100%;
    --poster-color: transparent;
    --progress-bar-color: var(--color-primary);
}

/* Loading */
.loading-message {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: rgba(255,255,255,0.85);
    z-index: 10;
    background: rgba(20,24,32,0.92);
    backdrop-filter: blur(4px);
}
.loading-message p {
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}
.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Кнопки керування (overlay на viewer) */
.viewer-controls {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 20;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    padding: 8px 12px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
}
.control-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.control-btn:hover {
    background: var(--color-primary);
    color: #fff;
    transform: scale(1.1);
}
.control-btn.active {
    background: var(--color-primary);
    color: #fff;
}

/* ── Інфо-панель (права колонка) ── */
.model-info-panel {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    border: 1px solid #e9ecef;
    position: sticky;
    top: 100px;
}

.model-info-panel h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}
.model-price-3d {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 20px;
}
.model-specs-3d {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 22px;
}
.model-specs-3d div {
    padding: 9px 0;
    border-bottom: 1px solid #f0f2f5;
    font-size: 0.9rem;
    color: var(--color-gray);
    display: flex;
    justify-content: space-between;
}
.model-specs-3d div:last-child { border-bottom: none; }

.model-info-panel .btn-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    border: 2px solid var(--color-primary);
}
.model-info-panel .btn-detail:hover {
    background: transparent;
    color: var(--color-primary);
}

/* Hint */
.viewer-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 0.8rem;
    color: #aaa;
}
.viewer-hint i { font-size: 0.9rem; color: var(--color-primary); }

/* ════════════════════════════════════════════
   АДАПТИВНІСТЬ
════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .showcase-layout {
        grid-template-columns: 1fr 260px;
    }
}

@media (max-width: 860px) {
    .showcase-layout {
        grid-template-columns: 1fr;
    }
    .model-info-panel {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px 24px;
        align-items: center;
    }
    .model-info-panel h3 { grid-column: 1 / -1; margin-bottom: 0; }
    .model-price-3d { margin-bottom: 0; }
    .model-specs-3d { grid-column: 1 / -1; margin-bottom: 0; }
    .model-info-panel .btn-detail { grid-column: 1 / -1; }
    .showcase-hero .container { grid-template-columns: 1fr; }
    .showcase-hero__badge { display: none; }
}

@media (max-width: 600px) {
    .model-select { min-width: auto; width: 100%; }
    .showcase-model-select { flex-direction: column; align-items: stretch; }
    .viewer-wrap { aspect-ratio: 1/1; }
    .model-info-panel { grid-template-columns: 1fr; }
    .viewer-controls { gap: 5px; padding: 6px 10px; }
    .control-btn { width: 34px; height: 34px; font-size: 0.85rem; }
    .showcase-3d-section { padding: 40px 0 56px; }
}

/* ════════════════════════════════════════════
   ТЕМНА ТЕМА
════════════════════════════════════════════ */

/* Хлібні крихти */
body.dark-theme .breadcrumbs {
    background: #0A1120;
    border-bottom-color: rgba(255,255,255,0.08);
}
body.dark-theme .breadcrumbs__link { color: rgba(255,255,255,0.55); }
body.dark-theme .breadcrumbs__link:hover { color: var(--color-primary); }
body.dark-theme .breadcrumbs__item:not(:last-child)::after { color: rgba(255,255,255,0.3); }
body.dark-theme .breadcrumbs__item.active { color: #fff; }

/* Секція переглядача */
body.dark-theme .showcase-3d-section { background: #0A1120; }

body.dark-theme .showcase-model-select label { color: rgba(255,255,255,0.7); }
body.dark-theme .model-select {
    background-color: rgba(30,41,59,0.7);
    border-color: rgba(255,255,255,0.15);
    color: #fff;
    box-shadow: none;
}
body.dark-theme .model-select:hover,
body.dark-theme .model-select:focus {
    border-color: var(--color-primary);
}

/* viewer-wrap вже темний за задумом — без змін */

/* Інфо-панель */
body.dark-theme .model-info-panel {
    background: rgba(30,41,59,0.5);
    border-color: rgba(255,255,255,0.08);
    box-shadow: none;
}
body.dark-theme .model-info-panel h3 { color: #fff; }
body.dark-theme .model-specs-3d div {
    border-bottom-color: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.65);
}

body.dark-theme .viewer-hint { color: rgba(255,255,255,0.4); }

/* Hero вже на темному фоні з білим текстом — без змін */