/* International Sires Brown Swiss IT Single Product Layout CSS - Based on Australian Sires Holstein Layout */

.brown-swiss-it-layout-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 15px;
    background-color: #f9f9f9;
    font-size:1rem;
}

.woocommerce:where(body:not(.woocommerce-uses-block-theme)) .woocommerce-breadcrumb {
    font-size: 0.8em;
    text-align: right;
    margin:0px 0px 5px 0px;
}

/* Header Section */
.brown-swiss-it-header-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px; /* Reduced from 30px */
    margin-bottom: 24px; /* Reduced from 30px */
}

.brown-swiss-it-left-column {
    padding-right: 16px; /* Reduced from 20px */
}

.brown-swiss-it-product-title {
    font-size: 2.2rem; /* Reduced from 3rem */
    font-weight: bold;
    margin: 0;
    color: #003c71;  /* Blue color for International Sires */
    border-bottom: solid 3px #003c71;
    border-bottom-right-radius: 20px;
    flex: 1;
    line-height: 1.3;
}

.brown-swiss-it-release-info h3 {
    color: #003c71;
    font-size: 0.99em; /* Reduced from 1.1em */
    font-weight: bold;
    margin-bottom: 12px; /* Reduced from 15px */
}

.brown-swiss-it-checkmarks {
    margin-bottom: 16px; /* Reduced from 20px */
}

.checkmark-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 6px; /* Reduced from 8px */
}

.checkmark {
    color: #28a745;
    font-weight: bold;
    font-size: 1.08em; /* Reduced from 1.2em */
    margin-right: 6px; /* Reduced from 8px */
    margin-top: 2px;
}

.checkmark-item span:last-child {
    font-size: 0.81em; /* Reduced from 0.9em */
    line-height: 1.3; /* Reduced from 1.4 */
    color: #333;
}

/* Key Performance Indicators */
.brown-swiss-it-key-indicators {
    display: flex;
    gap: 0;
    margin-top: 10px; /* Reduced from 20px */
    margin-bottom: 10px; /* Reduced from 20px */
}

.indicator-box {
    background-color: #003c71;
    color: white;
    text-align: center;
    padding: 5px 15px; /* Reduced from 20px 30px */
    position: relative;
    flex: 1;
}

.indicator-box:first-child {
    border-radius: 8px 0 0 8px;
}

.indicator-box:last-child {
    border-radius: 8px;
}

.indicator-box:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 2px;
    background-color: white;
}

.ite-box {
    background-color: #003c71;
}

.indicator-label {
    font-size: 0.8em;
    font-weight: bold;
    margin-bottom: 8px;
    color: white;
}

/* Button Container */
.brown-swiss-it-buttons {
    display: flex;
    gap: 10px;
    margin: 5px 0 0 0;
    align-items: center;
    flex-wrap: wrap;
}

