/* ============================================
   PRODUCT DETAIL PAGE - TOKOPEDIA STYLE
   Layout: 3 Columns (Gallery | Info | BuyBox)
   ============================================ */

/* ============ VARIABLES ============ */
:root {
    --rc-primary: #1b3c53;
    --rc-primary-dark: #213c51;
    --rc-primary-soft: rgba(27, 60, 83, 0.08);
    --rc-primary-hover: rgba(27, 60, 83, 0.1);

    --rc-border: #e5e7eb;
    --rc-bg: #ffffff;
    --rc-bg-soft: #f8f9fa;

    /* fallback jika template global belum define */
    --rc-text: var(--rc-text, #111827);
    --rc-muted: var(--rc-muted, #6b7280);

    --rc-radius-md: 12px;
    --rc-radius-sm: 10px;
    --rc-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --rc-shadow-md: 0 6px 18px rgba(0, 0, 0, 0.1);

    --rc-star-gold: #ffc107;
}

/* ============ BREADCRUMB ============ */
.rc-pdp-breadcrumb {
    margin-top: 24px;
    margin-bottom: 0;
}
.rc-pdp-breadcrumb .rc-pdp-breadcrumb__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--rc-muted);
}
.rc-pdp-breadcrumb .rc-pdp-breadcrumb__nav a {
    color: var(--rc-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.rc-pdp-breadcrumb .rc-pdp-breadcrumb__nav a:hover {
    color: var(--rc-primary);
}
.rc-pdp-breadcrumb .sep {
    opacity: 0.7;
}
.rc-pdp-breadcrumb .active {
    color: var(--rc-text);
    font-weight: 600;
}
.rc-pdp-divider {
    height: 1px;
    background: var(--rc-border);
    margin-top: 12px;
}

/* ============ GENERIC CARD ============ */
.rc-card {
    background: var(--rc-bg);
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius-md);
    box-shadow: var(--rc-shadow-sm);
    padding: 16px;
}

/* ============ MAIN PDP CONTAINER ============ */
.rc-pdp {
    padding: 20px 0 40px;
}

/* ============ GALLERY (LEFT COLUMN) ============ */
.rc-pdp-gallery__main {
    position: relative; /* 🔥 WAJIB */
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--rc-radius-sm);
    background: var(--rc-bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 0.5px solid var(--rc-border) !important;
}

.rc-pdp-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rc-pdp-gallery__badge {
    position: absolute;
    top: 14px;
    left: -36px;
    transform: rotate(-45deg);
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.4px;
    padding: 6px 0;
    width: 120px;
    text-align: center;
    z-index: 10;
    box-shadow: 0 6px 14px rgba(239, 68, 68, 0.45);
    pointer-events: none;
}

/* Thumbnail Wrapper with Arrows */
.rc-pdp-gallery__thumbs-wrapper {
    position: relative;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.rc-pdp-gallery__thumbs-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.rc-pdp-gallery__thumbs {
    display: flex;
    gap: 10px;
    transition: transform 0.3s ease;
}

/* Arrow Buttons */
.rc-pdp-thumb-arrow {
    width: 32px;
    height: 32px;
    border: 1px solid var(--rc-border);
    background: #fff;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.rc-pdp-thumb-arrow:hover:not(:disabled) {
    background: var(--rc-bg-soft);
    border-color: rgba(27, 60, 83, 0.35);
    box-shadow: 0 4px 12px rgba(27, 60, 83, 0.18);
}
.rc-pdp-thumb-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.rc-pdp-thumb-arrow i {
    font-size: 18px;
    color: var(--rc-text);
}

.rc-pdp-thumb {
    border: 1px solid var(--rc-border);
    background: #fff;
    border-radius: 10px;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}
.rc-pdp-thumb:hover {
    border-color: rgba(27, 83, 80, 0.35);
}
.rc-pdp-thumb.active {
    border-color: var(--rc-primary);
}
.rc-pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============ INFO (MIDDLE COLUMN) ============ */
.rc-pdp-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--rc-text);
    margin: 0 0 12px;
    line-height: 1.3;
}

