/* Simmental 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;
}

.simmental-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 */
.simmental-product-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

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

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

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

.simmental-product-title {
    font-size: 3rem;
    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);
}

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

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

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

/* Product Description */
.simmental-product-description {
    background: #fff;
    border: 2px solid #003c71;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.simmental-product-price{
    padding: 5px 20px;
  background: #003c71;
  border-top: 1px solid #ddd;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  text-align: center;}

  .simmental-general-info div.simmental-add-to-cart form.variations_form.cart {
  margin-top: 0px;
  padding: 0px 20px;
  background: none;
  border-radius: 8px;
  border: 0px solid #ddd;
  }
/* 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;
}





.description-title {
    background: #003c71;
    color: white;
    margin: 0;
    padding: 20px;
    font-size: 1em;
    font-weight: bold;
    text-align: left;
}
/* Hide the Clear variations button */
.variations_form .reset_variations {
    display: none !important;
}


.description-content {
    background: #fff;
    padding: 20px;
    font-size: 0.9em;
    line-height: 1.6;
    color: #333;
}

.description-content ul {
    margin: 0;
    padding-left: 20px;
}

.description-content li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.description-content li:last-child {
    margin-bottom: 0;
}

.description-content p {
    margin: 0 0 15px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.description-content p:last-child {
    margin-bottom: 0;
}

/* Pedigree Section */
.simmental-pedigree-section {
    background: #fff;
    border: 2px solid #003c71;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

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

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

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

.pedigree-section-header {
    background: #00a77e;
  color: white;
  padding: 5px 20px;
  font-weight: bold;
  font-size: 18px;
}

.pedigree-section-content {
    padding: 5px 20px;
    background: #f9f9f9;
}

.pedigree-detail {
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.4;
    font-weight: normal;
}

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

.pedigree-detail .field-label {
  font-weight: normal;
  margin-right: 8px;
  display: inline-block;
  min-width: 140px;
}

.pedigree-detail .field-value {
    font-size: 16px;
    color: #333;
    font-weight: bold;
    text-align: right;
    flex: 1;
}

/* Right Column Styles */
.simmental-right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* General Information */
.simmental-general-info {
    background: #fff;
    border: 2px solid #003c71;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

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

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

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

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

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

/* EPD Section */
.simmental-ebv-section {
    grid-column: 1 / -1;
    margin-top: 40px;
    background: #fff;
    border: 2px solid #003c71;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.ebv-title {
    background: #003c71;
    color: white;
    margin: 0;
    padding: 8px 15px;
    font-size: 18px;
    font-weight: bold;
    text-align: left;
}

.simmental-ebv-section h3.ebv-title {
    margin-bottom: 0px;
    border-bottom:solid 1px #fff;
}

.ebv-table-container {
    overflow-x: auto;
    padding: 0px;
}

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

.ebv-table th,
.ebv-table td {
    border: 1px solid #003c71;
    padding: 6px 4px;
    text-align: center;
    vertical-align: middle;
    overflow: hidden;
}

.ebv-table th {
    background: #003c71;
    font-weight: bold;
    color: white;
    font-size: 16px;
    padding: 8px 4px;
}

.trait-label {
    background: #c3e4d9 !important;
    font-weight: bold;
    color: #003c71 !important;
    font-size: 16px;
    min-width: 50px;
}

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

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

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

/* Desktop EPD Cards Layout - Hidden by default */
@media (min-width: 769px) {
    .ebv-mobile-cards {
        display: none;
    }
}

/* Breeding Indices Section */
.breeding-indices-section {
    margin-top: 30px;
    background: #fff;
    border: 2px solid #003c71;
    border-radius: 8px;
    overflow: hidden;
}

.indices-title {
    background: #003c71;
    color: white;
    margin: 0;
    padding: 15px 20px;
    font-size: 1.125rem;
    font-weight: bold;
}

.indices-table-container {
    overflow-x: auto;
    padding: 20px;
}

.indices-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.indices-table th {
    background: #c3e4d9;
    color: #003c71;
    font-weight: bold;
    padding: 10px 8px;
    text-align: center;
    border: 1px solid #003c71;
    font-size: 0.85rem;
}

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

.indices-values td:not(.trait-label) {
    background: #f6f9fb;
}

.indices-percentile td:not(.trait-label) {
    background: #fff3e0;
}

/* WooCommerce Product Form Styling */
.woocommerce div.product form.cart {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.woocommerce div.product form.cart .variations {
    margin-bottom: 20px;
}

.woocommerce div.product form.cart .variations td {
    padding: 8px 0;
    vertical-align: middle;
}

.woocommerce div.product form.cart .variations select {
    width: 95%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.woocommerce div.product form.cart .single_variation_wrap {
    width: 100%;
    margin-top: 15px;
}

.woocommerce div.product form.cart .quantity input {
    width: 60px;
    height: 25px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.woocommerce div.product form.cart .single_add_to_cart_button {
    background-color: #003c71 !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    opacity: 1 !important;
    filter: none !important;
}

.woocommerce div.product form.cart .single_add_to_cart_button:hover {
    background-color: #0f2d4f !important;
}

/* Related Products Section */
.simmental-related-products {
    grid-column: 1 / -1;
    margin-top: 40px;
    border: 2px solid #003c71;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.related-title {
    background: #003c71;
    color: white;
    margin: 0;
    padding: 20px;
    font-size: 24px;
    font-weight: bold;
    text-align: left;
}

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

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

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

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

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

.related-product-title {
    padding: 15px;
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
}

.related-product-item a {
    text-decoration: none;
    color: inherit;
}

/* Mobile EPD Cards Layout */
@media (max-width: 768px) {
    .simmental-product-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Mobile symbol adjustments */
    .simmental-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;
    }

    .simmental-ebv-section {
        margin-top: 20px;
        border: none;
    }

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

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

    .ebv-mobile-card {
        background: white;
        border: 1px solid #003c71;
        border-radius: 8px;
        margin-bottom: 15px;
        overflow: hidden;
    }

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

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

    .ebv-mobile-row {
        display: table;
        width: 100%;
        border-bottom: 1px solid #e0e0e0;
        table-layout: fixed;
    }

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

    .ebv-mobile-label {
        display: table-cell;
        width: 28%;
        background: #c3e4d9;
        color: #003c71;
        font-weight: bold;
        padding: 8px 4px;
        font-size: 12px;
        border-right: 1px solid #003c71;
        vertical-align: middle;
        word-wrap: break-word;
    }

    .ebv-mobile-value {
        display: table-cell;
        width: 24%;
        background: #c3e4d9;
        padding: 8px 4px;
        text-align: center;
        font-size: 12px;
        border-right: 1px solid #003c71;
        vertical-align: middle;
    }

    .ebv-mobile-acc {
        display: table-cell;
        width: 24%;
        background: #9fdacc;
        padding: 8px 4px;
        text-align: center;
        font-size: 12px;
        border-right: 1px solid #003c71;
        vertical-align: middle;
    }

    .ebv-mobile-perc {
        display: table-cell;
        width: 24%;
        background: #b9d7f8;
        padding: 8px 4px;
        text-align: center;
        font-size: 12px;
        vertical-align: middle;
    }

    .ebv-mobile-headers {
        display: table;
        width: 100%;
        background: #003c71;
        color: white;
        font-weight: bold;
        font-size: 12px;
        table-layout: fixed;
    }

    .ebv-mobile-headers > div {
        display: table-cell;
        padding: 8px 4px;
        text-align: center;
        border-right: 1px solid white;
        vertical-align: middle;
    }

    .ebv-mobile-headers > div:first-child {
        width: 28%;
        text-align: left;
    }

    .ebv-mobile-headers > div:nth-child(2) {
        width: 24%;
    }

    .ebv-mobile-headers > div:nth-child(3) {
        width: 24%;
    }

    .ebv-mobile-headers > div:nth-child(4) {
        width: 24%;
        border-right: none;
    }

    .pedigree-row {
        flex-direction: column;
    }

    .pedigree-label {
        flex: none;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .simmental-product-title {
        font-size: 2rem;
    }

    
    

    /* Related Products responsive */
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }

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

    .related-product-title {
        font-size: 13px;
        padding: 12px;
    }

    .related-title {
        font-size: 20px;
        padding: 15px;
    }
}

/* Additional responsive breakpoint for very small screens */
@media (max-width: 480px) {
    .related-products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

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

/* Download PDF Section Styles */
.simmental-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 simmental single product pages */
.simmental-single-product-container #primary.content-area main#main.site-main {
    padding-top: 0;
}
