/* ========== CUSTOM PRODUCT PAGE STYLES ========== */
.custom-product-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
    background: #fff;
    overflow-x: hidden;
}

.custom-product-wrapper,
.custom-product-wrapper *,
.custom-product-wrapper *::before,
.custom-product-wrapper *::after {
    box-sizing: border-box;
}

.custom-product-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    padding: 30px;
}

.custom-product-wrapper .product-breadcrumb {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.custom-product-wrapper .product-breadcrumb .woocommerce-breadcrumb {
    color: #666;
    font-size: 14px;
}

.custom-product-wrapper .product-breadcrumb a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-block;
}

.custom-product-wrapper .product-breadcrumb a:hover {
    color: #007cba;
}

.custom-product-wrapper .product-main-section {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 30px;
    margin-bottom: 40px;
    align-items: start;
}

.custom-product-wrapper .product-main-section > * {
    min-width: 0;
}

.custom-product-wrapper .product-gallery-column {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.custom-product-wrapper .product-gallery-wrapper {
    background: #f9f9f9;
    border-radius: 15px;
    padding: 15px;
    width: 100%;
}

.custom-product-wrapper .product-main-image {
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 400px;
}

.custom-product-wrapper .product-main-image img {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: contain;
    transition: transform 0.3s;
}

.custom-product-wrapper .product-main-image img:hover {
    transform: scale(1.03);
}

.custom-product-wrapper .product-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

.custom-product-wrapper .product-thumbnails:empty {
    display: none;
}

.custom-product-wrapper .product-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.custom-product-wrapper .product-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.custom-product-wrapper .product-thumbnails::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.custom-product-wrapper .thumbnail-item {
    flex: 0 0 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.custom-product-wrapper .thumbnail-item:hover {
    border-color: #007cba;
    transform: translateY(-2px);
}

.custom-product-wrapper .thumbnail-item.active {
    border-color: #007cba !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,124,186,0.2);
}

.custom-product-wrapper .thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-product-wrapper .product-info-column {
    padding: 0;
    width: 100%;
}

.custom-product-wrapper .product-title {
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 600;
    color: #333;
    margin: 0 0 15px;
    line-height: 1.3;
    word-wrap: break-word;
}

.custom-product-wrapper .product-price-wrapper {
    margin-bottom: 20px;
}

.custom-product-wrapper .product-price-wrapper .price {
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 700;
    color: #000000 !important;
}

.custom-product-wrapper .product-price-wrapper del {
    font-size: 16px;
    color: #999;
    margin-right: 10px;
}

.custom-product-wrapper .product-price-wrapper ins {
    text-decoration: none;
    color: #000000 !important;
}

.custom-product-wrapper .product-short-description {
    margin-bottom: 25px;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
    line-height: 1.8;
    word-wrap: break-word;
}

.custom-product-wrapper table.variations {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: hidden !important;
}

.custom-product-wrapper .product-variations-wrapper {
    margin: 25px 0;
    width: 100%;
}

.custom-product-wrapper .variation-group {
    margin-bottom: 25px;
}

.custom-product-wrapper .variation-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-product-wrapper .variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.custom-product-wrapper .variation-option {
    position: relative;
    min-width: 60px;
}

.custom-product-wrapper .variation-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-product-wrapper .variation-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 70px;
}

.custom-product-wrapper .variation-option label:hover {
    background: #e8e8e8;
    border-color: #999;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.custom-product-wrapper .variation-option input[type="radio"]:checked + label {
    background: #333;
    border-color: #333;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(51,51,51,0.3);
}

.custom-product-wrapper .variation-option input[type="radio"]:disabled + label {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.8);
    position: relative;
    overflow: hidden;
}

.custom-product-wrapper .variation-option input[type="radio"]:disabled + label::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ff0000;
    transform: translateY(-50%) rotate(-15deg);
    opacity: 0.5;
}

.custom-product-wrapper .product-variations-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.custom-product-wrapper .product-variations-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin-left: -15px;
    margin-top: -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.custom-product-wrapper .stock-status {
    margin: 20px 0 25px;
    padding: 15px;
    border-radius: 8px;
    background: #f9f9f9;
    word-wrap: break-word;
}

.custom-product-wrapper .in-stock {
    color: #4caf50;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-product-wrapper .out-of-stock {
    color: #f44336;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-product-wrapper .cart {
    margin: 25px 0 30px !important;
}