.rc-pdp-meta {
    margin-bottom: 16px;
}
.rc-pdp-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--rc-muted);
}
.rc-pdp-rating i {
    color: var(--rc-star-gold);
    font-size: 16px;
}
.rc-pdp-rating .val {
    color: var(--rc-text);
    font-weight: 800;
    font-size: 16px;
}
.rc-pdp-rating .dot {
    opacity: 0.55;
    font-size: 12px;
}
.rc-pdp-rating .muted {
    color: var(--rc-muted);
}

/* Section styling */
.rc-pdp-section {
    margin-top: 16px;
}
.rc-pdp-label {
    font-size: 14px;
    color: var(--rc-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

/* Variant pills */
.rc-pdp-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.rc-pill {
    border: 1px solid var(--rc-border);
    background: #fff;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--rc-text);
}
.rc-pill:hover {
    border-color: rgba(27, 60, 83, 0.35);
    color: var(--rc-primary);
}
.rc-pill.active {
    border-color: var(--rc-primary);
    background: rgba(27, 60, 83, 0.05);
    color: var(--rc-primary);
}

/* Key-value info */
.rc-pdp-kv {
    display: grid;
    gap: 8px;
}
.rc-pdp-kv .kv {
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius-sm);
    padding: 12px;
    background: #fff;
}
.rc-pdp-kv .kv span {
    display: block;
    font-size: 13px;
    color: var(--rc-muted);
    margin-bottom: 4px;
}
.rc-pdp-kv .kv b {
    font-size: 14px;
    color: var(--rc-text);
}

/* Description */
.rc-pdp-desc {
    max-height: 110px;
    overflow: hidden;
    font-size: 14px;
    color: var(--rc-text);
    line-height: 1.6;
}
.rc-pdp-desc.expanded {
    max-height: none;
}
.rc-link {
    border: 0;
    background: transparent;
    padding: 0;
    margin-top: 8px;
    color: var(--rc-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.rc-link:hover {
    text-decoration: underline;
}

/* Rich content from Summernote (description view) */
.rc-desc-body--rich {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.rc-desc-body--rich img,
.rc-desc-body--rich video,
.rc-desc-body--rich iframe,
.rc-desc-body--rich canvas {
    max-width: 100% !important;
    height: auto !important;
}
.rc-desc-body--rich canvas {
    display: block;
    width: 100% !important;
    object-fit: contain;
}
.rc-desc-body--rich table {
    width: 100% !important;
    max-width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
    .rc-desc-body--rich {
        font-size: 14px;
        line-height: 1.65;
    }

    .rc-desc-body--rich img,
    .rc-desc-body--rich video,
    .rc-desc-body--rich iframe,
    .rc-desc-body--rich canvas {
        border-radius: 10px;
    }
}

/* ============ BUNDLE (Isi Bundle) ============ */
.rc-pdp-bundle {
    margin-top: 12px;
}
.rc-pdp-bundle__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* kalau kamu masih pakai .bundle-breakdown wrapper, ini tetap aman */
.rc-pdp-bundle .bundle-breakdown {
    margin: 0;
    padding: 0;
}

.rc-pdp-bundle__product {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rc-pdp-bundle__img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--rc-bg-soft);
}
.rc-pdp-bundle__img--placeholder {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--rc-bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rc-muted);
}
.rc-pdp-bundle__img--placeholder i {
    font-size: 20px;
}

.rc-pdp-bundle__info {
    flex: 1;
    min-width: 0;
}
.rc-pdp-bundle__name {
    font-weight: 800;
    font-size: 14px;
    color: var(--rc-text);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rc-pdp-bundle__qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ✅ BADGE: minimalis & elegan (tanpa gradient) */
.rc-pdp-bundle__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    min-height: 24px;

    background: rgba(27, 60, 83, 0.06) !important; /* soft */
    color: var(--rc-primary) !important; /* teks */
    border: 1px solid rgba(27, 60, 83, 0.14) !important; /* border soft */
    border-radius: 999px;

    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}
.rc-pdp-bundle__badge i {
    font-size: 14px;
    opacity: 0.9;
}

/* ============ BUTTONS ============ */
.rc-btn {
    border-radius: var(--rc-radius-sm);
    padding: 10px 16px;
    font-weight: 800;
    font-size: 14px;
    border: 0.5px solid transparent !important;
    cursor: pointer;
    transition: all 0.2s ease;
}
.rc-btn--primary {
    background: var(--rc-primary);
    border-color: var(--rc-primary);
    color: #ffffff;
}
.rc-btn--primary:hover {
    filter: brightness(0.92);
    box-shadow: 0 6px 16px rgba(27, 60, 83, 0.22);
    transform: translateY(-1px);
}
.rc-btn--primary:active {
    transform: translateY(0);
}

.rc-btn--outline {
    background: #ffffff;
    border-color: var(--rc-primary) !important;
    /* color: var(--rc-primary) !important; */
}
.rc-btn--outline:hover {
    background: rgba(27, 60, 83, 0.06);
    color: #ffffff !important;
}

.rc-btn--ghost {
    background: #fff;
    border-color: var(--rc-border);
    color: var(--rc-text);
}
.rc-btn--ghost:hover {
    border-color: rgba(27, 60, 83, 0.35);
    color: var(--rc-primary);
}

/* ============ BUY BOX (RIGHT COLUMN - STICKY) ============ */
.rc-pdp-buybox {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.rc-pdp-price {
    margin-bottom: 16px;
}
.rc-pdp-price .label {
    font-size: 14px;
    color: var(--rc-muted);
    margin-bottom: 4px;
}
.rc-pdp-price .value {
    font-size: 24px;
    font-weight: 900;
    color: var(--rc-primary);
}

/* Harga dengan Diskon */
.rc-pdp-price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rc-pdp-price--original {
    font-size: 16px;
    font-weight: 400;
    color: #999;
    text-decoration: line-through;
}

.rc-pdp-price--discounted {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary, #1b3c53);
}

.rc-pdp-discount-badge {
    display: inline-block;
    background: var(--primary, #1b3c53);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

.rc-pdp-qty {
    margin-bottom: 16px;
}
.rc-pdp-qty .label {
    font-size: 14px;
    color: var(--rc-muted);
    margin-bottom: 8px;
}
.rc-pdp-qty .muted {
    font-size: 12px;
    color: var(--rc-muted);
    margin-top: 8px;
}

.qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius-sm);
    overflow: hidden;
    height: 44px;
}
.qty-btn {
    width: 44px;
    height: 44px;
    border: 0;
    background: var(--rc-bg-soft);
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.qty-btn:hover {
    background: #eef2f7;
}
.qty input {
    width: 100%;
    border: 0;
    text-align: center;
    outline: none;
    font-weight: 900;
    font-size: 16px;
    height: 100%;
}

.rc-pdp-actions {
    margin-top: 16px;
}
.rc-pdp-mini-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.rc-pdp-mini-actions .mini {
    flex: 1;
    border: 1px solid var(--rc-border);
    background: #fff;
    border-radius: var(--rc-radius-sm);
    padding: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.rc-pdp-mini-actions .mini:hover {
    border-color: rgba(27, 60, 83, 0.35);
    color: var(--rc-primary);
}

/* ============ REVIEWS SECTION (Scoped, Minimal) ============ */
.rc-pdp-reviews {
    padding: 40px 0;
}

.rc-pdp-reviews__head {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--rc-border);
    margin-bottom: 16px;
}
.rc-pdp-reviews__head .title {
    font-size: 14px;
    letter-spacing: 0.4px;
    font-weight: 900;
    color: var(--rc-text);
}

/* Summary = grid biar stabil */
.rc-pdp-reviews__summary {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    padding: 16px 0 18px;
    border-bottom: 1px solid var(--rc-border);
    margin-bottom: 16px;
    align-items: start;
}

/* Left summary */
.rc-pdp-reviews .rc-rating-summary {
    text-align: center;
}
.rc-pdp-reviews .rc-rating-summary__big {
    font-size: 44px;
    font-weight: 900;
    color: var(--rc-text);
    line-height: 1;
}
.rc-pdp-reviews .rc-rating-summary__stars {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 8px 0 6px;
    line-height: 1;
}
.rc-pdp-reviews .rc-rating-summary__stars i {
    font-size: 18px;
    color: var(--rc-star-gold);
    line-height: 1;
}
.rc-pdp-reviews .rc-rating-summary__count {
    font-size: 13px;
    color: var(--rc-muted);
}

/* Breakdown */
.rc-pdp-reviews .rc-rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rc-pdp-reviews .rc-rating-bar {
    display: grid;
    grid-template-columns: 60px 1fr 28px;
    gap: 12px;
    align-items: center;
}
.rc-pdp-reviews .rc-rating-bar__star {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--rc-muted);
    white-space: nowrap;
}
.rc-pdp-reviews .rc-rating-bar__star i {
    color: var(--rc-star-gold);
    font-size: 14px;
    line-height: 1;
}
.rc-pdp-reviews .rc-rating-bar__progress {
    height: 8px;
    background: var(--rc-bg-soft);
    border-radius: 999px;
    overflow: hidden;
}
.rc-pdp-reviews .rc-rating-bar__fill {
    height: 100%;
    background: var(--rc-star-gold);
    border-radius: 999px;
}
.rc-pdp-reviews .rc-rating-bar__count {
    font-size: 12px;
    color: var(--rc-muted);
    text-align: right;
}

/* Review List */
.rc-pdp-reviews .rc-pdp-reviews__list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* FIX COLLISION: PDP Reviews must NOT use flex card (buyer review punya flex) */
.rc-pdp-reviews .rc-review-card {
    display: block !important;
    width: 100%;
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius-sm);
    padding: 14px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
}

.rc-pdp-reviews .rc-review-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}
.rc-pdp-reviews .rc-review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    flex: 0 0 auto;
}

