/* ============================================================
   AtelierCox — Product Page Tweaks v4.0
   ============================================================ */

/* === BREADCRUMB === */
body.single-product .woocommerce-breadcrumb {
  font-size: 0.85rem !important;
  color: #888 !important;
  margin-bottom: 8px !important;
  padding: 12px 0 0 !important;
}
body.single-product .woocommerce-breadcrumb a {
  color: #555 !important;
  text-decoration: none !important;
}
body.single-product .woocommerce-breadcrumb a:hover {
  text-decoration: underline !important;
}

/* === STOREFRONT OVERRIDES — unlock full width === */
body.single-product .woocommerce,
body.single-product #content > .col-full {
  overflow: visible !important;
}
body.single-product #primary.content-area {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
}
body.single-product #secondary {
  display: none !important;
}
body.single-product .site-main {
  overflow: visible !important;
}

/* === STICKY NAV (acox-sticky-nav) === */
body.single-product .acox-sticky-nav {
  position: sticky !important;
  top: 0 !important;
  z-index: 9990 !important;
  background: #fff !important;
  border-bottom: 1px solid #e5e2db;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
}

/* === TWO-COLUMN PRODUCT LAYOUT === */
@media (min-width: 769px) {
  body.single-product div.product,
  body.single-product div.product.type-product {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 40px !important;
    align-items: flex-start !important;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
  }

  /* Full-width children */
  body.single-product div.product > .woocommerce-notices-wrapper,
  body.single-product div.product > .woocommerce-breadcrumb,
  body.single-product div.product > .acox-sticky-nav,
  body.single-product div.product > .woocommerce-tabs,
  body.single-product div.product > .related,
  body.single-product div.product > .up-sells {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Gallery: left column, no sticky */
  body.single-product div.product > .woocommerce-product-gallery,
  body.single-product div.product > .images {
    flex: 0 0 calc(50% - 20px) !important;
    max-width: calc(50% - 20px) !important;
    width: calc(50% - 20px) !important;
    float: none !important;
    align-self: flex-start !important;
  }

  /* Summary: right column */
  body.single-product div.product > .summary,
  body.single-product div.product > .entry-summary {
    flex: 0 0 calc(50% - 20px) !important;
    max-width: calc(50% - 20px) !important;
    width: calc(50% - 20px) !important;
    float: none !important;
  }
}

/* === INFO LINKS === */
.acox-info-link { display:inline-flex; align-items:center; gap:4px; font-size:0.82rem; color:#888; text-decoration:none; margin-top:2px; cursor:pointer; }
.acox-info-link:hover { color:#6b8e23; }
.acox-info-link svg { flex-shrink:0; opacity:0.6; width:14px; height:14px; }
.acox-info-link:hover svg { opacity:1; }

/* === OPTIONS CARDS === */
body.single-product .acox-options-section .variations tr {
  display:block; background:#fff; border:1px solid #e5e2db;
  border-radius:8px; padding:20px 22px 16px; margin-bottom:16px;
}
body.single-product .acox-options-section .variations tr:last-child { margin-bottom:0; }
body.single-product .acox-options-section .variations td.label { display:block; width:100%!important; padding-bottom:4px!important; }
body.single-product .acox-options-section .variations td.label label { font-weight:700; font-size:0.95rem; color:#333; }

body.single-product .acox-radio-group { display:flex!important; flex-direction:column!important; gap:0!important; margin-top:4px; }
body.single-product .acox-radio-option {
  display:flex!important; align-items:center!important; padding:10px 14px!important;
  border:none!important; border-bottom:1px solid #f0ede8!important;
  border-radius:0!important; margin-bottom:0!important; background:transparent!important;
  width:auto!important; min-width:0!important;
}
body.single-product .acox-radio-option:last-child { border-bottom:none!important; }
body.single-product .acox-radio-option.is-selected { border:2px solid #7aa838!important; background:#f0f5e8!important; border-radius:6px!important; padding:8px 12px!important; }
body.single-product .acox-radio-option:hover:not(.is-selected) { background:#f8f7f4!important; }

body.single-product .acox-swatch { width:22px; height:22px; border-radius:4px; display:inline-block; margin-right:10px; border:1px solid #ddd; flex-shrink:0; }
body.single-product .acox-swatch-img { width:28px; height:28px; border-radius:4px; display:inline-flex; margin-right:10px; overflow:hidden; flex-shrink:0; border:1px solid #ddd; }
body.single-product .acox-swatch-img img { width:100%; height:100%; object-fit:cover; }

/* Moved from ac-product-tweaks.php inline <style> to avoid grep duplication in HTML */
.acox-sticky-nav{position:sticky!important;top:0!important;z-index:9990!important;background:#fff!important;box-shadow:0 2px 8px rgba(0,0,0,.08)!important;border-bottom:1px solid #e5e2db!important}
body.admin-bar .acox-sticky-nav{top:32px!important}
.acox-sticky-inner{display:flex;align-items:center;justify-content:space-between;gap:20px;max-width:1200px;margin:0 auto;padding:10px 30px}
.ac-related-section,.ac-categories-section{max-width:1200px;margin:40px auto 0;padding:0 30px;width:100%}
.ac-related-section h2,.ac-categories-section h2{font-family:'Syne',sans-serif;font-size:26px;font-weight:700;color:#524235;margin:0 0 24px}
.ac-related-section{margin-bottom:60px}
.ac-categories-section{padding-top:40px;border-top:1px solid #e5e2db;margin-top:0}
.ac-categories-section h2{font-size:22px;color:#7a7a7a}


/* ============================================================
   AtelierCox — Product Page v5.0 (pixel-perfect overrides)
   ============================================================ */

/* Title / Price */
body.single-product .acox-title {
    font-family: 'Syne', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: #524235;
    line-height: 1.15;
    margin: 0 0 16px;
}

body.single-product .acox-price-block {
    margin: 0 0 24px;
}

body.single-product .acox-price-prefix {
    font-family: 'Syne', sans-serif;
    font-size: 0.9rem;
    color: #777;
    margin-right: 8px;
}

body.single-product .acox-price-row {
    font-family: 'Syne', sans-serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: #6b8e23;
    line-height: 1.2;
}

body.single-product .acox-price-row .woocommerce-Price-currencySymbol {
    font-size: 1.2rem;
    font-weight: 600;
    margin-left: 2px;
}

body.single-product .acox-price-row del,
body.single-product .acox-price-row .price del {
    color: #999;
    font-size: 1.3rem;
    margin-right: 10px;
    font-weight: 500;
}

body.single-product .acox-price-row ins,
body.single-product .acox-price-row .price ins {
    text-decoration: none;
    color: #6b8e23;
}

/* Internal sticky menu */
body.single-product .acox-sticky-inner {
    max-width: none;
    margin: 0 auto;
    padding: 10px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
}

body.single-product .acox-sticky-links {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    flex-wrap: nowrap;
    justify-content: space-between;
    min-width: 0;
}

body.single-product .acox-sticky-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 20px;
    font-family: 'Syne', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s, color .2s;
}

body.single-product .acox-sticky-link svg {
    width: 16px;
    height: 16px;
    color: #6b8e23;
    flex-shrink: 0;
}

body.single-product .acox-sticky-link:hover,
body.single-product .acox-sticky-link.is-active {
    background: #f0f5e8;
    color: #4a6f14;
}

body.single-product .acox-sticky-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #6b8e23;
    color: #fff;
    border-radius: 6px;
    font-family: 'Syne', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s;
}

body.single-product .acox-sticky-cart-btn:hover {
    background: #527a1a;
}

body.single-product .acox-sticky-price {
    color: #fff;
    font-size: 1rem;
}

@media (max-width: 768px) {
    body.single-product .acox-sticky-inner {
        flex-wrap: wrap;
        padding: 10px 16px;
    }
    body.single-product .acox-sticky-links {
        gap: 4px;
        order: 2;
        width: 100%;
    }
    body.single-product .acox-sticky-link {
        font-size: 0.78rem;
        padding: 6px 10px;
    }
    body.single-product .acox-sticky-cart-btn {
        order: 1;
        margin-left: auto;
        padding: 8px 14px;
        font-size: 0.82rem;
    }
}

/* Options / add-to-cart */
body.single-product .acox-options-heading {
    font-family: 'Syne', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #524235;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.single-product .acox-options-heading svg {
    color: #6b8e23;
    flex-shrink: 0;
}

body.single-product .acox-options-section .variations tr {
    margin-bottom: 14px;
    border-radius: 10px;
}

body.single-product .acox-options-section .variations td.label,
body.single-product .acox-options-section .variations td.value {
    display: block;
    width: 100% !important;
    padding: 0 !important;
}

body.single-product .acox-options-section .variations td.value {
    padding-top: 8px !important;
}

body.single-product .acox-radio-option {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid #e5e2db;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

body.single-product .acox-radio-option.is-selected {
    border: 2px solid #7aa838;
    background: #f0f5e8;
}

body.single-product .single_add_to_cart_button {
    width: 100%;
    background: #6b8e23;
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 16px;
    border: none;
    border-radius: 8px;
    margin-top: 14px;
    cursor: pointer;
    transition: background .2s;
}

body.single-product .single_add_to_cart_button:hover {
    background: #527a1a;
}

/* Delivery box */
body.single-product .acox-delivery-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #e5e2db;
    border-radius: 10px;
    margin: 16px 0;
    background: #fff;
}

body.single-product .acox-delivery-icon-wrap {
    color: #6b8e23;
    flex-shrink: 0;
    display: flex;
}

body.single-product .acox-dot-green {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #6b8e23;
    border-radius: 50%;
    margin-right: 8px;
}

/* CTA / help box */
body.single-product .acox-cta-box {
    background: #f0f5e8;
    border: 1px solid #7aa838;
    border-radius: 12px;
    padding: 20px;
    margin: 18px 0;
}

body.single-product .acox-cta-box h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #524235;
    margin: 0 0 8px;
}

body.single-product .acox-cta-box p {
    font-size: 0.95rem;
    color: #555;
    margin: 0 0 14px;
    line-height: 1.5;
}

body.single-product .acox-cta-link {
    display: inline-flex;
    padding: 10px 18px;
    background: #6b8e23;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    transition: background .2s;
}

body.single-product .acox-cta-link:hover {
    background: #527a1a;
}

/* Characteristics cards and table */
body.single-product .acox-charac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin: 0 0 24px;
}

body.single-product .acox-charac-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 14px;
    background: #f8f7f4;
    border: 1px solid #e5e2db;
    border-radius: 12px;
    transition: box-shadow .2s, border-color .2s;
}

body.single-product .acox-charac-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border-color: #d0cdc4;
}

body.single-product .acox-charac-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 10px;
    color: #6b8e23;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.single-product .acox-charac-icon svg {
    width: 100%;
    height: 100%;
}

body.single-product .acox-charac-value {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #524235;
    line-height: 1.2;
    margin-bottom: 4px;
}

body.single-product .acox-charac-label {
    font-size: 0.82rem;
    color: #777;
    line-height: 1.3;
}

body.single-product .acox-charac-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
}

body.single-product .acox-charac-table tr.acox-row-even {
    background: #fff;
}

body.single-product .acox-charac-table tr.acox-row-odd {
    background: #f8f7f4;
}

body.single-product .acox-charac-table td {
    padding: 13px 16px;
    font-size: 0.95rem;
    color: #555;
    border-bottom: 1px solid #e5e2db;
    vertical-align: middle;
}

body.single-product .acox-charac-table .acox-td-label {
    font-weight: 600;
    color: #524235;
    width: 55%;
}

body.single-product .acox-charac-table .acox-td-value {
    color: #6b8e23;
    font-weight: 700;
    text-align: right;
}

/* Collapsibles */
body.single-product .acox-collapsibles {
    border-top: 1px solid #e5e2db;
    margin: 32px 0;
}

body.single-product .acox-collapse {
    border-bottom: 1px solid #e5e2db;
}

body.single-product .acox-collapse-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    background: transparent;
    border: none;
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #524235;
    cursor: pointer;
    text-align: left;
}

body.single-product .acox-collapse-header svg {
    color: #6b8e23;
    flex-shrink: 0;
}

body.single-product .acox-collapse-body {
    padding: 0 0 24px;
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}

/* Storefront product pagination: keep nav, hide prev/next */
body.single-product .storefront-product-pagination a[rel="prev"],
body.single-product .storefront-product-pagination a[rel="next"] {
    display: none !important;
}

/* Related products and categories polish */
body.single-product .ac-related-section,
body.single-product .ac-categories-section {
    max-width: 1200px;
    margin: 50px auto 0;
    padding: 0 30px;
}

body.single-product .ac-related-card {
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid #e5e2db;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .2s, transform .2s;
}

body.single-product .ac-related-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

body.single-product .ac-related-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

body.single-product .ac-related-card-body {
    padding: 14px;
}

body.single-product .ac-related-card-name {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #524235;
    display: block;
    margin-bottom: 6px;
    line-height: 1.3;
}

body.single-product .ac-related-card-dims {
    font-size: 0.82rem;
    color: #777;
    margin-bottom: 8px;
}

body.single-product .ac-related-card-price {
    font-family: 'Syne', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #6b8e23;
}

body.single-product .ac-cat-card {
    text-decoration: none;
    display: block;
    text-align: center;
    background: #f8f7f4;
    border: 1px solid #e5e2db;
    border-radius: 10px;
    padding: 16px;
    transition: box-shadow .2s, transform .2s;
}

body.single-product .ac-cat-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

body.single-product .ac-cat-card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
}

body.single-product .ac-cat-card span {
    font-family: 'Syne', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #524235;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}


/* Price color overrides to match XD green */
body.single-product .acox-price-row .woocommerce-Price-amount,
body.single-product .acox-price-row .price,
body.single-product .acox-price-row ins {
    color: #6b8e23 !important;
}

body.single-product .acox-config-amount,
body.single-product .acox-config-amount .woocommerce-Price-amount {
    color: #6b8e23 !important;
}


/* User request: force sticky nav z-index */
body.single-product .acox-sticky-nav { z-index: 2 !important; }

/* Sticky nav icons: max 14px height, auto width */
body.single-product .acox-sticky-link svg,
body.single-product .acox-sticky-cart-btn svg {
    max-height: 14px;
    width: auto;
}

/* Collapse section titles matching the Options heading style */
body.single-product .acox-collapse-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 700;
    color: #524235;
}

body.single-product .acox-collapse-icon svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Hide native Storefront breadcrumb, keep our in-product one */
body.single-product .storefront-breadcrumb:has(.col-full) {
    display: none !important;
}

/* Native WooCommerce/FlexSlider thumbnails: 4 visible + horizontal scroll */
body.single-product .woocommerce-product-gallery .flex-control-thumbs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 10px;
    padding: 0;
    margin: 10px 0 0 0;
    list-style: none;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
body.single-product .woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}
body.single-product .woocommerce-product-gallery .flex-control-thumbs li {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    min-width: 25% !important;
    margin: 0;
}
body.single-product .woocommerce-product-gallery .flex-control-thumbs li img {
    width: 100%;
    height: auto;
    display: block;
    box-sizing: border-box;
}

/* FlexSlider prev/next arrows — bottom right of main image, no text */
body.single-product .woocommerce-product-gallery {
    position: relative;
}
body.single-product .woocommerce-product-gallery .flex-direction-nav {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
}
body.single-product .woocommerce-product-gallery .flex-direction-nav li {
    margin: 0;
}
body.single-product .woocommerce-product-gallery .flex-direction-nav a {
    display: block;
    width: 36px;
    height: 36px;
    background: rgba(107, 142, 35, 0.85);
    border-radius: 50%;
    text-align: center;
    text-decoration: none;
    text-indent: -9999px;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    transition: background 0.2s;
}
body.single-product .woocommerce-product-gallery .flex-direction-nav a:hover,
body.single-product .woocommerce-product-gallery .flex-direction-nav a:focus {
    background: rgba(82, 66, 53, 0.95);
    text-decoration: none;
}
body.single-product .woocommerce-product-gallery .flex-direction-nav a::before {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    text-indent: 0;
    text-align: center;
    line-height: 36px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    pointer-events: none;
}
body.single-product .woocommerce-product-gallery .flex-direction-nav a.flex-prev::before {
    content: '\2039';
    padding-right: 2px;
}
body.single-product .woocommerce-product-gallery .flex-direction-nav a.flex-next::before {
    content: '\203a';
    padding-left: 2px;
}

/* Image rule preview overlay: sits above the FlexSlider viewport without
   mutating slides, so native gallery navigation stays intact. */
body.single-product .woocommerce-product-gallery .flex-viewport {
    position: relative;
}
.acox-image-rule-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    display: none;
    background: #fff;
    pointer-events: none;
}
.acox-image-rule-preview.is-visible {
    display: block;
}
.acox-image-rule-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ============================================================
   AtelierCox — FlexSlider rail repair (preserve Odoo images)
   ============================================================ */
