/* ==========================================================================
   VFAV Built-in Detail Page Template
   Dark theme — uses !important to override The7 theme styles
   ========================================================================== */

/* Page background */
#main {
    background: #1a1a1a !important;
}

#main > .wf-wrap {
    background: #1a1a1a !important;
}

.vfav-detail-page {
    background: #1a1a1a !important;
    color: #c0c0c0 !important;
    min-height: 80vh;
    padding: 0 20px 40px;
}

.vfav-detail-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0;
}

/* ==========================================================================
   Section A: Artwork Image (Single Frame)
   ========================================================================== */
.vfav-detail-artwork-image {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 10px 0;
}

.vfav-detail-artwork-image img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.vfav-detail-no-image {
    color: #666;
    font-size: 18px;
    text-align: center;
    padding: 100px 0;
}

/* ==========================================================================
   Section A: Multi-Frame Thumbnail Grid
   ========================================================================== */
.vfav-detail-frame-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px 0;
}

.vfav-detail-frame-card {
    background: #222 !important;
    border: 1px solid #333 !important;
    border-radius: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.vfav-detail-frame-thumb {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
}

.vfav-detail-frame-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.vfav-detail-frame-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #555;
    font-size: 12px;
    width: 100%;
    height: 100%;
}

.vfav-detail-frame-info {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #222 !important;
    border-top: 1px solid #333;
}

.vfav-detail-frame-title {
    font-size: 13px;
    color: #aaa !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Frame card View button — identical to nav buttons */
.vfav-detail-page .vfav-detail-frame-view-btn,
.vfav-detail-page button.vfav-detail-frame-view-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ccc !important;
    border: 1px solid #555 !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: background 0.2s, color 0.2s, border-color 0.2s !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.vfav-detail-page .vfav-detail-frame-view-btn:hover,
.vfav-detail-page button.vfav-detail-frame-view-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    border-color: #888 !important;
}

/* ==========================================================================
   Section B: Title + Divider
   ========================================================================== */
.vfav-detail-page .vfav-detail-title {
    font-size: 20px !important;
    font-weight: 400 !important;
    font-style: italic !important;
    color: #e5e5e5 !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 0 10px 0 !important;
    line-height: 1.4 !important;
}

/* Divider goes UNDER the title, no margin */
.vfav-detail-divider {
    border: none !important;
    border-top: 1px solid #444 !important;
    margin: 0 !important;
}

/* ==========================================================================
   Sections C-F: Action Buttons — ALL identical styling
   ========================================================================== */
.vfav-detail-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
    margin-bottom: 25px;
}

/* Unified button style for ALL buttons (links and buttons) */
.vfav-detail-page .vfav-detail-btn,
.vfav-detail-page a.vfav-detail-btn,
.vfav-detail-page button.vfav-detail-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 16px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    line-height: 1.4 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ccc !important;
    border: 1px solid #555 !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    transition: background 0.2s, color 0.2s, border-color 0.2s !important;
}

.vfav-detail-page .vfav-detail-btn:hover,
.vfav-detail-page a.vfav-detail-btn:hover,
.vfav-detail-page button.vfav-detail-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    border-color: #888 !important;
    text-decoration: none !important;
}

/* ==========================================================================
   Section G: Artwork Info — flexbox row centered
   ========================================================================== */
.vfav-detail-info {
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding: 0;
}

.vfav-detail-info-inner {
    display: flex;
    flex-direction: column;
}

.vfav-detail-info-line {
    margin: 0 0 6px;
    padding: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #aaa;
}

.vfav-detail-info-line:empty {
    display: none;
}

/* All links in info — #aaa underlined, white on hover */
.vfav-detail-page .vfav-detail-info-line a {
    color: #aaa !important;
    text-decoration: underline !important;
}

.vfav-detail-page .vfav-detail-info-line a:hover {
    color: #fff !important;
}

/* Shortcode field styling within detail page */
.vfav-detail-info .vfav-field-label {
    color: #ccc;
}

.vfav-detail-info .vfav-field-value {
    color: #aaa;
}

/* BUY link — same as other links */
.vfav-detail-page .vfav-detail-info .vfav-buy-link {
    color: #aaa !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
}

.vfav-detail-page .vfav-detail-info .vfav-buy-link:hover {
    color: #fff !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .vfav-detail-frame-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .vfav-detail-page {
        padding: 0 15px 30px;
    }
    
    .vfav-detail-frame-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .vfav-detail-artwork-image {
        min-height: 50vh;
    }
    
    .vfav-detail-artwork-image img {
        max-height: 50vh;
    }
    
    .vfav-detail-page .vfav-detail-title {
        font-size: 16px !important;
    }
    
    /* View button on its own row, nav buttons on second row */
    .vfav-detail-actions {
        gap: 8px;
    }
    
    /* Force viewer button onto its own line */
    .vfav-detail-page .vfav-detail-btn-viewer {
        flex-basis: 100% !important;
        width: auto !important;
        text-align: center !important;
        justify-content: center !important;
    }
    
    /* Nav buttons share the second row equally */
    .vfav-detail-page .vfav-detail-btn-nav {
        flex: 1 !important;
        justify-content: center !important;
        min-width: 0 !important;
    }
    
    .vfav-detail-page .vfav-detail-btn {
        font-size: 12px !important;
    }
}
