/* Kran Experience — catalogue et fiche produit */

/* ── Catalogue ── */
html.kx .habitats-catalog { background: var(--kx-paper); }
html.kx .habitats-catalog__breadcrumb { color: var(--kx-muted); font-size: 13px; }
html.kx .habitats-catalog__breadcrumb a:hover { color: var(--kx-ember); }
html.kx .habitats-catalog__header { position: relative; isolation: isolate; overflow: hidden; margin: 8px 0 28px; padding: clamp(28px, 5vw, 64px) clamp(20px, 4vw, 56px); border-radius: var(--kx-r-panel); background: var(--kx-ink); border: 0; box-shadow: var(--kx-shadow-lift); min-height: clamp(170px, 20vw, 260px); display: flex; flex-direction: column; justify-content: flex-end; }
html.kx .habitats-catalog__header::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--kx-cat-bg, none) center/cover no-repeat, radial-gradient(120% 120% at 80% 0%, #7a3410, #120A06 65%); }
html.kx .habitats-catalog__header::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(18, 10, 6, .92) 0%, rgba(18, 10, 6, .62) 48%, rgba(18, 10, 6, .12) 100%); }
@keyframes kx-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
html.kx .habitats-catalog__title { color: #fff; font: 700 clamp(2.1rem, 5vw, 4rem)/1 var(--kx-display); letter-spacing: -.035em; margin: 0; animation: kx-slide .8s var(--kx-ease) both; }
@keyframes kx-slide { from { transform: translate3d(0, 22px, 0); } }
html.kx .habitats-catalog__subtitle { color: #E9DCCB; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.5; max-width: 60ch; margin: 14px 0 0; animation: kx-rise .8s .1s var(--kx-ease) both; }
@keyframes kx-rise { from { opacity: 0; transform: translate3d(0, 26px, 0); filter: blur(8px); } }
html.kx .habitats-catalog__sidebar { border-radius: var(--kx-r-card); background: #fff; border: 1px solid var(--kx-line); box-shadow: var(--kx-shadow); padding: 20px; }
html.kx .filter-block__title { color: var(--kx-muted); letter-spacing: .14em; }
html.kx .quick-chips .chip { min-height: 40px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--kx-cream); color: var(--kx-text); border: 1px solid transparent; font-weight: 600; transition: background .2s, transform .18s var(--kx-ease); }
html.kx .quick-chips .chip:active { transform: scale(.95); }
html.kx .quick-chips .chip.is-active { background: var(--kx-ink); color: #fff; }
html.kx .filter-list a { border-radius: 12px; transition: background .2s, color .2s; }
html.kx .filter-list a:hover { background: var(--kx-cream); }
html.kx .filter-list .current > a, html.kx .filter-list a.is-active, html.kx .filter-list a[aria-current] { background: var(--kx-ink) !important; color: #fff !important; }
html.kx .filter-price__submit { border-radius: 999px; background: var(--kx-ink); min-height: 44px; }
html.kx .filter-price input { border-radius: 12px; min-height: 44px; font-size: 16px; }
html.kx .habitats-catalog__toolbar { border: 0; }
html.kx .habitats-catalog__sort select, html.kx #orderby-select { min-height: 44px; border-radius: 999px; border: 1px solid var(--kx-line); background-color: #fff; font-size: 15px; box-shadow: var(--kx-shadow); }
html.kx .habitats-catalog__grid { gap: 18px; perspective: 1600px; }
html.kx .habitats-catalog__pagination .page-numbers { min-width: 44px; min-height: 44px; border-radius: 50%; border: 1px solid var(--kx-line); background: #fff; display: inline-grid; place-items: center; font-weight: 650; transition: transform .18s var(--kx-ease), background .2s, color .2s; }
html.kx .habitats-catalog__pagination a.page-numbers:hover { transform: translateY(-2px); color: var(--kx-ember); }
html.kx .habitats-catalog__pagination .page-numbers.current { background: var(--kx-ink); color: #fff; border-color: var(--kx-ink); }
html.kx .habitats-catalog__pagination .page-numbers.next, html.kx .habitats-catalog__pagination .page-numbers.prev { border-radius: 999px; padding: 0 18px; }
html.kx .habitats-catalog__seo-text { margin-top: clamp(40px, 6vw, 72px); padding: clamp(24px, 4vw, 48px); border-radius: var(--kx-r-panel); background: var(--kx-cream); border: 0; max-width: none; }
html.kx .habitats-catalog__seo-text > * { max-width: 72ch; }
html.kx .habitats-catalog__seo-text h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
html.kx .habitats-catalog__seo-text a { color: var(--kx-ember-deep); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 768px) {
  html.kx .habitats-catalog__header { border-radius: 24px; margin-top: 4px; }
  html.kx .habitats-catalog__header::after { background: linear-gradient(180deg, rgba(18, 10, 6, .35) 0%, rgba(18, 10, 6, .9) 100%); }
  html.kx .habitats-catalog__grid { gap: 12px; }
}

/* ── Fiche produit ── */
html.kx .sp-page { background: var(--kx-paper); }
html.kx .sp-breadcrumb { color: var(--kx-muted); }
html.kx .sp-breadcrumb a { color: var(--kx-ember-deep); }
html.kx .sp-gallery { perspective: 1400px; }
html.kx .sp-gallery__main { position: relative; border-radius: var(--kx-r-panel); background: radial-gradient(90% 70% at 50% 100%, #F3E9DC 0%, #fff 70%); border: 1px solid var(--kx-line); box-shadow: var(--kx-shadow-lift); overflow: hidden; transform: rotateX(var(--kx-rx, 0deg)) rotateY(var(--kx-ry, 0deg)); transition: transform .6s var(--kx-ease); }
html.kx .sp-gallery__main::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: 6%; height: 26px; border-radius: 50%; background: radial-gradient(closest-side, rgba(43, 26, 16, .28), transparent); pointer-events: none; }
html.kx #sp-main-img { view-transition-name: kx-shot; mix-blend-mode: multiply; position: relative; z-index: 1; transition: transform .7s var(--kx-ease); animation: kx-shot-in .9s var(--kx-ease) both; }
@keyframes kx-shot-in { from { transform: scale(.94) translateY(14px); } }
html.kx .sp-gallery__main:hover #sp-main-img { transform: scale(1.05) translateY(-4px); }
html.kx .sp-gallery__thumbs button, html.kx .sp-gallery__thumbs img { border-radius: 14px; }
html.kx .sp-info > * { animation: kx-slide .7s var(--kx-ease) both; }
html.kx .sp-info > :nth-child(2) { animation-delay: .06s; } html.kx .sp-info > :nth-child(3) { animation-delay: .12s; }
html.kx .sp-info > :nth-child(4) { animation-delay: .18s; } html.kx .sp-info > :nth-child(n+5) { animation-delay: .24s; }
html.kx .sp-info__title { font: 700 clamp(1.7rem, 3vw, 2.6rem)/1.05 var(--kx-display); letter-spacing: -.03em; color: var(--kx-text); }
html.kx .sp-info__cat-badge { border-radius: 999px; background: var(--kx-ink); color: var(--kx-gold); padding: 6px 12px; font-weight: 700; letter-spacing: .06em; }
html.kx .sp-price { font: 700 clamp(2rem, 3.4vw, 2.8rem)/1 var(--kx-display); letter-spacing: -.03em; color: var(--kx-text); font-variant-numeric: tabular-nums; }
html.kx .sp-price--sale { color: var(--kx-danger); }
html.kx .sp-price-note, html.kx .sp-grundpreis { color: var(--kx-muted); }
html.kx .sp-dot { background: var(--kx-ok); box-shadow: 0 0 0 4px rgba(23, 117, 74, .18); animation: kx-pulse 2.4s ease-in-out infinite; }
@keyframes kx-pulse { 50% { box-shadow: 0 0 0 8px rgba(23, 117, 74, 0); } }
html.kx .sp-mini-specs { border-radius: 20px; border: 1px solid var(--kx-line); background: #fff; overflow: hidden; }
html.kx .sp-info-bar:not(.sp-info-bar--dark) { border-radius: 20px; background: var(--kx-cream); border: 0; }
html.kx .sp-variation-selector__select { min-height: 52px; border-radius: 16px; border: 1px solid var(--kx-line); font-size: 16px; background-color: #fff; box-shadow: var(--kx-shadow); }
html.kx .sp-variation-selector__select:focus { border-color: var(--kx-ember); box-shadow: 0 0 0 4px rgba(184, 70, 15, .16); outline: none; }
html.kx .sp-cta-banner { border-radius: 24px; background: var(--kx-ink); box-shadow: 0 30px 60px -28px rgba(18, 10, 6, .8); position: relative; }
html.kx .sp-cta-banner.is-sticky { border-radius: 24px; }
html.kx .sp-cta { border-radius: 999px; background: var(--kx-glow); color: var(--kx-ink); font-weight: 700; min-height: 52px; box-shadow: 0 12px 34px -10px rgba(255, 122, 26, .8); transition: transform .18s var(--kx-ease), box-shadow .3s; }
html.kx .sp-cta:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -10px rgba(255, 122, 26, 1); background: var(--kx-glow); color: var(--kx-ink); }
html.kx .sp-cta:active { transform: scale(.97); }
html.kx .sp-cta .woocommerce-Price-amount, html.kx .sp-cta svg { color: var(--kx-ink); }
html.kx .sp-qty { border-radius: 999px; overflow: hidden; }
html.kx .sp-qty__btn { min-width: 44px; min-height: 44px; }
html.kx .sp-h2, html.kx .sp-related__title { font: 700 clamp(1.5rem, 2.6vw, 2.1rem)/1.1 var(--kx-display); letter-spacing: -.025em; }
html.kx .sp-specs-table { border-radius: 20px; overflow: hidden; border: 1px solid var(--kx-line); background: #fff; }
html.kx .sp-side-card { border-radius: var(--kx-r-card); background: #fff; border: 1px solid var(--kx-line); box-shadow: var(--kx-shadow); }
html.kx .sp-side-card__mail { color: var(--kx-ember-deep); }
html.kx .sp-related__grid.kx-rail { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 14px 4px 34px; margin: -14px -4px -20px; }
html.kx .sp-related__grid.kx-rail::-webkit-scrollbar { display: none; }
html.kx .sp-related__grid.kx-rail > .product-card { flex: 0 0 clamp(180px, 16.2vw, 232px); scroll-snap-align: start; }
html.kx .woocommerce #respond input#submit, html.kx #review_form .submit { border-radius: 999px; background: var(--kx-ink); color: #fff; min-height: 44px; padding: 0 22px; }
html.kx #review_form textarea, html.kx #review_form input[type=text], html.kx #review_form input[type=email] { border-radius: 14px; border: 1px solid var(--kx-line); min-height: 48px; font-size: 16px; padding: 10px 14px; width: 100%; max-width: 560px; }

@media (max-width: 767px) {
  /* barre d'achat collante, au-dessus de la barre d'onglets */
  html.kx .sp-page .sp-cta-banner, html.kx .sp-page .sp-cta-banner.is-sticky {
    position: fixed !important; left: 8px !important; right: 8px !important; bottom: calc(var(--kx-tab-h) + 8px) !important; top: auto !important; z-index: 60 !important;
    width: auto !important; margin: 0 !important; padding: 8px !important; border-radius: 22px !important; border: 1px solid rgba(255, 255, 255, .14) !important;
    background: rgba(18, 10, 6, .90) !important; -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
    box-shadow: 0 24px 48px -16px rgba(18, 10, 6, .8) !important; flex-direction: row !important; animation: kx-bar-in .6s .3s var(--kx-ease) both;
  }
  @keyframes kx-bar-in { from { opacity: 0; transform: translateY(120%); } }
  html.kx .sp-page .sp-cta-banner__actions { flex: 1; display: flex !important; gap: 8px !important; align-items: stretch !important; }
  html.kx .sp-page .sp-cta-banner .sp-qty { background: rgba(255, 255, 255, .12) !important; border: 0 !important; border-radius: 999px !important; height: 50px !important; }
  html.kx .sp-page .sp-cta-banner .sp-qty__btn, html.kx .sp-page .sp-cta-banner .sp-qty__input { color: #fff !important; background: transparent !important; height: 50px !important; }
  html.kx .sp-page .sp-cta { flex: 1 !important; min-height: 50px !important; border-radius: 999px !important; background: var(--kx-glow) !important; color: var(--kx-ink) !important; font-size: 15px !important; }
  html.kx .sp-page .sp-cta .woocommerce-Price-amount { color: var(--kx-ink) !important; }
  html.kx .sp-page { padding-bottom: 96px !important; }
  html.kx .sp-gallery__main { border-radius: 24px; }
  html.kx .cky-btn-revisit-wrapper { bottom: calc(var(--kx-tab-h) + 84px) !important; }
}

/* ── Page « Brennholz » (tuiles des essences) ── */
html.kx .kb-holz-grid > li, html.kx ul.kran-brennholz > li { transition: transform .4s var(--kx-ease); }

@media (prefers-reduced-motion: reduce) { html.kx .sp-gallery__main { transform: none; } html.kx .habitats-catalog__header::before { animation: none; } }

/* retouches après relecture des captures */
html.kx .habitats-catalog__header { width: 100%; max-width: none; box-sizing: border-box; }
html.kx #review_form label { display: block; margin: 12px 0 6px; font-weight: 600; }
html.kx #review_form .comment-form-cookies-consent label { display: inline; font-weight: 400; }
@media (min-width: 768px) and (max-width: 899px) { html.kx .sp-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; } }

/* contrastes AA et lien vide du pied de page (hérités du thème) */
html.kx .sp-grundpreis__label, html.kx .sp-grundpreis { color: var(--kx-muted) !important; }
html.kx .sp-info__stock { color: var(--kx-ok) !important; background: rgba(23, 117, 74, .10) !important; }

/* ── Filtres : feuille coulissante sous 900 px (bouton créé par le script ; sans script, les filtres restent en bas de page) ── */
html.kx .kx-filter-btn { display: none; }
@media (max-width: 899px) {
  html.kx .kx-filter-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--kx-line); background: var(--kx-ink); color: #fff; font: 650 15px/1 var(--kx-ui); box-shadow: var(--kx-shadow); }
  html.kx .kx-filter-btn:active { transform: scale(.96); }
  html.kx .habitats-catalog__toolbar { gap: 10px; flex-wrap: wrap; }
  html.kx.kx-has-filters .habitats-catalog__sidebar { position: fixed !important; z-index: 92; left: 0; right: 0; bottom: 0; top: auto; max-height: 84vh !important; overflow: auto !important; margin: 0; padding: 30px 20px calc(24px + env(safe-area-inset-bottom, 0px)) !important; border-radius: 28px 28px 0 0 !important; background: var(--kx-paper) !important; box-shadow: 0 -24px 60px -20px rgba(18, 10, 6, .6); transform: translateY(104%); visibility: hidden; transition: transform .42s var(--kx-ease), visibility 0s .42s; }
  html.kx.kx-has-filters .habitats-catalog__sidebar::before { content: ''; position: absolute; top: 10px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 99px; background: rgba(43, 26, 16, .22); }
  html.kx.kx-has-filters.kx-filters-open .habitats-catalog__sidebar { transform: none; visibility: visible; transition: transform .42s var(--kx-ease), visibility 0s; }
  html.kx .kx-filter-backdrop { position: fixed; inset: 0; z-index: 91; background: rgba(18, 10, 6, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .32s; }
  html.kx.kx-filters-open .kx-filter-backdrop { opacity: 1; pointer-events: auto; }
  html.kx .kx-filter-close { position: sticky; bottom: 0; width: 100%; min-height: 52px; margin-top: 16px; border: 0; border-radius: 999px; background: var(--kx-ember); color: #fff; font: 700 16px/1 var(--kx-ui); }
}
@media (min-width: 900px) { html.kx .kx-filter-close, html.kx .kx-filter-backdrop { display: none; } }

/* ═══ Retouches d'ergonomie (2026-11-25) ═══ */
html.kx .habitats-catalog__sort select, html.kx #orderby-select { min-height: 40px; height: 40px; padding: 0 38px 0 16px; line-height: 1.2; box-sizing: border-box; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A0F09' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 14px; }
html.kx .sp-variation-selector__select { min-height: 46px; height: 46px; padding: 0 40px 0 14px; line-height: 1.2; box-sizing: border-box; text-overflow: ellipsis; }
html.kx .sp-cta { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1; padding-block: 0; }
html.kx .sp-qty { display: inline-flex; align-items: center; }
html.kx .sp-qty__btn { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; padding: 0; }
html.kx .sp-qty__input { text-align: center; padding: 0; line-height: 1; }
html.kx .habitats-catalog__pagination .page-numbers { min-width: 38px; min-height: 38px; line-height: 1; }
html.kx .quick-chips .chip { min-height: 34px; padding-block: 0; line-height: 1; }
html.kx .filter-price__submit { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; padding-block: 0; }
html.kx .filter-price input { min-height: 40px; }
html.kx .woocommerce #respond input#submit, html.kx #review_form .submit { min-height: 40px; line-height: 1; padding-block: 0; }
@media (max-width: 899px) {
  html.kx .kx-filter-btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
  html.kx .kx-filter-close { min-height: 44px; font-size: 15px; display: flex; align-items: center; justify-content: center; }
}
@media (max-width: 768px) {
  html.kx .habitats-catalog__grid { gap: 10px; }
  html.kx .habitats-catalog__header { min-height: 0; padding: 18px 16px; margin: 2px 0 14px; border-radius: 20px; }
  html.kx .habitats-catalog__title { font-size: 1.6rem; }
  html.kx .habitats-catalog__subtitle { font-size: 13.5px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  html.kx .habitats-catalog__seo-text { margin-top: 28px; padding: 18px 16px; border-radius: 20px; font-size: 14px; }
  html.kx .habitats-catalog__seo-text h2 { font-size: 1.2rem; }
  /* fiche */
  html.kx .sp-gallery__main { max-height: 250px; }
  html.kx .sp-gallery__main img { max-height: 250px; width: 100%; object-fit: contain; }
  html.kx .sp-info__title { font-size: 1.4rem; }
  html.kx .sp-price { font-size: 1.7rem; }
  html.kx .sp-h2, html.kx .sp-related__title { font-size: 1.3rem; }
  html.kx .sp-variation-selector__select { min-height: 44px; height: 44px; }
  html.kx .sp-page .sp-cta-banner, html.kx .sp-page .sp-cta-banner.is-sticky { padding: 6px !important; border-radius: 18px !important; }
  html.kx .sp-page .sp-cta-banner .sp-qty, html.kx .sp-page .sp-cta-banner .sp-qty__btn, html.kx .sp-page .sp-cta-banner .sp-qty__input { height: 42px !important; min-height: 42px; }
  html.kx .sp-page .sp-cta-banner .sp-qty__btn { min-width: 34px; }
  html.kx .sp-page .sp-cta { min-height: 42px !important; font-size: 14px !important; padding-inline: 10px !important; white-space: nowrap; }
  html.kx .sp-page { padding-bottom: 76px !important; }
  html.kx .sp-related__grid.kx-rail > .product-card { flex-basis: min(42vw, 172px); }
  html.kx .sp-related__grid.kx-rail { gap: 10px; }
  html.kx .cky-btn-revisit-wrapper { bottom: calc(var(--kx-tab-h) + 70px) !important; }
}
html.kx .sp-grundpreis__label { color: #5E4E40 !important; opacity: 1 !important; }

/* ═══ Barre d'achat sur ordinateur (2026-11-25) : une fois la fiche défilée, elle se range en bas de l'écran au lieu de flotter sur le texte ═══ */
@media (min-width: 768px) {
  html.kx .sp-cta-banner { min-height: 64px; box-sizing: border-box; padding: 10px 14px 10px 22px; margin: 8px 0 24px; }
  html.kx .sp-cta-banner.is-sticky { position: fixed; top: auto; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 60; width: min(1040px, calc(100% - 176px)); margin: 0; box-shadow: 0 18px 44px -14px rgba(18, 10, 6, .65); animation: kx-dock .35s var(--kx-ease) both; }
  html.kx .sp-cta-banner.is-sticky:hover { transform: translateX(-50%); }
  html.kx *:has(+ .sp-cta-banner.is-sticky) { margin-bottom: 118px; }
  @keyframes kx-dock { from { opacity: 0; transform: translate(-50%, 24px); } }
  html.kx .sp-page { padding-bottom: 96px; }
}
