/* Revisi 04 — verified image-based product viewer, material editorial and custom journey. */
.r4-viewer, .r4-viewer-slot, .r4-viewer-panel { min-width: 0; width: 100%; }
.r4-viewer-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1.16;
    max-height: min(660px, 68vh);
    overflow: hidden;
    border: 1px solid var(--r2-line);
    background: #fff;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
}
body.aliva-r2 .r4-viewer-stage > img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
    object-position: center;
    transform-origin: center;
    transform: translate3d(0, 0, 0) scale(1);
    transition: opacity 140ms ease;
    -webkit-user-drag: none;
    user-select: none;
}
.r4-viewer-stage[data-zoomed] { touch-action: none; cursor: move; }
.r4-viewer-stage[data-dragging] { cursor: grabbing; }
.r4-viewer-stage[data-loading] > img { opacity: .22; }
.r4-viewer-stage[data-loading]::after {
    content: 'Memuat foto';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 8px 12px;
    background: #fff;
    color: var(--r2-muted);
    font-size: 13px;
    pointer-events: none;
}
.r4-stage-caption {
    position: absolute;
    bottom: 12px;
    left: 12px;
    max-width: calc(100% - 24px);
    padding: 7px 11px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--r2-line);
    color: var(--r2-ink);
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
    pointer-events: none;
}
body.aliva-r2 .r4-viewer-expand {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    background: #fff;
}
.r4-viewer-expand .r2-icon { width: 20px; height: 20px; }
.r4-viewer-message {
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: max-content; max-width: 88%;
    padding: 16px; background: #fff; border: 1px solid var(--r2-line);
    font-size: 14px; text-align: center;
}
body.aliva-r2 .r4-viewer-message a { text-decoration: underline; }
.r4-viewer-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 18px;
    padding: 12px 0;
    border-bottom: 1px solid var(--r2-line);
}
.r4-angle-controls, .r4-angle-buttons, .r4-zoom-controls { display: flex; align-items: center; min-width: 0; }
.r4-angle-controls { gap: 7px; }
.r4-angle-buttons { gap: 0; }
body.aliva-r2 .r4-angle-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 15px;
    border: 1px solid var(--r2-line);
    border-radius: 0;
    background: #fff;
    color: var(--r2-ink);
    box-shadow: none;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 500;
    cursor: pointer;
}
body.aliva-r2 .r4-angle-buttons button + button { margin-left: -1px; }
body.aliva-r2 .r4-angle-controls button[aria-pressed="true"] {
    position: relative;
    z-index: 1;
    background: var(--r3-walnut);
    color: #fff;
    border-color: var(--r3-walnut);
}
body.aliva-r2 .r4-angle-controls button:not([aria-pressed="true"]):hover { border-color: var(--r3-walnut); }
.r4-zoom-controls { gap: 3px; }
body.aliva-r2 .r4-zoom-controls .r3-icon-button { width: 44px; min-width: 44px; height: 44px; }
.r4-zoom-controls .r2-icon { width: 19px; height: 19px; }
body.aliva-r2 .r4-zoom-controls .r3-icon-button:disabled { opacity: .4; cursor: default; }
.r4-zoom-controls output { display: block; min-width: 54px; color: var(--r2-ink); text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
body.aliva-r2 .r4-viewer-help { color: var(--r2-muted); font-size: 13px; line-height: 1.45; margin: 10px 0 0; }
body.aliva-r2 .r4-viewer-status { margin: 8px 0 0; }
.r4-photo-list { margin-top: 15px; }
body.aliva-r2 .r4-photo-list summary {
    display: flex;
    width: fit-content;
    min-height: 45px;
    align-items: center;
    gap: 17px;
    padding: 9px 14px;
    border: 1px solid var(--r2-line);
    background: #fff;
    color: var(--r2-ink);
    font-size: 14px;
    font-weight: 500;
    list-style: none;
    cursor: pointer;
}
.r4-photo-list summary::-webkit-details-marker { display: none; }
.r4-photo-list summary .r2-icon { width: 17px; height: 17px; }
.r4-photo-list[open] summary .r2-icon { transform: rotate(180deg); }
.r4-photo-list-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px 12px; margin-top: 13px; }
.r4-other-photo { display: block; min-width: 0; }
.r4-other-photo-image { display: block; overflow: hidden; aspect-ratio: 1; background: #fff; border: 1px solid var(--r2-line); }
body.aliva-r2 .r4-other-photo-image img { width: 100%; height: 100%; object-fit: contain; }
body.aliva-r2 .r4-other-photo[data-photo-role="closeup"] img { transform: scale(1.5); transform-origin: 50% 27%; }
.r4-other-photo-label { display: block; color: var(--r2-muted); font-size: 13px; margin-top: 6px; line-height: 1.35; }
.r4-other-photo:hover .r4-other-photo-image { border-color: var(--r3-walnut); }
/* Compact rows for the four or five catalogue photographs retained in Revisi 08. */
@media (min-width: 1200px) {
    .r4-photo-list-grid:has(> .r4-other-photo:nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .r4-photo-list-grid:has(> .r4-other-photo:nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 768px) and (max-width: 1199px) {
    .r4-photo-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

body.aliva-r2 .r4-viewer-dialog {
    position: fixed;
    inset: 0;
    width: min(96vw, 1060px);
    max-width: 96vw;
    max-height: 94vh;
    max-height: 94dvh;
    padding: 0;
    margin: auto;
    border: 1px solid var(--r2-line);
    border-radius: 0;
    background: #fff;
    color: var(--r2-ink);
    overflow: auto;
    overscroll-behavior: contain;
}
.r4-viewer-dialog[open] { display: flex; flex-direction: column; }
.r4-viewer-dialog::backdrop { background: rgba(18, 15, 12, .78); }
.r4-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--r2-line); font-weight: 600; font-size: 15px; }
.r4-dialog-heading > span { min-width: 0; overflow-wrap: anywhere; }
.r4-dialog-content { padding: 14px; min-width: 0; }
.r4-dialog-content .r4-viewer-stage { aspect-ratio: auto; height: min(66vh, 740px); height: min(66dvh, 740px); max-height: none; }

/* A single ivory surface with equally tall product and material photographs. */
.r3-detail-summary.r4-material-summary {
    --detail-padding: clamp(20px, 2.7vw, 38px);
    --detail-gap: clamp(20px, 2.35vw, 34px);
    --detail-photo-height: clamp(220px, 23vw, 326px);
    grid-template-columns: minmax(0, 1.66fr) minmax(0, 1fr);
    align-items: start;
    gap: var(--detail-gap);
    padding: var(--detail-padding);
    background: var(--r3-ivory);
}
.r3-detail-summary.r4-material-summary[data-no-material] { grid-template-columns: minmax(0, 1fr); }
.r4-material-product { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1fr); align-items: center; gap: var(--detail-gap); min-width: 0; min-height: var(--detail-photo-height); }
.r4-material-product .r3-detail-product-image { width: 100%; max-width: none; height: var(--detail-photo-height); aspect-ratio: auto; align-self: start; justify-self: stretch; border: 1px solid var(--r3-brown-line); }
body.aliva-r2 .r4-material-product .r3-detail-description h3 { font-size: clamp(21px, 2vw, 30px); }
.r4-material-product .r3-detail-description .r2-btn { margin-top: 20px; }
.r4-material-photo { display: block; margin: 0; min-width: 0; padding: 0; border: 0; align-self: start; background: transparent; }
body.aliva-r2 .r4-material-photo img {
    display: block;
    width: 100%;
    height: var(--detail-photo-height);
    aspect-ratio: auto;
    min-height: 0;
    flex: none;
    object-fit: cover;
    object-position: 50% 56%;
    border: 1px solid var(--r3-brown-line);
}
@media (min-width: 1024px) {
    .r4-material-summary[data-no-material] .r4-material-product { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
}

/* Editorial photography cards with a single contextual route per service. */
.r4-option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.r4-option-card { display: flex; min-width: 0; flex-direction: column; background: var(--r3-ivory); }
.r4-option-photo { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #ded7cc; }
body.aliva-r2 .r4-option-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.r4-option-card:hover .r4-option-photo img { transform: scale(1.025); }
.r4-option-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 21px 22px 18px; }
body.aliva-r2 .r4-option-copy h3 { font-size: 24px; }
.r4-option-copy p { margin-top: 8px; color: var(--r2-muted); line-height: 1.5; }
.r4-option-link { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding-top: 12px; margin-top: auto; font-size: 14px; font-weight: 600; color: var(--r3-walnut); }
.r4-option-link .r2-icon { width: 20px; height: 20px; }
.r4-option-card:hover .r4-option-link > span { text-decoration: underline; text-underline-offset: 3px; }
body.aliva-r2 .r4-editorial-caption { margin-top: 11px; color: var(--r2-muted); font-size: 12px; }

/* Each desktop connector runs from its marker's center to the next marker's center. */
.r4-journey-list { --journey-gap: 18px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--journey-gap); list-style: none; margin: 0; padding: 24px; background: var(--r3-ivory); }
.r4-journey-item { position: relative; min-width: 0; }
.r4-journey-marker { position: relative; display: flex; align-items: center; justify-content: center; height: 42px; margin-bottom: 16px; }
.r4-journey-marker span { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 37px; min-width: 37px; height: 37px; padding: 0; background: var(--r3-walnut); color: #fff; border-radius: 50%; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.r4-journey-item:not(:last-child) .r4-journey-marker::after { content: ''; position: absolute; top: 50%; left: 50%; width: calc(100% + var(--journey-gap)); height: 1px; transform: translateY(-50%); background: #b6a497; }
.r4-journey-photo { aspect-ratio: 3 / 2; overflow: hidden; background: #ded7cc; }
body.aliva-r2 .r4-journey-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.r4-journey-text { padding: 13px 0 5px; }
body.aliva-r2 .r4-journey-text h3 { font-size: clamp(17px, 1.5vw, 19px); line-height: 1.25; min-height: 2.5em; overflow-wrap: break-word; }
.r4-journey-text p { margin-top: 8px; color: var(--r2-muted); font-size: 14px; line-height: 1.5; }

@media (max-width: 1199px) {
    .r4-option-copy { padding: 18px; }
    .r4-journey-list { --journey-gap: 13px; padding: 19px; }
}
@media (max-width: 1023px) {
    .r4-viewer-stage { aspect-ratio: 1; max-height: 72vh; }
    .r4-viewer-toolbar { gap: 8px 12px; }
    .r3-detail-summary.r4-material-summary { --detail-padding: 24px; --detail-gap: 24px; grid-template-columns: minmax(0, 1fr); }
    .r4-material-product { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); min-height: 0; }
    .r4-material-product .r3-detail-product-image { justify-self: center; max-width: 270px; height: auto; aspect-ratio: 1; }
    body.aliva-r2 .r4-material-photo img { height: auto; aspect-ratio: 2 / 1; }
    .r4-option-grid { gap: 14px; }
    body.aliva-r2 .r4-option-copy h3 { font-size: 21px; }
    .r4-option-copy { padding: 15px; }
    .r4-option-copy p { font-size: 14px; min-height: 0; }
    .r4-journey-list { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 22px; }
    .r4-journey-item { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 17px; padding-bottom: 26px; }
    .r4-journey-item:last-child { padding-bottom: 0; }
    .r4-journey-marker { height: 37px; align-items: flex-start; margin-bottom: 0; }
    .r4-journey-item:not(:last-child) .r4-journey-marker::after { display: none; }
    .r4-journey-item:not(:last-child)::before { content: ''; position: absolute; top: 18.5px; bottom: -18.5px; left: 19px; width: 1px; background: #b6a497; }
    .r4-journey-content { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); align-items: center; gap: 22px; min-width: 0; }
    .r4-journey-text { padding: 0; }
    body.aliva-r2 .r4-journey-text h3 { font-size: 19px; min-height: 0; }
}
@media (max-width: 767px) {
    .r4-viewer-stage { max-height: none; aspect-ratio: 1; }
    .r4-stage-caption { left: 8px; bottom: 8px; padding: 6px 9px; font-size: 12px; }
    body.aliva-r2 .r4-viewer-expand { top: 8px; right: 8px; }
    .r4-viewer-toolbar { padding: 10px 0; gap: 8px; }
    body.aliva-r2 .r4-angle-controls button { padding: 8px 12px; font-size: 13px; }
    .r4-zoom-controls { gap: 2px; }
    .r4-zoom-controls output { min-width: 47px; }
    body.aliva-r2 .r4-viewer-help { font-size: 12px; }
    .r4-photo-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .r4-dialog-heading { padding: 7px 9px; font-size: 14px; }
    .r4-dialog-content { padding: 9px; }
    .r4-dialog-content .r4-viewer-stage { height: min(58vh, 490px); height: min(58dvh, 490px); }
    .r3-detail-summary.r4-material-summary { --detail-padding: 16px; --detail-gap: 19px; }
    .r4-material-product { grid-template-columns: minmax(0, 1fr); }
    .r4-material-product .r3-detail-product-image { width: 100%; max-width: none; aspect-ratio: 1.15; justify-self: stretch; }
    body.aliva-r2 .r4-material-product .r3-detail-description h3 { font-size: 24px; }
    .r4-material-product .r3-detail-description .r2-btn { margin-top: 15px; }
    body.aliva-r2 .r4-material-photo img { width: 100%; height: auto; aspect-ratio: 1.35; }
    .r4-option-grid { grid-template-columns: minmax(0, 1fr); gap: 19px; }
    .r4-option-copy { padding: 17px 18px 12px; }
    .r4-option-copy p { font-size: 15px; }
    .r4-option-link { padding-top: 10px; }
    .r4-journey-list { padding: 16px 13px; }
    .r4-journey-item { grid-template-columns: 33px minmax(0, 1fr); gap: 12px; padding-bottom: 24px; }
    .r4-journey-marker { height: 33px; }
    .r4-journey-marker span { width: 33px; min-width: 33px; height: 33px; font-size: 13px; }
    .r4-journey-item:not(:last-child)::before { left: 16.5px; top: 16.5px; bottom: -16.5px; }
    .r4-journey-content { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .r4-journey-text p { font-size: 14px; line-height: 1.45; }
}
@media (prefers-reduced-motion: reduce) {
    body.aliva-r2 .r4-viewer-stage > img, body.aliva-r2 .r4-option-photo img { transition: none; }
}