/* Explainer Button */
.explainer-button,
button[onclick*="openExplainerTool"],
.brown-swiss-it-buttons .phe-help-button {
    background-color: #00a77e;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.explainer-button:hover,
button[onclick*="openExplainerTool"]:hover,
.brown-swiss-it-buttons .phe-help-button:hover {
    background-color: #1e3d5f;
}

/* Ensure explainer button container displays properly when moved */
.brown-swiss-it-buttons .phe-help-button-container {
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto !important;
    display: inline-block !important;
    margin: 0 !important;
}

.brown-swiss-it-buttons .phe-help-button {
    position: relative !important;
}

.indicator-subtext {
    font-size: 1em;
    color: white;
    border-top: 2px solid white;
    padding-top: 8px;
    margin-top: 8px;
}

/* Video Toggle Controls */
.video-toggle-controls {
    margin: 20px 0;
    text-align: left;
}

.video-toggle-button {
    background-color: #003c71;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.video-toggle-button:hover {
    background-color: #0f2f4f;
}

/* Product Image/Video Section */
.brown-swiss-it-product-image {
    margin: 5px 0;
    width: 100%;
}

.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 */
.brown-swiss-it-description-section {
    margin-top: 24px; /* Reduced from 30px */
    background-color: transparent;
    padding: 0;
    float: left;
    width:100%;
}

.description-container {
    padding: 0;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #003c71;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.description-title {
    font-size: 1em;
    font-weight: bold;
    color: white;
    background-color: #003c71;
    margin: 0;
    padding: 10px 20px;
    border: none;
}

.description-content {
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.product-description {
    margin-bottom: 0;
    font-size: 0.9em; /* Reduced from 1em */
}

.description-caption {
    font-size: 1em; /* Reduced from 1.2em */
    font-weight: bold;
    color: #003c71;
    margin: 0 0 12px 0;
}

.description-summaries {
    margin-top: 16px; /* Reduced from 20px */
}

.summary-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px; /* Reduced from 12px */
}

.green-checkmark {
    color: #28a745;
    font-weight: bold;
    font-size: 1.08em; /* Reduced from 1.2em */
    margin-right: 8px; /* Reduced from 10px */
    margin-top: 2px;
}

.summary-text {
    flex: 1;
    font-size: 0.9em; /* Reduced from 1em */
    color: #333;
    line-height: 1.4; /* Reduced from 1.5 */
}

/* General Information Sidebar */
.brown-swiss-it-general-info-sidebar {
    padding-left: 16px; /* Reduced from 20px */
}

.general-info-box {
    background-color: white;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 16px; /* Reduced from 20px */
    overflow: hidden;
    border: 2px solid #003c71;
}

.info-box-title {
    font-size: 0.99em; /* Reduced from 1.1em */
    font-weight: bold;
    color: white;
    background-color: #003c71;
    margin: 0;
    padding: 5px 16px; /* Reduced horizontal padding */
    border: none;
}

/* Structured Info Table */
.info-table-structured {
    margin-bottom: 0;
    padding: 0;
}

.info-row-structured {
    display: flex;
    padding: 0;
    border-bottom: 1px solid #fff;
    margin: 0;
}

.info-row-structured:last-child {
    border-bottom: none;
}

.info-label-structured {
    font-weight: 600;
    color: #333;
    background-color: #c3e4d9;
    flex: 0 0 40%;
    padding: 5px 10px;
    border-right: 1px solid #ddd;
    font-size: 0.8em; /* Reduced from 0.9em */
}

.info-value-structured {
    flex: 1;
    color: #333;
    background-color: #f6f9fb;
    padding: 5px 10px; 
    font-size: 0.8em;
    text-align: right;
    font-weight: 500;
}

/* Price Section */
.brown-swiss-it-price-section,
.price-section {
    margin: 0;
    padding: 12px 16px; /* Reduced from 20px */
    background-color: #003c71;
    border-top: 1px solid #e8e8e8;
    position: relative;
    z-index: 100;
    overflow: visible;
}

.price-display {
    font-size: 1.1em; /* Reduced from 1.8em */
    font-weight: bold;
    color: white;
    text-align: left;
    position: relative;
    overflow: visible;
    display: block;
}

.inc-gst {
    font-size: 0.6em;
    color: white;
    font-weight: normal;
    opacity: 0.9;
}

/* Price Variations Styling */
.price-variation {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    /* Simple inline layout */
}

.price-variation:first-child {
    padding-top: 0;
}

.price-variation:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.price-label {
    font-weight: 600;
    margin-right: 5px;
    color: rgba(255, 255, 255, 0.9);
    display: inline;
}

.variation-title {
    font-weight: 600;
    color: white;
    margin-right: 5px;
    display: inline;
}

/* Stock Icon Styling */
.stock-icon-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    z-index: 1000;
    margin-left: 10px;
    vertical-align: middle;
}

.stock-icon {
    font-size: 1em;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.stock-icon-wrapper:hover .stock-icon {
    opacity: 1;
}

/* Stock Status Display */
.stock-status {
    font-size: 0.65em;
    color: #fff;
}

/* Cart Section */
.brown-swiss-it-cart-section {
    padding: 20px;
    background-color: white;
}

.product-options {
    margin-bottom: 15px;
}

.product-options label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.product-options select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
}

