/* RENNiS STEP148 — unified graphite/orange styling, fixes confirmed by Mobile video.
 * Scope: UI only; no Woo Store API, orders, prices, original product data, legal documents. */
body { --rn148-orange:#ff6500; --rn148-ink:#262e33; --rn148-muted:#5e6970; --rn148-border:#d4dade; --rn148-panel:#f2f4f5; }

/* A. Existing native WooCommerce controls across Desktop AND Mobile. */
body.woocommerce :is(.woocommerce-message,.woocommerce-info,.woocommerce-error) {border-radius:7px;overflow-wrap:anywhere;}
body.woocommerce :is(a.added_to_cart,.woocommerce-pagination a,.woocommerce-pagination span.current,.woocommerce-MyAccount-content a,.woocommerce-tabs ul.tabs a):focus-visible,
body.woocommerce :is(.single_add_to_cart_button,.woocommerce-button,button.button,button.alt):focus-visible,
body.woocommerce :is(.wc-block-components-button,.wc-block-components-radio-control__input,.wc-block-components-checkbox__input):focus-visible {outline:2px solid var(--rn148-orange)!important;outline-offset:2px!important;box-shadow:none!important;}
body.woocommerce :is(.woocommerce-pagination,.ct-pagination) :is(.current,[aria-current="page"]) {background:var(--rn148-orange)!important;border-color:var(--rn148-orange)!important;color:#fff!important;box-shadow:none!important;}
body.woocommerce :is(.woocommerce-pagination,.ct-pagination) a:not(.current) {border-color:var(--rn148-border)!important;color:var(--rn148-ink)!important;background:#fff!important;}
body.woocommerce :is(.woocommerce-pagination,.ct-pagination) a:hover {border-color:var(--rn148-orange)!important;color:#b44706!important;}
body.woocommerce :is(.woocommerce-tabs ul.tabs li.active a,.woocommerce-tabs ul.tabs li.selected a) {color:#c74600!important;border-color:var(--rn148-orange)!important;box-shadow:inset 0 -2px var(--rn148-orange)!important;}
body.woocommerce :is(.woocommerce-tabs ul.tabs li.active,.woocommerce-tabs ul.tabs li.selected)::after {border-bottom-color:var(--rn148-orange)!important;}
body.woocommerce-account .woocommerce :is(.woocommerce-privacy-policy-text a,.lost_password a) {color:#c74600!important;}
body.woocommerce-account .woocommerce .woocommerce-privacy-policy-text {font-size:13px;line-height:1.55;max-width:100%;overflow-wrap:anywhere;margin:12px 0;}
body.woocommerce-account :is(.woocommerce-form-login,.woocommerce-form-register) {max-width:100%;min-width:0;}
body.woocommerce-account :is(.woocommerce-form-login,.woocommerce-form-register) label {line-height:1.4;overflow-wrap:anywhere;}

/* B. Native Cart & Checkout Blocks: shared palette, no fake components. */
body :is(.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout) {
  --wp--preset--color--accent:var(--rn148-orange);
  --wc-blocks--color--accent:var(--rn148-orange);
  --wc-blocks--color--accent-text:#fff;
  --wc-blocks--color--outline:var(--rn148-orange);
  --wc-blocks--color--foreground:var(--rn148-ink);
  --wc-blocks--color--surface:#fff;
  min-width:0;max-width:100%;box-sizing:border-box;
}
body :is(.wc-block-cart,.wc-block-checkout) :is(.wc-block-components-product-name,.wc-block-cart-item__product a,.wc-block-components-order-summary-item__description a) {color:var(--rn148-ink)!important;text-decoration:none!important;overflow-wrap:anywhere;word-break:normal;}
body :is(.wc-block-cart,.wc-block-checkout) :is(.wc-block-components-product-name,.wc-block-cart-item__product a):hover {color:#c74600!important;}
body :is(.wc-block-cart,.wc-block-checkout) :is(.wc-block-components-totals-wrapper,.wc-block-components-order-summary,.wc-block-cart__totals-title,.wc-block-components-totals-item) {min-width:0;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere;}
/* STEP152: native Woo radio and checkbox option geometry preserved. */
body :is(.wc-block-cart,.wc-block-checkout) :is(.wc-block-components-text-input input,.wc-block-components-text-input select,.wc-block-components-select select,.wc-block-components-textarea) {max-width:100%;box-sizing:border-box;}
body :is(.wc-block-cart,.wc-block-checkout) :is(.wc-block-components-text-input input,.wc-block-components-select select,.wc-block-components-textarea):focus {outline:1px solid var(--rn148-orange)!important;border-color:var(--rn148-orange)!important;box-shadow:none!important;}
body :is(.wc-block-cart,.wc-block-checkout) :is(.wc-block-components-button,.wc-block-components-checkout-place-order-button):not(:disabled) {background:var(--rn148-orange)!important;border-color:var(--rn148-orange)!important;border-radius:7px!important;color:#fff!important;}
body :is(.wc-block-cart,.wc-block-checkout) :is(.wc-block-components-button,.wc-block-components-checkout-place-order-button):hover:not(:disabled) {background:#e75500!important;}
body :is(.wc-block-cart,.wc-block-checkout) a:not(.wc-block-components-button):focus-visible {outline:2px solid var(--rn148-orange)!important;outline-offset:2px;}
body .wc-block-components-shipping-rates-control .wc-block-components-radio-control__label,
body .wc-block-components-shipping-rates-control .wc-block-components-radio-control__secondary-label {overflow-wrap:break-word;word-break:normal;white-space:normal;min-width:0;}
/* STEP152: do not alter the geometry or native selection state of Woo radio options. */
body.rennis-header-v018 .ct-footer-copyright {font-size:13px!important;line-height:1.45!important;text-align:center;padding:10px 12px;max-width:100%;overflow-wrap:anywhere;}

/* C. Product carousel: native Woo 'view cart' link no longer becomes a blue billboard. */
body.home .rn-home-products .rn-product-cart {flex-wrap:wrap;min-width:0;justify-content:flex-end;}
body.home .rn-home-products .rn-product-cart .added_to_cart {display:inline-flex!important;align-items:center;justify-content:center;flex:1 1 100%;max-width:100%!important;min-width:0;min-height:33px;margin-top:5px;padding:5px 9px!important;background:#fff4ec!important;color:#b34400!important;font-size:12px!important;line-height:17px!important;text-align:center;border:1px solid #ffb17e;border-radius:6px;box-shadow:none!important;word-break:normal;white-space:normal;text-decoration:none!important;}
body.home .rn-home-products .rn-product-cart .added_to_cart:hover {background:#ffe1cd!important;}

/* D. Mobile-layout visual corrections from actual 354 px recording. */
@media(max-width:767px){
 body.rennis-header-v018 {padding-bottom:calc(86px + env(safe-area-inset-bottom,0px))!important;scroll-padding-bottom:calc(90px + env(safe-area-inset-bottom,0px));}
 body.rennis-header-v018 .rn-bottom {height:calc(72px + env(safe-area-inset-bottom,0px));}
 body.rennis-header-v018 .ct-footer,body.rennis-header-v018 footer {scroll-margin-bottom:90px;}
 /* Shop category: Blocksy hero must not be a viewport-sized empty panel. */
 body.rn052-archive :is(.hero-section,.ct-hero-section) {--min-height:0px!important;min-height:0!important;height:auto!important;padding:18px 12px 10px!important;}
 body.rn052-archive :is(.hero-section,.ct-hero-section) :is(.ct-container,.entry-header) {min-height:0!important;height:auto!important;padding-block:0!important;margin-block:0!important;}
 body.rn052-archive :is(.hero-section,.ct-hero-section) :is(h1,.page-title) {margin-block:6px!important;line-height:1.2!important;font-size:clamp(25px,7.3vw,31px)!important;}
 body.rn052-archive :is(.woocommerce-ordering,form.woocommerce-ordering) {display:block!important;width:100%!important;max-width:100%!important;margin:7px 0 13px!important;position:relative!important;}
 body.rn052-archive .woocommerce-ordering::before,body.rn052-archive .woocommerce-ordering::after {content:none!important;display:none!important;}
 body.rn052-archive .woocommerce-ordering select.orderby {display:block!important;width:100%!important;min-height:43px!important;border:1px solid var(--rn148-border)!important;border-radius:7px!important;padding:8px 36px 8px 12px!important;color:var(--rn148-ink)!important;background-color:#fff!important;font-size:14px!important;line-height:21px!important;box-shadow:none!important;}
 body.rn052-archive .rn052-category-nav,body.rn052-archive .rn063-sidebar-host {min-width:0;max-width:100%;}
 body.rn052-archive .rn052-category-nav a,body.rn052-archive .rn063-sidebar-host a {white-space:normal;overflow-wrap:anywhere;line-height:1.35;}
 body.rn052-archive :is(.rn062-price-filter,.woocommerce-result-count) {max-width:100%;min-width:0;}
 /* At 354/375/390 px a 2-column grid crushes names: one readable column; two columns above 480px. */
 body.rn052-archive .woocommerce ul.products,
 body.rn052-archive.woocommerce-page ul.products {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;}
 body.rn052-archive .woocommerce ul.products li.product,
 body.rn052-archive.woocommerce-page ul.products li.product {display:flex!important;flex-direction:column;float:none!important;clear:none!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:14px!important;box-sizing:border-box;}
 body.rn052-archive .woocommerce ul.products li.product img {height:auto;max-height:190px;object-fit:contain;}
 body.rn052-archive .woocommerce ul.products li.product :is(.woocommerce-loop-product__title,h2.woocommerce-loop-product__title) {font-size:15px!important;line-height:1.35!important;font-weight:500!important;overflow-wrap:anywhere;word-break:normal;}
 body.rn052-archive .woocommerce ul.products li.product :is(.price,.button,.added_to_cart) {align-self:stretch;max-width:100%;white-space:normal;}
 body.rn052-archive .woocommerce ul.products li.product .price {font-size:18px!important;line-height:1.35!important;color:var(--rn148-ink)!important;}
 body.rn052-archive .woocommerce ul.products li.product .added_to_cart {display:flex!important;justify-content:center;align-items:center;margin-top:6px!important;padding:10px 12px!important;border:1px solid #ffb17e!important;background:#fff4ec!important;color:#b34400!important;border-radius:7px!important;min-height:42px;line-height:1.25!important;}
 /* Product page: long car-part titles/breadcrumb and gallery stay readable. */
 body.rn052-product .woocommerce-breadcrumb {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;max-width:100%;font-size:12px;line-height:1.5;margin:10px 0 14px;}
 body.rn052-product div.product :is(.product_title,.entry-title) {font-size:clamp(19px,5.1vw,24px)!important;line-height:1.28!important;letter-spacing:0!important;overflow-wrap:anywhere;word-break:normal;}
 body.rn052-product div.product .woocommerce-product-gallery {min-width:0!important;margin:0 0 13px!important;padding:0!important;max-width:100%!important;}
 body.rn052-product div.product :is(.woocommerce-product-gallery__wrapper,.flex-viewport) {min-width:0;max-width:100%;margin:0!important;padding:0!important;}
 body.rn052-product div.product .woocommerce-product-gallery img {max-width:100%!important;object-fit:contain!important;}
 body.rn052-product div.product .woocommerce-tabs ul.tabs {display:flex;flex-wrap:wrap;gap:4px;margin-bottom:10px;}
 body.rn052-product div.product .woocommerce-tabs ul.tabs a {font-size:14px;color:var(--rn148-ink)!important;}
 body.rn052-product div.product .woocommerce-tabs ul.tabs li.active a {color:#c74600!important;}
 /* STEP153: remove custom Cart table/row/td grid overrides. Woo Blocks owns responsive table. */
 /* Checkout cards and delivery labels: fit width without trampling native fields. */
 /* STEP152: keep natural Woo Blocks internal widths, paddings and radio alignment. */
body.woocommerce-checkout :is(.wc-block-checkout,.wc-block-checkout__main,.wc-block-checkout__sidebar,.wc-block-components-order-summary) {min-width:0;max-width:100%;box-sizing:border-box;}
body.woocommerce-checkout .wc-block-components-shipping-rates-control .wc-block-components-radio-control__label {white-space:normal;overflow-wrap:break-word;word-break:normal;line-height:1.45;}
 body.woocommerce-checkout .wc-block-components-text-input {min-width:0!important;max-width:100%!important;}
 body.woocommerce-checkout .wc-block-checkout__terms {font-size:12px!important;line-height:1.55!important;overflow-wrap:anywhere;}
 body.woocommerce-checkout :is(.wc-block-components-checkout-step__content,.wc-block-components-checkout-step__heading) {max-width:100%;min-width:0;overflow-wrap:anywhere;}
 /* Keep bottom navigation from overlapping end-of-page forms and footer. */
 body.rennis-header-v018 :is(.ct-footer,.site-footer) {margin-bottom:6px;}
}
@media(min-width:480px) and (max-width:767px){
 body.rn052-archive .woocommerce ul.products,
 body.rn052-archive.woocommerce-page ul.products {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 body.rn052-archive .woocommerce ul.products li.product img {max-height:170px;}
}
@media(min-width:768px) and (max-width:1099px){
 body.rn052-archive .woocommerce ul.products {grid-template-columns:repeat(2,minmax(0,1fr));}
 body :is(.wc-block-cart,.wc-block-checkout) {min-width:0;max-width:100%;}
}

/* STEP152: presentation labels only on explicit agreed-price flat_rate methods.
   The shipped monetary values, Woo totals and genuinely free pickup remain intact. */
body :is(.wc-block-cart,.wc-block-checkout) .rn152-agreed-rate :is(.wc-block-components-radio-control__secondary-label,.wc-block-components-shipping-rates-control__shipping-rate-price) {font-size:0!important;line-height:0!important;}
body :is(.wc-block-cart,.wc-block-checkout) .rn152-agreed-rate :is(.wc-block-components-radio-control__secondary-label,.wc-block-components-shipping-rates-control__shipping-rate-price)::after {content:"По согласованию";display:inline-block;font-size:12px;line-height:1.4;font-weight:500;color:var(--rn148-ink);white-space:normal;}
/* Preserve native lists for mobile as well as Desktop; only inherited link colors. */
body.woocommerce-account .woocommerce .lost_password a:hover {color:#a64100!important;}
@media(max-width:767px){
 body.woocommerce-checkout .wc-block-components-shipping-rates-control .wc-block-components-radio-control__label,
 body.woocommerce-checkout .wc-block-checkout__payment-method .wc-block-components-radio-control__label {font-size:13px;line-height:1.45;overflow-wrap:break-word;word-break:normal;}
 body.woocommerce-checkout .wc-block-components-checkout-step__content {min-width:0;max-width:100%;}
 body.woocommerce-checkout :is(.wc-block-components-text-input,.wc-block-components-combobox,.wc-block-components-select) {min-width:0;max-width:100%;box-sizing:border-box;}
 body.rn052-archive .rn063-sidebar-host {margin-top:0!important;}
 body.rn052-archive .ct-container:has(> .rn063-sidebar-host) {padding-top:10px!important;}
 body.woocommerce-cart .wc-block-cart-item__product .wc-block-components-product-name {font-size:14px!important;line-height:1.4!important;}
}


/* RENNiS STEP153 — mobile cart/checkout verified-scope geometry (native Woo layouts). */
@media (max-width:767px) {
  /* Restore consistent inset to the two standard Gutenberg blocks. STEP147 had zeroed padding. */
  body.woocommerce-cart.rn147-mobile-ready .wp-block-woocommerce-cart,
  body.woocommerce-checkout.rn147-mobile-ready .wp-block-woocommerce-checkout {
    width:100%!important;max-width:100%!important;min-width:0!important;
    margin-inline:auto!important;padding-inline:clamp(14px,4.2vw,18px)!important;
    box-sizing:border-box!important;
  }
  body.woocommerce-cart .wc-block-cart,
  body.woocommerce-checkout .wc-block-checkout {
    min-width:0;max-width:100%;box-sizing:border-box;
  }
  body.woocommerce-cart :is(.wc-block-cart__main,.wc-block-cart__sidebar,.wc-block-cart-items,.wc-block-cart__totals-title),
  body.woocommerce-checkout :is(.wc-block-checkout__main,.wc-block-checkout__sidebar,.wc-block-components-order-summary) {
    min-width:0!important;max-width:100%!important;box-sizing:border-box;
  }
  /* Woo's own responsive Cart grid is active: do NOT assign display:grid/block to table/tr/td. */
  body.woocommerce-cart .wc-block-cart-items__row :is(.wc-block-cart-item__product,.wc-block-cart-item__total) {
    min-width:0;max-width:100%;overflow-wrap:anywhere;
  }
  body.woocommerce-cart .wc-block-cart-item__product .wc-block-components-product-name {
    overflow-wrap:anywhere;word-break:normal;line-height:1.45;
  }
  body.woocommerce-cart .wc-block-cart__sidebar :is(.wc-block-components-totals-wrapper,.wc-block-components-totals-item,.wc-block-components-panel__button,.wc-block-components-totals-coupon) {
    min-width:0;max-width:100%;box-sizing:border-box;
  }
  body.woocommerce-cart .wc-block-components-totals-item {gap:10px;}
  body.woocommerce-cart .wc-block-components-totals-item__value {
    min-width:0;max-width:100%;text-align:right;white-space:normal;overflow-wrap:break-word;
  }
  /* Give the checkout summary and field cards one visual alignment line. */
  body.woocommerce-checkout .wc-block-components-checkout-step,
  body.woocommerce-checkout .wc-block-components-checkout-step__heading,
  body.woocommerce-checkout .wc-block-components-checkout-step__content {
    box-sizing:border-box;min-width:0;max-width:100%;
  }
  body.woocommerce-checkout .wc-block-components-checkout-step__heading {overflow-wrap:break-word;}
  /* Keep fixed nav from covering the last native cart/checkout control. */
  body.woocommerce-cart.rn147-mobile-ready,
  body.woocommerce-checkout.rn147-mobile-ready {
    scroll-padding-bottom:calc(96px + env(safe-area-inset-bottom,0px));
  }
}


/* RENNiS STEP154 — inherited class in STEP153 was WRONG (rn146 vs actual rn147).
 * Use native Woo Blocks layout; fixes only outer gutters, flow, selected-row color.
 * NEVER apply display:grid/block to Woo table/tr/td or change Woo orders/cart math. */
@media(max-width:767px) {
 body.woocommerce-cart.rn147-mobile-ready .wp-block-woocommerce-cart,
 body.woocommerce-checkout.rn147-mobile-ready .wp-block-woocommerce-checkout {
   display:block; width:100%!important; max-width:100%!important; min-width:0!important;
   box-sizing:border-box!important; margin-inline:auto!important;
   padding-inline:clamp(16px,4.2vw,18px)!important; overflow:visible;
 }
 body.rn147-mobile-ready :is(.wc-block-cart,.wc-block-checkout,
       .wc-block-cart__main,.wc-block-cart__sidebar,
       .wc-block-checkout__main,.wc-block-checkout__sidebar) {
   min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
 }
 body.rn147-mobile-ready.woocommerce-cart .wc-block-cart-items {
   width:100%;max-width:100%;min-width:0; margin-inline:0;box-sizing:border-box;
 }
 body.rn147-mobile-ready.woocommerce-cart .wc-block-cart-item__image,
 body.rn147-mobile-ready.woocommerce-cart .wc-block-cart-item__product,
 body.rn147-mobile-ready.woocommerce-cart .wc-block-cart-item__total {
   min-width:0; max-width:100%;box-sizing:border-box;
 }
 body.rn147-mobile-ready.woocommerce-cart .wc-block-cart-item__image img {
   display:block;max-width:100%;height:auto;object-fit:contain;
 }
 body.rn147-mobile-ready.woocommerce-cart .wc-block-cart__sidebar,
 body.rn147-mobile-ready.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-wrapper {
   width:100%;max-width:100%;box-sizing:border-box;
 }
 body.rn147-mobile-ready.woocommerce-cart .wc-block-cart-item__total,
 body.rn147-mobile-ready.woocommerce-cart .wc-block-components-totals-item__value {
   overflow-wrap:break-word;max-width:100%;box-sizing:border-box;
 }
 body.rn147-mobile-ready.woocommerce-checkout .wc-block-components-checkout-order-summary__title,
 body.rn147-mobile-ready.woocommerce-checkout .wc-block-components-checkout-step__heading,
 body.rn147-mobile-ready.woocommerce-checkout .wc-block-components-checkbox__label {
   width:auto;max-width:100%;min-width:0;box-sizing:border-box;white-space:normal;
   overflow-wrap:break-word;
 }
 /* Clear native Woo selected option's broad blue focus card, not its radio geometry.
    IMPORTANT: no padding, position, width or grid changes on radio controls. */
 body.rn147-mobile-ready.woocommerce-checkout .wc-block-components-radio-control__option {
   border:0!important;border-bottom:1px solid #e1e5e8!important;
   border-radius:0!important;box-shadow:none!important;background:#fff!important;
   outline:none!important;
 }
 body.rn147-mobile-ready.woocommerce-checkout .wc-block-components-radio-control__option-checked,
 body.rn147-mobile-ready.woocommerce-checkout .wc-block-components-radio-control__option:has(input[type="radio"]:checked) {
   background:#fff!important;border-color:#e1e5e8!important;box-shadow:none!important;
 }
 body.rn147-mobile-ready.woocommerce-checkout .wc-block-components-radio-control__input:focus-visible {
   outline:2px solid #ff6500!important;outline-offset:2px!important;
 }
}
/* Shipping is a display label, not a monetary rate change. Only JS can attach this
   class after confirming SELECTED flat_rate from Woo cart store or matching summary. */
body :is(.wc-block-cart,.wc-block-checkout) .rn154-shipping-agreed-price {
 font-size:0!important;color:transparent!important;white-space:normal!important;
}
body :is(.wc-block-cart,.wc-block-checkout) .rn154-shipping-agreed-price > * {
 font-size:0!important;color:transparent!important;
}
body :is(.wc-block-cart,.wc-block-checkout) .rn154-shipping-agreed-price::after {
 content:"По согласованию";display:inline-block;font-size:12px!important;
 line-height:1.45!important;color:#262e33!important;font-weight:500;
 white-space:normal;text-align:right;
}