body.single-product .woocommerce-product-gallery .flex-viewport > .woocommerce-product-gallery__wrapper {
  display: block !important;
  max-width: none !important;
}
body.single-product .woocommerce-product-gallery .flex-viewport > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image {
  display: block !important;
  float: left !important;
  clear: none !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
body.single-product .woocommerce-product-gallery .flex-control-thumbs li {
  clear: none !important;
}


/* === Fixed product preview frame (prevent gallery jumps on option images) === */
@media (min-width: 769px) {
  body.single-product .woocommerce-product-gallery .flex-viewport {
    height: clamp(420px, 40vw, 560px) !important;
    min-height: 420px !important;
    max-height: 560px !important;
    overflow: hidden !important;
    background: #fff;
  }
  body.single-product .woocommerce-product-gallery .flex-viewport > .woocommerce-product-gallery__wrapper,
  body.single-product .woocommerce-product-gallery .flex-viewport > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image {
    height: 100% !important;
  }
  body.single-product .woocommerce-product-gallery .flex-viewport > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    background: #fff !important;
  }
  body.single-product .woocommerce-product-gallery .flex-viewport > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    margin: 0 auto !important;
  }
}
@media (max-width: 768px) {
  body.single-product .woocommerce-product-gallery .flex-viewport {
    height: 360px !important;
    min-height: 360px !important;
    overflow: hidden !important;
    background: #fff;
  }
  body.single-product .woocommerce-product-gallery .flex-viewport > .woocommerce-product-gallery__wrapper,
  body.single-product .woocommerce-product-gallery .flex-viewport > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image {
    height: 100% !important;
  }
  body.single-product .woocommerce-product-gallery .flex-viewport > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
  }
  body.single-product .woocommerce-product-gallery .flex-viewport > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
  }
}