.custom-product-wrapper .cart .quantity {
    display: inline-block !important;
    margin-right: 15px !important;
}

.custom-product-wrapper .cart .quantity .qty {
    width: 80px !important;
    height: 44px !important;
    padding: 10px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    text-align: center !important;
}

.custom-product-wrapper .cart .woocommerce-Price-amount.amount {
    display: none !important;
}

.custom-product-wrapper .single_add_to_cart_button {
    width: auto !important;
    min-width: 200px !important;
    padding: 14px 30px !important;
    background: transparent !important;
    color: #333 !important;
    border: 2px solid #333 !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
}

.custom-product-wrapper .single_add_to_cart_button:hover {
    background: #333 !important;
    color: #fff !important;
}

.custom-product-wrapper .wishlist-wrapper {
    margin-top: 20px;
}

.custom-product-wrapper .wishlist-wrapper a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s;
    width: 100%;
    justify-content: center;
}

.custom-product-wrapper .wishlist-wrapper a:hover {
    border-color: #007cba;
    color: #007cba;
    background: #f0f8ff;
}

.custom-product-wrapper .related-products-section {
    margin-top: 40px;
}

.custom-product-wrapper .section-title {
    font-size: clamp(20px, 4vw, 24px);
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
}

.custom-product-wrapper .section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #007cba;
}

