/* Магазин Аймед — поверх css/style.css, те же токены :root */

.shop-cart-link{ position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 10px; background: var(--color-primary-light); color: var(--color-primary-dark);
  margin-left: auto; margin-right: -14px; }
.shop-cart-count{ position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--color-accent); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; }
.shop-cart-count[hidden], .shop-toast[hidden], .shop-card[hidden]{ display: none; }

.shop-crumbs{ font-size: 13.5px; color: var(--color-text-muted); margin-bottom: 14px; }
.shop-crumbs a{ color: var(--color-primary); }
.shop-narrow{ max-width: 820px; }
.shop-section{ padding-top: 36px; }

.shop-trust{ display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 28px; }
.shop-trust-wrap{ margin-top: 36px; }
.shop-trust div{ background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-m);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.shop-trust strong{ color: var(--color-primary-dark); font-size: 15px; }
.shop-trust span{ color: var(--color-text-muted); font-size: 13.5px; line-height: 1.45; }

.shop-search{ display: flex; gap: 8px; max-width: 680px; margin-top: 18px; }
.shop-search input{ flex: 1; min-width: 0; padding: 13px 18px; border: 1.5px solid var(--color-border); border-radius: 999px;
  font: 16px var(--font-body); background: var(--color-surface); color: var(--color-text); }
