/* Australian Sires Holstein Single Product Layout CSS - Matches Screenshot Design */

/* Breadcrumb Styles */
.woocommerce-breadcrumb {
    font-size: 0.8em;
    text-align: right;
    margin: 2px;
}

.woocommerce:where(body:not(.woocommerce-uses-block-theme)) .woocommerce-breadcrumb {
    font-size: 0.8em;
    text-align: right;
    margin: 2px;
}

.woocommerce .woocommerce-breadcrumb {
     margin: 5px;
    padding: 0;
}

.australian-sires-holsteins-layout-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 15px; /* Further reduced padding */
    background-color: #f9f9f9;
    font-size:1rem;
}

/* Header Section */
.australian-sires-holsteins-header-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px; /* Reduced from 30px by 20% */
    margin-bottom: 24px; /* Reduced from 30px by 20% */
}

.australian-sires-holsteins-left-column {
    padding-right: 16px; /* Reduced from 20px by 20% */
}

.australian-sires-holsteins-product-title {
    font-size: 2.2rem; /* Reduced to 2.2rem */
    font-weight: bold;
    margin: 0;
    color: #003c71;
    border-bottom: solid 3px #003c71;
    border-bottom-right-radius: 20px;
    flex: 1;
    line-height: 1.3;
}

.australian-sires-holsteins-release-info h3 {
    color: #003c71;
    font-size: 0.99em; /* Reduced from 1.1em by 10% */
    font-weight: bold;
    margin-bottom: 12px; /* Reduced from 15px by 20% */
}

.australian-sires-holsteins-checkmarks {
    margin-bottom: 16px; /* Reduced from 20px by 20% */
}

.checkmark-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 6px; /* Reduced from 8px by 25% for tighter spacing */
}

.checkmark {
    color: #28a745;
    font-weight: bold;
    font-size: 1.08em; /* Reduced from 1.2em by 10% */
    margin-right: 6px; /* Reduced from 8px by 25% */
    margin-top: 2px;
}

.checkmark-item span:last-child {
    font-size: 0.81em; /* Reduced from 0.9em by 10% */
    line-height: 1.3; /* Reduced line-height for tighter spacing */
    color: #333;
}

/* Key Performance Indicators */
.australian-sires-holsteins-key-indicators {
    display: flex;
    gap: 0;
    margin-top: 10px; /* Reduced from 20px by 20% */
    margin-bottom: 10px; /* Reduced from 20px by 20% */
}

.indicator-box {
    background-color: #003c71;
    color: white;
    text-align: center;
    padding: 16px 24px; /* Reduced from 20px 30px by 20% */
    position: relative;
    flex: 1;
}

.indicator-box:first-child {
    border-radius: 8px 0 0 8px;
}

.indicator-box:last-child {
    border-radius: 0 8px 8px 0;
}

.indicator-box:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 2px;
    background-color: white;
}

.bpi-box {
    background-color: #003c71;
}

.hwi-box {
    background-color: #003c71;
}

.sustainability-box {
    background-color: #003c71;
}

.indicator-label {
    font-size: 0.8em; /* Reduced from 1em by 10% */
    font-weight: bold;
    margin-bottom: 6px; /* Reduced from 8px by 25% */
    color: white;
}

.indicator-subtext {
    font-size: 0.9em; /* Reduced from 1em by 10% */
    color: white;
    border-top: 2px solid white;
    padding-top: 6px; /* Reduced from 8px by 25% */
    margin-top: 6px; /* Reduced from 8px by 25% */
}

/* Video Toggle Controls */
.video-toggle-controls {
    margin: 5px 0; /* Reduced from 20px by 20% */
    text-align: left;
    min-height:35px;
}

.video-toggle-button,
#video-toggle-btn {
    background-color: #003c71;
    color: white;
    border: none;
    padding: 10px 19px; /* Reduced from 12px 24px by ~20% */
    border-radius: 5px;
    font-size: 0.8em !important; /* Updated to 0.8em as requested */
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.video-toggle-button:hover,
#video-toggle-btn:hover {
    background-color: #0f2f4f;
}

/* Product Image/Video Section */
.australian-sires-holsteins-product-image {
    margin: 5px 0; 
    width: 100%;
    position: relative; 
}

