/* =============================================================
   GilaDiskon — Single Deal Page Styles
   ============================================================= */

/* ── Base reset for single post body ── */
body.gd-single-post {
    background: #f7f7f7;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #333;
    margin: 0;
    padding: 0;
}

body.gd-single-post *,
body.gd-single-post *::before,
body.gd-single-post *::after {
    box-sizing: border-box;
}

/* ── Main wrapper ── */
.gd-single-main {
    padding: 32px 0 48px;
    min-height: 60vh;
}

/* ── Hero: 2-column layout ── */
.gd-single-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    background: #fff;
    border-radius: 8px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

/* Left: image column */
.gd-single-image-col {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.gd-single-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    object-fit: contain;
    max-height: 420px;
}

/* Right: meta column */
.gd-single-meta-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Title */
.gd-single-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
    color: #222;
    margin: 0;
}

/* Expiry date */
.gd-single-expiry {
    font-size: 0.9rem;
    color: #E53935;
    margin: 0;
    font-weight: 500;
}

.gd-single-expiry strong {
    font-weight: 700;
}

/* ── Share section ── */
.gd-single-share {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gd-share-label {
    font-size: 0.85rem;
    color: #555;
    font-weight: 500;
    white-space: nowrap;
}

.gd-share-buttons {
    display: flex;
    gap: 6px;
}

.gd-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity .15s;
    flex-shrink: 0;
}

.gd-share-btn:hover {
    opacity: .85;
}

.gd-share-fb { background: #1877F2; }
.gd-share-tw { background: #1DA1F2; }
.gd-share-wa { background: #25D366; }
.gd-share-em { background: #888;    }

/* ── Tags ── */
.gd-single-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gd-tag-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: #f0f0f0;
    color: #555;
    font-size: 0.78rem;
    text-decoration: none;
    transition: background .15s, color .15s;
    border: 1px solid #e0e0e0;
}

.gd-tag-pill:hover {
    background: #E53935;
    color: #fff;
    border-color: #E53935;
}

/* ── "Tentang Deals" content section ── */
.gd-single-content-wrap {
    background: #fff;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.gd-single-content-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.gd-single-content {
    font-size: 0.92rem;
    line-height: 1.75;
    color: #444;
}

.gd-single-content p {
    margin: 0 0 14px;
}

.gd-single-content p:last-child {
    margin-bottom: 0;
}

.gd-single-content ul,
.gd-single-content ol {
    margin: 0 0 14px 20px;
    padding: 0;
}

.gd-single-content li {
    margin-bottom: 6px;
}

.gd-single-content strong,
.gd-single-content b {
    font-weight: 600;
    color: #222;
}

.gd-single-content a {
    color: #E53935;
    text-decoration: none;
}

.gd-single-content a:hover {
    text-decoration: underline;
}

/* ── Expired state on single deal page ── */

.gd-single-expired-badge {
    display: inline-block;
    background: #757575;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 4px 10px;
    border-radius: 4px;
}

.gd-single-hero--expired .gd-single-img {
    filter: grayscale(40%);
    opacity: .85;
}

.gd-single-expiry--expired {
    color: #999;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .gd-single-hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .gd-single-title {
        font-size: 1.1rem;
    }

    .gd-single-main {
        padding: 16px 0 32px;
    }

    .gd-single-content-wrap {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .gd-single-hero { padding: 16px; gap: 16px; }
    .gd-single-title { font-size: 1rem; }
    .gd-single-main { padding: 12px 0 24px; }
    .gd-single-content-wrap { padding: 16px; }
}

/* ── Image lightbox trigger button ── */
.gd-single-img-btn {
    position: relative;
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: zoom-in;
    border-radius: 6px;
    overflow: hidden;
}

.gd-single-img-btn:focus-visible {
    outline: 2px solid #E53935;
    outline-offset: 2px;
}

.gd-single-img-btn .gd-single-img {
    display: block;
    transition: transform .2s ease;
}

.gd-single-img-btn:hover .gd-single-img {
    transform: scale(1.02);
}

.gd-single-img-zoom {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}

.gd-single-img-btn:hover .gd-single-img-zoom {
    opacity: 1;
}

/* ── Lightbox overlay ── */
.gd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gd-lightbox[hidden] {
    display: none;
}

.gd-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .88);
    cursor: zoom-out;
}

.gd-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gd-lightbox-img {
    display: block;
    max-width: 92vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .6);
    object-fit: contain;
}

.gd-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 2;
    background: rgba(255, 255, 255, .15);
    border: none;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.gd-lightbox-close:hover {
    background: rgba(255, 255, 255, .3);
}

.gd-lightbox-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
