/* Murray Grey Single Product Page Styles */


/* Breadcrumb Styles */
.woocommerce-breadcrumb {
    font-size: 0.8em;
    text-align: right;
}

.woocommerce .woocommerce-breadcrumb {
     margin: 5px;
}
/* PHE Tour Button */
.phe-start-tour {
    padding: 10px 20px;
}
/* Explainer Tool Help Button */
.explainer-button,
button[onclick*="openExplainerTool"],
.phe-help-button {
    padding: 8px 20px;
    text-transform: initial;
}

.woocommerce:where(body:not(.woocommerce-uses-block-theme)) .woocommerce-breadcrumb {
    font-size: 0.8em;
    text-align: right;
    margin: 2px;
}

.murray-grey-single-product-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 15px;
    font-family: 'Helvetica Neue Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1rem;
}

/* Main Product Layout */
.murray-grey-product-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Left Column Styles */
.murray-grey-left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Product Header */
.murray-grey-product-header {
    padding: 0px;
}

.murray-grey-product-title-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.murray-grey-product-title {
    font-size: 3rem; /* 40px based on 16px base */
    font-weight: bold;
    margin: 0;
    color: #003c71;
    border-bottom: solid 3px #003c71;
    border-bottom-right-radius: 20px;
    flex: 1;
}

/* Product Symbols */
.product-symbols-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.product-symbol {
    height: 40px !important;
    width: auto !important;
    max-width: 100px !important;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.product-symbol:hover {
    transform: scale(1.1);
}

.murray-grey-product-image {
    text-align: center;
    width: 100%;
}

.murray-grey-product-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.murray-grey-product-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Product Description */
.murray-grey-product-description {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #003c71;
}

.murray-grey-product-description .description-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #003c71;
    margin: 0 0 15px 0;
}

.murray-grey-product-description .description-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

/* Right Column Styles */
.murray-grey-right-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* General Information */
.murray-grey-general-info {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.general-info-header {
    background-color: #003c71;
    color: white;
    padding: 15px 20px;
    font-weight: bold;
    font-size: 1em;
    text-align: center;
}

.info-table-structured {
    border: none;
    width: 100%;
}

.info-row-structured {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
}

.info-row-structured:last-child {
    border-bottom: none;
}

.info-label-structured {
    flex: 0 0 50%;
    background-color: #c3e4d9;
   padding: 5px 10px;
    font-weight: bold;
    border-right: 1px solid #e0e0e0;
    text-align: left;
    font-size: 0.8em;
}

.info-value-structured {
    flex: 1;
    background-color: #f6f9fb;
    padding: 5px 10px; 
    text-align: right;
    font-weight: bold;
    font-size: 0.8em;
}

/* Price and Add to Cart */
.murray-grey-product-price {
    padding: 15px 20px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    background: #003c71;
    color:#fff;
    border-top: 1px solid #e0e0e0;
}

.murray-grey-add-to-cart {
    padding: 0 20px 20px;
}

/* Add to Cart Layout Styling */
.murray-grey-add-to-cart .woocommerce-variation-add-to-cart,
.murray-grey-add-to-cart .cart {
    display: flex !important;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.murray-grey-add-to-cart .quantity {
    flex: 0 0 auto;
    margin: 0 !important;
}

.murray-grey-add-to-cart .quantity input {
    width: 60px !important;
    height: 25px !important;
    text-align: center;
}

.murray-grey-add-to-cart .single_add_to_cart_button {
    flex: 1;
    min-width: 120px;
    margin: 0 !important;
    background-color: #003c71 !important;
    opacity: 1 !important;
    filter: none !important;
}
/* Variations Form Label Styling */
.variations_form.cart th.label,
form.variations_form.cart th.label {
    line-height: 1.1em;
}
/* Variation Availability Stock Styling */
.woocommerce-variation-availability .stock {
    font-size: 0.8em;
    color: #0e2c4e;
    text-align: right;
    padding-right: 20px;
}
/* Stock paragraph styling */
p.stock.in-stock {
    font-size: 0.8em;
    color: #0e2c4e;
    text-align: right;
    padding-right: 20px;
}
/* Stock display in variation form */
.single_variation_wrap .woocommerce-variation-availability p.stock.in-stock,
.single_variation_wrap .woocommerce-variation-availability .stock,
.woocommerce-variation .woocommerce-variation-availability p.stock {
    font-size: 0.8em !important;
    color: #0e2c4e !important;
    text-align: right !important;
    padding-right: 20px !important;
    display: block !important;
}





.murray-grey-add-to-cart .variations_button {
    display: flex !important;
    align-items: center;
    gap: 10px;
}
/* Hide the Clear variations button */
.variations_form .reset_variations {
    display: none !important;
}


/* Additional styling fixes */
.murray-grey-add-to-cart .woocommerce div.product form.cart .variations {
    margin-bottom: 5px !important;
    padding-bottom: 5px !important;
}

.murray-grey-add-to-cart .woocommerce div.product form.cart .variations select,
.murray-grey-add-to-cart select[name*="attribute_"] {
    width: 95% !important;
    padding: 5px !important;
}

.murray-grey-add-to-cart .single_variation_wrap {
    width: 100% !important;
}

/* Pedigree Information */
.murray-grey-pedigree-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.pedigree-title {
    background-color: #003c71;
    color: white;
    padding: 5px 20px;
    margin: 0;
    font-weight: bold;
    font-size: 1.25rem;
    text-align: center;
}

.pedigree-table {
    padding: 0;
}

.pedigree-section {
    border-bottom: 1px solid #e0e0e0;
}

.pedigree-section:last-child {
    border-bottom: none;
}

.pedigree-header {
    background-color: #c3e4d9;
    padding: 12px 20px;
    font-weight: bold;
    font-size: 1.1rem;
    color: #003c71;
}

.pedigree-content {
    padding: 15px 20px;
    background-color: #f6f9fb;
}

.pedigree-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e8f4f8;
}

.pedigree-detail:last-child {
    border-bottom: none;
}

.field-label {
    font-weight: normal;
    color: #666;
    flex: 0 0 60%;
}

.field-value {
    font-weight: bold;
    color: #333;
    text-align: right;
    flex: 1;
}

/* EBV Section */
.murray-grey-ebv-section {
    margin: 40px 0;
}

.ebv-title {
    font-size: 2rem;
    font-weight: bold;
    color: #003c71;
    text-align: center;
    margin: 0 0 30px 0;
    border-bottom: 3px solid #003c71;
    padding-bottom: 10px;
}

.ebv-table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    border: 2px solid #003c71;
    border-radius: 8px;
}