.product-main-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.product-main-image:hover {
    transform: scale(1.02);
}

.video-container {
    width: 100%;
    height: auto;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-main-video {
    width: 100%;
    height: auto;
    display: block;
}

/* Video Loading States */
.video-container.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.video-container.loaded {
    background-color: #000;
}

.video-container.playing .product-main-video {
    opacity: 1;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Description Section */
.australian-sires-holsteins-description-section {
    margin: 24px 0; /* Reduced from 30px by 20% */
    margin-top: 10px;
    width: 100%;
    height: auto;
    float: left;
}

.description-container {
    border: 2px solid #003c71;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
}

.description-title {
    background-color: #003c71;
    color: white;
    margin: 0;
    padding: 4px 16px; /* Reduced from 5px 20px by 20% */
    font-size: 1em; /* Reduced from 1.1em by 10% */
    font-weight: bold;
    text-transform: none;
    border-radius: 0;
}

.description-content {
    padding: 16px; /* Reduced from 20px by 20% */
    background-color: #ffffff;
}

.product-description {
    margin-bottom: 12px; /* Reduced from 15px by 20% */
    line-height: 1.5; /* Reduced from 1.6 for tighter spacing */
    color: #333;
    font-size: 0.9em; /* Reduced by 10% */
}

.product-description p {
    margin-bottom: 12px; /* Reduced from 15px by 20% */
}

.description-caption {
    color: #003c71;
    font-size: 1em; /* Reduced from 1.2em by 10% */
    font-weight: bold;
    margin: 0 0 12px 0; /* Reduced from 15px by 20% */
    line-height: 1.3; /* Reduced from 1.4 */
}

.description-summaries {
    margin: 0;
}

.summary-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px; /* Reduced from 12px by ~17% */
    line-height: 1.4; /* Reduced from 1.5 */
}

.summary-item:last-child {
    margin-bottom: 0;
}

.green-checkmark {
    color: #28a745;
    font-weight: bold;
    font-size: 0.99em; /* Reduced from 1.1em by 10% */
    margin-right: 8px; /* Reduced from 10px by 20% */
    margin-top: 2px;
    flex-shrink: 0;
}

.summary-text {
    color: #333;
    line-height: 1.4; /* Reduced from 1.5 */
    flex: 1;
    font-size: 0.9em; /* Reduced by 10% */
}

/* General Information Sidebar */
.australian-sires-holsteins-general-info-sidebar {
    background-color: #f8f9fa;
}

.general-info-box {
    background-color: white;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    border: 2px solid #003c71;
}

.info-box-title {
    background-color: #003c71;
    color: white;
    margin: 0;
    padding: 4px 16px; /* Reduced from 5px 20px by 20% */
    font-size: 0.99em; /* Reduced from 1.1em by 10% */
    font-weight: bold;
    text-align: left;
}

.info-table-structured {
    margin: 0;
}

.info-row-structured {
    display: flex;
    border-bottom: 1px solid #fff;
}

.info-row-structured:last-child {
    border-bottom: none;
}

.info-label-structured {
    background-color: #c3e4d9;
    padding: 5px 10px; /* Further reduced padding */
    font-weight: 600;
    color: #333;
    font-size: 0.8em; /* Set to 0.8em */
    width: 40%;
    border-right: 1px solid #ddd;
    display: flex;
    align-items: center;
}

.info-value-structured {
    background-color: #f6f9fb;
    padding: 5px 10px; /* Further reduced padding */
    font-weight: 500;
    color: #333;
    text-align: right;
    font-size: 0.8em; /* Set to 0.8em */
    width: 60%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.australian-sires-holsteins-price-section {
    background-color: #003c71;
    padding: 12px 16px; /* Reduced from 15px 20px by 20% */
    text-align: center;
    margin: 0;
}

.price-display {
    color: white;
    font-size: 1.17em; /* Reduced from 1.3em by 10% */
    font-weight: bold;
}

.inc-gst {
    font-size: 0.72em; /* Reduced from 0.8em by 10% */
    opacity: 0.9;
}

.australian-sires-holsteins-cart-section {
    padding: 16px; /* Reduced from 20px by 20% */
    background-color: white;
}

.product-options {
    margin-bottom: 12px; /* Reduced from 15px by 20% */
}

.product-options label {
    display: block;
    margin-bottom: 4px; /* Reduced from 5px by 20% */
    font-weight: 600;
    color: #333;
    font-size: 0.9em; /* Reduced by 10% */
}

.product-options select {
    width: 100%;
    padding: 6px 10px; /* Reduced from 8px 12px by ~20% */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.81em; /* Reduced from 0.9em by 10% */
}

.quantity-cart-section {
    display: flex;
    gap: 8px; /* Reduced from 10px by 20% */
    align-items: center;
}

.quantity input {
    width: 60px;
    padding: 6px; /* Reduced from 8px by 25% */
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em; /* Reduced by 10% */
}

.single_add_to_cart_button {
    background: #0f2f52 !important;
    opacity: 1 !important;
    filter: none !important;
    color: white;
    border: none;
    padding: 10px 19px; /* Reduced from 12px 24px by ~20% */
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9em; /* Reduced by 10% */
    cursor: pointer;
    flex: 1;
    transition: background-color 0.3s ease;
}

.single_add_to_cart_button:hover {
    background-color: #0f2f4f;
}

/* Pedigree Information Section */
.pedigree-info-box {
    background-color: white;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    border: 2px solid #003c71;
    margin-top: 16px; /* Reduced from 20px by 20% */
}

.pedigree-title {
    background-color: #003c71;
    color: white;
    margin: 0;
    padding: 4px 16px; /* Reduced from 5px 20px by 20% */
    font-size: 0.99em; /* Reduced from 1.1em by 10% */
    font-weight: bold;
    text-align: left;
}

.pedigree-subsection {
    margin: 0;
}

.pedigree-subsection-title {
    margin: 0;
    padding: 4px 16px; /* Reduced from 5px 20px by 20% */
    font-size: 0.9em; /* Reduced from 1em by 10% */
    font-weight: bold;
    color: white;
    text-align: left;
}

.sire-title {
    background-color: #00a77e;
}

.dam-title {
    background-color: #00a77e;
}

.pedigree-info-structured {
    margin: 0;
}

.pedigree-row-structured {
    display: flex;
    border-bottom: 1px solid #fff;
}

.pedigree-row-structured:last-child {
    border-bottom: none;
}

.pedigree-label-structured {
    background-color: #f6f9fb;
    padding: 4px 12px; /* Reduced from 5px 15px by 20% */
    font-weight: 600;
    color: #333;
    font-size: 0.77em; /* Reduced from 0.85em by ~10% */
    width: 45%;
    border-right: 1px solid #fff;
    display: flex;
    align-items: center;
}

.pedigree-value-structured {
    background-color: #f6f9fb;
    padding: 4px 12px; /* Reduced from 5px 15px by 20% */
    font-weight: 500;
    color: #333;
    text-align: right;
    font-size: 0.77em; /* Reduced from 0.85em by ~10% */
    width: 55%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Download PDF Section */
.download-pdf-container {
    padding: 8px; /* Reduced from 10px by 20% */
    margin-top: 16px; /* Reduced from 20px by 20% */
}

.download-pdf-content {
    text-align: center;
}

.download-pdf-button {
    background-color: #003c71;
    color: #fff;
    border: none;
    padding: 10px 19px; /* Reduced from 12px 24px by ~20% */
    border-radius: 5px;
    font-size: 0.9em; /* Reduced from 1em by 10% */
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-bottom: 12px; /* Reduced from 15px by 20% */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* Reduced from 8px by 25% */
}

.download-pdf-button:hover {
    background-color: #f0f0f0;
}

.download-pdf-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.download-pdf-button.pdf-generating {
    background-color: #0f2d4f;
    cursor: wait;
}

.download-pdf-button.pdf-success {
    background-color: #28a745 !important;
    cursor: default;
}

.pdf-loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: pdf-spin 1s ease-in-out infinite;
}

@keyframes pdf-spin {
    to { transform: rotate(360deg); }
}

.download-pdf-description {
    color: #666;
    font-size: 0.81em; /* Reduced from 0.9em by 10% */
    line-height: 1.4; /* Reduced from 1.5 */
    margin: 0;
    text-align: center;
}

/* Main Product Image Section */
.australian-sires-holsteins-image-section {
    display: flex;
    gap: 16px; /* Reduced from 20px by 20% */
    margin-bottom: 24px; /* Reduced from 30px by 20% */
    justify-content: center;
    align-items: flex-start;
    position: relative; /* Added for positioning video toggle */
}

/* Ensure image wrapper is positioned for overlay */
.product-image-wrapper {
    position: relative;
    width: 100%;
}

.main-product-image {
    position: relative;
    flex: 1;
    max-width: 600px;
}

.main-product-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.image-zoom-btn {
    position: absolute;
    top: 12px; /* Reduced from 15px by 20% */
    right: 12px; /* Reduced from 15px by 20% */
    background-color: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 36px; /* Reduced from 40px by 10% */
    height: 36px; /* Reduced from 40px by 10% */
    font-size: 1.08em; /* Reduced from 1.2em by 10% */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.image-zoom-btn:hover {
    background-color: white;
}

.thumbnail-images {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Reduced from 10px by 20% */
}

.thumbnail-img {
    width: 72px; /* Reduced from 80px by 10% */
    height: 54px; /* Reduced from 60px by 10% */
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail-img:hover {
    border-color: #003c71;
}

/* Bottom Tables Section */
.australian-sires-holsteins-tables-section {
    margin-top: 24px; /* Reduced from 30px by 20% */
}

/* Production Table (Full Width) */
.production-table-container {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 16px; /* Reduced from 20px by 20% */
    border: 2px solid #003c71;
}

.production-table-title {
    background-color: #003c71;
    color: white;
    margin: 0;
    padding: 4px; /* Reduced from 5px by 20% */
    font-size: 0.9em; /* Reduced from 1em by 10% */
    font-weight: bold;
    text-align: left;
}

.table-subtitle {
    font-size: 0.72em; /* Reduced from 0.8em by 10% */
    font-weight: normal;
    opacity: 0.9;
    float: right;
}

.production-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0px;
}

.production-header {
    background-color: #c3e4d9;
    color: #333;
    padding: 10px 6px; /* Reduced from 12px 8px by ~20% */
    text-align: center;
    font-weight: bold;
    border: 1px solid #fff;
}

.production-header:last-child {
    border-right: none;
}

.production-data {
    background-color: #f9f9f9;
    color: #333;
    padding: 10px 6px; /* Reduced from 12px 8px by ~20% */
    text-align: center;
    font-weight: 500;
    border: 1px solid #fff;
     font-size:0.8em;
}

.production-data:last-child {
    border-right: none;
}

/* Bottom Row: Side by Side Layout */
.bottom-tables-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px; /* Reduced from 20px by 20% */
}

/* Workability and Management Container (Left Side) */
.workability-management-container {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid #003c71;
}

.workability-table-title {
    background-color: #003c71;
    color: white;
    margin: 0;
    padding: 12px; /* Reduced from 15px by 20% */
    font-size: 0.9em; /* Reduced from 1em by 10% */
    font-weight: bold;
    text-align: left;
}

.workability-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.77em; /* Reduced from 0.85em by ~10% */
    margin-bottom: 0px;
}

.workability-trait-label {
    background-color: #c3e4d9;
    color: #333;
    padding: 6px 10px; /* Reduced from 8px 12px by ~20% */
    text-align: left;
    font-weight: 500;
    border: 1px solid #fff;
    width: 70%;
}

.workability-trait-value {
    background-color: #f9f9f9;
    color: #333;
    padding: 6px 10px; /* Reduced from 8px 12px by ~20% */
    text-align: right;
    font-weight: 600;
    width: 30%;
    border: 1px solid #fff;
}

.management-table-title {
    background-color: #003c71;
    color: white;
    margin: 0;
    padding: 8px 12px; /* Reduced from 10px 15px by 20% */
    font-size: 0.81em; /* Reduced from 0.9em by 10% */
    font-weight: bold;
    text-align: left;
}

.management-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.77em; /* Reduced from 0.85em by ~10% */
    margin-bottom: 0px;
}

