/* IKD_RETAIL_EDITORIAL_V1 -- scoped presentation only, no order, payment or admin overrides. */
:root { --ikd-green:#173f35; --ikd-frost:#f7f3ee; --ikd-border:#e8dfd5; }

/* Product photography: retain the original image in full, especially wide packshots. */
.product-grid > .product-card, .popular-grid > .product-card,
.promo-grid > .product-card {min-width:0;}
.product-card > .product-photo {
  aspect-ratio: 4/3 !important;
  background:linear-gradient(150deg,#faf8f4,#f0ebe4) !important;
  isolation:isolate;
}
.product-card > .product-photo > img {
  object-fit:contain !important;
  object-position:center center !important;
  max-width:100% !important;
  max-height:100% !important;
  width:auto !important;
  height:auto !important;
  clip-path:none !important;
  transform:none !important;
}
.product-card .product-title,
.product-card .product-title a {
  overflow-wrap:break-word;
  word-break:normal;
}
.product-card {transition:box-shadow .18s ease,border-color .18s ease;}
@media (hover:hover) {
 .product-card:hover {border-color:#dbcec0;box-shadow:0 14px 32px rgba(29,45,35,.085);}
}

/* Sections: coherent cards with stable line wrapping at all viewport widths. */
.section .category-strip {
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:14px !important;
  align-items:stretch !important;
  overflow:visible !important;
  padding:4px 0 6px !important;
}
.section .category-tile {
  display:flex !important;
  align-items:center !important;
  flex:none !important;
  gap:13px !important;
  min-width:0 !important;
  min-height:112px !important;
  width:100% !important;
  padding:12px !important;
  border-radius:19px !important;
  box-shadow:0 6px 20px rgba(28,39,31,.035) !important;
  transition:transform .17s ease,box-shadow .17s ease,border-color .17s ease;
}
.section .category-tile > img {
  flex:0 0 78px !important;
  width:78px !important;
  height:78px !important;
  min-width:78px !important;
  min-height:78px !important;
  max-width:78px !important;
  max-height:78px !important;
  object-fit:contain !important;
  background:var(--ikd-frost) !important;
  border-radius:13px !important;
}
.section .category-tile > div {flex:1 1 auto;min-width:0;max-width:100%;}
.section .category-tile strong {
  display:block;
  font-size:clamp(14px,1.1vw,17px);
  font-weight:850;
  line-height:1.26;
  letter-spacing:-.012em;
  overflow-wrap:anywhere;
  hyphens:auto;
}
.section .category-tile small {display:block;margin-top:5px;font-size:12px;line-height:1.25;}
@media (hover:hover) {
 .section .category-tile:hover {transform:translateY(-2px);box-shadow:0 12px 26px rgba(27,53,43,.09) !important;}
}
.section .category-tile:focus-visible {outline:3px solid #175b44;outline-offset:3px;}
.section-head h2 {text-wrap:balance;line-height:1.08;}
.section-head p {line-height:1.5;}
.ikd-uds-card h2, .ikd-uds-description {overflow-wrap:break-word;}
.ikd-uds-card {min-width:0;}

/* Cart: no redundant status sentences, keep meaningful error messages. */
.ikd-cart-actions-v1 {gap:8px;}
.ikd-cart-actions-v1 button {font-size:12px;font-weight:750;}
.ikd-cart-action-status:empty {display:none !important;}

/* Accessible, restrained return-to-top control instead of the oversized orange arrow. */
#ikd-back-to-top {
  width:auto !important;
  height:42px !important;
  padding:0 16px !important;
  border:1px solid rgba(255,255,255,.14) !important;
  border-radius:999px !important;
  background:var(--ikd-green) !important;
  color:#fff !important;
  font-size:0 !important;
  font-weight:750 !important;
  letter-spacing:.008em;
  box-shadow:0 9px 27px rgba(19,46,38,.18) !important;
  gap:7px;
}
#ikd-back-to-top::before {content:'Наверх';font-size:13px;line-height:1;}
#ikd-back-to-top::after {content:'↑';font-size:14px;line-height:1;font-weight:600;opacity:.77;}
#ikd-back-to-top:hover {background:#285c48 !important;}
#ikd-back-to-top:focus-visible {outline:3px solid #f47a20 !important;outline-offset:3px;}

@media(max-width:1200px) {
  .section .category-strip {grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
}
@media(max-width:900px) {
  .section .category-strip {grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:11px !important;}
  .section .category-tile {min-height:102px !important;}
}
@media(max-width:620px) {
  .section .category-strip {grid-template-columns:1fr !important;gap:9px !important;}
  .section .category-tile {min-height:86px !important;gap:12px !important;padding:9px 12px !important;}
  .section .category-tile > img {flex-basis:66px !important;width:66px !important;height:66px !important;min-width:66px !important;min-height:66px !important;max-width:66px !important;max-height:66px !important;}
  .section .category-tile strong {font-size:15px;overflow-wrap:break-word;}
  .product-card > .product-photo {aspect-ratio:1/1 !important;}
  #ikd-back-to-top {right:13px !important;bottom:72px !important;height:40px !important;padding:0 13px !important;}
}
@media(prefers-reduced-motion:reduce){
 .section .category-tile,.product-card {transition:none !important;}
}
