.jpc-inc-vat-inline-price {
    margin: 8px 0 14px;
    font-size: 1.4em;
    font-weight: 800;
    line-height: 1.15;
    color: #121313;
}

.jpc-inc-vat-inline-price .woocommerce-Price-amount,
.jpc-inc-vat-inline-price .woocommerce-Price-currencySymbol,
.jpc-inc-vat-inline-price bdi {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.jpc-inc-vat-inline-price.jpc-inc-vat-pending {
    visibility: hidden;
}

@media (max-width: 767px) {
    .jpc-inc-vat-inline-price {
        margin: 6px 0 10px;
    }
}

/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* VAT Notice Styling */
.vat-notice {
    font-size: 0.85em;
    color: #666;
    font-weight: normal;
    margin-left: 5px;
}

/* Summary section styling restored */

/* Standalone price display styling removed as requested */

/* Tabs Navigation */
.jewelry-tabs-nav {
  display: flex;
  border-bottom: 1px solid #7b8189;
  margin-bottom: 0px;
}

/* Gemstone Selection Styles */
.jpc-gemstone-selection {
    margin: 2em 0;
    padding: 1em;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.jpc-gemstone-selection h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.jpc-gemstone-options {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.jpc-gemstone-category,
.jpc-gemstone {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.jpc-gemstone-category label,
.jpc-gemstone label,
.jpc-gemstone-quality label:first-child {
    font-weight: 600;
    margin-bottom: 5px;
}

.jpc-gemstone-category select,
.jpc-gemstone select {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    width: 100%;
    max-width: 300px;
}

.jpc-gemstone-quality {
    margin-top: 1em;
    padding: 10px;
    background-color: #efefef;
    border-radius: 4px;
}

.jpc-gemstone-quality-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    margin-top: 8px;
}

.jpc-gemstone-quality-options label {
    margin-right: 1.5em;
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    cursor: pointer;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.jpc-gemstone-quality-options label:hover {
    background-color: #f0f0f0;
}

.jpc-gemstone-quality-options input[type="radio"] {
    margin-right: 5px;
}

.jpc-gemstone-quality-options input[type="radio"]:checked + label {
    background-color: #e8f0fe;
    border-color: #99c2ff;
}

/* Responsive styles for gemstone selection */
@media screen and (max-width: 768px) {
    .jpc-gemstone-quality-options {
        flex-direction: column;
        gap: 0.5em;
    }
    
    .jpc-gemstone-quality-options label {
        margin-right: 0;
    }
    
    .jpc-gemstone-category select,
    .jpc-gemstone select {
        max-width: 100%;
    }
}

/* Diamond Selection Styles */
.jewelry-diamond-selection {
    margin: 2em 0;
    padding: 1em;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.jewelry-diamond-selection h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.diamond-quality-selection {
    margin-bottom: 1.5em;
    padding: 10px;
    background-color: #efefef;
    border-radius: 4px;
}

.diamond-quality-selection label {
    margin-right: 1.5em;
    font-weight: 500;
    display: inline-block;
    padding: 5px 10px;
    cursor: pointer;
}

.diamond-quality-selection input[type="radio"] {
    margin-right: 5px;
}

.diamond-table-container {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 1.5em;
    border: 1px solid #eee;
}

.diamond-selection-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.diamond-selection-table th,
.diamond-selection-table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.diamond-selection-table th {
    background-color: #f2f2f2;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.diamond-selection-table tbody tr:hover {
    background-color: #f5f5f5;
}

.diamond-selection-table .diamond-select {
    width: 60px;
    text-align: center;
}

.diamond-filters th {
    padding: 5px;
    background-color: #e9e9e9;
}

.diamond-filter {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.update-diamond-selection {
    padding: 10px 15px !important;
    font-weight: 600 !important;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .diamond-table-container {
        max-height: 300px;
        overflow-x: auto;
    }
    
    .diamond-selection-table th,
    .diamond-selection-table td {
        padding: 8px 6px;
        font-size: 0.9em;
    }
    
    .diamond-quality-selection label {
        margin-bottom: 5px;
        display: block;
    }
}

/* Jewelry Metal Duplication Prevention - CSS Solution */
/* Hide duplicate metal entries while preserving the first one */

/* Target cart and checkout pages where metal duplication occurs */
.woocommerce-cart-page .cart_item,
.woocommerce-checkout-page .shop_table,
.woocommerce-order-received .shop_table {
    /* Container selectors for metal duplication logic */
}

/* Hide duplicate metal entries - show only the first occurrence */
.woocommerce-cart-page .cart_item:has(.jpc-metal-direct-cart) .jpc-metal-unified-cart,
.woocommerce-cart-page .cart_item:has(.jpc-metal-direct-cart) .jpc-metal-simple-cart,
.woocommerce-cart-page .cart_item:has(.jpc-metal-direct-cart) .jpc-metal-minimal-cart:not(.jpc-metal-wedding-band),

.woocommerce-checkout-page .shop_table:has(.jpc-metal-direct-cart) .jpc-metal-unified-cart,
.woocommerce-checkout-page .shop_table:has(.jpc-metal-direct-cart) .jpc-metal-simple-cart,
.woocommerce-checkout-page .shop_table:has(.jpc-metal-direct-cart) .jpc-metal-minimal-cart:not(.jpc-metal-wedding-band),

/* Fallback: Hide duplicates using :nth-child selector for older browsers */
.woocommerce-cart-page .cart_item .variation:nth-of-type(n+2):has(.jpc-metal-direct-cart),
.woocommerce-checkout-page .shop_table .variation:nth-of-type(n+2):has(.jpc-metal-direct-cart) {
    display: none !important;
}

/* Alternative approach using sibling selectors */
.woocommerce-cart-page .cart_item .variation:has(~ .variation:has([class*="jpc-metal"])) [class*="jpc-metal"]:not(.jpc-metal-direct-cart),
.woocommerce-checkout-page .shop_table .variation:has(~ .variation:has([class*="jpc-metal"])) [class*="jpc-metal"]:not(.jpc-metal-direct-cart) {
    display: none !important;
}

/* Wedding band exception - allow both wedding band and regular metal to show if needed */
.jpc-metal-wedding-band + .jpc-metal-jewelry-selections {
    display: inline !important;
}

/* WooCommerce Blocks Specific Metal Duplication Prevention */
/* Target the exact structure from the HTML example */

/* Hide the second metal entry in WooCommerce Blocks */
.wc-block-components-product-metadata > .wc-block-components-product-details:nth-of-type(2) .wc-block-components-product-details__metal {
    display: none !important;
}

/* Alternative approach: Hide metal entries in subsequent product-details lists */
.wc-block-components-product-metadata .wc-block-components-product-details:not(:first-of-type) .wc-block-components-product-details__metal {
    display: none !important;
}

/* More specific: If there are multiple metal entries, hide all but the first */
.wc-block-components-product-metadata:has(.wc-block-components-product-details__metal:nth-of-type(2)) .wc-block-components-product-details__metal:nth-of-type(n+2) {
    display: none !important;
}

/* Fallback for browsers without :has() support */
.wc-block-components-product-metadata > .wc-block-components-product-details:nth-child(2) .wc-block-components-product-details__metal,
.wc-block-components-product-metadata > .wc-block-components-product-details:nth-child(3) .wc-block-components-product-details__metal,
.wc-block-components-product-metadata > .wc-block-components-product-details:nth-child(4) .wc-block-components-product-details__metal {
    display: none !important;
}

/* Dynamic metal duplication prevention will be handled by JavaScript */
/* This allows for any metal type to be handled dynamically */

/* Certified Diamond Compact Display */
/* Make certified diamond display more compact in cart and checkout */

.woocommerce-cart-page .cart_item .variation,
.woocommerce-checkout-page .shop_table .variation,
.woocommerce-order-received .shop_table .variation {
    /* Grid layout for better alignment */
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 5px 15px;
    align-items: start;

    /* Ensure variation data doesn't overflow */
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Style the labels (dt elements) */
.woocommerce-cart-page .cart_item .variation dt,
.woocommerce-checkout-page .shop_table .variation dt,
.woocommerce-order-received .shop_table .variation dt {
    font-weight: 600;
    color: #333;
    margin: 0;
    padding: 2px 0;
}

/* Style the values (dd elements) */
.woocommerce-cart-page .cart_item .variation dd,
.woocommerce-checkout-page .shop_table .variation dd,
.woocommerce-order-received .shop_table .variation dd {
    margin: 0;
    padding: 2px 0;
}

/* Specifically target certified diamond entries */
.woocommerce-cart-page .cart_item .variation:contains("Certified Diamond"),
.woocommerce-checkout-page .shop_table .variation:contains("Certified Diamond"),
.woocommerce-order-received .shop_table .variation:contains("Certified Diamond") {
    max-width: 300px;
    word-break: break-all;
    line-height: 1.2;
}

/* Alternative: Use classes if available */
.cart-item-certified-diamond,
.checkout-item-certified-diamond,
.order-item-certified-diamond {
    max-width: 300px !important;
    word-break: break-all !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    font-size: 0.9em !important;
}

/* Prevent horizontal scrolling in cart table */
.woocommerce-cart-form__contents,
.woocommerce-checkout-review-order-table,
.shop_table {
    overflow-x: hidden;
    table-layout: fixed;
}

/* Make cart item description cells more flexible */
.woocommerce-cart-form__cart-item .product-name,
.woocommerce-checkout-review-order-table .product-name,
.shop_table .product-name {
    max-width: 50%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Compact display for long text in cart and checkout */
.woocommerce-cart-page .product-name .variation,
.woocommerce-checkout-page .product-name .variation {
    display: block;
    margin: 5px 0;
    font-size: 0.85em;
    color: #666;
    word-break: break-word;
    max-width: 100%;
}

/* Responsive adjustments for mobile */
@media screen and (max-width: 768px) {
    .woocommerce-cart-form__cart-item .product-name,
    .woocommerce-checkout-review-order-table .product-name {
        max-width: 100%;
        flex: 1;
    }

    .cart-item-certified-diamond,
    .checkout-item-certified-diamond,
    .order-item-certified-diamond {
        max-width: 200px !important;
        font-size: 0.8em !important;
    }
}

/* Compact My Account order detail layout */
.woocommerce-account .woocommerce-table--order-details,
.woocommerce-account .woocommerce-table--order-details.shop_table,
.woocommerce-account .woocommerce-MyAccount-content .shop_table_responsive.order_details {
    table-layout: auto;
}

.woocommerce-account .woocommerce-table--order-details th,
.woocommerce-account .woocommerce-table--order-details td,
.woocommerce-account .woocommerce-MyAccount-content .shop_table_responsive.order_details th,
.woocommerce-account .woocommerce-MyAccount-content .shop_table_responsive.order_details td {
    padding-top: 9px;
    padding-bottom: 9px;
    vertical-align: top;
}

.woocommerce-account .woocommerce-table--order-details .product-name,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name {
    line-height: 1.3;
}

.woocommerce-account .woocommerce-table--order-details .product-name > a,
.woocommerce-account .woocommerce-table--order-details .product-name > strong,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name > a,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name > strong {
    display: inline-block;
    margin-bottom: 4px;
}

.woocommerce-account .woocommerce-table--order-details .product-name .wc-item-meta,
.woocommerce-account .woocommerce-table--order-details .product-name ul.wc-item-meta,
.woocommerce-account .woocommerce-table--order-details .product-name ul.variation,
.woocommerce-account .woocommerce-table--order-details .product-name dl.variation,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name .wc-item-meta,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name ul.wc-item-meta,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name ul.variation,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name dl.variation {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.woocommerce-account .woocommerce-table--order-details .product-name .wc-item-meta li,
.woocommerce-account .woocommerce-table--order-details .product-name ul.variation li,
.woocommerce-account .woocommerce-table--order-details .product-name ul.wc-item-meta li,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name .wc-item-meta li,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name ul.variation li,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name ul.wc-item-meta li {
    display: grid;
    grid-template-columns: minmax(82px, 108px) minmax(0, 1fr);
    gap: 3px 8px;
    align-items: start;
    margin: 0 0 2px;
    padding: 0;
    list-style: none;
    line-height: 1.25;
}

.woocommerce-account .woocommerce-table--order-details .product-name .wc-item-meta li::marker,
.woocommerce-account .woocommerce-table--order-details .product-name ul.variation li::marker,
.woocommerce-account .woocommerce-table--order-details .product-name ul.wc-item-meta li::marker,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name .wc-item-meta li::marker,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name ul.variation li::marker,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name ul.wc-item-meta li::marker {
    content: '';
}

.woocommerce-account .woocommerce-table--order-details .product-name .wc-item-meta-label,
.woocommerce-account .woocommerce-table--order-details .product-name strong,
.woocommerce-account .woocommerce-table--order-details .product-name .variation dt,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name .wc-item-meta-label,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name strong,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name .variation dt {
    margin: 0;
    padding: 0;
    font-weight: 600;
}

.woocommerce-account .woocommerce-table--order-details .product-name .wc-item-meta li > p,
.woocommerce-account .woocommerce-table--order-details .product-name .wc-item-meta li > span,
.woocommerce-account .woocommerce-table--order-details .product-name ul.variation li > p,
.woocommerce-account .woocommerce-table--order-details .product-name ul.wc-item-meta li > p,
.woocommerce-account .woocommerce-table--order-details .product-name .variation dd,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name .wc-item-meta li > p,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name .wc-item-meta li > span,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name ul.variation li > p,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name ul.wc-item-meta li > p,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name .variation dd {
    margin: 0;
    padding: 0;
    min-width: 0;
}

.woocommerce-account .woocommerce-table--order-details .product-name dl.variation,
.woocommerce-account .woocommerce-MyAccount-content .order_details .product-name dl.variation {
    display: grid;
    grid-template-columns: minmax(82px, 108px) minmax(0, 1fr);
    gap: 3px 8px;
}

@media screen and (max-width: 768px) {
    .woocommerce-account .woocommerce-table--order-details th,
    .woocommerce-account .woocommerce-table--order-details td,
    .woocommerce-account .woocommerce-MyAccount-content .shop_table_responsive.order_details th,
    .woocommerce-account .woocommerce-MyAccount-content .shop_table_responsive.order_details td {
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .woocommerce-account .woocommerce-table--order-details .product-name,
    .woocommerce-account .woocommerce-MyAccount-content .order_details .product-name {
        font-size: 0.95em;
    }

    .woocommerce-account .woocommerce-table--order-details .product-name .wc-item-meta,
    .woocommerce-account .woocommerce-table--order-details .product-name ul.wc-item-meta,
    .woocommerce-account .woocommerce-table--order-details .product-name ul.variation,
    .woocommerce-account .woocommerce-table--order-details .product-name dl.variation,
    .woocommerce-account .woocommerce-MyAccount-content .order_details .product-name .wc-item-meta,
    .woocommerce-account .woocommerce-MyAccount-content .order_details .product-name ul.wc-item-meta,
    .woocommerce-account .woocommerce-MyAccount-content .order_details .product-name ul.variation,
    .woocommerce-account .woocommerce-MyAccount-content .order_details .product-name dl.variation {
        margin-top: 2px;
        font-size: 0.9em;
    }

    .woocommerce-account .woocommerce-table--order-details .product-name .wc-item-meta li,
    .woocommerce-account .woocommerce-table--order-details .product-name ul.variation li,
    .woocommerce-account .woocommerce-table--order-details .product-name ul.wc-item-meta li,
    .woocommerce-account .woocommerce-MyAccount-content .order_details .product-name .wc-item-meta li,
    .woocommerce-account .woocommerce-MyAccount-content .order_details .product-name ul.variation li,
    .woocommerce-account .woocommerce-MyAccount-content .order_details .product-name ul.wc-item-meta li,
    .woocommerce-account .woocommerce-table--order-details .product-name dl.variation,
    .woocommerce-account .woocommerce-MyAccount-content .order_details .product-name dl.variation {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 2px 7px;
        margin-bottom: 1px;
        line-height: 1.2;
    }
}

/* Prices are now calculated without decimals - no CSS needed for hiding them */

/* Hide WooCommerce default price amounts on single product page */
.single-product .woocommerce-Price-amount {
    display: none !important;
}