/* ================================================================
   LGS Service CPT — service.css  v1.5.0
   ================================================================ */

/* ── Base ──────────────────────────────────────────────────────── */
#lgscpt-main    { width: 100%; box-sizing: border-box; }
.lgscpt-article { max-width: 1100px; margin: 0 auto; }

/* Default: desktop tampil, mobile sembunyi */
.lgscpt-mob  { display: none; }
.lgscpt-desk { display: block; }

/* ════════════════════════════════════════════════════════════════
   DESKTOP  ≥ 768px
   ════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {

    #lgscpt-main { padding: 12px 24px 32px; }

    /* Grid atas: gambar + kolom CTA */
    .lgscpt-above {
        display: grid;
        grid-template-columns: minmax(260px, 44%) 1fr;
        gap: 40px;
        align-items: start;
        margin-bottom: 32px;   /* jarak antara grid dan konten full-width */
    }

    .lgscpt-col-img img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 6px;
    }

    /* Konten panjang — full width di bawah grid */
    .lgscpt-below { /* tidak ada constraint lebar, ikut .lgscpt-article */ }

    .lgscpt-mob  { display: none !important; }
}

/* ════════════════════════════════════════════════════════════════
   MOBILE  < 768px
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

    #lgscpt-main { padding: 8px 16px 24px; }

    .lgscpt-desk { display: none !important; }
    .lgscpt-mob  { display: block; }

    /* Gambar auto-inject setelah paragraf ke-4 */
    .lgscpt-m-img {
        margin: 20px 0;
        border-radius: 8px;
        overflow: hidden;
    }
    .lgscpt-m-img img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 8px;
    }
}

/* ════════════════════════════════════════════════════════════════
   BREADCRUMB
   ════════════════════════════════════════════════════════════════ */
.lgscpt-bc { margin: 0 0 8px; }
.lgscpt-bc ol {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    line-height: 1.4;
    gap: 0;
}
.lgscpt-bc li { display: flex; align-items: center; color: #333333; }
.lgscpt-bc li + li::before {
    content: '';
    display: inline-block;
    width: 5px; height: 5px;
    border-right: 1.5px solid #bbb;
    border-top: 1.5px solid #bbb;
    transform: rotate(45deg);
    margin: 0 8px;
    flex-shrink: 0;
}
.lgscpt-bc a {
    color: #333333 !important;
    text-decoration: none;
    transition: color .15s;
}
.lgscpt-bc a:hover { color: #b81a50; text-decoration: underline; }

/* ════════════════════════════════════════════════════════════════
   H1
   ════════════════════════════════════════════════════════════════ */
.lgscpt-h1 {
    font-size: 1.45em;
    font-weight: 700;
    margin: 0 0 14px;
    color: #333;
    line-height: 1.35;
}
@media (max-width: 767px) { .lgscpt-h1 { font-size: 1.2em; } }

/* ════════════════════════════════════════════════════════════════
   CTA BOX  —  v1.1.0 style
   ════════════════════════════════════════════════════════════════ */
.lgscpt-cta {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 20px;
}

/* Baris variabel */
.lgscpt-var-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.lgscpt-var-label {
    font-size: .9em;
    color: #555;
    font-weight: 600;
    white-space: nowrap;
}

/* Dropdown — v1.1.0 */
.lgscpt-select {
    flex: 1;
    min-width: 160px;
    display: block;
    height: 38px;
    padding: 0 36px 0 12px;
    border: 1px solid rgba(32,7,7,.8);
    border-radius: 4px;
    font-size: 1em;
    color: #333;
    background: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 16px;
    background-position: calc(100% - 10px) 50%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 38px;
    vertical-align: middle;
}
.lgscpt-select:focus { outline: none; border-color: #b81a50; }

/* Harga — v1.1.0 */
.lgscpt-price {
    margin: 0 0 10px;
    font-size: 1em;
    color: #666;
    line-height: 1.4;
}
.lgscpt-price del    { color: #767676; margin-right: 6px; font-weight: 400; font-style: normal; }
.lgscpt-price strong { color: #b81a50; font-size: 1.25em; }
.lgscpt-price small  { font-size: .78em; color: #888; font-weight: 400; margin-right: 3px; }

/* Short description */
.lgscpt-short-desc {
    font-size: .92em;
    color: #555;
    line-height: 1.65;
    margin-bottom: 12px;
}
.lgscpt-short-desc:empty { margin-bottom: 0; }
.lgscpt-short-desc p  { margin: 0 0 4px; }
.lgscpt-short-desc ul { padding-left: 18px; margin: 3px 0 0; }
.lgscpt-short-desc li { margin-bottom: 3px; }

/* Tombol — v1.1.0 */
.lgscpt-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: #b81a50;
    color: #fff !important;
    text-align: center;
    font-weight: 700;
    font-size: 1em;
    padding: 13px 20px;
    border-radius: 4px;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .2s;
}
.lgscpt-btn:hover { background: #9a1542; }

/* ════════════════════════════════════════════════════════════════
   KONTEN — tidak ada override, biarkan tema
   ════════════════════════════════════════════════════════════════ */
.lgscpt-content img { max-width: 100%; height: auto; }

/* ════════════════════════════════════════════════════════════════
   MOBILE — var-row tetap horizontal (label + dropdown satu baris)
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    .lgscpt-var-row  { flex-wrap: nowrap; align-items: center; }
    .lgscpt-var-label { flex-shrink: 0; }
    .lgscpt-select   { min-width: 0; flex: 1; }
}

/* ════════════════════════════════════════════════════════════════
   MOBILE — Rating (.pgr) selalu di bawah CTA
   Plugin rating auto-inject di dalam <article>, sehingga muncul
   setelah konten. Gunakan flex order agar urutan terjamin:
   h1(1) → konten(2) → cta(3) → pgr/rating(4)
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    .lgscpt-mob {
        display: flex;
        flex-direction: column;
    }
    .lgscpt-mob .lgscpt-h1      { order: 1; }
    .lgscpt-mob .lgscpt-content { order: 2; }
    .lgscpt-mob .lgscpt-cta     { order: 3; }
    /* .pgr dan elemen rating lain yang di-inject setelah konten */
    .lgscpt-mob .pgr,
    .lgscpt-mob [class*="rating"],
    .lgscpt-mob [id*="rating"],
    .lgscpt-mob [class*="review"],
    .lgscpt-mob [class*="star"]  { order: 4; }
}

/* ════════════════════════════════════════════════════════════════
   Rating via shortcode [pgopt_rating]
   ════════════════════════════════════════════════════════════════ */

/* Mobile: jarak atas + padding kiri 17px */
.lgscpt-mob-rating {
    margin-top: 28px;
    padding-top: 20px;
    padding-left: 17px;
    border-top: 1px solid #f0f0f0;
}

/* Desktop: jarak atas, tanpa padding kiri */
.lgscpt-desk-rating {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}