/* Avatar dengan gambar */
.rc-pdp-reviews .rc-review-avatar--image {
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
}

.rc-pdp-reviews .rc-review-avatar--image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px;
}

/* Fallback inisial jika gambar error */
.rc-pdp-reviews .rc-review-avatar--fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.rc-pdp-reviews .rc-review-info {
    flex: 1;
    min-width: 0;
}
.rc-pdp-reviews .rc-review-name {
    font-weight: 900;
    color: var(--rc-text);
    font-size: 14px;
    margin-bottom: 4px;
}
.rc-pdp-reviews .rc-review-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--rc-muted);
    flex-wrap: wrap;
}
.rc-pdp-reviews .rc-review-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    line-height: 1;
}
.rc-pdp-reviews .rc-review-stars i {
    font-size: 13px;
    color: var(--rc-star-gold);
    line-height: 1;
}

/* Snapshot product */
.rc-pdp-reviews .rc-review-product-info {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    padding: 10px 12px;
    background: rgba(27, 60, 83, 0.035);
    border: 1px solid rgba(27, 60, 83, 0.1);
    border-radius: 10px;
    margin: 10px 0;
    box-sizing: border-box;
}
.rc-pdp-reviews .rc-review-product-info img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.06);
    flex: 0 0 auto;
}
.rc-pdp-reviews .rc-review-product-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #f3f4f6;
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rc-muted);
    flex: 0 0 auto;
}
.rc-pdp-reviews .rc-review-product-info .info {
    flex: 1;
    min-width: 0;
}
.rc-pdp-reviews .rc-review-product-info .info .name {
    font-weight: 900;
    color: var(--rc-text);
    font-size: 13px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rc-pdp-reviews .rc-review-product-info .info .price {
    color: var(--rc-primary);
    font-weight: 900;
    font-size: 13px;
    margin-bottom: 2px;
}
.rc-pdp-reviews .rc-review-product-info .info .note {
    font-size: 11px;
    color: var(--rc-muted);
}

.rc-pdp-reviews .rc-review-content {
    font-size: 14px;
    color: var(--rc-text);
    line-height: 1.65;
    margin-top: 8px;
}

.rc-pdp-reviews .rc-review-images {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
}
.rc-pdp-reviews .rc-review-img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--rc-border);
    flex: 0 0 auto;
    display: block;
}
.rc-pdp-reviews .rc-review-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Empty state */
.rc-empty-reviews {
    text-align: center;
    padding: 46px 18px;
}
.rc-empty-reviews i {
    font-size: 52px;
    color: #ddd;
    margin-bottom: 14px;
}
.rc-empty-reviews h3 {
    font-size: 16px;
    font-weight: 900;
    color: var(--rc-text);
    margin-bottom: 6px;
}
.rc-empty-reviews p {
    font-size: 13px;
    color: var(--rc-muted);
    margin: 0;
}

