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

/* ============ VARIABLES ============ */
:root {
    --rc-primary: #ee4d2d;
    --rc-border: #e0e0e0;
    --rc-bg: #ffffff;
    --rc-bg-soft: #f8f9fa;
    --rc-text: #2f2f2f;
    --rc-muted: #777777;
    --rc-muted-light: #888888;
    --rc-radius-md: 12px;
    --rc-radius-sm: 10px;
    --rc-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --rc-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --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 {
    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: 1px solid var(--rc-border);
}

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

/* Thumbnail Wrapper with Arrows */
.rc-pdp-gallery__thumbs-wrapper {
    position: relative;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Container untuk thumbnail dengan overflow hidden */
.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: 50%;
    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: var(--rc-primary);
    box-shadow: 0 2px 12px rgba(238, 77, 45, 0.2);
}

.rc-pdp-thumb-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.rc-pdp-thumb-arrow i {
    font-size: 18px;
    color: var(--rc-text);
}

.rc-pdp-thumb {
    border: 2px 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(238, 77, 45, 0.45);
}

.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: 700;
    color: var(--rc-text);
    margin: 0 0 12px 0;
    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: 700;
    font-size: 16px;
}

.rc-pdp-rating .dot {
    opacity: 0.5;
    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: 500;
}

/* 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(238, 77, 45, 0.45);
    color: var(--rc-primary);
}

.rc-pill.active {
    border-color: var(--rc-primary);
    background: rgba(238, 77, 45, 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: 500;
    cursor: pointer;
}

.rc-link:hover {
    text-decoration: underline;
}

/* ============ STORE CARD ============ */
.rc-pdp-store {
    margin-top: 16px;
}

.rc-pdp-store__row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rc-pdp-store__avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--rc-radius-sm);
    overflow: hidden;
    border: 1px solid var(--rc-border);
    background: var(--rc-bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.rc-pdp-store__info {
    flex: 1;
    min-width: 0;
}

.rc-pdp-store__info .name {
    font-weight: 700;
    color: var(--rc-text);
    font-size: 14px;
    margin-bottom: 2px;
}

.rc-pdp-store__info .muted {
    font-size: 13px;
    color: var(--rc-muted);
}

.rc-pdp-store__info .status {
    font-size: 12px;
    color: var(--rc-muted);
    margin-top: 2px;
}

.rc-pdp-store__status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
    margin-right: 4px;
}

.rc-pdp-store__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ============ BUTTONS ============ */
.rc-btn {
    border-radius: var(--rc-radius-sm);
    padding: 10px 16px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rc-btn--primary {
    background: var(--rc-primary);
    border-color: var(--rc-primary);
    color: #fff;
}

.rc-btn--primary:hover {
    filter: brightness(0.95);
    box-shadow: 0 4px 12px rgba(238, 77, 45, 0.3);
}

.rc-btn--outline {
    background: #fff;
    border-color: var(--rc-primary);
    color: var(--rc-primary);
}

.rc-btn--outline:hover {
    background: rgba(238, 77, 45, 0.05);
}

.rc-btn--ghost {
    background: #fff;
    border-color: var(--rc-border);
    color: var(--rc-text);
}

.rc-btn--ghost:hover {
    border-color: rgba(238, 77, 45, 0.45);
    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: 800;
    color: var(--rc-primary);
}

.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: #e8e8e8;
}

.qty input {
    width: 100%;
    border: 0;
    text-align: center;
    outline: none;
    font-weight: 700;
    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(238, 77, 45, 0.45);
    color: var(--rc-primary);
}

/* ============ REVIEWS SECTION ============ */
.rc-pdp-reviews {
    padding: 40px 0;
}

.rc-pdp-reviews__head {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rc-border);
    margin-bottom: 20px;
}

.rc-pdp-reviews__head .title {
    font-size: 18px;
    font-weight: 700;
    color: var(--rc-text);
}

/* Rating Summary */
.rc-pdp-reviews__summary {
    display: flex;
    gap: 40px;
    padding: 20px 0;
    border-bottom: 1px solid var(--rc-border);
    margin-bottom: 20px;
}

.rc-rating-summary {
    text-align: center;
    flex-shrink: 0;
}

.rc-rating-summary__big {
    font-size: 48px;
    font-weight: 800;
    color: var(--rc-text);
    line-height: 1;
}

.rc-rating-summary__stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 8px 0;
}

.rc-rating-summary__stars i {
    font-size: 20px;
    color: var(--rc-star-gold);
}

.rc-rating-summary__count {
    font-size: 14px;
    color: var(--rc-muted);
}

/* Rating Breakdown */
.rc-rating-breakdown {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rc-rating-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rc-rating-bar__star {
    font-size: 14px;
    color: var(--rc-muted);
    min-width: 60px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rc-rating-bar__star i {
    color: var(--rc-star-gold);
    font-size: 14px;
}

.rc-rating-bar__progress {
    flex: 1;
    height: 8px;
    background: var(--rc-bg-soft);
    border-radius: 4px;
    overflow: hidden;
}

.rc-rating-bar__fill {
    height: 100%;
    background: var(--rc-star-gold);
    border-radius: 4px;
}

.rc-rating-bar__count {
    font-size: 13px;
    color: var(--rc-muted);
    min-width: 40px;
    text-align: right;
}

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

.rc-review-card {
    border: 1px solid var(--rc-border);
    border-radius: var(--rc-radius-sm);
    padding: 16px;
}

.rc-review-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.rc-review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--rc-bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--rc-muted);
    font-size: 16px;
    flex-shrink: 0;
}

.rc-review-info {
    flex: 1;
}

.rc-review-name {
    font-weight: 600;
    color: var(--rc-text);
    font-size: 14px;
    margin-bottom: 2px;
}

.rc-review-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--rc-muted);
}

.rc-review-stars {
    display: flex;
    gap: 2px;
}

.rc-review-stars i {
    font-size: 12px;
    color: var(--rc-star-gold);
}

.rc-review-content {
    font-size: 14px;
    color: var(--rc-text);
    line-height: 1.6;
    margin-bottom: 8px;
}

.rc-review-images {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.rc-review-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--rc-border);
    cursor: pointer;
}

.rc-review-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

    .rc-pdp-reviews__summary {
        flex-direction: column;
        gap: 20px;
    }

    .rc-rating-breakdown {
        width: 100%;
    }
}

@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;
    }

    .rc-pdp-store__row {
        flex-wrap: wrap;
    }

    .rc-pdp-store__actions {
        width: 100%;
        margin-top: 12px;
    }

    .rc-pdp-store__actions .rc-btn {
        flex: 1;
    }

    .rc-rating-summary__big {
        font-size: 36px;
    }

    .rc-review-images {
        overflow-x: auto;
    }
}

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

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

/* ============ HIDE OLD STYLING ============ */
/* Hide existing breadcrumb-bar */
.breadcrumb-bar {
    display: none !important;
}

/* Hide old product-detail-head */
.product-detail-head {
    display: none !important;
}

/* Hide old detail-product styles */
.detail-product .detail-bigimg,
.detail-product .slider-nav-thumbnails {
    display: none !important;
}