.custom-product-wrapper .related-products-section ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-product-wrapper .related-products-section li.product {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.custom-product-wrapper .related-products-section li.product:hover {
    transform: translateY(-5px);
}

.custom-product-wrapper .related-products-section li.product a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.custom-product-wrapper .related-products-section li.product img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.custom-product-wrapper .related-products-section li.product h2 {
    font-size: 15px;
    padding: 12px 12px 5px;
    margin: 0;
    color: #333;
    word-wrap: break-word;
}

.custom-product-wrapper .related-products-section li.product .price {
    padding: 0 12px 10px;
    display: block;
    color: #000000 !important;
    font-weight: 600;
    font-size: 14px;
}

.custom-product-wrapper .related-products-section li.product .button {
    display: block;
    margin: 10px 12px 12px;
    padding: 8px 10px;
    text-align: center;
    background: #007cba;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
    font-size: 14px;
    white-space: normal;
    word-wrap: break-word;
}

.custom-product-wrapper .related-products-section li.product .button:hover {
    background: #005a87;
}

/* ========== PRODUCT TABS ========== */
.custom-product-wrapper .product-tabs-container {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.custom-product-wrapper .tabs-header {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e5e7eb;
    flex-wrap: wrap;
}

.custom-product-wrapper .tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.custom-product-wrapper .tab-button:hover {
    color: #007cba;
    background: rgba(0, 124, 186, 0.05);
}

.custom-product-wrapper .tab-button.active {
    color: #007cba;
    border-bottom-color: #007cba;
}

.custom-product-wrapper .tab-icon {
    font-size: 18px;
}

.custom-product-wrapper .review-count {
    font-size: 12px;
    font-weight: 500;
    margin-left: 4px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 20px;
}

.custom-product-wrapper .tab-button.active .review-count {
    color: #007cba;
    background: rgba(0, 124, 186, 0.1);
}

.custom-product-wrapper .tabs-body {
    min-height: 300px;
}

.custom-product-wrapper .tab-content {
    display: none;
    animation: tabFadeIn 0.3s ease;
}

.custom-product-wrapper .tab-content.active {
    display: block;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Description Tab */
.custom-product-wrapper .product-description-full {
    line-height: 1.8;
    color: #4b5563;
    font-size: 16px;
}

.custom-product-wrapper .product-description-full h2,
.custom-product-wrapper .product-description-full h3,
.custom-product-wrapper .product-description-full h4 {
    color: #111827;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.custom-product-wrapper .product-description-full p {
    margin-bottom: 20px;
}

.custom-product-wrapper .product-description-full ul,
.custom-product-wrapper .product-description-full ol {
    margin: 20px 0;
    padding-left: 30px;
}

.custom-product-wrapper .product-description-full li {
    margin-bottom: 8px;
}

/* Audiobook Player */
.custom-product-wrapper .product-audiobook {
    margin-top: 40px;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    border-radius: 16px;
    border-left: 4px solid #007cba;
}

.custom-product-wrapper .product-audiobook h3 {
    margin-top: 0 !important;
    margin-bottom: 16px !important;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.custom-product-wrapper .product-audiobook audio {
    width: 100%;
    max-width: 400px;
    border-radius: 30px;
    outline: none;
}

/* ========== RATING SUMMARY WIDGET ========== */
.custom-product-wrapper .rating-summary-widget {
    display: flex;
    gap: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    margin-top: 25px;
    border: 1px solid #e2e8f0;
}

.custom-product-wrapper .rating-summary-left {
    text-align: center;
    min-width: 120px;
    padding: 8px 16px;
    background: white;
    border-radius: 12px;
}

.custom-product-wrapper .rating-summary-score {
    font-size: 42px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 6px;
}

.custom-product-wrapper .rating-summary-stars {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 6px;
}

.custom-product-wrapper .rating-summary-stars .star {
    font-size: 16px;
}

.custom-product-wrapper .rating-summary-stars .star.filled {
    color: #fbbf24;
}

.custom-product-wrapper .rating-summary-stars .star.half {
    color: #fbbf24;
    font-size: 16px;
}

.custom-product-wrapper .rating-summary-stars .star.empty {
    color: #cbd5e1;
}

.custom-product-wrapper .rating-summary-count {
    font-size: 12px;
    color: #64748b;
}

.custom-product-wrapper .rating-summary-right {
    flex: 1;
    min-width: 160px;
}

.custom-product-wrapper .rating-bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.custom-product-wrapper .rating-bar-item:last-child {
    margin-bottom: 0;
}

.custom-product-wrapper .rating-label {
    width: 40px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}

.custom-product-wrapper .rating-bar-bg {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.custom-product-wrapper .rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.5s ease;
}

.custom-product-wrapper .rating-percent {
    width: 40px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    text-align: right;
}

/* Reviews Tab - Hide Avatar */
.custom-product-wrapper .product-reviews-wrapper .avatar,
.custom-product-wrapper .product-reviews-wrapper .commentlist .avatar,
.custom-product-wrapper .product-reviews-wrapper #reviews .avatar {
    display: none !important;
}

.custom-product-wrapper .product-reviews-wrapper .comment-text {
    margin-left: 0 !important;
}

/* Responsive */
@media (max-width: 992px) {
    .custom-product-wrapper .product-main-section {
        grid-template-columns: 1fr 1fr;
    }
    .custom-product-wrapper .related-products-section ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
    .custom-product-wrapper .custom-product-container {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .custom-product-wrapper {
        padding: 0 10px;
        margin: 15px auto;
    }
    .custom-product-wrapper .custom-product-container {
        padding: 20px;
    }
    .custom-product-wrapper .product-main-section {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .custom-product-wrapper .product-gallery-column {
        max-width: 100% !important;
    }
    .custom-product-wrapper .product-gallery-wrapper {
        padding: 15px;
    }
    .custom-product-wrapper .product-main-image {
        max-height: 350px;
    }
    .custom-product-wrapper .related-products-section ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* Tabs Responsive */
    .custom-product-wrapper .tabs-header {
        gap: 4px;
        overflow-x: auto;
        flex-wrap: nowrap;
        white-space: nowrap;
    }
    .custom-product-wrapper .tab-button {
        padding: 10px 16px;
        font-size: 14px;
        flex-shrink: 0;
    }
    .custom-product-wrapper .tab-icon {
        font-size: 14px;
    }
    .custom-product-wrapper .review-count {
        font-size: 10px;
        padding: 1px 6px;
    }
    
    /* Rating Summary Responsive */
    .custom-product-wrapper .rating-summary-widget {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    .custom-product-wrapper .rating-summary-left {
        min-width: auto;
        flex-direction: column;
    }
    .custom-product-wrapper .rating-summary-score {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .custom-product-wrapper .custom-product-container {
        padding: 15px;
    }
    .custom-product-wrapper .product-title {
        font-size: 22px;
    }
    .custom-product-wrapper .product-price-wrapper .price {
        font-size: 24px;
    }
    .custom-product-wrapper .related-products-section ul.products {
        grid-template-columns: 1fr;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }
    .custom-product-wrapper .single_add_to_cart_button {
        min-width: 100% !important;
    }
    .custom-product-wrapper .tab-button {
        padding: 8px 12px;
        font-size: 13px;
    }
    .custom-product-wrapper .product-description-full {
        font-size: 14px;
    }
}

.custom-product-wrapper .product-main-section,
.custom-product-wrapper .related-products-section {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}