.quantity-cart-section {
    display: flex;
    gap: 10px;
    align-items: center;
}

.quantity input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.single_add_to_cart_button {
    flex: 1;
    background: #0f2f52 !important;
    opacity: 1 !important;
    filter: none !important;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.single_add_to_cart_button:hover {
    background-color: #0f2f4f !important;
}

/* Download PDF Section */
.download-pdf-container {
    padding: 10px;
    margin-top: 20px;
}

.download-pdf-content {
    text-align: center;
}

.download-pdf-button {
    background-color: #003c71;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.download-pdf-button:hover {
    background-color: #0f2f4f;
}

.download-pdf-description {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

/* Pedigree Information */
.pedigree-info-box {
    background-color: white;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    border: 2px solid #003c71;
    margin-top: 20px;
}

.pedigree-title {
    background-color: #003c71;
    color: white;
    margin: 0;
    padding: 5px 20px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: left;
}

.pedigree-subsection {
    margin: 0;
}

.pedigree-subsection-title {
    margin: 0;
    padding: 5px 20px;
    font-size: 1em;
    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;
    background-color: #f6f9fb;
}

.pedigree-row-structured:last-child {
    border-bottom: none;
}

.pedigree-label-structured {
    background-color: #f6f9fb;
    padding: 5px 15px;
    font-weight: 600;
    color: #333;
    font-size: 0.85em;
    width: 45%;
    border-right: 1px solid #fff;
    display: flex;
    align-items: center;
}

.pedigree-value-structured {
    background-color: #f6f9fb;
    padding: 5px 15px;
    font-weight: 500;
    color: #333;
    text-align: right;
    font-size: 0.85em;
    width: 55%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Tables Section */
.brown-swiss-it-tables-section {
    margin-top: 40px;
}

/* Production Table */
.production-table-container {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border: 2px solid #003c71;
}

.production-table-title {
    background-color: #003c71;
    color: white;
    margin: 0;
    padding: 5px;
    font-size: 1em;
    font-weight: bold;
    text-align: left;
}

.table-subtitle {
    font-size: 0.8em;
    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: 12px 8px;
    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: 12px 8px;
    text-align: center;
    font-weight: 500;
    border: 1px solid #fff;
     font-size:0.8em;
}

.production-data:last-child {
    border-right: none;
}

/* Conformation Table - using same container as production for consistency */
.conformation-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0px;
    font-size:0.8em;
}

.conformation-trait-label {
    background-color: #c3e4d9;
    color: #333;
    padding: 12px 8px;
    text-align: left;
    font-weight: 500;
    border: 1px solid #fff;
}

.conformation-trait-value {
    background-color: #f9f9f9;
    color: #333;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    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) {
    .brown-swiss-it-header-section {
        grid-template-columns: 1fr;
    }
    
    .brown-swiss-it-left-column {
        padding-right: 0;
    }
    
    .brown-swiss-it-general-info-sidebar {
        padding-left: 0;
        margin-top: 30px;
    }
    
    .brown-swiss-it-key-indicators {
        flex-direction: column;
    }
    
    .indicator-box:not(:last-child)::after {
        display: none;
    }
    
    .indicator-box {
        border-radius: 8px;
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .brown-swiss-it-product-title {
        font-size: 2rem;
    }
    
    .brown-swiss-it-key-indicators {
        flex-direction: column;
        gap: 15px;
        padding: 0 10px;
    }
    
    .indicator-box {
        min-width: auto;
        border-radius: 8px !important;
        padding: 15px 20px;
        margin-bottom: 0;
    }
    
    .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;
    }
    
    .conformation-data-table {
        font-size:0.8em;
    }
    
    .conformation-trait-label,
    .conformation-trait-value {
        padding: 8px;
    }
}

/* Print Styles */
@media print {
    .video-toggle-controls,
    .download-pdf-button,
    .single_add_to_cart_button {
        display: none;
    }
    
    .brown-swiss-it-header-section {
        grid-template-columns: 1fr;
    }
    
    .brown-swiss-it-tables-section {
        page-break-before: always;
    }
}