/* ========================================================================== 
   Need Kala 1.8.0 — release design contract
   Final typography, premium composition, dark-mode coverage and viewport QA.
   This file is intentionally loaded after every page-specific stylesheet.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Readability and interaction baseline
   -------------------------------------------------------------------------- */
body.papillon-theme{
  --release-card-radius:clamp(18px,1.7vw,26px);
  --release-section-radius:clamp(22px,2.2vw,32px);
  --release-shadow:0 18px 54px rgba(9,82,106,.075);
  --release-shadow-hover:0 24px 68px rgba(9,82,106,.12);
  background:var(--pap-bg);
}
body.papillon-theme main :where(p,li,dd,dt,blockquote,figcaption){
  font-size:max(14px,.875em);
}
body.papillon-theme main :where(small,.eyebrow,time,.optional,.description){
  font-size:max(12px,.75em)!important;
}
body.papillon-theme :where(label,legend){font-size:max(13px,.8125em)!important;}
body.papillon-theme :where(input:not([type="checkbox"]):not([type="radio"]),textarea,select,.select2-selection__rendered){
  min-height:48px;
  font-size:15px!important;
  line-height:1.65;
}
body.papillon-theme textarea{min-height:132px;resize:vertical;}
body.papillon-theme :where(.button,button,.btn){font-size:max(13px,.8125em);}
body.papillon-theme main :where(h1,h2,h3,h4,p,li,dd,figcaption){text-wrap:pretty;}
body.papillon-theme main :where(p,li,dd,td,th,a,span,strong,small){overflow-wrap:anywhere;}
body.papillon-theme :where(.button,.btn,button,input,select,textarea,a):focus-visible{
  outline:3px solid var(--pap-focus-ring)!important;
  outline-offset:3px;
}
body.papillon-theme :where(.papillon-container,.section){min-width:0;}
body.papillon-theme :where(.woocommerce,.woocommerce-page,.wc-block-components-main,.wc-block-components-sidebar){min-width:0;}

/* Controls and notices share one visual language across classic and block WC. */
body.papillon-theme :where(
  .woocommerce-message,.woocommerce-info,.woocommerce-error,
  .woocommerce-notice,.wc-block-components-notice-banner,
  .contact-notice,.newsletter-notice,.pap-toast
){font-size:13px!important;line-height:1.8;}
body.papillon-theme :where(
  .woocommerce a.button,.woocommerce button.button,.woocommerce input.button,
  .wc-block-components-button,.single_add_to_cart_button,#place_order
){min-height:46px;padding:10px 17px!important;border-radius:12px;font-size:13px!important;font-weight:800;}

/* --------------------------------------------------------------------------
   2. Header, search and footer polish
   -------------------------------------------------------------------------- */
body.papillon-theme .topbar-inner{font-size:12px!important;letter-spacing:.005em;}
body.papillon-theme .site-header{backdrop-filter:saturate(130%) blur(16px);}
body.papillon-theme .header-main{gap:clamp(18px,2.4vw,32px);}
body.papillon-theme .site-search input{font-size:14px!important;}
body.papillon-theme .header-action span,
body.papillon-theme .category-nav-inner>a,
body.papillon-theme .all-categories{font-size:13px!important;}
body.papillon-theme .category-mega-item b{font-size:13px!important;}
body.papillon-theme .category-mega-item small{font-size:12px!important;}
body.papillon-theme .papillon-search-result strong{font-size:14px!important;}
body.papillon-theme .papillon-search-result small,
body.papillon-theme .papillon-search-meta,
body.papillon-theme .papillon-search-dialog-foot{font-size:12px!important;}
body.papillon-theme .site-footer :where(a,span,p){font-size:13px!important;line-height:1.9;}
body.papillon-theme .site-footer h4{font-size:15px!important;}

/* --------------------------------------------------------------------------
   3. Homepage — stronger editorial rhythm and premium first impression
   -------------------------------------------------------------------------- */