/* ============ HIDE OLD STYLING ============ */
.breadcrumb-bar {
    display: none !important;
}
.product-detail-head {
    display: none !important;
}
.detail-product .detail-bigimg,
.detail-product .slider-nav-thumbnails {
    display: none !important;
}

/* ============ RESPONSIVE DESIGN ============ */
@media (max-width: 991px) {
    .rc-pdp-buybox {
        position: static;
        top: auto;
        max-height: none;
    }

    .rc-pdp-reviews__summary {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .rc-pdp-reviews .rc-rating-summary {
        text-align: left;
        display: flex;
        align-items: center;
        gap: 14px;
    }
    .rc-pdp-reviews .rc-rating-summary__big {
        font-size: 36px;
    }
}

@media (max-width: 767px) {
    .rc-pdp-breadcrumb {
        margin-top: 16px;
    }
    .rc-pdp {
        padding: 16px 0 24px;
    }

    .rc-pdp-title {
        font-size: 18px;
    }

    .rc-pdp-gallery__thumbs {
        gap: 8px;
    }
    .rc-pdp-thumb {
        width: 56px;
        height: 56px;
        flex: 0 0 56px;
    }
}

@media (max-width: 575px) {
    .rc-pdp-mini-actions {
        flex-direction: column;
    }

    .rc-pdp-reviews .rc-review-card {
        padding: 12px;
    }

    .rc-pdp-reviews .rc-review-avatar {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .rc-pdp-reviews .rc-review-product-info {
        flex-direction: column;
        align-items: flex-start;
    }
    .rc-pdp-reviews .rc-review-product-info img,
    .rc-pdp-reviews .rc-review-product-placeholder {
        width: 60px;
        height: 60px;
    }

    .rc-pdp-reviews .rc-review-img {
        width: 56px;
        height: 56px;
    }
}

/* ============================================
   REVIEW MEDIA & LIGHTBOX STYLES
   ============================================ */

/* Review Media Container */
.rc-review-media {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* Media Item (Photo & Video) */
.rc-review-media-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

.rc-review-media-item:hover {
    border-color: #1b3c53;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Photo Thumbnail */
.rc-review-media-item--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video Thumbnail */
.rc-review-media-item--video {
    background: #f5f5f5;
    flex-direction: column;
    overflow: hidden;
}

.rc-review-media-item--video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.rc-review-media-item--video:hover video {
    opacity: 0.9;
}

.rc-review-video-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #1b3c53;
    z-index: 3;
    /* background: rgba(255, 255, 255, 0.9); */
    padding: 6px 10px;
    border-radius: 6px;
    position: relative;
}

.rc-review-video-thumb i {
    font-size: 28px;
    color: #1b3c53;
}

.rc-review-video-thumb span {
    font-size: 10px;
    font-weight: 500;
}

/* Admin Feedback Actions */
.rc-review-admin-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e0e0e0;
}

.rc-feedback-btn {
    font-size: 12px;
    padding: 4px 12px;
}

/* Review Feedbacks - Public Display */
.rc-review-feedbacks {
    margin-top: 16px;
    padding: 12px;
    background: #f3f9fb;
    border-left: 3px solid #1b3c53;
    border-radius: 6px;
}

.rc-feedbacks-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #1b3c53;
    font-size: 13px;
}

.rc-feedbacks-header i {
    font-size: 16px;
}

.rc-feedback-card {
    background: white;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.rc-feedback-card:last-child {
    margin-bottom: 0;
}

.rc-feedback-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.rc-feedback-author {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #1b3c53;
}

.rc-feedback-author i {
    font-size: 14px;
}

.rc-feedback-date {
    font-size: 11px;
    color: #6b7280;
}

.rc-feedback-message {
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 32px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    line-height: 1;
}

.lightbox-close:hover {
    color: #1b3c53;
}

/* Lightbox Navigation */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
    left: -70px;
}

.lightbox-nav.next {
    right: -70px;
}

/* Lightbox navigation icon styling */
.lightbox-nav i {
    font-size: 28px !important;
    line-height: 1;
    display: inline-block;
    font-family: "boxicons" !important;
    font-weight: normal;
    font-style: normal;
}
.rc-anon-badge {
    display: inline-block;
    margin-left: 8px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}
.rc-card-title {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    color: var(--heading, #111827);
    letter-spacing: 0.2px;
}

.rc-admin-edit-link {
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---- Specs Card ---- */
.rc-spec-card {
    padding: 14px;
}

.rc-spec-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line, #e5e7eb);
    margin-bottom: 10px;
}

.rc-spec-table {
    display: block;
}

.rc-spec-row {
    display: grid;
    grid-template-columns: 42% 58%;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
}

.rc-spec-row:last-child {
    border-bottom: 0;
}

.rc-spec-key {
    color: var(--muted, #6b7280);
    font-size: 13px;
    line-height: 1.35;
}

.rc-spec-val {
    color: var(--text, #111827);
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;
}

/* ---- Description Card ---- */
.rc-desc-card {
    padding: 14px;
}

.rc-desc-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line, #e5e7eb);
    margin-bottom: 10px;
}

/* body styling agar konten summernote enak dibaca */
.rc-desc-body {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text, #111827);
}

.rc-desc-body p {
    margin: 0 0 10px;
}

.rc-desc-body ul,
.rc-desc-body ol {
    padding-left: 18px;
    margin: 0 0 12px;
}

.rc-desc-body li {
    margin-bottom: 6px;
}

.rc-desc-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 10px auto;
    background: #f3f4f6;
}

/* clamp: seperti marketplace (biar nggak kepanjangan) */
.rc-desc-body {
    max-height: 420px;
    overflow: hidden;
    position: relative;
}

.rc-desc-body.is-expanded {
    max-height: none;
}

.rc-desc-footer {
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 10px;
    display: flex;
    justify-content: flex-start;
}

/* Lightbox Navigation Styles */
.lightbox-nav {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    border: none !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    z-index: 10000 !important;
    padding: 0 !important;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-50%) scale(1.1) !important;
}

.lightbox-nav.prev {
    left: 20px !important;
}

.lightbox-nav.next {
    right: 20px !important;
}

.lightbox-nav i {
    font-size: 28px !important;
    line-height: 1 !important;
    display: inline-block !important;
    font-family: "boxicons" !important;
    font-weight: normal !important;
    font-style: normal !important;
}

/* Responsive lightbox nav */
@media (max-width: 768px) {
    .lightbox-nav.prev {
        left: 10px !important;
    }

    .lightbox-nav.next {
        right: 10px !important;
    }

    .lightbox-close {
        top: -50px !important;
    }
}

/* Responsive tweak */
@media (max-width: 991px) {
    .rc-spec-row {
        grid-template-columns: 45% 55%;
    }
}
/* =========================================================
   PDP SHOPEE-LIKE OVERRIDES (keep your tokens + rc-card radius)
   - Focus: rc-pdp + rc-pdp-content + mobile bottom drawer
   ========================================================= */

/* ---- grid feel: lebih flat + spacing seperti Shopee ---- */
.rc-pdp-grid {
    align-items: flex-start;
}

.rc-card.rc-pdp-gallery,
.rc-card.rc-pdp-info,
.rc-card.rc-pdp-buybox,
.rc-card.rc-spec-card,
.rc-card.rc-desc-card {
    box-shadow: var(--rc-shadow-sm);
}

/* =========================================================
   PDP INFO (Shopee-like)
   ========================================================= */
.rc-pdp-info {
    padding: 16px;
}

.rc-pdp-title {
    /* mirip marketplace: tegas, tidak terlalu besar */
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 8px;
    color: #000000cc;
}

.rc-pdp-meta {
    margin-bottom: 12px;
}

/* KV jadi 2 kolom (Shopee-like small boxes) */
.rc-pdp-kv--2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rc-pdp-kv--2 .kv {
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius-sm);
    padding: 12px;
    background: #fff;
}

