/* ==========================================================================
   Custom Single Product Styles (v9 - final mobile-centering fix based on Dev1)
   ========================================================================== */

/* --- Base Layout & Spacing --- */
body.single-product {
    /* background-color: #f7f7f6; */
}

.woocommerce div.product.custom-single-product-layout {
    padding-top: 0;
}

.woocommerce .woocommerce-breadcrumb {
    max-width: 1200px;
    margin: 20px auto 20px auto;
    padding: 0 15px;
    font-size: 0.9em;
    color: #5a616a;
}
.woocommerce .woocommerce-breadcrumb a {
    color: #5a616a;
    text-decoration: none;
}
.woocommerce .woocommerce-breadcrumb a:hover {
    color: #222b38;
}

.custom-single-product-layout .product-top-section-wrapper {
    background-color: #fff;
    padding: 40px 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    box-sizing: border-box;
}

.custom-single-product-layout .product-top-content-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.custom-single-product-layout .product-main-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: stretch; 
}

.custom-single-product-layout .product-image-column {
    flex: 0 0 40%;
    min-width: 280px;
    display: flex; 
    flex-direction: column;
}
.custom-single-product-layout .product-info-column {
    flex: 1 1 calc(60% - 40px);
    display: flex;
    flex-direction: column;
}

/* --- Image Column --- */

.woocommerce div.product.custom-single-product-layout .image-wrapper-relative {
    position: relative;
    width: 100%;
    border: 1px solid #e0e0e0;
    padding: 30px; 
    box-sizing: border-box;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    min-height: 400px; 
    flex-grow: 1; 
}

.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images {
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    position: relative; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column;
    min-height: 0; 
}

