/* ========================================
   TRANH NGANG DETAIL v1.0
   Style giống BlogProduct (wiki layout)
   ======================================== */

/* ========== FONT ========== */
@font-face {
    font-family: 'AIAEverest-Regular';
    src: url('/assets/fonts/tamancac/AIAEverest-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ========== TITLE ========== */
.hgd-title {
    font-size: 32px;
    font-weight: 700;
    color: #8B0000;
    text-align: center;
    margin-bottom: 20px;
    font-family: 'GanhType', Georgia, serif;
}

/* ========== IMAGE VIEWER ========== */
.hgd-viewer {
    margin-bottom: 30px;
}

.hgd-viewer-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f8f8;
    border: 1px solid #eee;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.hgd-viewer-scroll {
    overflow: hidden;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 200px);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hgd-viewer-scroll::-webkit-scrollbar { display: none; }
.hgd-viewer-scroll:active { cursor: grabbing; }

.hgd-main-img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease;
    user-select: none;
    -webkit-user-drag: none;
}

/* Zoom controls */
.hgd-zoom-controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 6px;
    z-index: 5;
}

.hgd-zoom-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: rgba(255,255,255,0.95);
    color: #444;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.hgd-zoom-btn:hover {
    background: #222;
    color: #fff;
    border-color: #222;
}

/* Hint */
.hgd-img-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    pointer-events: none;
    transition: opacity 0.5s;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.5);
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(8px);
}

.hgd-img-hint.hidden { opacity: 0; }

/* ========== WIKI LAYOUT ========== */
.hgd-wiki-layout {
    display: flex;
    gap: 35px;
    align-items: flex-start;
    margin-top: 30px;
}

.hgd-wiki-left {
    flex: 1;
    padding-right: 10px;
}

.hgd-wiki-content {
    font-size: 17px;
    color: #352e27;
    line-height: 1.7;
    font-family: 'AIAEverest-Regular', sans-serif;
}

.hgd-info-card {
    background: #f8f7f7;
    padding: 18px 20px;
    margin-top: 25px;
    border-radius: 6px;
    color: #3d2f23;
    font-size: 16px;
    line-height: 1.6;
}

/* ========== INFOBOX ========== */
.hgd-infobox {
    width: 400px;
    background: #faf7f2;
    border: 1px solid #d8cfc4;
    border-radius: 8px;
    padding: 15px;
    flex-shrink: 0;
}

.hgd-infobox-image img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #ddd;
    cursor: pointer;
}

.hgd-collect-btn {
    display: block;
    width: fit-content;
    min-width: 220px;
    margin: 15px auto;
    padding: 12px 24px;
    text-align: center;
    background-color: #796254;
    color: #fff;
    border-radius: 999px;
    border: none;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.4s ease;
}

.hgd-collect-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    color: #fff;
}

/* ========== META TABLE ========== */
.hgd-infobox-meta {
    margin-top: 18px;
    background: #f4f2ed;
    border: 1px solid #d8d2c8;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 15px;
    color: #3b2f25;
}

.hgd-meta-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: #4b392d;
    margin-bottom: 12px;
}

.hgd-meta-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.hgd-meta-table th {
    width: 35%;
    text-align: left;
    font-weight: 600;
    padding: 6px 4px;
    color: #574737;
    vertical-align: top;
    word-wrap: break-word;
}

.hgd-meta-table td {
    padding: 6px 4px;
    color: #2d241b;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ========== PREV/NEXT NAV ========== */
.hgd-painting-nav {
    padding: 24px 0;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.hgd-nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #999;
    transition: all 0.3s;
    padding: 12px 18px;
    border-radius: 10px;
}

.hgd-nav-link:hover {
    color: #333;
    background: #f8f8f8;
}

.hgd-nav-label {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8B6914;
}

.hgd-nav-name {
    font-size: 13px;
    margin-top: 3px;
}

.hgd-nav-thumb {
    width: 72px;
    height: 45px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #eee;
}

/* ========== RELATED ========== */
.hgd-related {
    padding: 30px 0 40px;
    border-top: 1px solid #eee;
}

.hgd-related h2 {
    color: #222;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 24px;
    font-family: 'GanhType', Georgia, serif;
}

.hgd-related-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hgd-related-grid::-webkit-scrollbar { display: none; }

.hgd-rel-card {
    flex: 0 0 260px;
    scroll-snap-align: start;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee;
    transition: all 0.3s;
    text-decoration: none;
}

.hgd-rel-card:hover {
    border-color: #ccc;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.hgd-rel-card img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.hgd-rel-card .info {
    padding: 12px;
}

.hgd-rel-card .info span {
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #8B6914;
}

.hgd-rel-card .info p {
    font-size: 12px;
    color: #444;
    margin: 3px 0 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .hgd-wiki-layout {
        flex-direction: column-reverse;
    }

    .hgd-infobox {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .hgd-title {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .hgd-viewer-scroll {
        height: calc(100vh - 130px);
    }

    .hgd-wiki-layout {
        gap: 20px;
        margin-top: 20px;
    }

    .hgd-wiki-left {
        padding-right: 0;
    }

    .hgd-wiki-content {
        font-size: 15px;
    }

    .hgd-info-card {
        font-size: 14px;
        padding: 14px 16px;
    }

    .hgd-painting-nav {
        padding: 16px 0;
        gap: 8px;
    }

    .hgd-nav-link {
        gap: 8px;
        padding: 8px 10px;
    }

    .hgd-nav-thumb {
        width: 50px;
        height: 32px;
    }

    .hgd-nav-label { font-size: 9px; }
    .hgd-nav-name { font-size: 11px; }

    .hgd-related h2 {
        font-size: 18px;
        letter-spacing: 2px;
    }

    .hgd-rel-card {
        flex: 0 0 180px;
    }

    .hgd-zoom-controls {
        bottom: 8px;
        right: 8px;
    }

    .hgd-zoom-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .hgd-collect-btn {
        font-size: 11px;
        padding: 8px 16px;
        min-width: unset;
        width: 100%;
        letter-spacing: 1px;
    }
}
