/* Shared dimensions for purchase controls keep each row stable when quantities change. */
body[data-page] :is(#productList,#homeNewProducts,#pdRelatedGrid,#favoritesGrid) .product-card > .cart-controls {
  display:grid !important; grid-template-columns:minmax(0,1fr); grid-template-rows:44px;
  align-items:stretch; height:59px !important; min-height:59px !important;
}
body[data-page] :is(#productList,#homeNewProducts,#pdRelatedGrid,#favoritesGrid) .cart-controls > :is(.add-btn,.catalog-cart-state),
body[data-page] :is(#productList,#homeNewProducts,#pdRelatedGrid,#favoritesGrid) .cart-controls .qty-control {
  box-sizing:border-box!important; width:100%!important; height:44px!important; min-height:44px!important;
  margin:0!important; grid-area:1/1;
}
body[data-page] :is(#productList,#homeNewProducts,#pdRelatedGrid,#favoritesGrid) .cart-controls [hidden],
#favoritesState[hidden], #pdRelatedGrid [hidden], #profileSectionBody [hidden] {display:none!important}
body[data-page] :is(#productList,#homeNewProducts,#pdRelatedGrid,#favoritesGrid) .product-price-caption {font-size:12px!important;line-height:1.2!important}
body[data-page] :is(#productList,#homeNewProducts,#pdRelatedGrid,#favoritesGrid) .product-price-values {white-space:nowrap}
body[data-page] :is(#productList,#homeNewProducts,#pdRelatedGrid,#favoritesGrid) .product-card .image-wrap {
  display:block!important;position:relative;aspect-ratio:3/4!important;width:100%;height:auto!important;overflow:hidden;
}
body[data-page] :is(#homeNewProducts,#pdRelatedGrid,#favoritesGrid) .product-card .name {display:block;text-decoration:none;color:inherit}
body[data-page] :is(#pdRelatedGrid,#favoritesGrid,#homeNewProducts) .badge {z-index:2}
body[data-page] :is(#pdRelatedGrid,#favoritesGrid) .slider-container {position:absolute;inset:0;width:100%;height:100%;overflow:hidden}
body[data-page] :is(#pdRelatedGrid,#favoritesGrid) .dcr-carousel-strip {display:flex;width:100%;height:100%;touch-action:pan-y pinch-zoom}
body[data-page] :is(#pdRelatedGrid,#favoritesGrid) .dcr-carousel-strip img {flex:0 0 100%;min-width:0;width:100%;height:100%;object-fit:contain}
body[data-page] .dcr-favorite-card, body[data-page] .dcr-favorite-action {box-sizing:border-box;padding:0!important;align-items:center;justify-content:center;line-height:1}
body[data-page] .dcr-favorite-card {display:grid!important;place-items:center!important;grid-template:1fr / 1fr}
body[data-page] .dcr-favorite-card svg {display:block!important;position:static!important;transform:none!important;margin:0!important}
body[data-page] :is(.dcr-favorite-card,.dcr-favorite-action).is-favorite svg {fill:#a76cdb!important;stroke:#6726ab!important}
body[data-page] :is(.catalog-search-clear:not([hidden]),.dcr-inquiry header button[aria-label="Закрыть"],.close-btn,.home-lightbox-close,.orders-center-close,.cart-image-viewer-close,.product-image-viewer-close,.dcr-mobile-drawer-close,#pdCloseZoom,#pdInfoClose,#pdVariantDialog button[aria-label="Закрыть"]) {
  display:inline-grid!important;place-items:center!important;line-height:1!important;padding:0!important;text-indent:0!important;
}
body[data-page] .dcr-mobile-drawer-close svg {width:20px;height:20px;display:block}
body[data-page] #profileSectionToggle {width:100%!important;justify-content:flex-start!important;text-align:left}
#profileSectionToggle .account-section-chevron,#profileSectionToggle::before {display:none!important}
#profileSectionBody #profileEditBtn {margin-top:8px}
body[data-page="cart"] #cartSheet .cart-sheet-header,body[data-page="cart"] #cartSheet .cart-sheet-header h3 {
  background:white!important;background-image:none!important;box-shadow:none!important;color:#302534!important;
}
body[data-page="cart"] #cartSheet .cart-sheet-header::before,body[data-page="cart"] #cartSheet .cart-sheet-header::after,
body[data-page="cart"] #cartSheet .cart-sheet-header h3::before,body[data-page="cart"] #cartSheet .cart-sheet-header h3::after {content:none!important}
#cartItemsList .remove-cross {display:none}
@media(min-width:900px) {
  body[data-page="cart"] #cartSheet:has(#cartItemsList > .empty-cart) {grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"head" "items"!important}
}
body[data-page="catalog"][data-catalog-level] > #breadcrumb:has(.dcr-breadcrumb-separator) {display:flex!important}
@media(max-width:899px) {
  html body[data-page]:has(.dcr-global-menu-trigger) > :is(nav.bottom-nav,nav.home-bottom-nav) {display:none!important}
  html body[data-page]:has(.dcr-global-menu-trigger):not([data-page="product"]) {padding-bottom:env(safe-area-inset-bottom,0px)!important}
  body[data-page="catalog"] #viewHeader:not(.hidden) {display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:baseline!important;gap:2px 8px!important}
  #viewHeader .title {grid-column:1;grid-row:1;min-width:0}
  #viewHeader span.meta-chip {grid-column:1;grid-row:2}
  #viewHeader a.meta-chip {grid-column:2;grid-row:1;align-self:baseline;text-align:right;white-space:normal;max-width:47vw}
  body[data-page="cart"] #cartSheet #cartItemsList .cart-item {
    grid-template-columns:48px minmax(0,1fr) auto 26px!important;
    grid-template-areas:"image name qty remove" "image unit price price"!important;
    padding:6px 8px!important;gap:2px 5px!important;grid-template-rows:auto auto;
  }
  body[data-page="cart"] #cartSheet #cartItemsList .item-main {display:contents!important}
  body[data-page="cart"] #cartSheet .item-name {grid-area:name;overflow-wrap:anywhere;min-width:0}
  body[data-page="cart"] #cartSheet .item-unit {grid-area:unit}
  body[data-page="cart"] #cartSheet #cartItemsList .item-qty {grid-template-columns:25px 29px 25px!important;gap:0!important;padding:0!important;justify-self:end!important}
  body[data-page="cart"] #cartSheet #cartItemsList .item-qty :is(button,input) {width:100%!important;min-width:0!important}
  body[data-page="cart"] #cartSheet #cartItemsList .cart-item-remove {display:grid!important;place-items:center!important;width:28px!important;height:28px!important;padding:0!important;border:0!important;border-radius:50%;background:transparent!important;color:#625c68!important}
  #cartItemsList .remove-label {display:none}
  #cartItemsList .remove-cross {width:17px;height:17px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
}
@media(max-width:760px) {
  body[data-page="product"] .pd-heading {grid-template-columns:minmax(0,1fr) auto}
  body[data-page="product"] #pdTitle {grid-column:1}
  body[data-page="product"] .pd-actions {grid-column:2}
}
/* Draw icon-only close controls around their geometric center, independent of font metrics. */
body[data-page] :is(.catalog-search-clear:not([hidden]),.dcr-inquiry header button[aria-label="Закрыть"],.close-btn,.home-lightbox-close,.orders-center-close,.cart-image-viewer-close,.product-image-viewer-close,#pdCloseZoom,#pdInfoClose,#pdCloseVariants):not(:has(svg)) {font-size:0!important;grid-template:1fr/1fr}
body[data-page] :is(.catalog-search-clear:not([hidden]),.dcr-inquiry header button[aria-label="Закрыть"],.close-btn,.home-lightbox-close,.orders-center-close,.cart-image-viewer-close,.product-image-viewer-close,#pdCloseZoom,#pdInfoClose,#pdCloseVariants):not(:has(svg))::before {
  content:"";display:block;width:18px;height:18px;position:static;transform:none;border:0;
  background:linear-gradient(45deg,transparent 46%,currentColor 47% 53%,transparent 54%),linear-gradient(-45deg,transparent 46%,currentColor 47% 53%,transparent 54%);
}
body[data-page] :is(#productList,#homeNewProducts,#pdRelatedGrid,#favoritesGrid) .product-card:is(:hover,:active,:focus-within) {transform:none!important;translate:none!important}
@media(max-width:899px) {
  body[data-page="catalog"][data-catalog-level] > .container:has(#viewHeader:not(.hidden)) {padding-top:12px!important}
  #viewHeader a.meta-chip {max-width:58vw}
}
/* Store navigation comes from the header. Product purchase controls have a separate dock. */
@media(max-width:899px){
  html body[data-page]:not([data-page="admin"]) :is(nav.bottom-nav,nav.home-bottom-nav,#bottomNav){display:none!important}
  html body[data-page="product"] > header.header,
  html body[data-page="product"] > nav.breadcrumb,
  html body[data-page="product"] .pd-shell > .pd-heading {
    position:static!important;inset:auto!important;transform:none!important;box-shadow:none!important;
  }
  html body[data-page="product"] > nav.breadcrumb {
    display:flex!important; background:white!important; min-height:32px!important;
    backdrop-filter:none!important; -webkit-backdrop-filter:none!important;
  }
  body[data-page="product"] > .breadcrumb > .current,body[data-page="product"] > .breadcrumb > .dcr-breadcrumb-separator:nth-last-child(2){display:none!important}
  body[data-page="product"] > .breadcrumb a:last-of-type{min-width:0!important;overflow:hidden;text-overflow:ellipsis;display:block!important;flex:0 1 auto!important}
  body[data-page="product"] .pd-shell > .pd-heading {border:0!important;margin:0 0 8px!important;padding:4px 0!important}
  body[data-page="product"] .pd-heading .pd-mobile-back{display:none!important}
  body[data-page="cart"] #cartSheet #cartItemsList .cart-item {
    grid-template-columns:48px minmax(0,1fr) auto 6px 36px!important;
    grid-template-areas:"image name qty . remove" "image unit price price price"!important;
    column-gap:5px!important;row-gap:3px!important;padding:7px 8px!important;
  }
  body[data-page="cart"] #cartSheet #cartItemsList .item-qty {
    grid-template-columns:28px 52px 28px!important;min-height:36px!important;align-items:center!important;
  }
  body[data-page="cart"] #cartSheet #cartItemsList .item-qty .cart-qty-input {
    padding:0 2px!important;box-sizing:border-box!important;font:600 16px/32px system-ui!important;
    font-variant-numeric:tabular-nums;appearance:textfield; -moz-appearance:textfield;
  }
  .cart-qty-input::-webkit-inner-spin-button,.cart-qty-input::-webkit-outer-spin-button {appearance:none;margin:0}
  body[data-page="cart"] #cartSheet #cartItemsList .cart-item-remove {
    width:36px!important;height:36px!important;align-self:start!important;
    background:#f5f2f6!important;border:1px solid #dfd9e3!important;color:#4a404d!important;
  }
  #cartItemsList .remove-cross{width:21px;height:21px;stroke-width:2}
  body[data-page="cart"] #cartSheet #cartItemsList .item-name,
  body[data-page="cart"] #cartSheet #cartItemsList .cart-product-link {font-size:16px!important;line-height:1.22!important}
  body[data-page="cart"] #cartSheet #cartItemsList .item-unit,
  body[data-page="cart"] #cartSheet #cartItemsList .cart-unit-current {font-size:13px!important;line-height:1.3!important}
}
body[data-page] #profileSectionToggle {justify-content:space-between!important}
#profileSectionToggle .account-section-chevron {display:grid!important}
.country-code-custom{position:relative!important}
.country-code-custom select[hidden]{display:none!important}
.country-code-custom .country-code-trigger {
  position:absolute;inset:0;z-index:2;width:100%;height:100%;min-width:0;min-height:0;
  background:transparent;border:0;padding:0;margin:0;border-radius:inherit;cursor:pointer;
}
.country-code-trigger:focus-visible {outline:2px solid #6726ab;outline-offset:2px}
.country-code-options {position:fixed;z-index:12000;box-sizing:border-box;padding:4px;background:#fff;border:1px solid #ded7e3;border-radius:12px;box-shadow:0 8px 28px #25182926}
.country-code-options[hidden]{display:none!important}
.country-code-options [role="option"] {width:100%;display:flex;align-items:center;justify-content:space-between;min-height:42px;margin:0;padding:0 10px;
  font:500 14px/1.3 system-ui;color:#332b37;background:transparent;border:0;border-radius:8px;cursor:pointer}
.country-code-options [aria-selected="true"]{color:#6726ab;background:#f4edf9}
.country-code-options button:focus-visible{outline:2px solid #8846bd;outline-offset:-2px}
#favoritesGrid[data-checking-prices] .product-card :is(.product-price-block,.cart-controls){visibility:hidden!important}
.country-code-options {inset:auto;margin:0}
@media(max-width:899px){
  html body:is([data-page="account"],[data-page="orders"]) > .header {display:flex!important;z-index:2201!important}
  html body[data-page="orders"] #ordersCenter {top:var(--dcr-header-height,68px)!important;bottom:0!important}
  html body[data-page="account"] .account-scroll {padding-bottom:max(24px,env(safe-area-inset-bottom))!important}
  html body[data-page="account"] #authUserView .profile-heading {padding-inline:0!important}
}
.country-code-value {display:inline-flex;align-items:center;min-height:40px;padding:0 12px}