body.papillon-front-screen .papillon-home-vitrine{
  --home-gap:clamp(62px,6.5vw,94px);
  background:
    radial-gradient(circle at 91% 5%,rgba(14,98,102,.10),transparent 23%),
    radial-gradient(circle at 4% 39%,rgba(174,143,92,.07),transparent 19%),
    linear-gradient(180deg,#fff 0%,#fbfdfd 48%,#fff 100%);
}
body.papillon-front-screen .papillon-home-vitrine .market-hero{
  min-height:clamp(560px,46vw,610px);
  border-radius:clamp(26px,2.5vw,36px);
  box-shadow:0 32px 90px rgba(7,63,79,.19);
}
body.papillon-front-screen .papillon-home-vitrine .market-slider-stage,
body.papillon-front-screen .papillon-home-vitrine .market-slide,
body.papillon-front-screen .papillon-home-vitrine .market-slide-image,
body.papillon-front-screen .papillon-home-vitrine .market-slide-image img{
  min-height:clamp(560px,46vw,610px);
}
body.papillon-front-screen .papillon-home-vitrine .market-slide-copy{
  padding-inline:clamp(38px,4.2vw,66px);
  background:
    radial-gradient(circle at 12% 88%,rgba(215,183,122,.15),transparent 28%),
    linear-gradient(145deg,#063744 0%,#07515e 58%,#0a6269 100%);
}
body.papillon-front-screen .papillon-home-vitrine .market-slide-copy::before{
  position:absolute;
  inset:20px;
  z-index:-1;
  border:1px solid rgba(255,255,255,.07);
  border-radius:24px;
  pointer-events:none;
  content:"";
}
body.papillon-front-screen .papillon-home-vitrine .hero-ribbon{font-size:13px!important;}
body.papillon-front-screen .papillon-home-vitrine .market-slide-title{
  max-width:660px;
  font-size:clamp(36px,3.55vw,54px)!important;
  line-height:1.42!important;
  letter-spacing:-.045em;
}
body.papillon-front-screen .papillon-home-vitrine .market-slide-copy>p{
  max-width:590px;
  font-size:15px!important;
  line-height:2;
}
body.papillon-front-screen .papillon-home-vitrine .hero-actions .btn{font-size:14px!important;}
body.papillon-front-screen .papillon-home-vitrine .hero-quick-links a{
  min-height:38px!important;
  font-size:12px!important;
  border-color:rgba(255,255,255,.16)!important;
}
body.papillon-front-screen .papillon-home-vitrine .section-head .eyebrow,
body.papillon-front-screen .papillon-home-vitrine .deal-kicker{font-size:13px!important;}
body.papillon-front-screen .papillon-home-vitrine .section-head h2,
body.papillon-front-screen .papillon-home-vitrine .deals-header h2{
  font-size:clamp(28px,2.65vw,38px)!important;
  line-height:1.42;
}
body.papillon-front-screen .papillon-home-vitrine .section-copy,
body.papillon-front-screen .papillon-home-vitrine .deals-header p{
  max-width:680px;
  color:var(--pap-muted);
  font-size:14px!important;
  line-height:1.95;
}
body.papillon-front-screen .papillon-home-vitrine .text-link{font-size:13px!important;}

/* The first conversion path reads like one composed premium panel. */
body.papillon-front-screen .papillon-home-vitrine .home-purchase-pulse{
  margin-top:22px;
  padding:11px;
  border-radius:28px;
  background:rgba(255,255,255,.88);
  box-shadow:0 22px 62px rgba(9,82,106,.10);
  backdrop-filter:blur(16px);
}
body.papillon-front-screen .papillon-home-vitrine .purchase-pulse-intro{min-height:128px;}
body.papillon-front-screen .papillon-home-vitrine .purchase-pulse-kicker,
body.papillon-front-screen .papillon-home-vitrine .purchase-pulse-intro>a{font-size:12px!important;}
body.papillon-front-screen .papillon-home-vitrine .purchase-pulse-intro strong{font-size:17px!important;}
body.papillon-front-screen .papillon-home-vitrine .purchase-pulse-item{min-height:128px;padding:16px;}
body.papillon-front-screen .papillon-home-vitrine .purchase-pulse-copy small,
body.papillon-front-screen .papillon-home-vitrine .purchase-pulse-copy em{font-size:12px!important;}
body.papillon-front-screen .papillon-home-vitrine .purchase-pulse-copy b{font-size:14px!important;}

body.papillon-front-screen .papillon-home-vitrine #popular-products{
  padding:clamp(28px,3.2vw,42px) clamp(20px,3vw,38px) 18px;
  border-color:rgba(14,98,102,.13);
  border-radius:34px;
  background:
    radial-gradient(circle at 92% 0,rgba(14,98,102,.08),transparent 25%),
    linear-gradient(180deg,rgba(245,251,251,.96),rgba(255,255,255,.74));
  box-shadow:0 24px 70px rgba(9,82,106,.07);
}
body.papillon-front-screen .papillon-home-vitrine .home-services{
  gap:12px;
  padding:12px;
  border-radius:24px;
}
body.papillon-front-screen .papillon-home-vitrine .home-service-card{min-height:104px;padding:18px;}
body.papillon-front-screen .papillon-home-vitrine .home-service-card b{font-size:14px!important;}
body.papillon-front-screen .papillon-home-vitrine .home-service-card small{font-size:12px!important;}

/* Category and discovery zones receive a calm framed canvas. */
body.papillon-front-screen .papillon-home-vitrine :where(.home-category-shortcuts,.home-tabbed,.home-editorial){
  position:relative;
  padding:clamp(24px,3vw,38px);
  border:1px solid rgba(14,98,102,.10);
  border-radius:var(--release-section-radius);
  background:rgba(255,255,255,.82);
  box-shadow:var(--release-shadow);
}
body.papillon-front-screen .papillon-home-vitrine .shortcut-grid{gap:16px;}
body.papillon-front-screen .papillon-home-vitrine .shortcut-grid a{padding:12px 12px 18px;}
body.papillon-front-screen .papillon-home-vitrine .shortcut-grid b{font-size:14px!important;}
body.papillon-front-screen .papillon-home-vitrine .shortcut-grid small{font-size:12px!important;}
body.papillon-front-screen .papillon-home-vitrine .home-conversion-gateway .conversion-gateway-card{
  min-height:228px;
  padding:24px;
}
body.papillon-front-screen .papillon-home-vitrine .conversion-gateway-card strong{font-size:19px!important;}
body.papillon-front-screen .papillon-home-vitrine .conversion-gateway-card p{font-size:13px!important;}
body.papillon-front-screen .papillon-home-vitrine :where(.gateway-eyebrow,.gateway-meta,.conversion-gateway-card em){font-size:12px!important;}

body.papillon-front-screen .papillon-home-vitrine .market-product-rail>.market-product-card{
  flex-basis:clamp(224px,19vw,252px);
  width:clamp(224px,19vw,252px);
  min-width:clamp(224px,19vw,252px);
  max-width:252px;
}
body.papillon-front-screen .papillon-home-vitrine .market-product-card{border-radius:24px;}
body.papillon-front-screen .papillon-home-vitrine .market-product-copy{min-height:170px;}
body.papillon-front-screen .papillon-home-vitrine .market-product-copy h3{font-size:14px!important;line-height:1.75;}
body.papillon-front-screen .papillon-home-vitrine :where(.market-product-brand,.market-product-category){font-size:12px!important;}
body.papillon-front-screen .papillon-home-vitrine .price-stack strong{font-size:16px!important;}
body.papillon-front-screen .papillon-home-vitrine .price-stack :where(small,del){font-size:12px!important;}
body.papillon-front-screen .papillon-home-vitrine .market-buy-button{min-height:46px;font-size:13px!important;}
body.papillon-front-screen .papillon-home-vitrine .market-tabs button{min-height:44px;font-size:13px!important;}
body.papillon-front-screen .papillon-home-vitrine .promo-card small,
body.papillon-front-screen .papillon-home-vitrine .promo-card em{font-size:12px!important;}
body.papillon-front-screen .papillon-home-vitrine .promo-card b{font-size:21px!important;}
body.papillon-front-screen .papillon-home-vitrine :where(.review-card p,.editorial-card p,.spotlight-copy p,.home-order-steps small){font-size:13px!important;}
body.papillon-front-screen .papillon-home-vitrine :where(.review-card strong,.home-order-steps b,.spotlight-list b){font-size:14px!important;}
body.papillon-front-screen .papillon-home-vitrine .home-trend-tags a{min-height:40px;font-size:12px!important;}

/* --------------------------------------------------------------------------
   4. Store, product, cart, checkout and account readability
   -------------------------------------------------------------------------- */
body.papillon-market-screen :where(.market-product-card,.shop-results li.product){border-radius:var(--release-card-radius);}
body.papillon-market-screen :where(.market-product-copy h2,.market-product-copy h3,.woocommerce-loop-product__title){font-size:14px!important;line-height:1.75!important;}
body.papillon-market-screen :where(.market-product-brand,.market-product-category,.woocommerce-result-count){font-size:12px!important;}
body.papillon-market-screen :where(.price,.price-stack strong){font-size:16px!important;}
body.papillon-catalog-screen :where(.shop-toolbar,.woocommerce-ordering select,.shop-filter-chip,.pill-list a){font-size:13px!important;}

body.papillon-product-screen :where(.product_title,.pap-product-title){font-size:clamp(28px,3vw,40px)!important;line-height:1.5!important;}
body.papillon-product-screen div.product .summary :where(p,li,.woocommerce-product-details__short-description){font-size:14px!important;line-height:1.95!important;}
body.papillon-product-screen :where(.product_meta,.stock,.woocommerce-product-rating,.pap-product-benefit,.pap-product-service){font-size:13px!important;}
body.papillon-product-screen :where(.woocommerce-tabs p,.woocommerce-tabs li,#reviews p,#reviews label){font-size:14px!important;}
body.papillon-product-screen :where(.woocommerce-tabs h2,.related>h2,.upsells>h2){font-size:clamp(22px,2.1vw,30px)!important;}

body.papillon-cart-screen :where(.cart-page-shell,.papillon-cart-content),
body.papillon-checkout-screen :where(.checkout-page-shell,.papillon-checkout-content),
body.papillon-account-screen :where(.papillon-account-page,.account-shortcode-shell){font-size:15px;}
body.papillon-cart-screen :where(.shop_table.cart .product-name a,.cart_totals h2){font-size:15px!important;}
body.papillon-cart-screen :where(.shop_table.cart td,.shop_table.cart th,.cart_totals td,.cart_totals th,.pap-empty-cart p){font-size:13px!important;}
body.papillon-cart-screen :where(.quantity .qty,.coupon .input-text){font-size:14px!important;}
body.papillon-checkout-screen :where(.transaction-page-heading p,.checkout-progress li,.woocommerce-billing-fields label,.woocommerce-shipping-fields label,.woocommerce-additional-fields label){font-size:13px!important;}
body.papillon-checkout-screen :where(.woocommerce-checkout-review-order-table th,.woocommerce-checkout-review-order-table td,#payment label,#payment p){font-size:13px!important;}
body.papillon-checkout-screen :where(.woocommerce-billing-fields>h3,.woocommerce-shipping-fields>h3,#order_review_heading){font-size:20px!important;}

body.papillon-account-screen :where(.account-page-heading>p:last-child,.profile-welcome p,.profile-sidebar-user small,.profile-card-kicker,.profile-data-grid span,.profile-quick-links small,.account-password-heading p,.papillon-address-summary-note small){font-size:12px!important;}
body.papillon-account-screen :where(.papillon-account-nav a,.profile-card-heading a,.profile-mobile-title a,.support-options small,.papillon-address-meta-row span,.papillon-address-meta-row b){font-size:13px!important;}
body.papillon-account-screen :where(.profile-sidebar-user strong,.profile-data-grid strong,.profile-quick-links span,.account-password-heading h3){font-size:14px!important;}
body.papillon-account-screen :where(.woocommerce-MyAccount-content p,.woocommerce-MyAccount-content li,.woocommerce-MyAccount-content label,.woocommerce-orders-table th,.woocommerce-orders-table td){font-size:13px!important;}
body.papillon-account-screen .account-nav-toggle{min-height:46px!important;font-size:13px!important;}
body.papillon-account-screen :where(.papillon-address-compact-action,.papillon-address-edit-action,.papillon-address-default-form button){font-size:12px!important;}

/* Generic content pages should never inherit the old micro-typography. */
body.papillon-generic-page-screen :where(.page-entry-content,.pap-rich-content),
body.papillon-article-screen .pap-article-content,
body.papillon-legal-screen :where(.legal-card,.faq-answer,.privacy-page),
body.papillon-about-contact-screen :where(.about-page,.contact-page),
:where(body.blog,body.papillon-blog-screen) .niazkala-blog-page{font-size:15px;}
body.papillon-generic-page-screen :where(.page-entry-content,.pap-rich-content) :where(p,li),
body.papillon-article-screen .pap-article-content :where(p,li),
body.papillon-legal-screen :where(.legal-card,.faq-answer,.privacy-page) :where(p,li),
body.papillon-about-contact-screen :where(.about-page,.contact-page) :where(p,li){font-size:14px!important;line-height:2;}

/* --------------------------------------------------------------------------
   5. Complete dark-mode contract and anti-light-leak guard
   -------------------------------------------------------------------------- */
html[data-theme="dark"] body.papillon-theme{
  --release-shadow:0 20px 58px rgba(0,0,0,.30);
  --release-shadow-hover:0 28px 76px rgba(0,0,0,.42);
  --pap-panel:var(--dk-surface-1);
  --pap-panel-soft:var(--dk-surface-2);
  --pap-field:var(--dk-field);
  --pap-control-surface:var(--dk-field);
  background:var(--dk-canvas)!important;
  color:var(--dk-text);
}
html[data-theme="dark"] body.papillon-theme :where(main,.site-main,.site-content,.content-area,.entry-content){color:var(--dk-text-2);}
html[data-theme="dark"] body.papillon-theme :where(input,textarea,select,option){color-scheme:dark;}
html[data-theme="dark"] body.papillon-theme input:-webkit-autofill,
html[data-theme="dark"] body.papillon-theme textarea:-webkit-autofill,
html[data-theme="dark"] body.papillon-theme select:-webkit-autofill{
  -webkit-text-fill-color:var(--dk-text)!important;
  box-shadow:0 0 0 1000px var(--dk-field) inset!important;
  caret-color:var(--dk-text);
}

/* WordPress, Elementor and WooCommerce surfaces not owned by native templates. */
html[data-theme="dark"] body.papillon-theme :where(
  .wp-block-group.has-background,.wp-block-columns.has-background,
  .wp-block-table,.wp-block-search__inside-wrapper,.wp-block-latest-comments,
  .elementor-widget-text-editor,.elementor-widget-accordion .elementor-tab-content,
  .elementor-widget-toggle .elementor-tab-content
){border-color:var(--dk-border)!important;background-color:var(--dk-surface-1)!important;color:var(--dk-text-2)!important;}
html[data-theme="dark"] body.papillon-theme :where(.elementor-heading-title,.wp-block-heading){color:var(--dk-text)!important;}
html[data-theme="dark"] body.papillon-theme :where(
  .wp-block-table td,.wp-block-table th,
  .elementor-widget-accordion .elementor-tab-title,
  .elementor-widget-toggle .elementor-tab-title
){border-color:var(--dk-border)!important;background:var(--dk-surface-2)!important;color:var(--dk-text)!important;}

/* Classic/block commerce fallbacks, including fragments injected after load. */
html[data-theme="dark"] body.papillon-theme :where(
  .woocommerce-mini-cart,.widget_shopping_cart_content,.woocommerce-widget-layered-nav,
  .woocommerce-form-login,.woocommerce-form-coupon,.woocommerce-form-track-order,
  .woocommerce-order-details,.woocommerce-customer-details,.woocommerce-order-overview,
  .wc-block-components-sidebar,.wc-block-components-main,
  .wc-block-components-panel,.wc-block-components-card,
  .wc-block-components-order-summary,.wc-block-components-totals-wrapper,
  .wc-block-cart-items,.wc-block-components-checkout-step,
  .wc-block-components-combobox-control,.wc-block-components-text-input
){border-color:var(--dk-border)!important;background-color:var(--dk-surface-1)!important;color:var(--dk-text-2)!important;box-shadow:none!important;}
html[data-theme="dark"] body.papillon-theme :where(
  .woocommerce table.shop_table tr,.woocommerce table.shop_table th,.woocommerce table.shop_table td,
  .wc-block-cart-items th,.wc-block-cart-items td,
  .wc-block-components-order-summary-item,.wc-block-components-totals-item
){border-color:var(--dk-border)!important;background-color:transparent!important;color:var(--dk-text-2)!important;}
html[data-theme="dark"] body.papillon-theme :where(
  .woocommerce table.shop_table thead th,.woocommerce table.shop_table tfoot th,
  .wc-block-cart-items thead th,.wc-block-components-totals-footer-item
){background-color:var(--dk-surface-2)!important;color:var(--dk-text)!important;}
html[data-theme="dark"] body.papillon-theme :where(
  .woocommerce form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
  .woocommerce form textarea,.woocommerce form select,
  .wc-block-components-text-input input,
  .wc-block-components-combobox .wc-block-components-combobox-control input,
  .wc-block-components-address-form select
){border-color:var(--dk-border)!important;background:var(--dk-field)!important;color:var(--dk-text)!important;box-shadow:none!important;}

/* Native page surfaces that historically declared #fff with !important. */
html[data-theme="dark"] body.papillon-front-screen .papillon-home-vitrine{
  background:
    radial-gradient(circle at 91% 5%,rgba(105,200,192,.07),transparent 23%),
    radial-gradient(circle at 4% 39%,rgba(211,175,112,.045),transparent 19%),
    linear-gradient(180deg,var(--dk-canvas),var(--dk-canvas-2) 50%,var(--dk-canvas))!important;
}
html[data-theme="dark"] body.papillon-front-screen .papillon-home-vitrine :where(
  .home-purchase-pulse,#popular-products,.home-category-shortcuts,.home-tabbed,.home-editorial,
  .home-services,.home-service-card,.shortcut-grid a,.market-product-card,
  .conversion-gateway-card:not(.is-primary),.market-tabs,.market-tabs button.is-active,
  .review-card,.home-order-guide,.home-order-steps li,.papillon-brand-item
){border-color:var(--dk-border)!important;background:var(--dk-surface-1)!important;color:var(--dk-text)!important;box-shadow:var(--release-shadow)!important;}
html[data-theme="dark"] body.papillon-front-screen .papillon-home-vitrine :where(.market-product-image,.shortcut-grid a>span,.purchase-pulse-item,.purchase-pulse-icon){
  border-color:var(--dk-media-border)!important;background:var(--dk-media)!important;
}
html[data-theme="dark"] body.papillon-front-screen .papillon-home-vitrine :where(.section-copy,.home-service-card small,.shortcut-grid small,.conversion-gateway-card p,.review-card p){color:var(--dk-muted)!important;}

html[data-theme="dark"] body.papillon-account-screen :where(
  .papillon-account-page,.woocommerce-MyAccount-content,.papillon-profile-sidebar,
  .papillon-profile-dashboard,.profile-welcome,.profile-data-card,.profile-data-grid>div,
  .profile-quick-links>a,.papillon-address-book-card,.papillon-saved-address-card,
  .papillon-order-view,.papillon-order-hero,.papillon-order-facts,.papillon-order-notes,
  .papillon-order-native-details,.papillon-order-delivery-address,.support-options>a,
  .account-form-heading,.woocommerce-EditAccountForm,.edit-account,.papillon-edit-address-form,
  .papillon-login-shell,.papillon-login-form,.papillon-password-recovery-shell,
  .papillon-password-recovery-form,.account-password-section,.address-not-set
){border-color:var(--dk-border)!important;background:var(--dk-surface-1)!important;color:var(--dk-text)!important;box-shadow:none!important;}
html[data-theme="dark"] body.papillon-account-screen :where(.profile-sidebar-user,.papillon-account-nav,.login-tabs,.account-password-heading){border-color:var(--dk-border)!important;}
html[data-theme="dark"] body.papillon-account-screen :where(.papillon-account-nav a,.account-nav-toggle,.profile-edit-link,.papillon-address-compact-action,.papillon-address-edit-action,.papillon-address-default-form button){
  border-color:var(--dk-border)!important;background:var(--dk-surface-2)!important;color:var(--dk-text-2)!important;
}

html[data-theme="dark"] body.papillon-cart-screen :where(
  .woocommerce-cart-form,.shop_table.cart,.shop_table.cart tbody>tr.cart_item,
  .shop_table.cart td.actions,.cart_totals,.cross-sells,.pap-empty-cart,
  .wc-block-cart__main,.wc-block-cart__sidebar,.wc-block-cart-items
),
html[data-theme="dark"] body.papillon-checkout-screen :where(
  form.checkout,#customer_details>.col-1,#customer_details>.col-2,
  .woocommerce-billing-fields,.woocommerce-shipping-fields,.woocommerce-additional-fields,
  #order_review,#payment,.checkout_coupon,.woocommerce-form-login,
  .papillon-checkout-address-picker,.papillon-checkout-address-option,
  .woocommerce-checkout-review-order-table
),
html[data-theme="dark"] body.papillon-product-screen :where(
  div.product,.pap-product-gallery-column,.pap-product-summary-card,
  .woocommerce-product-gallery,.summary,.woocommerce-tabs,.woocommerce-tabs .panel,
  #review_form_wrapper,.related,.upsells
){border-color:var(--dk-border)!important;background-color:var(--dk-surface-1)!important;color:var(--dk-text-2)!important;box-shadow:none!important;}
html[data-theme="dark"] body.papillon-product-screen :where(.woocommerce-product-gallery__image,.market-product-image){background:var(--dk-media)!important;}

html[data-theme="dark"] body.papillon-generic-page-screen :where(.page-entry-content,.pap-rich-content,.page-native-heading),
html[data-theme="dark"] body.papillon-article-screen :where(.pap-article-card,.pap-article-footer),
html[data-theme="dark"] body.papillon-legal-screen :where(.legal-card,.legal-aside,.faq-item,.faq-toggle,.privacy-card),
html[data-theme="dark"] body.papillon-about-contact-screen :where(.about-stats>div,.about-value-grid article,.contact-channels article,.contact-form-card,.contact-help-card),
html[data-theme="dark"] :where(body.blog,body.papillon-blog-screen) :where(.niazkala-blog-card,.niazkala-blog-topics a){
  border-color:var(--dk-border)!important;background:var(--dk-surface-1)!important;color:var(--dk-text-2)!important;box-shadow:none!important;
}

/* --------------------------------------------------------------------------
   6. Responsive release checks
   -------------------------------------------------------------------------- */
@media(max-width:1024px){
  body.papillon-theme .header-main{grid-template-columns:auto minmax(0,1fr) auto;gap:14px;}
  body.papillon-front-screen .papillon-home-vitrine .shortcut-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
  body.papillon-front-screen .papillon-home-vitrine .home-services{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media(min-width:701px) and (max-width:1024px){
  body.papillon-market-screen .catalog-filter-actions :where(button,a){min-height:44px!important;}
  body.papillon-account-screen .papillon-address-compact-action{min-height:44px!important;padding-block:8px!important;}
  body.papillon-cart-screen .shop_table.cart .quantity.pap-cart-quantity{
    width:136px!important;
    min-width:136px!important;
    max-width:136px!important;
    height:46px!important;
    grid-template-columns:44px 48px 44px!important;
    grid-template-rows:44px!important;
  }
  body.papillon-cart-screen .shop_table.cart .quantity.pap-cart-quantity .qty,
  body.papillon-cart-screen .pap-cart-quantity-button{height:44px!important;min-height:44px!important;line-height:44px!important;}
}

@media(max-width:820px){
  body.papillon-front-screen .papillon-home-vitrine .market-slide-copy::before{inset:12px;border-radius:18px;}
  body.papillon-front-screen .papillon-home-vitrine :where(.home-category-shortcuts,.home-tabbed,.home-editorial){padding:22px 18px;}
  body.papillon-product-screen :where(.pap-product-gallery-column,.pap-product-summary-card,.summary){position:static!important;width:100%!important;max-width:none!important;}
  body.papillon-cart-screen :where(.woocommerce-cart-form,.cart-collaterals,.cart_totals),
  body.papillon-checkout-screen :where(form.checkout,#customer_details,#order_review){width:100%!important;max-width:none!important;position:static!important;}
}

@media(max-width:700px){
  body.papillon-theme{font-size:15px;}
  body.papillon-theme .papillon-container,
  body.papillon-theme .section{width:calc(100% - 24px)!important;max-width:calc(100% - 24px)!important;}
  body.papillon-theme main :where(p,li,dd,dt,blockquote,figcaption){font-size:14px;}
  body.papillon-theme :where(input:not([type="checkbox"]):not([type="radio"]),textarea,select,.select2-selection__rendered){font-size:16px!important;}
  body.papillon-theme :where(button,.button,.btn,a[role="button"]){min-height:44px;}
  body.papillon-theme :where(.slider-dots button,.mobile-carousel-dots button,.market-slider-controls>button,.rail-actions button,.pap-toast-close,.mobile-menu-close){min-height:0;}
  body.papillon-theme .mobile-navigation>a{min-height:52px;font-size:14px!important;}
  body.papillon-theme .mobile-bottom-nav .mobile-nav-label{font-size:12px!important;}

  body.papillon-front-screen .papillon-home-vitrine{--home-gap:52px;}
  body.papillon-front-screen .papillon-home-vitrine .market-hero,
  body.papillon-front-screen .papillon-home-vitrine .market-slider-stage,
  body.papillon-front-screen .papillon-home-vitrine .market-slide{min-height:0;}
  body.papillon-front-screen .papillon-home-vitrine .market-slide-image,
  body.papillon-front-screen .papillon-home-vitrine .market-slide-image img{min-height:clamp(250px,74vw,340px);}
  body.papillon-front-screen .papillon-home-vitrine .market-slide-copy{padding:28px 20px 122px!important;}
  body.papillon-front-screen .papillon-home-vitrine .market-slide-title{font-size:clamp(29px,8.5vw,38px)!important;line-height:1.45!important;}
  body.papillon-front-screen .papillon-home-vitrine .market-slide-copy>p{font-size:14px!important;line-height:1.9;}
  body.papillon-front-screen .papillon-home-vitrine .hero-actions{display:grid;width:100%;grid-template-columns:repeat(2,minmax(0,1fr));}
  body.papillon-front-screen .papillon-home-vitrine .hero-actions .btn{width:100%;padding-inline:10px;font-size:13px!important;}
  body.papillon-front-screen .papillon-home-vitrine .hero-quick-links a{font-size:12px!important;}
  body.papillon-front-screen .papillon-home-vitrine .home-purchase-pulse{padding:8px;}
  body.papillon-front-screen .papillon-home-vitrine .purchase-pulse-item{min-height:108px;}
  body.papillon-front-screen .papillon-home-vitrine .section-head{align-items:flex-start;}
  body.papillon-front-screen .papillon-home-vitrine .section-head h2,
  body.papillon-front-screen .papillon-home-vitrine .deals-header h2{font-size:26px!important;}
  body.papillon-front-screen .papillon-home-vitrine .section-copy{font-size:13px!important;}
  body.papillon-front-screen .papillon-home-vitrine .shortcut-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  body.papillon-front-screen .papillon-home-vitrine .shortcut-grid a{padding:9px 9px 14px;border-radius:18px;}
  body.papillon-front-screen .papillon-home-vitrine .shortcut-grid b{font-size:13px!important;}
  body.papillon-front-screen .papillon-home-vitrine .home-service-card{min-height:132px!important;}
  body.papillon-front-screen .papillon-home-vitrine .home-service-card b{font-size:13px!important;white-space:normal!important;}
  body.papillon-front-screen .papillon-home-vitrine .home-service-card small{font-size:12px!important;}
  body.papillon-front-screen .papillon-home-vitrine .market-product-rail>.market-product-card{flex-basis:min(76vw,260px);width:min(76vw,260px);min-width:min(76vw,260px);}
  body.papillon-front-screen .papillon-home-vitrine .market-product-copy h3{font-size:14px!important;}
  body.papillon-front-screen .papillon-home-vitrine .conversion-gateway-card{min-height:210px;}

  body.papillon-account-screen :where(.woocommerce-MyAccount-content,.account-content-shell>.woocommerce-MyAccount-content){padding:16px!important;}
  body.papillon-account-screen .papillon-account-nav a{min-height:48px!important;font-size:13px!important;}
  body.papillon-cart-screen .shop_table.cart tbody>tr.cart_item{padding:14px!important;}
  body.papillon-checkout-screen :where(#customer_details>.col-1,#customer_details>.col-2,#order_review,#payment){padding:16px!important;}
  body.papillon-product-screen :where(.woocommerce-tabs .panel,#review_form_wrapper){padding:16px!important;}
}

@media(max-width:430px){
  body.papillon-theme .papillon-container,
  body.papillon-theme .section{width:calc(100% - 20px)!important;max-width:calc(100% - 20px)!important;}
  body.papillon-front-screen .papillon-home-vitrine .market-slide-copy{padding-inline:17px!important;}
  body.papillon-front-screen .papillon-home-vitrine .market-slide-title{font-size:28px!important;}
  body.papillon-front-screen .papillon-home-vitrine .hero-actions{grid-template-columns:1fr;gap:8px;}
  body.papillon-front-screen .papillon-home-vitrine :where(.home-category-shortcuts,.home-tabbed,.home-editorial){padding:18px 12px;}
  body.papillon-front-screen .papillon-home-vitrine #popular-products{padding-inline:12px;}
  body.papillon-front-screen .papillon-home-vitrine .shortcut-grid{gap:8px;}
  body.papillon-front-screen .papillon-home-vitrine .shortcut-grid small{font-size:11.5px!important;}
  body.papillon-account-screen .profile-data-grid{grid-template-columns:1fr!important;}
  body.papillon-account-screen .papillon-account-nav{grid-template-columns:1fr!important;}
}

@media(max-height:520px) and (orientation:landscape){
  body.papillon-theme .papillon-search-dialog{max-height:calc(100dvh - 12px);}
  body.papillon-theme .mobile-navigation{padding-block:10px!important;}
}

@supports not (backdrop-filter:blur(1px)){
  body.papillon-theme .site-header,
  body.papillon-front-screen .papillon-home-vitrine .home-purchase-pulse{backdrop-filter:none;}
}

@media(prefers-reduced-motion:reduce){
  body.papillon-theme *,
  body.papillon-theme *::before,
  body.papillon-theme *::after{scroll-behavior:auto!important;}
}

/* --------------------------------------------------------------------------
   8. Small phones (<=560px) — footer rebuilt as one compact stack
   The footer used to inherit competing grid rules from footer.css,
   responsive.css and dark-mode-system.css: at narrow widths the brand block
   could be auto-placed beside a link column, so the logo, tagline and trust
   chip interleaved with the shopping links, and four stacked sections pushed
   the footer past a full viewport. One layout now owns every small viewport:
   brand on its own row, two link columns side by side, support/legal paired
   two-per-row, denser section padding, uniform 34px tap rows.
   The `html[data-theme]` prefix is deliberate: the inline theme boot script in
   inc/assets.php always sets that attribute, and it lifts these rules above the
   equally-important footer overrides in the earlier stylesheets.
   -------------------------------------------------------------------------- */
@media(max-width:560px){
  html[data-theme] body.papillon-theme .site-footer{padding-top:26px!important;}
  html[data-theme] body.papillon-theme .site-footer .footer-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:0 14px!important;
    padding-bottom:12px!important;
  }
  html[data-theme] body.papillon-theme .site-footer .footer-grid>div{
    width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    /* Every entry is a padded row now, so the desktop 10px inter-item gap
       only padded the column out. */
    gap:0!important;
    padding:12px 0!important;
    border-top:0!important;
    border-inline:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    align-items:flex-start!important;
    text-align:right!important;
  }
  html[data-theme] body.papillon-theme .site-footer .footer-grid>div.footer-brand,
  html[data-theme] body.papillon-theme .site-footer .footer-grid>div:last-child{grid-column:1/-1!important;}

  /* Brand: compact centered lockup instead of the oversized desktop logo. */
  html[data-theme] body.papillon-theme .site-footer .footer-grid>div.footer-brand{
    padding:0 0 12px!important;
    align-items:center!important;
    text-align:center!important;
  }
  body.papillon-theme .site-footer .footer-logo-image{max-width:120px!important;max-height:42px!important;}
  body.papillon-theme .site-footer .footer-brand>p{max-width:280px!important;margin:7px auto 0!important;font-size:12px!important;line-height:1.8!important;}
  body.papillon-theme .site-footer .footer-badges{gap:8px!important;padding-block:14px!important;}
  body.papillon-theme .site-footer .footer-badge{padding:9px 10px!important;border-radius:12px!important;}
  body.papillon-theme .site-footer .footer-badge-icon{width:29px!important;height:29px!important;flex-basis:29px!important;border-radius:9px!important;}
  body.papillon-theme .site-footer .footer-badge-icon svg{width:16px!important;height:16px!important;}
  body.papillon-theme .site-footer .footer-badge-label{font-size:11px!important;line-height:1.6!important;}
  /* Uploaded trust logos: 40px is a desktop-only luxury — on a 390px screen
     the badge box is ~185px wide and a 40px logo would dominate it. */
  body.papillon-theme .site-footer .footer-badge-image{max-height:32px!important;}
  body.papillon-theme .site-footer .footer-badge-has-image{gap:6px!important;}

  /* Link lists: each entry is a full-width row, so nothing can drift apart. */
  html[data-theme] body.papillon-theme .site-footer .footer-grid h4{
    margin:0 0 2px!important;
    padding:0 0 5px!important;
    font-size:12.5px!important;
  }
  html[data-theme] body.papillon-theme .site-footer .footer-grid>div:not(.footer-brand)>:where(a,span){
    display:block!important;
    width:100%!important;
    min-height:34px!important;
    padding:6px 0!important;
    font-size:12px!important;
    line-height:1.7!important;
  }

  /* Support column: one stack. The contact rows are tappable cards and the two
     legal links share a row, which is why this column no longer runs as a
     2-column grid like the link columns above it. */
  html[data-theme] body.papillon-theme .site-footer .footer-grid>div.footer-support{
    display:block!important;
    padding:14px 0 6px!important;
  }
  html[data-theme] body.papillon-theme .site-footer .footer-contact-list{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:6px!important;
  }
  html[data-theme] body.papillon-theme .site-footer .footer-contact-line{
    display:flex!important;
    width:100%!important;
    min-height:44px!important;
    padding:8px 10px!important;
    border-radius:12px!important;
    font-size:12px!important;
    /* The heading and the CTA label above/below this list are centered, so the
       icon+text pair centers too; left to the RTL default it hugged the right
       edge and the tappable cards looked empty on one side. */
    justify-content:center!important;
  }
  /* Address and hours are not links, so they stay flat: no box, no 44px floor. */
  html[data-theme] body.papillon-theme .site-footer .footer-contact-static{
    min-height:34px!important;
    padding:2px 2px!important;
    border-color:transparent!important;
    background:transparent!important;
  }
  html[data-theme] body.papillon-theme .site-footer .footer-contact-text{font-size:12px!important;}
  /* The CTA is a direct <a> child of the support column, so the generic
     «every link in a footer column is a full-width row» rule above also matched
     it and won on specificity: display:block turned the grid icon and the label
     into two stacked lines and the pill grew to 61px. Naming the column here
     outranks that rule, so the pill stays a single centered line. */
  html[data-theme] body.papillon-theme .site-footer .footer-grid>div.footer-support>.footer-support-cta{
    display:flex!important;
    width:100%!important;
    min-height:46px!important;
    align-items:center!important;
    justify-content:center!important;
    margin-top:10px!important;
    padding:0 14px!important;
    font-size:12px!important;
  }
  html[data-theme] body.papillon-theme .site-footer .footer-legal{
    display:flex!important;
    width:100%!important;
    gap:8px!important;
    margin-top:11px!important;
    padding-top:11px!important;
  }
  html[data-theme] body.papillon-theme .site-footer .footer-legal a{
    display:inline-flex!important;
    flex:1 1 0!important;
    min-height:40px!important;
    justify-content:center!important;
    padding:0 10px!important;
    font-size:11.5px!important;
  }

  /* Bottom line: two tight lines instead of an 80px centered block. */
  html[data-theme] body.papillon-theme .site-footer .footer-bottom{
    min-height:0!important;
    gap:1px!important;
    padding:11px 0 14px!important;
    font-size:11.5px!important;
    line-height:1.75!important;
  }
}

/* -------------------------------------------------------------------------
 * Touch-target floor for standalone inline links.
 * Measured on 320-430px viewports: breadcrumbs, the home "shop all" link and
 * the contact channels rendered 20-22px tall, below the 24px WCAG 2.2 minimum
 * and far below a comfortable 32px thumb target. These are standalone links
 * (not links inside a sentence), so enlarging the hit area is the right fix.
 * The html[data-theme] prefix keeps them above the page stylesheets that set
 * the small type sizes; nothing changes where the links already exceed 32px.
 * ---------------------------------------------------------------------- */
html[data-theme] body.papillon-market-screen .shop-breadcrumb a,
html[data-theme] body.papillon-product-screen .shop-breadcrumb a,
html[data-theme] body.papillon-front-screen .home-purchase-pulse .purchase-pulse-intro>a,
html[data-theme] body.papillon-about-contact-screen .contact-channels a,
html[data-theme] body.papillon-generic-page-screen .shop-breadcrumb a{
  display:inline-flex;
  min-height:32px;
  align-items:center;
}

/* Magazine cards: the category link in the meta row measured 21px and the post
 * title 24px, so a thumb hit both poorly. They are separate links inside the
 * card (the card has no stretched overlay), hence the explicit floor. */
html[data-theme] :where(body.blog,body.papillon-blog-screen) .niazkala-blog-card__meta a,
html[data-theme] :where(body.blog,body.papillon-blog-screen) .niazkala-blog-card__title a{
  display:inline-flex;
  min-height:32px;
  align-items:center;
}

/* Phone widths: keep the category chips in the magazine scroll rail usable. */
@media(max-width:430px){
  html[data-theme] :where(body.blog,body.papillon-blog-screen) .niazkala-blog-topics a{
    min-height:36px!important;
  }
}

/* -------------------------------------------------------------------------
 * Password-recovery action row (the lost-password card).
 * Measured on 780-826px viewports: the primary button and the "بازگشت به ورود"
 * text link shared one flex line with only a 10px gutter, so the link read as
 * if it had fallen onto the button's box. They are now two separate boxes
 * (the link gets an outline of its own) with a real 16px gutter, and on phones
 * both stretch full width on separate lines. The html[data-theme] prefix keeps
 * these rules above account-experience.css, which loads earlier but also uses
 * !important for the same elements.
 * ---------------------------------------------------------------------- */
html[data-theme] body.papillon-account-screen .password-recovery-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  column-gap:16px!important;
  row-gap:12px!important;
  margin:4px 0 0!important;
}
html[data-theme] body.papillon-account-screen .password-recovery-actions>a{
  display:inline-flex!important;
  min-height:44px!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  padding:8px 16px!important;
  border:1px solid var(--account-line)!important;
  border-radius:12px!important;
  background:transparent!important;
  color:var(--account-accent-strong)!important;
  font-size:11.5px!important;
  font-weight:800!important;
  text-decoration:none!important;
}
html[data-theme] body.papillon-account-screen .password-recovery-actions>a:hover{
  border-color:var(--account-accent)!important;
  background:rgba(14,98,102,.06)!important;
}

@media(max-width:700px){
  html[data-theme] body.papillon-account-screen .password-recovery-actions{
    align-items:stretch!important;
    row-gap:12px!important;
  }
  html[data-theme] body.papillon-account-screen .password-recovery-actions .button,
  html[data-theme] body.papillon-account-screen .password-recovery-actions>a{width:100%!important;}
}

/* --------------------------------------------------------------------------
   Mobile interaction pass

   1. iOS Safari zooms the whole page whenever a focused field renders below
      16px — the header search (14px) and the cart quantity box (12px) both did
      that on every screen. Raising the field type at phone widths removes the
      zoom jump without changing the desktop look.
   2. Landscape text inflation is disabled so the Persian type scale stays put.
   3. Anchor jumps now stop below the sticky header instead of underneath it.
   4. The cart product name is a 20px tall text link on a touch screen; it gets
      a 32px hit area.
   -------------------------------------------------------------------------- */
@media(max-width:700px){
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:96px;}
  html[data-theme] body.papillon-theme input#papillon-search,
  html[data-theme] body.papillon-theme .site-header input[type="search"],
  html[data-theme] body.papillon-theme .papillon-search-overlay input[type="search"],
  html[data-theme] body.papillon-cart-screen .shop_table.cart .quantity .qty,
  html[data-theme] body.papillon-cart-screen .shop_table.cart input.qty{font-size:16px!important;}
  body.papillon-cart-screen .shop_table.cart td.product-name>a{display:block!important;min-height:32px!important;padding-block:6px!important;}
}

@media(max-width:380px){
  html[data-theme] body.papillon-theme .site-footer{padding-top:22px!important;}
  html[data-theme] body.papillon-theme .site-footer .footer-grid>div{padding:10px 0!important;}
  body.papillon-theme .site-footer .footer-logo-image{max-width:104px!important;max-height:38px!important;}
  body.papillon-theme .site-footer .footer-brand>p{font-size:11.5px!important;}
  html[data-theme] body.papillon-theme .site-footer .footer-grid h4{font-size:12px!important;}
  html[data-theme] body.papillon-theme .site-footer .footer-grid>div:not(.footer-brand)>:where(a,span){
    min-height:32px!important;
    padding:5px 0!important;
  }
}
