/* ========================================
   AYIRA MARKETPLACE - DETAIL PAGE (SHOW)
   public/css/marketplace-detail.css
   ✅ VERSION COMPLÈTE - Reproduit 100% du rendu original
   ✅ Compatible mode clair/sombre
   ======================================== */

/* ========================================
   RESET & BASE
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   CONTAINER & LAYOUT
   ======================================== */

.detail-container {
    min-height: 100vh;
    padding: 2rem 1rem;
    max-width: 1800px;
    margin: 0 auto;
    background: transparent;
}

/* ========================================
   BACK BUTTON
   ======================================== */

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(243, 156, 18, 0.3);
    color: var(--ayira-orange);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    font-weight: 500;
}

body.light-theme .back-button {
    background: #ffffff;
    border: 2px solid rgba(243, 156, 18, 0.4);
    color: var(--ayira-orange);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.back-button:hover {
    background: rgba(243, 156, 18, 0.1);
    transform: translateX(-5px);
    border-color: var(--ayira-orange);
}

body.light-theme .back-button:hover {
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

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

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

/* ========================================
   VISUAL SECTION
   ======================================== */

.visual-section {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.visual-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

body.light-theme .visual-container {
    background: #f8f9fa;
    border: 2px solid rgba(243, 156, 18, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.photo-view {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2rem;
}

.main-viewer {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#photo-viewer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#model-3d-viewer {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
}

/* ========================================
   VIEW TOGGLE (2D/3D)
   ======================================== */

.view-toggle {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.view-toggle-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(243, 156, 18, 0.3);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

body.light-theme .view-toggle-btn {
    background: #ffffff;
    border: 2px solid rgba(243, 156, 18, 0.3);
    color: #7f8c8d;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.view-toggle-btn.active {
    background: linear-gradient(135deg, var(--ayira-orange), var(--ayira-red));
    border-color: transparent;
    color: white;
}

.view-toggle-btn:hover:not(.active) {
    background: rgba(243, 156, 18, 0.1);
    border-color: var(--ayira-orange);
}

body.light-theme .view-toggle-btn:hover:not(.active) {
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.2);
}

/* ========================================
   THUMBNAILS GALLERY
   ======================================== */

.thumbnails-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.thumbnail-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

body.light-theme .thumbnail-item {
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.thumbnail-item:hover {
    border-color: var(--ayira-orange);
    transform: scale(1.05);
}

.thumbnail-item.active {
    border-color: var(--ayira-orange);
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.5);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem;
    text-align: center;
}

body.light-theme .thumbnail-label {
    background: rgba(0, 0, 0, 0.7);
}

/* ========================================
   AUDIO SECTION
   ======================================== */

.audio-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

body.light-theme .audio-section {
    background: #ffffff;
    border: 2px solid rgba(243, 156, 18, 0.25);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.audio-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--ayira-orange);
    font-size: 1.1rem;
    font-weight: 600;
}

.audio-languages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.audio-language-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(243, 156, 18, 0.2);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

body.light-theme .audio-language-item {
    background: #fafbfc;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.audio-lang-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.audio-lang-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: white;
    transition: color 0.3s ease;
}

body.light-theme .audio-lang-name {
    color: #2c3e50;
}

.audio-lang-flag {
    font-size: 1.2rem;
}

.audio-duration {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

body.light-theme .audio-duration {
    color: #7f8c8d;
    font-weight: 600;
}

.audio-player {
    width: 100%;
    height: 40px;
    border-radius: 6px;
}

/* ========================================
   INFO SECTION
   ======================================== */

.info-section {
    color: white;
    transition: color 0.3s ease;
}

body.light-theme .info-section {
    color: #1a1a1a;
}

.product-badge-detail {
    display: inline-block;
    background: linear-gradient(135deg, var(--ayira-orange), var(--ayira-red));
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.product-title-detail {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 700;
    transition: color 0.3s ease;
}

body.light-theme .product-title-detail {
    color: #1a1a1a;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid rgba(243, 156, 18, 0.3);
    color: var(--ayira-orange);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

body.light-theme .category-badge {
    background: #fef9f3;
    border: 2px solid rgba(243, 156, 18, 0.4);
}

/* ========================================
   ARTIST CARD
   ======================================== */

.artist-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(243, 156, 18, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s ease;
}

body.light-theme .artist-card {
    background: #ffffff;
    border: 2px solid rgba(243, 156, 18, 0.3);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.artist-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--ayira-orange);
}

.artist-info {
    flex: 1;
}

.artist-info h3 {
    font-size: 1.3rem;
    color: var(--ayira-orange);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.artist-country {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

body.light-theme .artist-country {
    color: #7f8c8d;
    font-weight: 500;
}

.artist-info p {
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
    transition: color 0.3s ease;
}

body.light-theme .artist-info p {
    color: #5a6c7d;
    font-weight: 500;
}

/* ========================================
   PRICE SECTION
   ======================================== */

.price-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(243, 156, 18, 0.2);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

body.light-theme .price-section {
    background: #fef9f3;
    border: 2px solid rgba(243, 156, 18, 0.4);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.price-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

body.light-theme .price-label {
    color: #7f8c8d;
    font-weight: 600;
}

.price-value {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: var(--gold);
    font-weight: 700;
}

.price-currency {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 0.5rem;
    transition: color 0.3s ease;
}

body.light-theme .price-currency {
    color: #7f8c8d;
    font-weight: 600;
}

/* ========================================
   DESCRIPTION SECTION
   ======================================== */

.description-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

body.light-theme .description-section {
    background: #ffffff;
    border: 2px solid rgba(243, 156, 18, 0.25);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.description-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--ayira-orange);
    margin-bottom: 1.5rem;
}

.description-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    font-size: 1.05rem;
    transition: color 0.3s ease;
}

body.light-theme .description-text {
    color: #2c3e50;
    font-weight: 500;
}

/* ========================================
   SPECS SECTION
   ======================================== */

.specs-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

body.light-theme .specs-section {
    background: #fafbfc;
    border: 2px solid rgba(243, 156, 18, 0.25);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.specs-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--ayira-orange);
    margin-bottom: 1.5rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s ease;
}

body.light-theme .spec-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    transition: color 0.3s ease;
}

body.light-theme .spec-label {
    color: #7f8c8d;
    font-weight: 600;
}

.spec-value {
    color: white;
    font-weight: 600;
    transition: color 0.3s ease;
}

body.light-theme .spec-value {
    color: #2c3e50;
    font-weight: 700;
}

/* ========================================
   ACTION BUTTONS
   ======================================== */

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary {
    flex: 1;
    background: linear-gradient(135deg, var(--ayira-orange), var(--ayira-red));
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(243, 156, 18, 0.3);
    color: var(--ayira-orange);
    padding: 1.25rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

body.light-theme .btn-secondary {
    background: #ffffff;
    border: 2px solid rgba(243, 156, 18, 0.4);
    color: var(--ayira-orange);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover {
    background: rgba(243, 156, 18, 0.1);
    border-color: var(--ayira-orange);
}

body.light-theme .btn-secondary:hover {
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.btn-download {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.btn-download:hover {
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.4);
}

.btn-preview {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    border: none;
    color: white;
}

.btn-preview:hover {
    background: linear-gradient(135deg, #8e44ad, #732d91);
    box-shadow: 0 10px 30px rgba(142, 68, 173, 0.4);
}

.btn-preview i {
    font-size: 1.2rem;
}

/* ========================================
   MEDIA PREVIEW MODAL
   ======================================== */

.media-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
}

body.light-theme .media-preview-modal {
    background: rgba(255, 255, 255, 0.95);
}

.media-preview-modal.active {
    display: flex;
}

.preview-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: rgba(26, 26, 26, 0.95);
    border-radius: 20px;
    border: 2px solid rgba(243, 156, 18, 0.3);
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease-out;
}

body.light-theme .preview-content {
    background: #fafbfc;
    border: 2px solid rgba(243, 156, 18, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s ease;
}

body.light-theme .preview-header {
    border-bottom: 2px solid rgba(243, 156, 18, 0.2);
}

.preview-title {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--ayira-orange);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.preview-title i {
    font-size: 1.5rem;
}

.close-preview {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(243, 156, 18, 0.3);
    color: var(--ayira-orange);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

body.light-theme .close-preview {
    background: rgba(0, 0, 0, 0.05);
    border: 2px solid rgba(243, 156, 18, 0.4);
}

.close-preview:hover {
    background: rgba(243, 156, 18, 0.2);
    transform: rotate(90deg);
}

.preview-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.video-preview-container {
    position: relative;
    width: 100%;
    max-height: 600px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

body.light-theme .video-preview-container {
    background: #1a1a1a;
}

.video-preview-container video {
    width: 100%;
    height: auto;
    max-height: 600px;
    display: block;
}

.audio-preview-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.audio-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(243, 156, 18, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

body.light-theme .audio-item {
    background: #ffffff;
    border: 2px solid rgba(243, 156, 18, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.audio-header-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.audio-language-badge {
    background: linear-gradient(135deg, var(--ayira-orange), var(--ayira-red));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.audio-duration-preview {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

body.light-theme .audio-duration-preview {
    color: #7f8c8d;
    font-weight: 600;
}

.audio-player-wrapper {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
}

body.light-theme .audio-player-wrapper {
    background: rgba(0, 0, 0, 0.05);
}

.audio-player-wrapper audio {
    width: 100%;
    height: 54px;
    border-radius: 8px;
}

/* Custom audio player styling */
audio::-webkit-media-controls-panel {
    background: rgba(243, 156, 18, 0.1);
}

audio::-webkit-media-controls-play-button {
    background-color: var(--ayira-orange);
    border-radius: 50%;
}

.preview-info {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    transition: all 0.3s ease;
}

body.light-theme .preview-info {
    background: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #5a6c7d;
    font-weight: 500;
}

.preview-info strong {
    color: var(--ayira-orange);
}

.preview-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-preview-action {
    flex: 1;
    padding: 1rem 2rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-preview-purchase {
    background: linear-gradient(135deg, var(--ayira-orange), var(--ayira-red));
    color: white;
}

.btn-preview-purchase:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(243, 156, 18, 0.4);
}

/* ========================================
   SIMILAR SECTION
   ======================================== */

.similar-section {
    margin-top: 4rem;
}

.similar-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--ayira-orange);
    margin-bottom: 2rem;
    text-align: center;
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@media (max-width: 1200px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .visual-section {
        position: relative;
        top: 0;
    }

    .visual-container {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .detail-container {
        padding: 1rem;
    }

    .product-title-detail {
        font-size: 2rem;
    }

    .price-value {
        font-size: 2rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .visual-container {
        height: 400px;
    }

    .thumbnails-gallery {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .preview-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 95vh;
        overflow-y: auto;
    }

    .preview-title {
        font-size: 1.3rem;
    }

    .video-preview-container {
        max-height: 400px;
    }

    .preview-actions {
        flex-direction: column;
    }
}