/**
 * VR Hair - Product Details Styles
 * Design refinado e sofisticado
 */

/* ========================================
   PRODUCT DETAILS LAYOUT
======================================== */
.product-details {
    padding: 40px 0;
    background: var(--vr-bg, #fff);
}

.product-details .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.product-details .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -16px;
}

.product-details .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 16px;
}

/* ========================================
   PRODUCT GALLERY
======================================== */
.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image-container {
    position: relative;
    background: #fafafa;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.img-zoom-container {
    position: relative;
    width: 100%;
    padding-top: 100%;
    cursor: zoom-in;
    overflow: hidden;
}

#main-product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: #fafafa;
}

/* Override Bootstrap .img-fluid for main product image */
#main-product-image.img-fluid {
    max-width: 100%;
    height: 100%;
}

.img-zoom-container:hover #main-product-image {
    transform: scale(2);
}

.zoom-icon {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 14px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.img-zoom-container:hover .zoom-icon {
    opacity: 1;
    transform: scale(1);
}

/* Thumbnails */
.thumbnail-images {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px;
    margin: 0 -4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.thumbnail-images::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-images::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.thumbnail-images .row {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    margin: 0;
}

.thumbnail-images .col-2 {
    flex: 0 0 auto;
    width: auto;
    padding: 0;
}

.thumbnail {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    background: #fafafa;
}

.thumbnail:hover {
    border-color: rgba(99, 121, 82, 0.4);
}

.thumbnail.active {
    border-color: #637952;
    box-shadow: 0 0 0 3px rgba(99, 121, 82, 0.2);
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   PRODUCT INFO
======================================== */
.product-info {
    padding-left: 24px;
}

.product-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.product-rating i {
    color: #f59e0b;
    font-size: 0.9rem;
}

.product-rating .rating-count {
    font-size: 0.875rem;
    color: #666;
}

/* Meta Info */
.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.875rem;
}

.meta-label {
    color: #999;
    font-weight: 500;
}

.meta-value {
    color: #333;
}

/* Price */
.product-price {
    margin: 24px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8faf7 0%, #f0f4ee 100%);
    border-radius: 12px;
    border: 1px solid rgba(99, 121, 82, 0.1);
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: #637952;
    letter-spacing: -0.02em;
}

.price-revenda {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-revenda .original-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.price-revenda .revenda-price {
    font-size: 2rem;
    font-weight: 700;
    color: #637952;
}

/* Description */
.product-description {
    margin-bottom: 24px;
    color: #555;
    line-height: 1.7;
}

.product-description p {
    margin: 0;
}

/* Features */
.product-features {
    margin-bottom: 24px;
}

.product-features h4,
.product-size h4,
.product-quantity h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #333;
    margin-bottom: 12px;
}

.product-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-features li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: #555;
    font-size: 0.9rem;
}

.product-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: #637952;
    border-radius: 50%;
}

