/**
 * Diamond Details Professional Styling
 * All styles for diamond-details-flatsome.php
 */

/* Breadcrumbs */
.woocommerce-breadcrumb {
    font-size: 14px;
    color: #666;
    padding: 5px 0;
    margin-bottom: 5px;
}

/* Override Flatsome's excessive column bottom padding on diamond details page */
.diamond-details-page .row {
    margin-bottom: 0;
}

.diamond-details-page .row .col {
    padding-bottom: 15px; /* Reduce from Flatsome's default 30px */
}

.diamond-details-page .row:first-of-type .col {
    padding-bottom: 10px; /* Even less spacing for breadcrumb row */
}

/* Main content row with no padding */
.diamond-main-content {
    padding: 0;
}

.woocommerce-breadcrumb a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.woocommerce-breadcrumb a:hover {
    color: #005a87;
    text-decoration: underline;
}

.woocommerce-breadcrumb .divider {
    margin: 0 8px;
    color: #999;
}

.woocommerce-breadcrumb span:last-child {
    color: #333;
    font-weight: 500;
}

/* SKU Display - Inline Version */
.product-sku-inline {
    font-size: 14px;
    color: #666;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
}

.product-sku-inline .sku-label {
    font-weight: 500;
    color: #333;
}

.product-sku-inline .sku-value {
    font-weight: 600;
    color: #0073aa;
    margin-left: 5px;
}

/* Legacy SKU Display (if still used elsewhere) */
.product-sku {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    background: #f8f9fa;
    padding: 8px 12px;
    display: inline-block;
}

.product-sku .sku-label {
    font-weight: 500;
    color: #333;
}

.product-sku .sku-value {
    font-weight: 600;
    color: #0073aa;
    margin-left: 5px;
}

/* Step 1: Professional Gallery Styling */
.professional-diamond-gallery {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px 0;
}

.main-diamond-display {
    position: relative;
    width: 100%;
    height: 500px;
    background: #ffffff;
    border: 1px solid #e1e1e1;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.diamond-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.diamond-view.active {
    opacity: 1;
    visibility: visible;
}

.main-diamond-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.diamond-placeholder {
    text-align: center;
    color: #999;
}

.diamond-placeholder i {
    font-size: 120px;
    display: block;
    margin-bottom: 15px;
    color: #ddd;
}

/* Measurements View */
.measurements-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.diamond-outline {
    margin-bottom: 30px;
}

.measurements-data h4 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
}

.measurement-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    text-align: left;
}

.measurement-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f8f8;
}

.measurement-item .label {
    font-weight: 500;
    color: #666;
    white-space: nowrap;
    margin-right: 8px;
}