.rc-pdp-section--tight {
    margin-top: 14px;
}

/* Ringkasan clamp look */
.rc-pdp-desc--clamp {
    max-height: 84px; /* Shopee lebih pendek */
    overflow: hidden;
    position: relative;
}

/* Bundle row feel: lebih rapih */
.rc-pdp-bundle__product {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--rc-radius-sm);
    padding: 10px;
    background: #fff;
}

/* =========================================================
   BUYBOX (Desktop) — Shopee-like
   ========================================================= */
.rc-pdp-buybox {
    padding: 16px;
    border-radius: var(--rc-radius-md);
}

.rc-pdp-price .label {
    font-weight: 600;
}

.rc-pdp-price .value {
    color: #0f172a;
    font-size: 26px;
    font-weight: 900;
}

/* stok */
.rc-pdp-stock {
    margin-top: 10px;
    font-size: 12px;
    color: var(--rc-muted);
}
.rc-pdp-stock .ok {
    color: #16a34a;
    font-weight: 700;
}
.rc-pdp-stock .bad {
    color: #dc2626;
    font-weight: 700;
}

/* =========================================================
   CONTENT SECTION (Specs + Desc) — Shopee-like sheet
   ========================================================= */
.rc-sheet {
    padding: 0; /* head+body yang pegang padding */
    overflow: hidden;
}

