/* Profline 2.0 commerce consistency and Cart 2.0.
   This layer is intentionally presentation-only: native InSales cart,
   favorites, quick checkout, KLADR and delivery handlers stay authoritative. */

:root {
  --p23-action-primary: #262329;
  --p23-action-hover: #111014;
  --p23-action-muted: #f2f0f3;
  --p23-border: #e3dfe6;
  --p23-surface: #ffffff;
  --p23-surface-soft: #f8f7f9;
  --p23-text: #29262d;
  --p23-text-soft: #68616d;
  --p23-brand-accent: #6f5688;
  --p23-focus: rgba(111, 86, 136, .16);
  --p23-success: #367257;
  --p23-radius: 14px;
}

/* One 3:4 product-media geometry across native and Profline cards. */
.p2-product-card__image,
body.p2-internal .product-preview__photo > .img-ratio,
body.p2-internal .special-products .product-preview__photo > .img-ratio,
body.p2-homepage .product-preview__photo > .img-ratio,
body.p2-cart-page .cart-item > .item-image .img-ratio {
  position: relative;
  width: 100%;
  height: auto !important;
  min-height: 0;
  aspect-ratio: 3 / 4;
  padding: 3px !important;
  overflow: hidden;
  border-radius: 11px;
  background: #fff;
}

.p2-product-card__image::before,
body.p2-internal .product-preview__photo > .img-ratio::before,
body.p2-homepage .product-preview__photo > .img-ratio::before,
body.p2-cart-page .cart-item > .item-image .img-ratio::before {
  display: none;
}

.p2-product-card__image > a,
.p2-product-card__image picture,
.p2-product-card__image img,
body.p2-internal .product-preview__photo > .img-ratio .img-ratio__inner,
body.p2-internal .product-preview__photo > .img-ratio a,
body.p2-internal .product-preview__photo > .img-ratio picture,
body.p2-internal .product-preview__photo > .img-ratio img,
body.p2-homepage .product-preview__photo > .img-ratio .img-ratio__inner,
body.p2-homepage .product-preview__photo > .img-ratio a,
body.p2-homepage .product-preview__photo > .img-ratio picture,
body.p2-homepage .product-preview__photo > .img-ratio img,
body.p2-cart-page .cart-item > .item-image .img-ratio__inner,
body.p2-cart-page .cart-item > .item-image picture,
body.p2-cart-page .cart-item > .item-image img {
  position: static;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  display: block;
  object-fit: contain;
  object-position: center;
}

/* PDP: use the existing gallery footprint instead of scaling the media down. */
body.p2-product-page .product__gallery-main {
  background: var(--p23-surface);
}

body.p2-product-page .product__gallery-main .product__slide-main,
body.p2-product-page .product__gallery-main .product__photo {
  width: 100%;
  height: auto !important;
  min-height: 0;
  aspect-ratio: 3 / 4;
  padding: 4px;
  background: var(--p23-surface);
}