.ebv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    min-width: 1200px;
}

.ebv-table th {
    background-color: #003c71;
    color: white;
    padding: 8px 4px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #0f2d4d;
    font-size: 14px;
}

.ebv-table td {
    padding: 6px 4px;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 15px;
}

.trait-label {
    font-weight: bold;
    background-color: #f0f0f0 !important;
    color: #003c71;
    text-align: center !important;
}

.ebv-values {
    background-color: #c3e4d9;
}

.ebv-accuracy {
    background-color: #9fdacc;
}

.ebv-percentile {
    background-color: #b9d7f8;
}

/* Mobile EBV Cards - Hidden by default, shown on mobile */
.ebv-mobile-cards {
    display: none;
}

/* Breeding Indices */
.murray-grey-breeding-indices-section {
    margin: 40px 0;
}

.indices-title {
    font-size: 2rem;
    font-weight: bold;
    color: #003c71;
    text-align: center;
    margin: 0 0 30px 0;
    border-bottom: 3px solid #003c71;
    padding-bottom: 10px;
}

.indices-table-container {
    overflow-x: auto;
    border: 2px solid #003c71;
    border-radius: 8px;
}

.indices-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    min-width: 800px;
}

.indices-table th {
    background-color: #003c71;
    color: white;
    padding: 8px 4px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #0f2d4d;
}

.indices-table td {
    padding: 6px 4px;
    text-align: center;
    border: 1px solid #ddd;
}

.indices-values {
    background-color: #c3e4d9;
}

.indices-percentile {
    background-color: #b9d7f8;
}

/* Related Products */
.murray-grey-related-products {
    margin: 40px 0;
}