.rc-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
}

.rc-sheet__body {
    padding: 12px 14px;
    background: #fff;
}

/* Specs rows feel: seperti marketplace list */
.rc-spec-row {
    display: grid;
    grid-template-columns: 42% 58%;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.rc-spec-row:last-child {
    border-bottom: 0;
}
.rc-spec-key {
    color: var(--rc-muted);
    font-size: 13px;
}
.rc-spec-val {
    color: var(--rc-text);
    font-size: 13px;
    font-weight: 600;
}

/* Desc clamp lebih “marketplace” */
.rc-desc-body {
    max-height: 420px;
    overflow: hidden;
    position: relative;
}
.rc-desc-body.is-expanded {
    max-height: none;
}
.rc-desc-footer {
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 12px;
}

/* =========================================================
   MOBILE: PDP layout + bottom swipe buy card
   ========================================================= */
@media (max-width: 991px) {
    /* top spacing */
    .rc-pdp {
        padding: 12px 0 16px;
    }

    /* lebih marketplace: cards full width, jarak rapat */
    .rc-card {
        padding: 14px;
    }

    .rc-pdp-title {
        font-size: 18px;
    }

    /* KV jadi 1 baris 2 kolom tetap oke di mobile kecil */
    .rc-pdp-kv--2 {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    /* biar konten gak ketutup drawer */
}

/* ============ MOBILE BUY DRAWER (Swipeable) ============ */
.rc-mbuy {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    pointer-events: none; /* panel yg aktif yg boleh klik */
}

.rc-mbuy__peek {
    pointer-events: auto;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.1);
    border-top-left-radius: var(--rc-radius-md);
    border-top-right-radius: var(--rc-radius-md);
    padding: 10px 12px 12px;
}

.rc-mbuy__handle {
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.15);
    margin: 0 auto 10px;
}