.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images .flex-viewport {
    width: 100% !important;
    height: 100% !important; 
    overflow: hidden !important; 
    position: relative;
    flex-grow: 1; 
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images .woocommerce-product-gallery__wrapper {
    width: auto;
    height: 100%; 
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Each LI slide */
.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images .woocommerce-product-gallery__image {
    height: 100% !important;          /* fill viewport */
    padding: 0;
    margin: 0;
    position: relative; /* Added this back from one of the earlier versions, good for safety */

    /* Dev1's Centering Fix: Make the <li> a flex container to center its child <a> */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* The Link <a> INSIDE each LI slide - centers the image */
/* With Dev1's fix on the <li>, the <a> can be simpler if needed, but current flex props are fine */
.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images .woocommerce-product-gallery__image a {
    display: flex !important; /* Still good to ensure it's a flex container for the img */
    align-items: center !important; 
    justify-content: center !important; 
    width: 100%; /* Takes width from parent <li>'s flex item behavior */
    height: 100% !important; /* Takes height from parent <li>'s flex item behavior */
    outline: none;
    text-decoration: none;
    overflow: hidden; 
}

.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images .woocommerce-product-gallery__image img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain !important;
    object-position: center center !important;
    margin: 0;
    border: none;
    opacity: 1;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images .flex-control-nav {
    display: flex !important;
    position: absolute;
    bottom: -60px; 
    left: 50%;
    transform: translateX(-50%);
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
    z-index: 10; 
}

.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images .flex-control-nav li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images .flex-control-nav li img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border: 2px solid #e8ebed;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images .flex-control-nav li img.flex-active,
.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images .flex-control-nav li.flex-active-slide img {
    border: 2px solid #5a616a !important;
    opacity: 1 !important;
    /* transform: scale(1.05); */ /* Removed to make active state visually identical to hover for border/opacity */
}

.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images .flex-control-nav li img:hover {
    opacity: 1;
    border-color: #5a616a;
}

.custom-single-product-layout .image-wrapper-relative:not(.single-image-gallery) {
    padding-bottom: calc(30px + 60px + 10px) !important; 
}
.custom-single-product-layout .image-wrapper-relative.single-image-gallery {
    padding-bottom: 30px !important;
}

/* This rule is problematic and likely no longer needed with JS changes */
/*
.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images.woocommerce-product-gallery--columns-1 .flex-control-nav,
.woocommerce div.product.custom-single-product-layout .image-wrapper-relative.single-image-gallery .woocommerce-product-gallery.images .flex-control-nav {
    display: none !important;
}
*/

.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images .woocommerce-product-gallery__image img:not(.loaded) {
    opacity: 0.8;
}
.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images .woocommerce-product-gallery__image img.loaded {
    opacity: 1 !important;
}

.custom-single-product-layout .image-wrapper-relative .favoritt-badge-wrapper {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 9;
}
.custom-single-product-layout .favoritt-badge-wrapper span {
    position: relative; display: inline-block; color:#232b38; background-color: #cfd6e3; font-size: 14px; font-weight: 600; text-transform: uppercase; padding: 5px 20px 5px 15px; clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}


/* --- Info Column --- */
/* ... (Info column styles remain unchanged from previous version) ... */
.custom-single-product-layout .product-info-column .energy-label-wrapper { margin-bottom: 15px; }
.custom-single-product-layout .product-info-column .energy-label-wrapper img { max-width: 80px; height: auto; display: block; }
.custom-single-product-layout .product-info-column h1.product_title { margin-bottom: 10px; font-size: 20px !important; line-height: 1.3; font-weight: 600; color: #222b38; }
.custom-single-product-layout .product-info-column .woocommerce-product-details__short-description { margin-bottom: 20px; font-size: 1em; line-height: 1.6; color: #5a616a; }
.custom-single-product-layout .product-info-column .woocommerce-product-details__short-description p { margin-bottom: 0; }
.custom-single-product-layout .product-info-column .stock-sku-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; font-size: 0.9em; color: #5a616a; padding-bottom: 15px; border-bottom: 1px solid #ebeef2; }
.custom-single-product-layout .product-info-column .stock-sku-row .stock { font-weight: 500; line-height: 1.4; }
.custom-single-product-layout .product-info-column .stock-sku-row .in-stock { color: #378352; }
.custom-single-product-layout .product-info-column .stock-sku-row .out-of-stock,
.custom-single-product-layout .product-info-column .stock-sku-row .available-on-backorder { color: #958e09 !important; }
.custom-single-product-layout .product-info-column .stock-sku-row .sku_wrapper { line-height: 1.4; }

.custom-single-product-layout .product-info-column .price-cart-row {
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.price-cart-row .stock { display: none; }

.custom-single-product-layout .product-info-column .price-cart-row .price-and-vat-group {
    order: 0;
    margin-right: 0;
    flex: 0 1 auto;
}

.custom-single-product-layout .product-info-column .price-cart-row .price-wrapper,
.custom-single-product-layout .product-info-column .price-cart-row .bundle-price-display {
    margin-right: 0;
    margin-bottom: 0;
    display: inline-block;
    min-height: 1.8em;
}
.custom-single-product-layout .product-info-column .price-cart-row .price {
    font-size: 22px;
    font-weight: 600;
    color: #222b38;
    line-height: 1;
    display: inline-block;
    margin-bottom: 0; /* <<< UPDATED: Set margin-bottom to 0 */
}
.custom-single-product-layout .product-info-column .price-cart-row .price ins { text-decoration: none; }
.custom-single-product-layout .product-info-column .price-cart-row .price del { font-size: 22px; /* <<< UPDATED: Same font-size as main price */ opacity: 0.7; margin-right: 5px; }

.custom-single-product-layout .product-info-column .price-cart-row .price-vat-info {
    display: block;
    font-size: 14px;
    color: #6B798A;
    margin-top: 4px;
}

.custom-single-product-layout .product-info-column .price-cart-row form.cart,
.custom-single-product-layout .product-info-column .price-cart-row .size-bundle-selector {
    flex: 1 1 auto;
    order: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.custom-single-product-layout .product-info-column .price-cart-row form.cart div.quantity { margin: 0; border: 1px solid #d7dce2; border-radius: 5px; overflow: hidden; display: flex; height: 40px; }
.custom-single-product-layout .product-info-column .price-cart-row form.cart input.qty {
    height: 38px; width: 65px; padding: 5px; text-align: center; border: none;
    border-left: 1px solid #d7dce2; border-right: 1px solid #d7dce2;
    font-size: 1em; font-weight: 500; color: #222b38;
    appearance: textfield; -moz-appearance: textfield; background-color: #fff;
}
.custom-single-product-layout .product-info-column .price-cart-row form.cart .quantity .minus,
.custom-single-product-layout .product-info-column .price-cart-row form.cart .quantity .plus {
    background-color: #f4f5f6; border: none; cursor: pointer; padding: 0 10px;
    font-size: 1.2em; color: #5a616a; line-height: 38px; transition: background-color 0.2s ease;
}
.custom-single-product-layout .product-info-column .price-cart-row form.cart .quantity .minus:hover,
.custom-single-product-layout .product-info-column .price-cart-row form.cart .quantity .plus:hover { background-color: #e8ebed; }

.custom-single-product-layout .product-info-column .price-cart-row form.cart .single_add_to_cart_button {
    background-color: #222b38; color: #ffffff; border: 1px solid #222b38; padding: 0 20px;
    height: 40px; line-height: 38px; border-radius: 5px; font-size: 0.9em; font-weight: 600;
    text-transform: uppercase; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}
.custom-single-product-layout .product-info-column .price-cart-row form.cart .single_add_to_cart_button:hover { background-color: #3a4454; border-color: #3a4454; color: #ffffff; }

/* --- Bundle Selector Styling --- */
/* ... (Bundle selector styles remain unchanged) ... */
.custom-single-product-layout .size-bundle-selector { width: 100%; order: 2; }
.custom-single-product-layout .size-bundle-selector form.bundle_cart { display: flex; align-items: center; gap: 10px; margin-bottom: 0; width: 100%; flex-wrap: wrap; }
.custom-single-product-layout .size-bundle-selector .bundle-options-wrapper { flex: 1 1 100%; margin-bottom: 15px; position: relative; margin-right: 0; }
.custom-single-product-layout .size-bundle-selector label[for="bundle_size_select"] { display: block; margin-bottom: 8px; font-weight: 600; color: #222b38; }
.custom-single-product-layout .size-bundle-selector select.bundle-size-select-dropdown {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    width: 100%; padding: 10px 35px 10px 15px; border: 1px solid #d7dce2; border-radius: 5px;
    background-color: #fff; height: 40px; line-height: normal; font-size: 1em; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='18' height='18' fill='%235a616a'%3E%3Cpath d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 18px 18px;
}
.custom-single-product-layout .size-bundle-selector select.bundle-size-select-dropdown::-ms-expand { display: none; }
.custom-single-product-layout .size-bundle-selector form.bundle_cart div.quantity { margin: 0; border: 1px solid #d7dce2; border-radius: 5px; overflow: hidden; display: inline-flex; height: 40px; flex: 0 0 auto; vertical-align: middle; }
.custom-single-product-layout .size-bundle-selector form.bundle_cart input.qty {
    height: 38px; width: 65px; padding: 5px; text-align: center; border: none;
    border-left: 1px solid #d7dce2; border-right: 1px solid #d7dce2;
    font-size: 1em; font-weight: 500; color: #222b38;
    appearance: textfield; -moz-appearance: textfield; background-color: #fff; box-shadow: none; outline: none;
}
.custom-single-product-layout .size-bundle-selector form.bundle_cart .quantity .minus,
.custom-single-product-layout .size-bundle-selector form.bundle_cart .quantity .plus {
    background-color: #f4f5f6; border: none; cursor: pointer; padding: 0 10px;
    font-size: 1.2em; color: #5a616a; line-height: 38px; transition: background-color 0.2s ease;
}
.custom-single-product-layout .size-bundle-selector form.bundle_cart .quantity .minus:hover,
.custom-single-product-layout .size-bundle-selector form.bundle_cart .quantity .plus:hover { background-color: #e8ebed; }
.custom-single-product-layout .size-bundle-selector .bundle_add_to_cart_button {
    background-color: #222b38; color: #ffffff; border: 1px solid #222b38; padding: 0 20px;
    height: 40px; line-height: 38px; border-radius: 5px; font-size: 0.9em; font-weight: 600;
    text-transform: uppercase; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap; flex: 1 1 auto; min-width: 150px;
}
.custom-single-product-layout .size-bundle-selector .bundle_add_to_cart_button:hover { background-color: #3a4454; border-color: #3a4454; color: #ffffff; }
.custom-single-product-layout .size-bundle-selector .bundle_add_to_cart_button:disabled { background-color: #ccc !important; border-color: #ccc !important; color: #666 !important; cursor: not-allowed; opacity: 0.7; }
.custom-single-product-layout .size-bundle-selector .bundle_add_to_cart_button .button-text { }

/* --- Layout Stacking for Non-Bundle Products --- */
/* ... (Stacking styles remain unchanged) ... */
.custom-single-product-layout .product-info-column .price-cart-row.layout-stack-cart { gap: 0; }
.custom-single-product-layout .product-info-column .price-cart-row.layout-stack-cart .price-and-vat-group { flex-basis: 100%; margin-bottom: 15px; }
.custom-single-product-layout .product-info-column .price-cart-row.layout-stack-cart form.cart { flex-basis: 100%; justify-content: flex-start; }

/* --- Related Products Sections --- */
/* ... (Related products styles remain unchanged) ... */
.custom-single-product-layout .related-products-section { background-color: #f7f7f6; padding: 0; margin-top: 5px; margin-bottom: 5px; max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 15px; padding-right: 15px; border-radius: 5px; overflow: hidden; }
.related-tilhorende-section { margin-top: 40px!important; }
.woocommerce div.product .woocommerce-tabs ul.tabs { margin-bottom: 0; }
.custom-single-product-layout .related-products-section:last-of-type { margin-bottom: 40px; }
.custom-single-product-layout .related-products-section .accordion-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 20px 30px; background-color: #fff; border-bottom: 1px solid #e8ebed; margin-bottom: 0; }
.custom-single-product-layout .related-products-section .accordion-header span { font-size: 1.2em; font-weight: 600; color: #222b38; }
.custom-single-product-layout .related-products-section .accordion-header .accordion-icon { transition: transform 0.3s ease; }
.custom-single-product-layout .related-products-section .accordion-header[aria-expanded="true"] .accordion-icon { transform: rotate(180deg); }
.custom-single-product-layout .related-products-section .accordion-content { padding: 0; background-color: #f7f7f6; display: none; }
.custom-single-product-layout .related-products-section .related-products-filter { display: flex; flex-wrap: wrap; gap: 10px; padding: 15px 30px; background-color: #fff; border-bottom: 1px solid #e8ebed; margin-left: 0; margin-right: 0; margin-bottom: 0; }
.custom-single-product-layout .related-products-section .related-products-filter label { display: inline-flex; align-items: center; cursor: pointer; padding: 5px 10px; margin: 0; border: 1px solid #d7dce2; border-radius: 5px; background-color: #fff; transition: background-color 0.2s ease, border-color 0.2s ease; font-size: 0.9em; color: #5a616a; }
.custom-single-product-layout .related-products-section .related-products-filter label:hover { background-color: #f8f9fa; border-color: #c8cfd6; }
.custom-single-product-layout .related-products-section .related-products-filter input[type="radio"] { opacity: 0; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.custom-single-product-layout .related-products-section .related-products-filter input[type="radio"]:checked + label { background-color: #e8ebed; border-color: #adb5bd; color: #222b38; font-weight: 500; }
.custom-single-product-layout .related-products-section .related-products-table { }
.custom-single-product-layout .related-products-section .table-row { display: flex; flex-wrap: wrap; align-items: center; padding: 15px 30px; border-bottom: 1px solid #e8ebed; gap: 15px; background-color: #fff; margin-left: 0; margin-right: 0; }
.custom-single-product-layout .related-products-section .table-row:last-child { border-bottom: none; }
.custom-single-product-layout .related-products-section .cell { padding: 5px; box-sizing: border-box; }
.custom-single-product-layout .related-products-section .product-image { flex: 0 0 auto; width: 40px; }
.custom-single-product-layout .related-products-section .product-image img { display: block; max-width: 100%; height: 40px !important; width: 40px !important; object-fit: cover !important; border: 1px solid #eee; }
.custom-single-product-layout .related-products-section .product-title { flex: 1 1 200px; font-weight: 500; font-size: 14px; }
.custom-single-product-layout .related-products-section .product-title a { color: #222b38; text-decoration: none; }
.custom-single-product-layout .related-products-section .product-title a:hover { color: #0056b3; }
.custom-single-product-layout .related-products-section .product-sku { flex: 1 1 100px; font-size: 14px; color: #5a616a; }
.custom-single-product-layout .related-products-section .product-price { flex: 1 1 100px; font-weight: 500; color: #222b38; font-size: 14px; }
.custom-single-product-layout .related-products-section .product-add-to-cart { flex: 1 1 220px; }
.custom-single-product-layout .related-products-section .product-add-to-cart .quantity-wrapper { display: flex; align-items: center; gap: 10px; }
.custom-single-product-layout .related-products-section .product-add-to-cart .quantity-selector { border: 1px solid #d7dce2; border-radius: 5px; overflow: hidden; display: flex; height: 36px; }
.custom-single-product-layout .related-products-section .product-add-to-cart .quantity-selector input.quantity { height: 34px; width: 40px; padding: 5px; text-align: center; border: none; border-left: 1px solid #d7dce2; border-right: 1px solid #d7dce2; font-size: 0.9em; font-weight: 500; color: #222b38; appearance: textfield; -moz-appearance: textfield; background-color: #fff; }
.custom-single-product-layout .related-products-section .product-add-to-cart .quantity-selector .minus,
.custom-single-product-layout .related-products-section .product-add-to-cart .quantity-selector .plus { background-color: #f4f5f6; border: none; cursor: pointer; padding: 0 8px; font-size: 1.1em; color: #5a616a; line-height: 34px; transition: background-color 0.2s ease; }
.custom-single-product-layout .related-products-section .product-add-to-cart .quantity-selector .minus:hover,
.custom-single-product-layout .related-products-section .product-add-to-cart .quantity-selector .plus:hover { background-color: #e8ebed; }
.custom-single-product-layout .related-products-section .product-add-to-cart .add_to_cart_button { background-color: #222b38; color: #ffffff; border: 1px solid #222b38; padding: 0 15px; height: 36px; line-height: 34px; border-radius: 5px; font-size: 0.85em; font-weight: 600; text-transform: uppercase; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; white-space: nowrap; }
.custom-single-product-layout .related-products-section .product-add-to-cart .add_to_cart_button:hover { background-color: #3a4454; border-color: #3a4454; color: #ffffff; }
.custom-single-product-layout .related-products-section .product-add-to-cart .added_to_cart { display: none !important; }

/* Product Data Tabs Section */
/* ... (Tabs styles remain unchanged) ... */
.custom-single-product-layout .product-data-tabs-section { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 0px !important; padding-right: 0px !important; margin-bottom: 40px; margin-top: 40px; }
.woocommerce-js div.product.custom-single-product-layout .woocommerce-tabs { padding-top: 0; }

div.product.custom-single-product-layout .woocommerce-tabs ul.tabs { list-style: none; padding: 40px 5px !important; margin: 0 0 0 0; display: flex; flex-wrap: wrap; justify-content: center !important; align-items: center !important; border-bottom: none; overflow: visible; position: static; background: #f7f7f6; }
.custom-single-product-layout .woocommerce-tabs ul.tabs::before,
.custom-single-product-layout .woocommerce-tabs ul.tabs::after { display: none; }
div.product.custom-single-product-layout .woocommerce-tabs ul.tabs li { border: 1px solid #202B39 !important; background: none !important; padding: 0 !important; margin-right: 20px; border-radius: 0 !important; display: inline-flex !important; align-items: center; position: static !important; line-height: normal; }
div.product.custom-single-product-layout .woocommerce-tabs ul.tabs li:last-child { margin-right: 0 !important; }
div.product.custom-single-product-layout .woocommerce-tabs ul.tabs li.active { background-color: #202B39 !important; border-bottom-color: transparent !important; z-index: auto !important; }
div.product.custom-single-product-layout .woocommerce-tabs ul.tabs li a { display: block; padding: 0.5em; text-decoration: none; color: #202B39 !important; font-weight: 700; background-color: transparent; border: none; border-radius: 0; transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; line-height: 1.5; white-space: nowrap; cursor: pointer; position: relative; z-index: 1; }
div.product.custom-single-product-layout .woocommerce-tabs ul.tabs li a:hover { color: #222b38; background-color: #f8f9fa; /* border-color: #adb5bd; */ } /* Assuming border is on LI now */
div.product.custom-single-product-layout .woocommerce-tabs ul.tabs li.active a { color: #fff !important; background-color: transparent !important; /* border-color: #222b38 !important; */ font-weight: 700; z-index: 2; }
div.product.custom-single-product-layout .woocommerce-tabs .panel,
div.product.custom-single-product-layout .woocommerce-tabs .woocommerce-Tabs-panel { padding: 25px !important; border: 1px solid #ebeef2 !important; background-color: #ffffff !important; border-radius: 5px !important; clear: both !important; margin-top: -1px !important; border-top: none !important; position: relative; z-index: 1; }
div.product.custom-single-product-layout .woocommerce-tabs .panel h2:first-child { margin-top: 0; display: block; font-size: 1.8em; margin-bottom: 20px; font-weight: 600; color: #222b38; }

/* Document List Styles (within tabs) */
.custom-single-product-layout .documents-list {
    width: 100%;
}
.custom-single-product-layout .document-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #F7F7F6;
    padding: 10px 20px;
    margin-bottom: 10px;
}
.custom-single-product-layout .document-name {
    font-weight: 400;
}
.custom-single-product-layout .document-download {
    font-weight: 600;
    text-decoration: underline!important;
}

/* Shop Attributes Table Styles (within tabs) */
div.product.custom-single-product-layout .woocommerce-product-attributes.shop_attributes {
    border-collapse: collapse!important;
    border-top: none!important; /* From: .woocommerce div.product.elementor .woocommerce-tabs .panel, .woocommerce-js table.shop_attributes */
    width: 100%; /* Ensuring full width */
}
div.product.custom-single-product-layout .woocommerce-product-attributes.shop_attributes th,
div.product.custom-single-product-layout .woocommerce-product-attributes.shop_attributes td {
    border: none!important;
}
div.product.custom-single-product-layout .woocommerce-product-attributes.shop_attributes th {
    text-align: left;
    padding-left: 20px !important; /* specific rule for th padding */
    padding-top: 8px !important; /* from general td padding */
    padding-bottom: 8px !important; /* from general td padding */
    font-weight: 600; /* common styling for th */
}
div.product.custom-single-product-layout .woocommerce-product-attributes.shop_attributes td {
    text-align: right;
    padding:8px!important;
    padding-right:30px!important;
}
div.product.custom-single-product-layout .woocommerce-product-attributes.shop_attributes tr {
    border-bottom: 1px solid #F1F1F1!important;
}
div.product.custom-single-product-layout .woocommerce-product-attributes.shop_attributes tr:last-child {
    border-bottom: none!important;
}


/* Responsive Adjustments for Tabs */
@media (max-width: 768px) {
    div.product.custom-single-product-layout .woocommerce-tabs ul.tabs {
        margin-bottom: 20px;
        padding: 20px 0 !important;
        font-size: 12px;
    }
    div.product.custom-single-product-layout .woocommerce-tabs ul.tabs li {
        flex-grow: 0; flex-basis: auto;
        margin-right: 10px; /* Overrides desktop margin-right */
    }
    div.product.custom-single-product-layout .woocommerce-tabs ul.tabs li a { padding: 8px 15px; text-align: center; } /* This padding was from before, check if still desired with 0.5em */
    div.product.custom-single-product-layout .woocommerce-tabs .panel,
    div.product.custom-single-product-layout .woocommerce-tabs .woocommerce-Tabs-panel { padding: 20px !important; }
    div.product.custom-single-product-layout .woocommerce-tabs .panel h2:first-child { font-size: 1.5em; }
}

/* Responsive Adjustments (General) */
@media (max-width: 768px) {
    .custom-single-product-layout .product-main-container { flex-direction: column; gap: 30px; align-items: stretch; }
    .custom-single-product-layout .product-image-column,
    .custom-single-product-layout .product-info-column { flex-basis: 100%; flex-grow: 0; flex-shrink: 1; }

    .custom-single-product-layout .image-wrapper-relative {
        width: 100%;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        padding: 20px; 
        min-height: 300px; 
        /* Dev2's suggestion for mobile thumbnail visibility if needed, test without first */
        /* overflow: visible; */ 
    }
    .custom-single-product-layout .image-wrapper-relative:not(.single-image-gallery) {
        /* Dev1's padding tweak for mobile thumbnails in dev tools */
        padding-bottom: calc(20px + 50px + 12px) !important; 
    }
    .custom-single-product-layout .image-wrapper-relative.single-image-gallery {
        padding-bottom: 20px !important; 
    }

    .woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images .flex-control-nav {
        bottom: -50px; 
        gap: 6px;
    }
    .woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images .flex-control-nav li img {
        width: 40px;
        height: 40px;
        border-width: 1px;
    }

    /* ... (other mobile styles remain unchanged) ... */
    .custom-single-product-layout .related-products-section .accordion-header { padding: 15px 20px; }
    .custom-single-product-layout .related-products-section .accordion-content { padding: 0; }
    .custom-single-product-layout .related-products-section .related-products-filter { padding: 15px 20px; margin-left: 0; margin-right: 0; }
    .custom-single-product-layout .related-products-section .table-row { flex-direction: column; align-items: flex-start; gap: 5px; padding: 15px 20px; }
    .custom-single-product-layout .related-products-section .cell { padding: 2px 0; flex-basis: auto !important; width: 100%; }
    .custom-single-product-layout .related-products-section .product-image { width: 80px; margin-bottom: 5px; }
    .custom-single-product-layout .related-products-section .product-add-to-cart .quantity-wrapper { flex-wrap: wrap; }

    .custom-single-product-layout .product-info-column .price-cart-row form.cart { gap: 10px; }
    .custom-single-product-layout .product-info-column .price-cart-row form.cart div.quantity { margin-right: 0; }

    .custom-single-product-layout .size-bundle-selector form.bundle_cart { gap: 10px; }
    .custom-single-product-layout .size-bundle-selector form.bundle_cart div.quantity { margin-right: 0; flex: 0 0 auto; }
    .custom-single-product-layout .size-bundle-selector .bundle_add_to_cart_button { flex: 1 1 100%; }
}

@media (min-width: 769px) {
    div.product.custom-single-product-layout .woocommerce-tabs .panel,
    div.product.custom-single-product-layout .woocommerce-tabs .woocommerce-Tabs-panel {
        padding: 30px 40px !important;
    }
}


/* Desktop specific quantity input gap adjustment */
@media (min-width: 769px) {
    /* ... (Desktop quantity/bundle styles remain unchanged) ... */
    .custom-single-product-layout .product-info-column .price-cart-row:not(.layout-stack-cart) form.cart { gap: 0; }
    .custom-single-product-layout .product-info-column .price-cart-row:not(.layout-stack-cart) form.cart div.quantity { margin-right: 10px; }
    .custom-single-product-layout .product-info-column .price-cart-row.layout-stack-cart form.cart { gap: 10px; }
    .custom-single-product-layout .product-info-column .price-cart-row.layout-stack-cart form.cart div.quantity { margin-right: 0; }
    .custom-single-product-layout .size-bundle-selector form.bundle_cart { gap: 10px; }
    .custom-single-product-layout .size-bundle-selector form.bundle_cart div.quantity { margin-right: 10px; flex: 0 0 auto; }
    .custom-single-product-layout .size-bundle-selector .bundle_add_to_cart_button { flex: 1; }

    .custom-single-product-layout .image-wrapper-relative {
        width: 90%;
        max-width: 420px;
        margin: 0 auto;
        padding: 30px; 
        min-height: 400px; 
    }
    .custom-single-product-layout .image-wrapper-relative:not(.single-image-gallery) {
         padding-bottom: calc(30px + 60px + 10px) !important; 
    }
    .custom-single-product-layout .image-wrapper-relative.single-image-gallery {
        padding-bottom: 30px !important; 
    }
}

/* Additional styling for better gallery experience */
.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images .flex-control-nav li a { display: block; outline: none; text-decoration: none; }
.woocommerce div.product.custom-single-product-layout .image-wrapper-relative .woocommerce-product-gallery.images.flexslider { border: none; border-radius: 0; box-shadow: none; margin: 0; background: transparent; }

/* Bundle Size Notice */
.bundle-size-notice {
    padding: 15px;
    background-color: #f7f7f6;
    border-left: 4px solid #222b38;
    margin-bottom: 20px;
    color: #5a616a;
    font-style: italic;
}

/* Bundle Component Links - Updated styles */
.bundle-component-links {
    margin-bottom: 30px;
    padding: 0; /* Removed padding */
    background-color: transparent; /* Removed background */
    border-radius: 0; /* Removed border radius */
}

.bundle-component-links .goto-label {
    display: block;
    font-weight: 600;
    color: #222b38;
    margin-bottom: 10px;
}

.bundle-component-link {
    display: block; /* Changed from inline to block for vertical stacking */
    color: #222b38;
    text-decoration: none;
    font-weight: 400; /* Reduced from 600 */
    transition: color 0.2s ease;
    margin-bottom: 5px; /* Add spacing between links */
    line-height: 1.5;
}

.bundle-component-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Bundle Component Sections */
.bundle-components-descriptions,
.bundle-components-specifications,
.bundle-components-documents {
    margin-top: 20px;
}

.bundle-component-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e8ebed;
}

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

.bundle-component-section h3 {
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 600;
    color: #222b38; /* Ensure color is set since it's no longer a link */
}

.component-description {
    color: #5a616a;
    line-height: 1.6;
}

/* Smooth scroll behavior for anchor links */
html {
    scroll-behavior: smooth;
}

/* Add some offset for the anchor links */
.bundle-component-section {
    scroll-margin-top: 100px;
}

/* Loading state for tab content */
.woocommerce-tabs .panel.loading {
    position: relative;
    pointer-events: none;
}

.woocommerce-tabs .panel.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

/* Login to See Prices Link */
.login-to-see-prices {
    color: #222b38 !important;
    text-decoration: underline !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-to-see-prices:hover {
    color: #0056b3 !important;
    text-decoration: underline !important;
}

/* Login required price styling */
.price.login-required-price {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 0;
}

/* Hide bundle size content by default */
.bundle-size-content {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .bundle-component-links {
        margin-bottom: 20px;
    }
    
    .bundle-component-link {
        font-size: 0.95em;
    }
    
    .bundle-component-section {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
    
    .bundle-component-section h3 {
        font-size: 1.1em;
    }
}