/* PRODUCT-DETAIL.CSS - RESPONSIVE (FIXED IMAGE SIZE)
============================================== */

* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
  font-family: "Poppins", sans-serif; 
}

html, body {
    background: #fff;
    color: #000;
    width: 100%;
    height: 100%;
    overflow: hidden; 
}

main.product-detail-section {
    width: 100%;
    height: 100vh;
}

.product-layout {
    display: flex;
    width: 100%;
    height: 100vh;
}

.left-panel {
    width: 40%;
    height: 100vh;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.gallery-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.main-image-box {
    width: 100%;
    height: 450px; 
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
    padding: 0 40px; 
}

.main-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
    transition: opacity 0.3s ease;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    color: #333;
    font-size: 1.2rem;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.slider-nav:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.slider-nav.prev { left: 20px; }
.slider-nav.next { right: 20px; }

.thumbnail-container {
    display: flex;
    gap: 10px;
    padding: 10px;
    overflow-x: auto;
    max-width: 90%;
}

.thumb-item {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    opacity: 0.6;
    transition: 0.2s;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-item:hover, 
.thumb-item.active {
    opacity: 1;
    border-color: #000;
    transform: scale(1.05);
}

.back-button {
    position: absolute;
    top: 25px;
    left: 25px;
    background: #000;
    color: #fff;
    border: none;
    padding: 11px 12px;
    border-radius: 100%;
    cursor: pointer;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.2s;
}

.back-button:hover { 
    opacity: 0.85; 
}

.right-panel {
    width: 60%;
    height: 100vh;
    background: #fff;
    overflow-y: auto; 
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.content-wrapper {
    padding: 40px 60px 60px 60px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    min-height: 100%;
}

.right-panel::-webkit-scrollbar { width: 8px; }
.right-panel::-webkit-scrollbar-track { background: #fff; }
.right-panel::-webkit-scrollbar-thumb { background-color: #333; border-radius: 6px; }

.product-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
    margin-top: 0;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.product-options { margin-top: 20px; }
.product-options h4, .product-quantity h4 {
    margin: 15px 0 8px;
    font-size: 1rem;
    font-weight: 600;
}

.option-btn {
    padding: 8px 15px;
    border: 1px solid #333;
    border-radius: 6px;
    margin: 3px;
    background: transparent;
    color: #000;
    cursor: pointer;
    transition: 0.2s;
}

.option-btn:hover, .option-btn.active {
    background: #333;
    color: #fff;
}

.product-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.product-quantity button {
    width: 35px;
    height: 35px;
    border: 1px solid #333;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
}

.product-quantity button:hover { background: #333; color: #fff; }
.product-quantity .count { min-width: 25px; text-align: center; font-weight: 600; }

.stock { margin-top: 10px; font-size: 0.9rem; color: #666; }

.product-buttons {
    margin-top: 25px;
    display: flex;
    gap: 10px;
}

.product-buttons button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.product-buttons .add { background: #fff; border: 1px solid #333; color: #000; }
.product-buttons .add:hover { background: #333; color: #fff; }
.product-buttons .buy { background: #333; color: #fff; }
.product-buttons .buy:hover { opacity: 0.85; }

.review-section-wrapper {
    width: 100%;
    background: #fff;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed #eee;
}

.review-header {
    text-align: center;
    margin-bottom: 50px;
}

.big-rating {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    color: #000;
}

.stars {
    font-size: 1.2rem;
    margin: 10px 0;
    color: #FFC107;
}

.stars .gold { color: #FFC107; }
.stars .grey { color: #e0e0e0; }

.review-form {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    margin-bottom: 40px;
}

.star-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.star-input input { display: none; }

.star-input label {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label {
    color: #FFC107; 
}

.star-input label:hover {
    transform: scale(1.1);
}

.review-form textarea {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 0.95rem;
    resize: vertical;
    outline: none;
    margin-bottom: 20px;
}

.review-form textarea:focus { border-color: #000; }

.submit-review {
    background: #000;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.submit-review:hover { opacity: 0.8; }

.review-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-item {
    padding: 25px;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    background: #fff;
}

.reviewer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.reviewer-info strong { font-size: 1.05rem; color: #000; }
.review-date { font-size: 0.85rem; color: #999; }

.user-rating {
    font-size: 0.8rem;
    margin-bottom: 12px;
    color: #FFC107;
}

.user-rating .gold { color: #FFC107; }
.user-rating .grey { color: #e0e0e0; }

.review-text {
    color: #444;
    line-height: 1.6;
    font-size: 1rem;
}

.login-alert {
    text-align: center;
    padding: 40px;
    background: #f8f8f8;
    border-radius: 12px;
    color: #666;
}

.login-alert a { color: #000; font-weight: 600; text-decoration: underline; }

@media (max-width: 1024px) {
    .left-panel {
        width: 45%;
    }
    
    .right-panel {
        width: 55%;
    }
    
    .main-image-box {
        height: 380px;
    }
    
    .content-wrapper {
        padding: 35px 40px;
    }
    
    .product-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    html, body { 
        overflow: auto; 
        height: auto; 
    }
    
    main.product-detail-section { 
        height: auto; 
    }
    
    .product-layout { 
        flex-direction: column; 
        height: auto; 
    }
    
    .left-panel { 
        width: 100%; 
        height: auto; 
        padding: 20px 0; /* Dikurangi dari 40px biar ga terlalu boros tempat */
    }
    
    .right-panel { 
        width: 100%; 
        height: auto; 
        overflow-y: visible; 
        padding: 0; 
    }
    
    .main-image-box { 
        height: 250px; /* Dikurangi dari 350px biar ga kegedean */
        padding: 0 20px;
    }
    
    .slider-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .slider-nav.prev { left: 10px; }
    .slider-nav.next { right: 10px; }
    
    .thumbnail-container {
        gap: 8px;
    }
    
    .thumb-item {
        width: 50px;
        height: 50px;
    }
    
    .back-button {
        top: 15px;
        left: 15px;
        padding: 10px;
    }
    
    .content-wrapper { 
        padding: 30px 20px; 
    }
    
    .product-title {
        font-size: 1.6rem;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    .product-options h4,
    .product-quantity h4 {
        font-size: 0.95rem;
    }
    
    .option-btn {
        padding: 7px 13px;
        font-size: 0.9rem;
    }
    
    .product-buttons button {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .review-header {
        margin-bottom: 35px;
    }
    
    .big-rating {
        font-size: 3rem;
    }
    
    .stars {
        font-size: 1rem;
    }
    
    .review-form {
        padding: 30px 20px;
    }
    
    .star-input label {
        font-size: 1.8rem;
    }
    
    .review-form textarea {
        height: 100px;
        font-size: 0.9rem;
    }
    
    .review-item {
        padding: 20px;
    }
    
    .reviewer-info strong {
        font-size: 1rem;
    }
    
    .review-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .left-panel {
        padding: 15px 0; /* Dikurangi dari 30px */
    }
    
    .main-image-box {
        height: 200px; /* Dikurangi dari 280px, ini ukuran pas buat HP kecil */
        padding: 0 15px;
    }
    
    .slider-nav {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .thumbnail-container {
        gap: 6px;
    }
    
    .thumb-item {
        width: 45px;
        height: 45px;
    }
    
    .content-wrapper {
        padding: 25px 15px;
    }
    
    .product-title {
        font-size: 1.4rem;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .product-options h4,
    .product-quantity h4 {
        font-size: 0.9rem;
    }
    
    .option-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .product-quantity button {
        width: 30px;
        height: 30px;
    }
    
    .product-buttons {
        flex-direction: column;
    }
    
    .product-buttons button {
        padding: 11px;
        font-size: 0.9rem;
    }
    
    .big-rating {
        font-size: 2.5rem;
    }
    
    .stars {
        font-size: 0.9rem;
    }
    
    .review-form {
        padding: 20px 15px;
    }
    
    .star-input label {
        font-size: 1.5rem;
        gap: 8px;
    }
    
    .review-form textarea {
        height: 90px;
        font-size: 0.85rem;
        padding: 12px;
    }
    
    .submit-review {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    .review-item {
        padding: 15px;
    }
    
    .reviewer-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .reviewer-info strong {
        font-size: 0.95rem;
    }
    
    .review-date {
        font-size: 0.8rem;
    }
    
    .user-rating {
        font-size: 0.75rem;
    }
    
    .review-text {
        font-size: 0.9rem;
    }
}