.rc-mbuy__row {
    display: grid;
    grid-template-columns: 1fr 110px 90px;
    gap: 10px;
    align-items: center;
}

.rc-mbuy__price .t {
    font-size: 12px;
    color: var(--rc-muted);
    margin-bottom: 2px;
}
.rc-mbuy__price .v {
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
}

.rc-mbuy__btn {
    height: 44px;
    border-radius: var(--rc-radius-sm);
    border: 1px solid transparent;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.rc-mbuy__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rc-mbuy__btn--cart {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.18);
    color: #0f172a;
}
.rc-mbuy__btn--buy {
    background: var(--rc-primary);
    border-color: var(--rc-primary);
    color: #fff;
}

/* Panel (expanded) */
.rc-mbuy__panel {
    pointer-events: auto;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top-left-radius: var(--rc-radius-md);
    border-top-right-radius: var(--rc-radius-md);
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.18);
    transform: translateY(110%);
    transition: transform 260ms ease;
    z-index: 9999;
    max-height: 78vh;
    overflow: auto;
}

.rc-mbuy__panelhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.rc-mbuy__title {
    font-weight: 900;
    color: var(--rc-text);
}

.rc-mbuy__close {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.rc-mbuy__content {
    padding: 12px 14px 16px;
}

.rc-mbuy__qty .qty {
    height: 46px;
}

.rc-mbuy__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
    z-index: 9997;
}