.measurement-item .value {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.measurement-row {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    width: 100%;
}

.measurement-item.half {
    flex: 1;
    min-width: 0; /* Prevents flex items from overflowing */
    width: auto; /* Override any fixed width from base class */
}

/* Professional Thumbnail Navigation */
.diamond-thumbnails {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 0 10px;
}

.thumb-item {
    width: 60px;
    height: 60px;
    border: 2px solid #e1e1e1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    overflow: hidden;
}

.thumb-item:hover {
    border-color: #0073aa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,115,170,0.15);
}

.thumb-item.active {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0,115,170,0.2);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-icon {
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-item:hover .thumb-icon,
.thumb-item.active .thumb-icon {
    color: #0073aa;
}

.thumb-icon img {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.thumb-item:hover .thumb-icon img,
.thumb-item.active .thumb-icon img {
    opacity: 1;
}

.thumb-icon .lab-logo {
    opacity: 0.8;
    transition: opacity 0.3s ease;
    filter: grayscale(20%);
}

.thumb-item:hover .thumb-icon .lab-logo,
.thumb-item.active .thumb-icon .lab-logo {
    opacity: 1;
    filter: grayscale(0%);
}

/* Video and iframe styling */
.diamond-view iframe,
.diamond-view video {
    width: 95%;
    height: 95%;
    border: none;
}

/* Step 2: Product Details Styling */
.diamond-product-details {
    padding: 20px 0 20px 40px;
}

.diamond-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.diamond-badges {
    display: flex;
    gap: 10px;
    margin: 15px 0 25px 0;
    flex-wrap: wrap;
    align-items: center;
}

.certification-badge,
.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
}

.certification-badge {
    background: #f0f8ff;
    color: #0073aa;
    border: 1px solid #0073aa;
}

.availability-badge.available {
    background: #f0f9ff;
    color: #059669;
    border: 1px solid #059669;
}

.diamond-pricing {
    margin-bottom: 30px;
}

.main-price {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    line-height: 1;
    display: flex;
    align-items: baseline;
}

.currency {
    font-size: 24px;
    margin-right: 2px;
}

.amount {
    line-height: 1;
}

/* WooCommerce Price Styling for Diamond Details */
.price-wrapper {
    margin: 20px 0 30px 0;
}

.price-wrapper .price.product-page-price {
    font-size: 42px;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1.2;
}

.price-wrapper .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.price-wrapper .woocommerce-Price-currencySymbol {
    font-size: 0.8em;
    margin-right: 3px;
    vertical-align: top;
}

/* Discount pricing styles for detail page */
.price-wrapper .original-price {
    text-decoration: line-through;
    color: #999;
    font-weight: 400;
    margin-right: 15px;
    font-size: 0.7em;
    vertical-align: middle;
}

.price-wrapper .discounted-price {
    color: #333;
    font-weight: 700;
}

/* Ensure price stands out on mobile too */
@media (max-width: 768px) {
    .price-wrapper .price.product-page-price {
        font-size: 36px;
    }
    
    .price-wrapper .original-price {
        font-size: 0.6em;
        margin-right: 10px;
    }
}

@media (max-width: 480px) {
    .price-wrapper .price.product-page-price {
        font-size: 32px;
    }
    
    .price-wrapper .original-price {
        font-size: 0.55em;
        margin-right: 8px;
    }
}

.diamond-attributes-table {
    width: 100%;
    border-collapse: collapse;
}

.diamond-attributes-table th,
.diamond-attributes-table td {
    padding: 12px 0;
    border-bottom: 1px solid #e1e5e9;
    text-align: left;
}

.diamond-attributes-table th {
    font-weight: 500;
    color: #666;
    width: 40%;
}

.diamond-attributes-table td {
    font-weight: 600;
    color: #333;
}

.diamond-attributes-table tr:last-child th,
.diamond-attributes-table tr:last-child td {
    border-bottom: none;
}

/* Full Width Specifications Section */
.key-specifications-full-width {
    margin: 40px 0;
    padding: 30px;
    background: #f9f9f9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.key-specifications-full-width .specs-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.key-specifications-full-width .diamond-attributes-table {
    background: white;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.key-specifications-full-width .diamond-attributes-table th,
.key-specifications-full-width .diamond-attributes-table td {
    padding: 15px 20px;
}

.key-specifications-full-width .diamond-attributes-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    width: 200px;
}

.key-specifications-full-width .diamond-attributes-table td {
    background: white;
    color: #333;
    font-weight: 500;
}

.key-specifications-full-width .diamond-attributes-table tr:hover {
    background: #f8f9fa;
}

.key-specifications-full-width .diamond-attributes-table tr:hover th {
    background: #e9ecef;
}

/* Certificate Modal Popup */
/* Certificate Modal CSS - REMOVED (certificates now open in new tabs) */

.diamond-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn-add-to-cart,
.btn-add-to-wishlist {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.btn-add-to-cart {
    flex: 1;
    justify-content: center;
}

.btn-add-to-cart:hover {
    transform: translateY(-1px);
}

.btn-add-to-wishlist {
    background: white;
    color: #0073aa;
    border: 2px solid #0073aa;
    min-width: 180px;
    justify-content: center;
}

.btn-add-to-wishlist:hover {
    background: #f0f8ff;
    transform: translateY(-1px);
}

.trust-signals {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #059669;
    font-weight: 500;
}

/* Independent Delivery Estimate Section */
.delivery-estimate-section {
    margin: 20px 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 4px;
}

.delivery-estimate-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.delivery-estimate-item svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #666;
}

/* Mobile responsive for full width specifications */
@media (max-width: 768px) {
    .key-specifications-full-width {
        margin: 20px 0;
        padding: 20px 15px;
    }
    
    .key-specifications-full-width .specs-title {
        font-size: 20px;
    }
    
    .key-specifications-full-width .diamond-attributes-table th,
    .key-specifications-full-width .diamond-attributes-table td {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .key-specifications-full-width .diamond-attributes-table th {
        width: 120px;
    }

    /* Certificate modal responsive styles - REMOVED (certificates now open in new tabs) */
}

/* Mobile responsive */
@media (max-width: 768px) {
    .professional-diamond-gallery {
        max-width: 100%;
        padding: 15px;
    }
    
    .main-diamond-display {
        height: 400px;
    }
    
    .thumb-item {
        width: 50px;
        height: 50px;
    }
    
    .diamond-thumbnails {
        gap: 6px;
    }
    
    .measurements-content {
        padding: 20px;
    }
    
    .measurement-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .measurement-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .measurement-item.half {
        width: 100%;
    }
    
    .diamond-product-details {
        padding: 20px 15px;
    }
    
    .diamond-title {
        font-size: 24px;
    }
    
    .main-price {
        font-size: 28px;
    }
    
    .diamond-actions {
        flex-direction: column;
    }
    
    .btn-add-to-cart,
    .btn-add-to-wishlist {
        width: 100%;
    }
    
    .diamond-badges {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin: 10px 0 20px 0;
    }
    
    .product-sku-inline {
        font-size: 13px;
        padding: 5px 10px;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    /* Mobile trust signals styling */
    .trust-signals {
        padding: 15px;
        gap: 10px;
    }
    
    /* Mobile delivery estimate styling */
    .delivery-estimate-section {
        margin: 15px 0;
        padding: 12px 15px;
    }
    
    .delivery-estimate-item {
        font-size: 13px;
        line-height: 1.3;
        gap: 10px;
    }
    
    .delivery-estimate-item svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .main-diamond-display {
        height: 350px;
    }
    
    .thumb-item {
        width: 45px;
        height: 45px;
    }
    
    .thumb-icon svg,
    .thumb-icon img,
    .thumb-icon .lab-logo {
        width: 20px;
        height: 20px;
    }
    
    .diamond-title {
        font-size: 20px;
    }
    
    .main-price {
        font-size: 24px;
    }
}

/* Tab System Styles - Enhanced for Flatsome */
.tabbed-content {
    margin: 2px 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Override Flatsome tab navigation styles */
.tabbed-content .nav-line {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 0;
    padding: 0;
}

.tabbed-content .nav-line .tab {
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tabbed-content .nav-line .tab.active {
    border-bottom-color: #b8860b;
    background: #fff;
}

.tabbed-content .nav-line .tab a {
    padding: 18px 24px;
    color: #666;
    font-size: 16px;
    transition: all 0.3s ease;
}

.tabbed-content .nav-line .tab.active a {
    color: #b8860b;
}

.tabbed-content .nav-line .tab:hover a {
    color: #b8860b;
}

/* Tab content styling */
.tabbed-content .tab-panels .panel {
    padding: 20px;
}

/* Diamond Sections */
.diamond-section {
    margin-bottom: 35px;
}

.diamond-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #b8860b;
    font-weight: 600;
}

/* Quality Grade Styling */
.quality-grade {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quality grade colors */
.diamond-attributes-table td .quality-grade {
    background: #e8f5e8;
    color: #2d5016;
    border: 1px solid #a3d977;
}

/* Excellent/Ideal grades */
.diamond-attributes-table td:contains("Excellent") .quality-grade,
.diamond-attributes-table td:contains("Ideal") .quality-grade {
    background: #e8f5e8;
    color: #2d5016;
    border: 1px solid #a3d977;
}

/* Very Good grades */
.diamond-attributes-table td:contains("Very Good") .quality-grade {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Good grades */
.diamond-attributes-table td:contains("Good") .quality-grade {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Fair/Poor grades */
.diamond-attributes-table td:contains("Fair") .quality-grade,
.diamond-attributes-table td:contains("Poor") .quality-grade {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* The 4 C's Grid */
.four-cs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.c-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #dee2e6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.c-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.c-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.c-value {
    font-size: 24px;
    color: #2c3e50;
    font-weight: 700;
}

/* Video Section */
.video-section {
    text-align: center;
}

.video-container {
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.video-description {
    color: #6c757d;
    font-size: 16px;
    line-height: 1.6;
    margin-top: 15px;
}

/* Certificate Section */
.certificate-section {
    text-align: left;
}

.certificate-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #b8860b;
}

.certificate-header .section-title {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.certificate-simple-content {
    padding: 20px 0;
}

.certificate-info-card {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.certificate-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.lab-logo-large {
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.certificate-details {
    flex: 1;
}

.certificate-details h3 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.certificate-details p {
    margin-bottom: 10px;
    color: #495057;
    line-height: 1.6;
}

.certificate-description {
    margin: 15px 0 20px 0;
    color: #6c757d;
    font-style: italic;
}

.certificate-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Certificate iframe containers - REMOVED (certificates now open in new tabs) */

.btn-view-certificate-large {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #b8860b 0%, #daa520 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-view-certificate-large:hover {
    background: linear-gradient(135deg, #a0750a 0%, #c8940e 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184,134,11,0.3);
    color: white;
    text-decoration: none;
}

/* Retry iframe button - REMOVED (certificates now open in new tabs) */

.btn-view-certificate,
.btn-view-certificate-modal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #b8860b 0%, #daa520 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-view-certificate:hover,
.btn-view-certificate-modal:hover {
    background: linear-gradient(135deg, #a0750a 0%, #c8940e 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184,134,11,0.3);
    color: white;
    text-decoration: none;
}

.certificate-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #b8860b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.certificate-link:hover {
    color: #a0750a;
    text-decoration: none;
}

.certificate-link svg {
    width: 16px;
    height: 16px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .tabbed-content .tab-panels .panel {
        padding: 20px;
    }
    
    .four-cs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .c-item {
        padding: 20px 15px;
    }
    
    .c-value {
        font-size: 20px;
    }
    
    .certificate-info-card {
        flex-direction: column;
        gap: 20px;
        padding: 25px 20px;
        text-align: center;
    }
    
    .certificate-icon {
        width: 60px;
        height: 60px;
        margin: 0 auto;
    }
    
    .certificate-details h3 {
        font-size: 20px;
    }
    
    .btn-view-certificate-large {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .four-cs-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 18px;
    }
}

/* Video Lazy Loading Styles */
.video-section {
    padding: 20px;
}

.video-container {
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

/* Video loading and placeholder styles */
.video-loading, .video-placeholder {
    text-align: center;
    padding: 80px 20px;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.video-loading svg, .video-placeholder svg {
    opacity: 0.5;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.video-loading h3, .video-placeholder h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.video-loading p, .video-placeholder p {
    font-size: 14px;
    color: #666;
    margin-bottom: 0;
    max-width: 300px;
}

.video-content {
    width: 100%;
    height: 100%;
}

.video-content iframe,
.video-content video {
    border-radius: 8px;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