.shop-search input:focus{ outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.shop-search .btn{ padding: 12px 22px; }
.shop-product .shop-search{ margin: 0 0 18px; }
.shop-quick{ display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.shop-quick button{ border: 0; background: var(--color-surface); color: var(--color-primary-dark); padding: 6px 12px;
  border-radius: 999px; font: 600 13px var(--font-body); cursor: pointer; box-shadow: 0 1px 4px rgba(7,94,94,.08); }
.shop-search-result{ background: var(--color-primary-light); border-radius: var(--radius-m); padding: 12px 16px; margin-bottom: 16px; font-size: 14.5px; }
.shop-search-result p{ margin: 0; }
.shop-search-result a{ color: var(--color-primary-dark); font-weight: 700; text-decoration: underline; margin-right: 10px; }
.shop-search-result button{ border: 0; background: none; color: var(--color-accent-dark); font: 600 14px var(--font-body); cursor: pointer; text-decoration: underline; }
.shop-search-result[hidden]{ display: none; }
.shop-chips{ display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px; scrollbar-width: none; }
.shop-chips::-webkit-scrollbar{ display: none; }
.shop-chip{ flex: 0 0 auto; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text);
  padding: 9px 16px; border-radius: 999px; font: 600 14px var(--font-body); cursor: pointer; }
.shop-chip.is-active{ background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.shop-grid{ display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.shop-grid--small{ grid-template-columns: repeat(4,1fr); }
.shop-card{ background: var(--color-surface); border-radius: var(--radius-m); box-shadow: var(--shadow-card);
  padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 10px; position: relative; transition: box-shadow .2s; }
.shop-card:hover{ box-shadow: var(--shadow-card-hover); }
.shop-card[hidden]{ display: none; }
.shop-card-link{ display: flex; flex-direction: column; gap: 4px; flex: 1; }
.shop-card-price{ font-size: 19px; font-weight: 800; color: var(--color-text); margin-top: 6px; }
.shop-card-name{ font-size: 14.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden; }
.shop-card-volume{ font-size: 13px; color: var(--color-text-muted); }
.shop-card-short{ font-size: 13px; color: var(--color-text-muted); line-height: 1.4; }
.shop-card .btn{ padding: 11px 16px; font-size: 14.5px; }

.shop-img{ width: 100%; aspect-ratio: 1/1; object-fit: contain; background: #fff; border-radius: var(--radius-m); }
.shop-img--placeholder{ display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: linear-gradient(160deg, var(--color-primary-light), var(--color-bg-alt)); color: var(--color-primary-dark);
  text-align: center; padding: 12px; }
.shop-img--placeholder span{ font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.shop-img--placeholder small{ font-size: 12px; color: var(--color-text-muted); }
.shop-img--large .shop-img--placeholder span, .shop-img--large span{ font-size: 28px; }

.shop-badge{ position: absolute; top: 20px; left: 20px; font-size: 11.5px; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; background: rgba(255,255,255,.92); color: var(--color-primary-dark); }
.shop-info .shop-badge{ position: static; display: inline-block; background: var(--color-primary-light); margin-bottom: 10px; }
.shop-badge--bad{ color: var(--color-accent-dark); }
.shop-soon{ display: block; text-align: center; padding: 11px; border-radius: 999px; background: var(--color-bg-alt);
  color: var(--color-text-muted); font-weight: 600; font-size: 14px; }
.shop-empty{ color: var(--color-text-muted); padding: 24px 0; }

/* product page */
.shop-product{ padding-top: 28px; }
.shop-product-grid{ display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr) 300px; gap: 28px; align-items: start; }
.shop-info h1{ font-size: 28px; }
.shop-lead{ color: var(--color-text-muted); font-size: 16.5px; }
.shop-specs{ width: 100%; border-collapse: collapse; font-size: 14.5px; margin-top: 8px; }
.shop-specs th{ text-align: left; font-weight: 500; color: var(--color-text-muted); padding: 7px 12px 7px 0; width: 42%;
  vertical-align: top; border-bottom: 1px dashed var(--color-border); }
.shop-specs td{ padding: 7px 0; border-bottom: 1px dashed var(--color-border); }

.shop-buybox{ background: var(--color-surface); border-radius: var(--radius-m); box-shadow: var(--shadow-card);
  padding: 20px; position: sticky; top: 90px; }
.shop-buy-price{ font-size: 30px; font-weight: 800; }
.shop-buy-volume{ color: var(--color-text-muted); margin: 0 0 14px; }
.shop-delivery{ margin: 16px 0 0; font-size: 13.5px; color: var(--color-text-muted); display: flex; flex-direction: column; gap: 8px; }
.shop-delivery strong{ color: var(--color-text); }
.shop-legal{ font-size: 12.5px; color: var(--color-text-muted); margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--color-border); }

.shop-details h2{ font-size: 22px; margin-top: 32px; }
.shop-howto{ padding-left: 22px; line-height: 1.7; }
.shop-doctor{ display: flex; gap: 18px; align-items: flex-start; background: var(--color-primary-light);
  border-radius: var(--radius-m); padding: 18px; }
.shop-doctor img{ width: 96px; height: 128px; object-fit: cover; object-position: center top; border-radius: var(--radius-m); flex: 0 0 auto; }
.shop-reading{ padding-left: 20px; list-style: disc; line-height: 1.8; }
.shop-reading a{ color: var(--color-primary); text-decoration: underline; }
.shop-sections{ display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 32px; }
.shop-sections h2{ flex-basis: 100%; font-size: 20px; margin-bottom: 4px; }
.shop-sections a{ padding: 8px 14px; border-radius: 999px; background: var(--color-primary-light); color: var(--color-primary-dark);
  font-size: 14px; font-weight: 600; }
.shop-details .accordion{ margin-top: 8px; }
.shop-doctor p{ margin: 4px 0 6px; }

.shop-sticky-buy{ display: none; }

/* cart */
.shop-cart-layout{ display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 28px; align-items: start; }
.shop-cart-item{ display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; background: var(--color-surface);
  border-radius: var(--radius-m); box-shadow: var(--shadow-card); padding: 14px 16px; margin-bottom: 12px; }
.shop-cart-item a{ font-weight: 600; }
.shop-cart-item small{ display: block; color: var(--color-text-muted); }
.shop-qty{ display: inline-flex; align-items: center; border: 1px solid var(--color-border); border-radius: 999px; }
.shop-qty button{ width: 34px; height: 34px; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--color-primary-dark); }
.shop-qty span{ min-width: 24px; text-align: center; font-weight: 700; }
.shop-cart-sum{ font-weight: 800; white-space: nowrap; }
.shop-sum-row{ display: flex; justify-content: space-between; font-size: 17px; }
.shop-free-delivery{ font-size: 13.5px; color: var(--color-primary-dark); background: var(--color-primary-light);
  padding: 8px 12px; border-radius: var(--radius-s); }
.shop-checkout{ display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.shop-checkout h2{ font-size: 20px; margin: 0; }
.shop-checkout label{ display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.shop-checkout input[type=text], .shop-checkout input:not([type]), .shop-checkout input[type=tel]{
  padding: 11px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-s); font: 16px var(--font-body); }
.shop-checkout fieldset{ border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.shop-checkout legend{ font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.shop-checkout .shop-radio, .shop-checkout .shop-consent{ flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
.shop-consent span{ font-size: 13px; color: var(--color-text-muted); }
.shop-consent a{ color: var(--color-primary); text-decoration: underline; }
.shop-checkout-result{ font-size: 14px; background: var(--color-bg-alt); border-radius: var(--radius-s); padding: 12px; }
.shop-checkout-result a{ color: var(--color-primary); font-weight: 700; text-decoration: underline; }

.shop-toast{ position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); background: var(--color-primary-dark);
  color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14.5px; z-index: 60; box-shadow: var(--shadow-card-hover); }
.shop-toast a{ color: #fff; font-weight: 700; text-decoration: underline; margin-left: 8px; }

@media (max-width: 1000px){
  .shop-grid, .shop-grid--small{ grid-template-columns: repeat(3,1fr); }
  .shop-trust{ grid-template-columns: repeat(2,1fr); }
  .shop-product-grid{ grid-template-columns: 1fr 1fr; }
  .shop-buybox{ grid-column: 1 / -1; position: static; }
  .shop-cart-layout{ grid-template-columns: 1fr; }
}
@media (max-width: 640px){
  .shop-grid, .shop-grid--small{ grid-template-columns: repeat(2,1fr); gap: 12px; }
  .shop-trust{ grid-template-columns: 1fr; gap: 8px; }
  .shop-product-grid{ grid-template-columns: 1fr; gap: 18px; }
  .shop-product .shop-buybox{ display: none; }
  .shop-info h1{ font-size: 22px; }
  .shop-card{ padding: 8px 8px 10px; }
  .shop-badge{ top: 14px; left: 14px; }
  .shop-sticky-buy{ display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; gap: 12px; align-items: center;
    justify-content: space-between; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--color-surface); box-shadow: 0 -4px 20px rgba(7,94,94,.12); }
  .shop-sticky-buy div{ display: flex; flex-direction: column; min-width: 0; }
  .shop-sticky-buy span{ font-size: 12.5px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .shop-sticky-buy .btn{ flex: 0 0 auto; padding: 12px 20px; }
  .shop-product ~ .floating-contact, body.shop-page:has(.shop-sticky-buy) .floating-contact{ bottom: 84px; }
  .shop-cart-item{ grid-template-columns: 1fr auto; }
  .shop-cart-sum{ grid-column: 2; }
}