/* Size Options */
.size-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.btn-size {
    min-width: 60px;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-size:hover {
    border-color: #637952;
    color: #637952;
}

.btn-size.active {
    background: #637952;
    border-color: #637952;
    color: #fff;
}

/* Quantity Selector */
.quantity-selector {
    display: inline-flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-selector.refined {
    background: #fff;
    border: 1px solid #e0e0e0;
}

.btn-quantity {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-quantity:hover {
    background: rgba(99, 121, 82, 0.1);
    color: #637952;
}

.input-quantity {
    width: 60px;
    height: 44px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    -moz-appearance: textfield;
}

.input-quantity::-webkit-outer-spin-button,
.input-quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Actions */
.product-actions {
    display: flex;
    gap: 12px;
    margin: 24px 0;
}

.btn-add-cart {
    flex: 1;
    padding: 16px 32px;
    background: linear-gradient(135deg, #637952 0%, #4a5c3d 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 121, 82, 0.35);
}

.btn-wishlist,
.btn-compare {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-wishlist:hover,
.btn-compare:hover {
    border-color: #637952;
    color: #637952;
}

/* Share */
.product-share.styled-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.share-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.share-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f5f5f5;
    color: #666;
    text-decoration: none;
    transition: all 0.25s ease;
}

.share-icon:hover {
    background: #637952;
    color: #fff;
    transform: translateY(-2px);
}

/* ========================================
   PRODUCT TABS
======================================== */
.product-tabs {
    margin-top: 60px;
}

.product-tabs .nav-tabs {
    border-bottom: 2px solid #eee;
    gap: 0;
}

.product-tabs .nav-link {
    padding: 16px 24px;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    background: transparent;
    transition: all 0.25s ease;
}

.product-tabs .nav-link:hover {
    color: #333;
}

.product-tabs .nav-link.active {
    color: #637952;
    border-bottom-color: #637952;
    background: transparent;
}

.tab-content-inner {
    padding: 32px 0;
}

.tab-content-inner h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.tab-content-inner p {
    color: #555;
    line-height: 1.8;
}

/* ========================================
   REVIEWS
======================================== */
.reviews-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.average-rating {
    text-align: center;
}

.rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

.rating-stars {
    margin: 8px 0;
}

.rating-stars i {
    color: #f59e0b;
    font-size: 1.1rem;
}

.rating-count {
    font-size: 0.875rem;
    color: #666;
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-bar .rating-label {
    flex: 0 0 80px;
    font-size: 0.8rem;
    color: #666;
}

.rating-bar .progress {
    flex: 1;
    height: 8px;
    background: #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar .progress-bar {
    background: linear-gradient(90deg, #637952, #8ba378);
    border-radius: 4px;
}

.rating-bar .rating-percent {
    flex: 0 0 40px;
    font-size: 0.8rem;
    color: #999;
    text-align: right;
}

/* Review Cards */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.review {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 24px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.reviewer-info {
    display: flex;
    gap: 12px;
}

.reviewer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
}

.reviewer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reviewer-details h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px;
}

.review-date {
    font-size: 0.8rem;
    color: #999;
}

.review-rating i {
    color: #f59e0b;
    font-size: 0.85rem;
}

.review-content h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
}

.review-content p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.review-response {
    margin-top: 16px;
    padding: 16px;
    background: #f8faf7;
    border-radius: 8px;
    border-left: 3px solid #637952;
}

.review-response h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #637952;
    margin: 0 0 8px;
}

.review-response p {
    font-size: 0.9rem;
}

/* Write Review Form */
.write-review {
    margin-top: 40px;
    padding: 32px;
    background: #f8f9fa;
    border-radius: 12px;
}

.write-review h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 24px;
}

.rating-selector {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.rating-selector i {
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
}

.rating-selector i:hover,
.rating-selector i.fas {
    color: #f59e0b;
}

.write-review .form-group {
    margin-bottom: 20px;
}

.write-review label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.write-review .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.write-review .form-control:focus {
    outline: none;
    border-color: #637952;
    box-shadow: 0 0 0 3px rgba(99, 121, 82, 0.1);
}

.write-review textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ========================================
   RELATED PRODUCTS
======================================== */
.related-products,
.crosssell-products {
    padding: 60px 0;
    background: #f8f9fa;
}

.related-products .container,
.crosssell-products .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 8px;
}

.crosssell-subtitle {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.related-products .row,
.crosssell-products .row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.related-products .col-md-3,
.crosssell-products .col-md-3 {
    max-width: 100%;
    padding: 0;
}

.related-products .product-card,
.crosssell-products .product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.related-products .product-card:hover,
.crosssell-products .product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.related-products .product-image,
.crosssell-products .product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.related-products .product-image img,
.crosssell-products .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-products .product-card:hover .product-image img,
.crosssell-products .product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #637952, #4a5c3d);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
}

.related-products .product-actions,
.crosssell-products .product-actions {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: all 0.3s ease;
}

.related-products .product-card:hover .product-actions,
.crosssell-products .product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    color: #333;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
}

.action-btn:hover {
    background: #637952;
    color: #fff;
}

.related-products .product-info,
.crosssell-products .product-info {
    padding: 16px;
}

.related-products .product-title,
.crosssell-products .product-title {
    margin: 0 0 8px;
}

.related-products .product-title a,
.crosssell-products .product-title a {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-products .product-title a:hover,
.crosssell-products .product-title a:hover {
    color: #637952;
}

.related-products .product-price,
.crosssell-products .product-price {
    margin-bottom: 12px;
}

.related-products .current-price,
.crosssell-products .current-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #637952;
}

.related-products .btn-outline-primary,
.crosssell-products .btn-outline-primary {
    display: block;
    width: 100%;
    padding: 10px;
    border: 1px solid #637952;
    border-radius: 6px;
    color: #637952;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.25s ease;
}

.related-products .btn-outline-primary:hover,
.crosssell-products .btn-outline-primary:hover {
    background: #637952;
    color: #fff;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
    .related-products .row,
    .crosssell-products .row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-details .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .product-gallery {
        position: static;
        margin-bottom: 32px;
    }

    .product-info {
        padding-left: 0;
    }

    .product-title {
        font-size: 1.5rem;
    }

    .current-price,
    .price-revenda .revenda-price {
        font-size: 1.75rem;
    }

    .product-tabs .nav-link {
        padding: 12px 16px;
        font-size: 0.85rem;
    }

    .related-products .row,
    .crosssell-products .row {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .reviews-summary .row {
        flex-direction: column;
    }

    .reviews-summary .col-md-4,
    .reviews-summary .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .average-rating {
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .product-details {
        padding: 24px 0;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
    }

    .product-actions {
        flex-direction: column;
    }

    .btn-add-cart {
        order: -1;
    }

    .related-products .row,
    .crosssell-products .row {
        grid-template-columns: 1fr;
    }
}