.management-trait-label {
    background-color: #c3e4d9;
    color: #333;
    padding: 6px 10px; /* Reduced from 8px 12px by ~20% */
    text-align: left;
    font-weight: 500;
    border: 1px solid #fff;
    width: 70%;
}

.management-trait-value {
    background-color: #f9f9f9;
    color: #333;
    padding: 6px 10px; /* Reduced from 8px 12px by ~20% */
    text-align: right;
    font-weight: 600;
    width: 30%;
    border: 1px solid #fff;
}

/* Conformation Container (Right Side) */
.conformation-container {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid #003c71;
}

.conformation-table-title {
    background-color: #003c71;
    color: white;
    margin: 0;
    padding: 12px; /* Reduced from 15px by 20% */
    font-size: 0.9em; /* Reduced from 1em by 10% */
    font-weight: bold;
    text-align: left;
}

.conformation-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0px;
    font-size:0.8em;
}

.conformation-trait-label {
    background-color: #c3e4d9;
    color: #333;
    padding: 6px 6px; /* Reduced from 8px 8px by 25% */
    text-align: left;
    font-weight: 500;
    border: 1px solid #fff;
    width: 40%;
}

.conformation-trait-value {
    background-color: #f9f9f9;
    color: #333;
    padding: 6px 6px; /* Reduced from 8px 8px by 25% */
    text-align: center;
    font-weight: 600;
    width: 10%;
    border: 1px solid #fff;
}