.related-title {
    font-size: 2rem;
    font-weight: bold;
    color: #003c71;
    text-align: center;
    margin: 0 0 30px 0;
    border-bottom: 3px solid #003c71;
    padding-bottom: 10px;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-product-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.related-product-image {
    height: 220px;
    overflow: hidden;
}

.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-product-title {
    padding: 15px;
    font-size: 1rem;
    font-weight: bold;
    color: #003c71;
    text-align: center;
    margin: 0;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.modal-image {
    width: 100%;
    height: auto;
    display: block;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 30px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Mobile EBV Cards Styling */
.ebv-mobile-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.ebv-mobile-card-header {
    background-color: #003c71;
    color: white;
    padding: 12px 15px;
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
}

.ebv-mobile-card-content {
    padding: 0;
}

.ebv-mobile-headers {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    background-color: #c3e4d9;
    font-weight: bold;
    color: #003c71;
    border-bottom: 1px solid #e0e0e0;
}

.ebv-mobile-headers > div {
    padding: 10px 8px;
    text-align: center;
    border-right: 1px solid #e0e0e0;
    font-size: 14px;
}

.ebv-mobile-headers > div:last-child {
    border-right: none;
}

.ebv-mobile-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    border-bottom: 1px solid #f0f0f0;
    background-color: #f6f9fb;
}

.ebv-mobile-row:last-child {
    border-bottom: none;
}

.ebv-mobile-row > div {
    padding: 8px;
    text-align: center;
    border-right: 1px solid #e8f4f8;
    font-size: 14px;
}

.ebv-mobile-row > div:last-child {
    border-right: none;
}

.ebv-mobile-label {
    font-weight: bold;
    color: #003c71;
    text-align: left !important;
    padding-left: 12px !important;
}

.ebv-mobile-value {
    font-weight: bold;
    color: #333;
}

.ebv-mobile-acc,
.ebv-mobile-perc {
    color: #666;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .murray-grey-product-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .murray-grey-right-column {
        order: -1;
    }

    .murray-grey-product-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .murray-grey-single-product-container {
        padding: 15px;
    }

    /* Mobile symbol adjustments */
    .murray-grey-product-title-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 20px;
    }

    .product-symbols-container {
        justify-content: flex-start;
        gap: 6px;
    }

    .product-symbol {
        height: 30px;
        max-width: 45px;
    }

    .murray-grey-product-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    /* Hide desktop EBV table, show mobile cards */
    .ebv-table-container {
        display: none;
    }

    .ebv-mobile-cards {
        display: block;
    }

    /* Hide desktop indices table on mobile */
    .indices-table-container {
        display: none;
    }

    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .related-product-image {
        height: 180px;
    }

    .info-label-structured,
    .info-value-structured {
       padding: 5px 10px; 
        font-size: 14px;
        font-size: 0.8em;
}

    .pedigree-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .field-label {
        flex: none;
    }

    .field-value {
        text-align: left;
        flex: none;
    }
}

@media (max-width: 480px) {
    .murray-grey-product-title {
        font-size: 1.75rem;
    }

    .related-products-grid {
        grid-template-columns: 1fr;
    }

    .related-product-image {
        height: 200px;
    }

    .ebv-mobile-headers,
    .ebv-mobile-row {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        font-size: 12px;
    }

    .ebv-mobile-headers > div,
    .ebv-mobile-row > div {
        padding: 6px 4px;
    }

    .ebv-mobile-label {
        padding-left: 8px !important;
    }

    .info-label-structured {
        flex: 0 0 45%;
        font-size: 0.8em;
}

    .general-info-header,
    .pedigree-title,
    .ebv-title,
    .indices-title,
    .related-title {
        font-size: 1.5rem;
    }
}

/* Download PDF Section Styles */
.murray-grey-download-pdf {
    background-color: #f6f9fb;
    overflow: hidden;
}

.download-pdf-header {
    background-color: #003c71;
    color: white;
    padding: 12px 20px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

.download-pdf-content {
    padding: 20px;
    text-align: center;
}

.download-pdf-button {
    background-color: #003c71;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.download-pdf-button:hover {
    background-color: #0f2d4f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(22, 65, 112, 0.3);
}

.download-pdf-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(22, 65, 112, 0.3);
}

.download-pdf-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.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 {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Responsive adjustments for Download PDF */
@media (max-width: 768px) {
    .download-pdf-header {
        padding: 10px 15px;
        font-size: 16px;
    }

    .download-pdf-content {
        padding: 15px;
    }

    .download-pdf-button {
        padding: 10px 20px;
        font-size: 14px;
    }

    .download-pdf-description {
        font-size: 13px;
    }
}


/* Remove top padding from main content area on murray-grey single product pages */
.murray-grey-single-product-container #primary.content-area main#main.site-main {
    padding-top: 0;
}