body.p2-product-page .product__gallery-main :is(.img-ratio__inner, picture),
body.p2-product-page .product__gallery-main img {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

body.p2-product-page .product__photo-tumb {
  aspect-ratio: 3 / 4;
  width: 64px !important;
  height: auto !important;
  padding: 3px;
}

/* Product description is always complete. */
body.p2-product-page .product__area-description .cut-block,
body.p2-product-page .product__area-description .cut-block__content-wrapper,
body.p2-product-page .product__area-description .product__description-content {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  -webkit-line-clamp: unset !important;
  mask-image: none !important;
}

body.p2-product-page .product__area-description .cut-block__content-wrapper::after,
body.p2-product-page .product__area-description .cut-block__controls {
  display: none !important;
}

/* Header reflects the native InSales location source; it owns no state. */
.p23-location-status {
  min-height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.p23-location-status:hover { color: var(--p23-brand-accent); }
.p23-location-status:focus-visible { outline: 2px solid var(--p23-brand-accent); outline-offset: 3px; border-radius: 5px; }
.p23-location-status[aria-disabled="true"] { cursor: default; }
.p23-location-status__pin { color: var(--p23-brand-accent); font-size: 15px; }

/* Native InSales/KLADR selector, presentation only. */
body.p2-product-page .insales_widget-delivery {
  border: 1px solid var(--p23-border);
  border-radius: var(--p23-radius);
  box-shadow: none;
  background: var(--p23-surface-soft);
  color: var(--p23-text);
  font-family: inherit;
}

body.p2-product-page .insales_widget-delivery_form { padding: 18px; }
body.p2-product-page .insales_widget-delivery_header { margin-bottom: 14px; }
body.p2-product-page .insales_widget-label { color: var(--p23-text-soft); font-size: 12px; }
body.p2-product-page .insales_widget-current_address { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
body.p2-product-page .insales_widget-current_address span { color: var(--p23-text); font-size: 14px; font-weight: 750; }
body.p2-product-page .insales_widget-open_modal {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--p23-border);
  border-radius: 10px;
  background: var(--p23-surface);
  color: var(--p23-text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

body.p2-product-page .insales_widget-delivery_info--item {
  padding: 12px 0;
  border-color: var(--p23-border);
}

body.p2-product-page .insales_widget-modal_overlay { background: rgba(25, 22, 29, .48); backdrop-filter: blur(2px); }
body.p2-product-page .insales_widget-modal {
  width: min(520px, calc(100vw - 32px));
  max-height: min(640px, calc(100dvh - 40px));
  padding: 26px;
  border: 1px solid var(--p23-border);
  border-radius: 18px;
  background: var(--p23-surface);
  box-shadow: 0 24px 70px rgba(30, 25, 36, .2);
  color: var(--p23-text);
  font-family: inherit;
}

body.p2-product-page .insales_widget-modal-header-top { margin: 0 0 18px; display: block; }
body.p2-product-page .insales_widget-modal-label { margin: 0; color: var(--p23-text); font-size: 22px; font-weight: 820; line-height: 1.2; }
body.p2-product-page .insales_widget-modal-country { display: none; }
body.p2-product-page .insales-autocomplete-address { position: relative; }
body.p2-product-page .insales-autocomplete-address::before {
  content: '⌕';
  position: absolute;
  z-index: 2;
  left: 17px;
  top: 50%;
  color: #847d89;
  font-size: 21px;
  transform: translateY(-53%);
  pointer-events: none;
}

body.p2-product-page .insales-autocomplete-address-input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px 0 48px;
  border: 1px solid #d8d3dc;
  border-radius: 12px;
  background: #fff;
  color: var(--p23-text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  outline: none;
}

body.p2-product-page .insales-autocomplete-address-input:focus {
  border-color: var(--p23-brand-accent);
  box-shadow: 0 0 0 4px var(--p23-focus);
}

body.p2-product-page .insales-autocomplete-address-result-list {
  z-index: 20 !important;
  top: calc(100% + 8px) !important;
  bottom: auto !important;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--p23-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(29, 25, 34, .14);
}

body.p2-product-page .insales-autocomplete-address-result-list li { min-height: 46px; padding: 12px 14px; color: var(--p23-text); font-size: 14px; }
body.p2-product-page .insales-autocomplete-address-result-list li:hover,
body.p2-product-page .insales-autocomplete-address-result-list [aria-selected="true"] { background: var(--p23-surface-soft); }
body.p2-product-page .insales_widget-modal_close {
  top: 19px;
  right: 19px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--p23-action-muted);
}
body.p2-product-page .insales_widget-modal_close::before {
  content: '×';
  display: grid;
  place-items: center;
  color: var(--p23-text);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}

/* Transactional controls share one neutral visual language. */
body.p2-internal :is(.add-cart-counter__btn, [data-cart-submit], .m-modal-button--checkout),
body.p2-checkout :is(.co-button--checkout, .co-checkout-order_form .co-button) {
  border: 1px solid var(--p23-action-primary) !important;
  background: var(--p23-action-primary) !important;
  color: #fff !important;
  box-shadow: none !important;
  background-image: none !important;
}

body.p2-internal .product-preview .add-cart-counter__btn,
body.p2-internal.p2-cart-page .cart__area-controls [data-cart-submit],
body.p2-product-page .product__buy-btn-area .add-cart-counter__btn {
  border-color: var(--p23-action-primary) !important;
  background: var(--p23-action-primary) !important;
  background-image: none !important;
  color: #fff !important;
  box-shadow: none !important;
}

body.p2-internal :is(.add-cart-counter__btn, [data-cart-submit], .m-modal-button--checkout):hover,
body.p2-checkout :is(.co-button--checkout, .co-checkout-order_form .co-button):hover {
  border-color: var(--p23-action-hover) !important;
  background: var(--p23-action-hover) !important;
}

body.p2-internal .add-cart-counter__controls,
body.p2-internal .counter {
  min-height: 44px;
  grid-template-columns: 44px minmax(54px, auto) 44px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #d9d5dd;
  border-radius: 11px;
  background: #fff;
  color: var(--p23-text);
}

body.p2-internal .add-cart-counter.p23-cart-has-items > .add-cart-counter__btn {
  display: none !important;
}

body.p2-internal .add-cart-counter:not(.p23-cart-has-items) > .add-cart-counter__controls {
  display: none !important;
}

body.p2-internal .add-cart-counter.p23-cart-has-items > .add-cart-counter__controls {
  display: grid !important;
}

body.p2-internal :is(.add-cart-counter__controls-btn, .counter-button) {
  min-width: 44px;
  min-height: 42px;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--p23-action-muted) !important;
  color: var(--p23-text) !important;
  box-shadow: none !important;
}

body.p2-internal :is(.add-cart-counter__detail, .counter-input) {
  min-width: 0;
  min-height: 42px;
  border: 0 !important;
  background: #fff !important;
  color: var(--p23-text) !important;
  text-align: center;
  font-weight: 780;
}

body.p2-internal .micro-alert-item,
body.p2-internal .micro-alert__item,
body.p2-internal [data-micro-alert-item] {
  width: min(360px, calc(100vw - 28px));
  min-height: 0;
  padding: 13px 16px;
  border: 1px solid #cfe1d7;
  border-radius: 12px;
  background: #f4faf6;
  color: #2f6048;
  box-shadow: 0 12px 30px rgba(30, 50, 39, .12);
  font-size: 13px;
}

/* Quick checkout: native form and submission remain unchanged. */
body.p2-internal .m-modal--checkout { padding: 20px; background: rgba(24, 21, 28, .5); backdrop-filter: blur(2px); }
body.p2-internal .m-modal--checkout .m-modal-wrapper {
  width: min(520px, 100%);
  max-width: 520px !important;
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 0;
  border: 1px solid var(--p23-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 25px 75px rgba(30, 25, 36, .22);
}

body.p2-internal .m-modal--checkout form { position: relative; padding: 28px; }
body.p2-internal .m-modal--checkout .m-modal-heading { margin: 0 54px 22px 0; color: var(--p23-text); font-size: 23px; font-weight: 830; line-height: 1.2; }
body.p2-internal .m-modal--checkout .m-modal-close {
  top: 19px;
  right: 19px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--p23-action-muted);
}

body.p2-internal .m-modal--checkout .m-input { margin: 0 0 16px; }
body.p2-internal .m-modal--checkout .m-input-label { margin: 0 0 7px; display: block; color: var(--p23-text); font-size: 13px; font-weight: 720; }
body.p2-internal .m-modal--checkout .m-input-field {
  width: 100%;
  height: 52px !important;
  min-height: 52px;
  padding: 11px 14px;
  border: 1px solid #d8d3dc;
  border-radius: 11px;
  background: #fff;
  color: var(--p23-text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  outline: none;
}

body.p2-internal .m-modal--checkout textarea.m-input-field { height: 92px !important; min-height: 92px; resize: vertical; }
body.p2-internal .m-modal--checkout .m-input-field:focus { border-color: var(--p23-brand-accent); box-shadow: 0 0 0 4px var(--p23-focus); }
body.p2-internal .m-modal--checkout .m-input--checkbox { min-height: 44px; padding-left: 30px; position: relative; }
body.p2-internal .m-modal--checkout .m-input--checkbox > input[type="checkbox"] { width: 20px; height: 20px; left: 0; top: 2px; }
body.p2-internal .m-modal--checkout .m-input--checkbox .m-input-label { margin: 0 0 4px; }
body.p2-internal .m-modal--checkout .m-input-caption,
body.p2-internal .m-modal--checkout .m-input-caption p { margin: 0; color: var(--p23-text-soft); font-size: 12px !important; line-height: 1.45; text-align: left !important; }
body.p2-internal .m-modal--checkout .m-input-caption a { color: var(--p23-brand-accent); }
body.p2-internal .m-modal--checkout .m-modal-footer { margin-top: 20px; }
body.p2-internal .m-modal--checkout .m-modal-button--checkout { width: 100%; min-height: 52px; border-radius: 12px; font-size: 14px; font-weight: 800; }

/* Cart 2.0 */
body.p2-cart-page .page_layout { width: min(1240px, calc(100% - 48px)); padding: 22px 0 82px; }
body.p2-cart-page .widget-type_system_widget_v4_back_to_catalog { margin-bottom: 8px; }
body.p2-cart-page .cart { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); gap: 28px; align-items: start; }
.p23-cart-heading { margin: 0 0 22px !important; padding: 0 0 16px; display: flex !important; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--p23-border); }
.p23-cart-heading .p23-cart-heading__title { color: var(--p23-text); font-size: clamp(30px, 3vw, 42px); font-weight: 830; line-height: 1.1; letter-spacing: -.035em; }
.p23-cart-heading [data-p23-cart-count-label] { color: var(--p23-text-soft); font-size: 13px; font-weight: 500; }

body.p2-cart-page .cart__area-items { min-width: 0; display: grid; gap: 12px; }
body.p2-cart-page .cart-item {
  padding: 16px;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  grid-template-areas:
    "image meta unit"
    "image title unit"
    "image quantity total"
    "image actions total";
  gap: 7px 18px;
  align-items: start;
  border: 1px solid var(--p23-border) !important;
  border-radius: var(--p23-radius);
  background: #fff;
}

body.p2-internal.p2-cart-page .cart-item {
  grid-template-columns: 128px minmax(0, 1fr) auto !important;
  grid-template-areas:
    "image meta unit"
    "image title unit"
    "image quantity total"
    "image actions total" !important;
}

body.p2-cart-page .cart-item > .item-image { grid-area: image; width: 128px; min-width: 0; }
body.p2-cart-page .cart-item > .item-title { grid-area: title; margin: 0; color: var(--p23-text); font-size: 15px; font-weight: 740; line-height: 1.4; }
body.p2-cart-page .cart-item > .item-price { grid-area: unit; min-width: 100px; color: var(--p23-text-soft); text-align: right; font-size: 12px; }
body.p2-cart-page .cart-item > .item-price .price { margin-top: 3px; display: block; color: var(--p23-text); font-size: 14px; font-weight: 760; }
body.p2-cart-page .cart-item > .item-counter { grid-area: quantity; width: fit-content; align-self: end; }
body.p2-cart-page .cart-item > .item-total { grid-area: total; align-self: end; color: var(--p23-text); text-align: right; font-size: 17px; font-weight: 830; }
body.p2-cart-page .cart-item > .item-total::before { content: 'Сумма'; margin-bottom: 3px; display: block; color: var(--p23-text-soft); font-size: 11px; font-weight: 500; }
body.p2-cart-page .cart-item > .item-delete { grid-area: actions; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.p23-cart-meta { grid-area: meta; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--p23-text-soft); font-size: 11px; }
.p23-cart-brand { color: var(--p23-brand-accent); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.p23-cart-sku::before { content: 'Арт. '; }
.p23-unit-label { display: block; }

body.p2-cart-page .cart-item .favorites_btn,
body.p2-cart-page .cart-item .js-item-delete {
  width: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0 !important;
  background: transparent !important;
  color: var(--p23-text-soft) !important;
  font-size: 12px;
  box-shadow: none !important;
}

body.p2-cart-page .cart-item .favorites_btn:hover,
body.p2-cart-page .cart-item .js-item-delete:hover { color: var(--p23-text) !important; }
body.p2-cart-page .cart-item .favorites_btn.favorites-added { color: var(--p23-brand-accent) !important; }
body.p2-cart-page .cart-item .p2-favorite-icon { width: 20px; height: 20px; display: block; fill: transparent; stroke: currentColor; stroke-width: 1.65; }
body.p2-cart-page .cart-item .favorites-added .p2-favorite-icon { fill: currentColor; }

body.p2-cart-page .cart__area-controls { position: sticky; top: 20px; border: 1px solid var(--p23-border); border-radius: 16px; background: #fff; box-shadow: 0 14px 38px rgba(35, 29, 42, .06); }
body.p2-cart-page .cart__area-controls-sticky { padding: 24px; }
body.p2-cart-page .sidebar_header { margin: 0 0 19px; color: var(--p23-text); font-size: 22px; font-weight: 830; }
body.p2-cart-page .sidebar-size-items,
.p23-summary-delivery { padding: 9px 0; display: flex; justify-content: space-between; gap: 16px; color: var(--p23-text-soft); font-size: 13px; }
body.p2-cart-page .sidebar-size-items span:last-child { color: var(--p23-text); font-weight: 720; }
body.p2-cart-page .cart__area-coupon { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--p23-border); }
body.p2-cart-page .coupon-header { min-height: 44px; display: flex; align-items: center; justify-content: space-between; color: var(--p23-text); font-size: 13px; font-weight: 720; cursor: pointer; }
body.p2-cart-page .coupon-header::after { content: '+'; color: var(--p23-text-soft); font-size: 18px; font-weight: 400; }
body.p2-cart-page .coupon-content { margin: 4px 0 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
body.p2-cart-page .coupon-content.hidden { display: none; }
body.p2-cart-page .coupon-input input { min-height: 44px; border: 1px solid var(--p23-border); border-radius: 10px; font-size: 16px; }
body.p2-cart-page .coupon-button { min-height: 44px; padding: 0 13px; border: 1px solid var(--p23-border); border-radius: 10px; background: #fff; color: var(--p23-text); font-weight: 720; }
body.p2-cart-page .total { margin-top: 10px; padding-top: 18px; display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--p23-border); }
body.p2-cart-page .total::before { content: 'Итого'; color: var(--p23-text); font-size: 16px; font-weight: 780; }
body.p2-cart-page .total-amount { color: var(--p23-text); font-size: 24px; font-weight: 850; }
body.p2-cart-page .cart-controls { margin-top: 18px; }
body.p2-cart-page [data-cart-submit] { width: 100%; min-height: 54px; border-radius: 12px; font-size: 14px; font-weight: 820; }

/* Recommendations use the same card and favorite component. */
body.p2-cart-page .special-products { margin-top: 34px; }
body.p2-cart-page .special-products__title { color: var(--p23-text); font-size: clamp(24px, 2.5vw, 32px); font-weight: 830; }
body.p2-cart-page .special-products .product-preview { height: 100%; overflow: hidden; border: 1px solid var(--p23-border); border-radius: var(--p23-radius); background: #fff; }
body.p2-cart-page .special-products .product-preview__content { height: 100%; padding: 8px 10px 12px; display: flex; flex-direction: column; }
body.p2-cart-page .special-products .product-preview__area-title { flex: 1 1 auto; }
body.p2-cart-page .special-products .product-preview__title { min-height: calc(1.4em * 3); margin-top: 9px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; color: var(--p23-text); font-size: 12px; line-height: 1.4; }
body.p2-cart-page .special-products .product-preview__price-cur { color: var(--p23-text); font-size: 16px; font-weight: 820; }
body.p2-cart-page .special-products .favorites_btn { width: 44px; height: 44px; min-width: 44px; padding: 0; display: grid; place-items: center; border: 1px solid rgba(48, 42, 53, .09); border-radius: 50%; background: rgba(255, 255, 255, .95); color: var(--p23-text); }
body.p2-cart-page .special-products .favorites_btn .p2-favorite-icon { width: 20px; height: 20px; display: block; fill: transparent; stroke: currentColor; stroke-width: 1.65; }
body.p2-cart-page .special-products .favorites_btn.favorites-added { color: var(--p23-brand-accent); }
body.p2-cart-page .special-products .favorites_btn.favorites-added .p2-favorite-icon { fill: currentColor; }
body.p2-cart-page .special-products .add-cart-counter__btn { width: 100%; min-height: 42px; border-radius: 10px; font-size: 0; }
body.p2-cart-page .special-products .add-cart-counter__btn::after { content: '+  В корзину'; font-size: 12px; font-weight: 780; }

/* One icon per reusable favorite control; JS removes obsolete native glyph nodes. */
:is(.p2-product-card__favorite, .favorites_btn) .p2-favorite-icon { width: 20px; height: 20px; }

@media (max-width: 900px) {
  body.p2-product-page .product__gallery-main .product__slide-main,
  body.p2-product-page .product__gallery-main .product__photo { height: auto !important; min-height: 0; aspect-ratio: 3 / 4; padding: 3px; }

  body.p2-internal .m-modal--checkout { padding: 0; align-items: flex-end; }
  body.p2-internal .m-modal--checkout .m-modal-wrapper { width: 100%; max-height: 92dvh; border-width: 1px 0 0; border-radius: 20px 20px 0 0; }
  body.p2-internal .m-modal--checkout form { padding: 24px 18px calc(22px + env(safe-area-inset-bottom)); }

  body.p2-product-page .insales_widget-modal {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 88dvh;
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 20px 20px 0 0;
    transform: none;
  }

  body.p2-cart-page .page_layout { width: calc(100% - 28px); padding-top: 14px; }
  body.p2-internal.p2-cart-page .cart { display: block !important; }
  body.p2-cart-page .p23-cart-heading { margin-bottom: 16px; }
  body.p2-cart-page .cart__area-controls { margin-top: 16px; }
  body.p2-internal.p2-cart-page .cart__area-items,
  body.p2-internal.p2-cart-page .cart__area-controls { grid-column: 1 !important; grid-row: auto !important; }
  body.p2-cart-page .cart__area-controls { position: static; }
}

@media (max-width: 700px) {
  .p2-header__main {
    align-items: center !important;
    min-height: 114px !important;
    padding-block: 4px 6px !important;
    grid-template-rows: 58px 42px !important;
    gap: 4px 12px !important;
  }

  .p2-logo {
    width: min(96px, 27vw) !important;
    height: auto !important;
    flex: 0 0 auto;
  }

  .p2-logo img,
  .p2-header__logo img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    aspect-ratio: 5 / 3;
    object-fit: contain !important;
  }

  .p2-actions,
  .p2-mobile-toggle {
    align-self: center;
  }

  body.p2-internal :is(.breadcrumb-wrapper, .breadcrumb, .p2-commerce-breadcrumbs) {
    min-height: 0 !important;
    height: auto !important;
  }

  body.p2-internal .widget-type_system_widget_v4_breadcrumbs_1 {
    margin-bottom: 6px !important;
  }

  body.p2-internal .widget-type_system_widget_v4_breadcrumbs_1 > .layout__content {
    padding-block: 8px !important;
  }

  body.p2-internal .breadcrumb-wrapper {
    margin-bottom: 0 !important;
  }

  body.p2-internal .breadcrumb .bttn-hidden-breadcrumbs {
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 4px !important;
    line-height: inherit;
  }

  body.p2-internal .p2-commerce-breadcrumbs {
    margin-bottom: 8px !important;
    padding-block: 0 !important;
  }

  .p2-product-card__image,
  body.p2-internal .product-preview__photo > .img-ratio,
  body.p2-homepage .product-preview__photo > .img-ratio {
    min-height: 0 !important;
    aspect-ratio: 3 / 4;
  }
}

@media (max-width: 600px) {
  .p23-cart-heading { padding-bottom: 12px; }
  .p23-cart-heading .p23-cart-heading__title { font-size: 30px; }
  body.p2-cart-page .cart-item {
    padding: 13px;
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-areas:
      "image meta"
      "image title"
      "image unit"
      "quantity total"
      "actions actions";
    gap: 6px 12px;
  }
  body.p2-internal.p2-cart-page .cart-item {
    grid-template-columns: 92px minmax(0, 1fr) !important;
    grid-template-areas:
      "image meta"
      "image title"
      "image unit"
      "quantity total"
      "actions actions" !important;
  }
  body.p2-cart-page .cart-item > .item-image { width: 92px; }
  body.p2-cart-page .cart-item > .item-price { min-width: 0; text-align: left; }
  body.p2-cart-page .cart-item > .item-price .p23-unit-label { display: inline; margin-right: 5px; }
  body.p2-cart-page .cart-item > .item-price .price { display: inline; font-size: 13px; }
  body.p2-cart-page .cart-item > .item-counter { margin-top: 8px; }
  body.p2-cart-page .cart-item > .item-total { margin-top: 8px; align-self: center; }
  body.p2-cart-page .cart__area-controls-sticky { padding: 20px 17px; }
  body.p2-cart-page .coupon-content { grid-template-columns: 1fr; }
  body.p2-cart-page .special-products .splide { margin-right: -14px; }
}

@media (max-width: 390px) {
  body.p2-cart-page .page_layout { width: calc(100% - 20px); }
  body.p2-cart-page .cart-item { grid-template-columns: 82px minmax(0, 1fr); padding: 11px; gap-inline: 10px; }
  body.p2-internal.p2-cart-page .cart-item { grid-template-columns: 82px minmax(0, 1fr) !important; }
  body.p2-cart-page .cart-item > .item-image { width: 82px; }
  body.p2-cart-page .cart-item > .item-title { font-size: 13px; }
  body.p2-cart-page .cart-item > .item-delete { gap: 2px 10px; }
}

@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}