/* Open state */
.rc-mbuy.is-open .rc-mbuy__panel {
    transform: translateY(0%);
}
.rc-mbuy.is-open .rc-mbuy__backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile kecil: tombol rapat */
@media (max-width: 420px) {
    .rc-mbuy__row {
        grid-template-columns: 1fr 100px 86px;
        gap: 8px;
    }
}

/* =========================================================
   IMPORTANT: prevent duplicate qty input id behavior
   - kamu punya qtyInput (desktop) dan qtyInputMobile (mobile)
   - JS qty kamu harus update keduanya jika ada
   ========================================================= */
/* =========================
   CONTENT: one-card + coupon card
   ========================= */

.rc-content-card {
    padding: 0;
    overflow: hidden;
}
.rc-content-card__body {
    padding: 14px;
}

.rc-block {
    padding: 4px 0 0;
}
.rc-block__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.rc-block__title {
    font-size: 14px;
    font-weight: 900;
    margin: 0;
    color: var(--rc-text);
}

.rc-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 14px 0;
}

/* make specs more marketplace-like */
.rc-spec-table--compact .rc-spec-row {
    grid-template-columns: 240px 1fr;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
}
@media (max-width: 991px) {
    .rc-spec-table--compact .rc-spec-row {
        grid-template-columns: 44% 56%;
    }
}

/* desc clamp behavior (you already have, keep it) */
.rc-desc-body {
    max-height: 520px;
    overflow: hidden;
}
.rc-desc-body.is-expanded {
    max-height: none;
}

/* inline admin control */
.rc-admin-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rc-btn--sm {
    padding: 7px 10px;
    font-size: 12px;
    border-radius: 10px;
}

/* coupon card (right) */
.rc-coupon-card {
    position: sticky;
    top: 86px; /* sesuaikan dengan tinggi header */
}
.rc-coupon-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line, #d9d9d9);
    margin-bottom: 10px;
}
.rc-pill-mini {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--primary-soft, rgba(27, 60, 83, 0.08));
    color: var(--primary, #1b3c53);
    border: 1px solid rgba(27, 60, 83, 0.18);
}

.rc-coupon-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rc-coupon {
    border: 1px solid rgba(27, 60, 83, 0.25);
    background: rgba(27, 60, 83, 0.04);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.rc-coupon--muted {
    border-color: var(--border, #ededed);
    background: #fff;
}
.rc-coupon__title {
    font-weight: 900;
    color: var(--primary, #1b3c53);
    font-size: 13px;
    margin-bottom: 2px;
}
.rc-coupon__sub {
    font-size: 12px;
    color: var(--heading, #222222);
    opacity: 0.9;
}
.rc-coupon__meta {
    font-size: 11px;
    color: var(--light, #888888);
    margin-top: 2px;
}
.rc-coupon__btn {
    border: 1px solid rgba(27, 60, 83, 0.35);
    background: #fff;
    color: var(--primary, #1b3c53);
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 900;
    font-size: 12px;
    cursor: pointer;
}
.rc-coupon__btn:hover {
    background: rgba(27, 60, 83, 0.06);
}

/* editor wrap spacing */
.rc-desc-editor {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