/* Rule image overlay must preserve the fixed frame proportions. */
body.single-product .acox-image-rule-preview img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  margin: 0 auto !important;
}


/* ============================================================
   AtelierCox — Rule preview frame fallback
   Some WooCommerce gallery states omit .flex-viewport and leave
   the floated wrapper at 0px height. Keep the global frame stable.
   ============================================================ */
body.single-product .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
  position: relative !important;
  height: 560px !important;
  min-height: 420px !important;
  max-height: 560px !important;
  overflow: hidden !important;
}
body.single-product .woocommerce-product-gallery .flex-viewport > .woocommerce-product-gallery__wrapper {
  position: relative !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
}
body.single-product .woocommerce-product-gallery .acox-image-rule-preview {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  z-index: 20 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  background: #fff !important;
  pointer-events: none !important;
}
body.single-product .woocommerce-product-gallery .acox-image-rule-preview.is-visible {
  display: flex !important;
}
body.single-product .woocommerce-product-gallery .acox-image-rule-preview img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  margin: 0 auto !important;
}
@media (max-width: 768px) {
  body.single-product .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
    height: 360px !important;
    min-height: 360px !important;
    max-height: 360px !important;
  }
}


/* Fiche produit — retour au rail natif FlexSlider */
body.single-product .woocommerce-product-gallery .flex-viewport > .woocommerce-product-gallery__wrapper {
  display: block !important;
  flex: none !important;
  max-width: none !important;
  overflow: visible !important;
}
body.single-product .woocommerce-product-gallery .flex-viewport > .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image {
  display: block !important;
  position: relative !important;
  float: left !important;
  clear: none !important;
  flex: none !important;
  margin: 0 !important;
}


/* Odoo image rules : recadrage plein cadre, sans arrondi */
body.single-product .woocommerce-product-gallery .acox-image-rule-preview img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

body.single-product .acox-charac-card:hover {
    box-shadow: inherit;
}
