/* Одна кликабельная карточка на главной, в каталоге и рекомендациях. */
.product { position: relative; border-radius: 16px; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.product:hover, .product:focus-within { border-color: #8dc1ef; box-shadow: 0 7px 18px rgba(12, 66, 116, .08); }
.product-link { color: inherit; text-decoration: none; }
.product-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.product-link:focus-visible { outline: none; }
.product:has(.product-link:focus-visible) { outline: 2px solid var(--blue); outline-offset: 3px; }
.product .add { position: relative; z-index: 2; }
.product .add.added, .primary.added { background: #198956; }
.product-visual { justify-content: center; }
.product-foot { gap: 8px; flex-wrap: wrap; }
.product-foot .price { white-space: nowrap; }
.product .add:focus-visible, .favorite-button:focus-visible, .quantity-control button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.favorite-button { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border: 1px solid #d4e0e9; border-radius: 50%; color: #496781; background: white; cursor: pointer; transition: color .2s, background-color .2s, transform .2s; }
.favorite-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.favorite-button:hover { color: var(--blue); transform: translateY(-2px); }
.favorite-button[aria-pressed="true"] { color: var(--blue); background: #eaf3ff; border-color: #a7cef5; }
.favorite-button[aria-pressed="true"] svg { fill: currentColor; }

/* Общая корзина: состояние сохраняется при переходе между страницами. */
.shop-panel-open { overflow: hidden; }
.cart-drawer { height: 100dvh; visibility: hidden; }
.cart-drawer.open { visibility: visible; }
.cart-items { min-height: 0; overflow-y: auto; }
.cart-product { flex: 1; }
.cart-product a { display: block; color: var(--ink); font-weight: 700; text-decoration: none; }
.cart-product a:hover { color: var(--blue); }
.cart-product .cart-quantity { color: #617a90; margin-top: 5px; font: 11px Manrope, Arial, sans-serif; }
.cart-remove { align-self: flex-start; border: 0; background: none; color: #738ba0; padding: 4px; font-size: 21px; cursor: pointer; }
.cart-remove:hover { color: #b33344; }
.cart-toast { border-radius: 12px; }
.cart-toast:not(.show) { visibility: hidden; }
.cart-toast small { max-width: 180px; }
.checkout-note { grid-column: 1 / -1; color: #657b91; font-size: 12px; line-height: 1.6; margin: 0; }
.drawer-total .checkout { border-radius: 8px; }
.drawer-total .checkout:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.quantity-control { display: flex; align-items: center; height: 52px; border: 1px solid #d8e3ed; border-radius: 9px; background: white; }
.quantity-control button { width: 36px; height: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); font: 22px Manrope, Arial, sans-serif; cursor: pointer; }
.quantity-control button:disabled { opacity: .3; cursor: default; }
.quantity-control input { width: 40px; min-width: 0; padding: 0; border: 0; color: var(--ink); text-align: center; font: 700 14px Manrope, Arial, sans-serif; appearance: textfield; -moz-appearance: textfield; }
.quantity-control input::-webkit-inner-spin-button, .quantity-control input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
@media (max-width: 520px) {
  .cart-toast { top: 12px; right: 12px; width: calc(100% - 24px); grid-template-columns: 30px minmax(0, 1fr); }
  .cart-toast button { grid-column: 2; justify-self: start; padding: 0; }
  .cart-toast small { max-width: 100%; }
  .cart-drawer { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .product, .favorite-button, .cart-drawer, .cart-toast { transition: none; }
}