/* Special styling for specific conformation fields */
.conformation-trait-label.special-field {
    background-color: #003c71;
    color: #fff;
    border: 1px solid #fff;
}

.conformation-trait-value.special-field-value {
    background-color: #6790be;
    color: #fff;
    border: 1px solid #fff;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .bottom-tables-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .australian-sires-holsteins-header-section {
        grid-template-columns: 1fr;
    }
    
    .australian-sires-holsteins-key-indicators {
        flex-direction: column;
        gap: 12px; /* Reduced from 15px by 20% */
        padding: 0 8px; /* Reduced from 10px by 20% */
    }
    
    .indicator-box {
        min-width: auto;
        border-radius: 8px !important;
        padding: 12px 16px; /* Reduced from 15px 20px by 20% */
    }
    
    .indicator-box:not(:last-child)::after {
        display: none;
    }
    
    /* Fix button styling consistency on mobile */
    #video-toggle-btn,
    .explainer-button,
    .download-pdf-button,
    button[onclick*="toggleVideoView"],
    button[onclick*="openExplainerTool"] {
        text-transform: none !important;
        font-size: 14px !important;
        padding: 10px 20px !important;
        min-height: 44px !important;
        width: 100% !important;
        margin-bottom: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 5px !important;
    }
    
    /* Ensure button container has proper spacing */
    .product-header-actions,
    .button-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
        padding: 0 10px;
    }
    
    /* Make sure all action buttons have consistent appearance */
    .product-header-actions button,
    .product-header-actions .button,
    .button-container button,
    .button-container .button {
        text-transform: none !important;
        font-size: 14px !important;
        line-height: 1.4 !important;
        min-height: 44px !important;
        width: 100% !important;
        white-space: normal !important;
    }
    
    .australian-sires-holsteins-image-section {
        flex-direction: column;
        align-items: center;
    }
    
    .thumbnail-images {
        flex-direction: row;
        justify-content: center;
    }
    
    .bottom-tables-row {
        grid-template-columns: 1fr;
    }
    
    .production-data-table,
    .workability-data-table,
    .management-data-table,
    .conformation-data-table {
        font-size:0.8em;
    }
    
    .production-header,
    .production-data,
    .workability-trait-label,
    .workability-trait-value,
    .management-trait-label,
    .management-trait-value,
    .conformation-trait-label,
    .conformation-trait-value {
        padding: 5px 3px; /* Reduced from 6px 4px by ~20% */
    }
}

@media (max-width: 480px) {
    .australian-sires-holsteins-layout-container {
        padding: 8px; /* Reduced from 10px by 20% */
    }
    
    .australian-sires-holsteins-product-title {
        font-size: 1.62em; /* Reduced from 1.8em by 10% */
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .info-value {
        text-align: left;
        margin-left: 0;
    }
}