/* Витрина IDIкея (макет Figma «IDIкея Web Site»): шапка, подвал, карточки. */
:root {
  --shop-lime: #bfe365;
  --shop-lime-d: #a9d044;
  --shop-ink: #2b2c2a;
  --shop-muted: #8a8c87;
  --shop-line: #ececea;
  --shop-bg: #ffffff;
  --shop-soft: #f5f5f3;
  --shop-teal: #2f8a89;
  --shop-radius: 30px;
}

body.shop-mode { background: var(--shop-bg); font-family: 'Manrope', sans-serif; color: var(--shop-ink); }

/* ---------- Шапка ---------- */
.shop-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.shop-header__in { max-width: 1280px; margin: 0 auto; padding: 8px 32px 12px; }
.shop-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 11px; color: var(--shop-muted); margin-bottom: 8px; }
.shop-top a { color: var(--shop-muted); text-decoration: none; }
.shop-top a:hover { color: var(--shop-ink); }
.shop-top__city { display: inline-flex; align-items: center; gap: 4px; }
.shop-top__links { display: flex; gap: 14px; flex-wrap: wrap; }
.shop-bar { display: flex; align-items: center; gap: 12px; }
.shop-logo { flex: none; display: block; }
.shop-logo img { height: 50px; display: block; }
.shop-bar { position: relative; }
.shop-catalog { position: static; flex: none; }
.shop-btn-lime { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 26px; border: 0; border-radius: var(--shop-radius); background: var(--shop-lime); color: var(--shop-ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; }
.shop-btn-lime:hover { background: var(--shop-lime-d); color: var(--shop-ink); }
.shop-search { flex: 1 1 auto; display: flex; align-items: stretch; height: 50px; border: 2px solid var(--shop-lime); border-radius: var(--shop-radius); overflow: hidden; background: #fff; min-width: 0; }
.shop-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; padding: 0 16px; font: inherit; font-size: 14px; color: var(--shop-ink); background: transparent; }
.shop-search input::placeholder { color: #a6a8a3; font-size: 12px; }
.shop-search button { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 0 24px; background: var(--shop-lime); color: var(--shop-ink); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; border-radius: var(--shop-radius); }
.shop-search button:hover { background: var(--shop-lime-d); }
.shop-icons { flex: none; display: flex; align-items: center; height: 50px; padding: 0 14px; border: 2px solid var(--shop-lime); border-radius: var(--shop-radius); background: #fff; }
.shop-icons > * + * { border-left: 1px solid #d9dbd5; }
.shop-icon { position: relative; display: inline-flex; align-items: center; gap: 2px; padding: 0 11px; height: 22px; color: var(--shop-ink); text-decoration: none; background: none; border-top: 0; border-right: 0; border-bottom: 0; font: inherit; cursor: pointer; }
.shop-icon svg { width: 20px; height: 20px; display: block; }
button.shop-icon { border: 0; }
.shop-icon:hover { color: var(--shop-teal); }
.shop-icon__badge { position: absolute; top: -9px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--shop-teal); color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; }
.shop-icon__dot { position: absolute; top: -3px; right: 22px; width: 8px; height: 8px; border-radius: 50%; background: #e2574c; }

/* Меню профиля */
.shop-user { position: relative; }
.shop-user__menu { position: absolute; right: -16px; top: calc(100% + 18px); min-width: 196px; padding: 8px; background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.12); display: none; }
.shop-user__menu::before { content: ''; position: absolute; left: 0; right: 0; top: -20px; height: 20px; }
.shop-user:hover .shop-user__menu, .shop-user:focus-within .shop-user__menu { display: block; }
.shop-user__menu a, .shop-user__menu button { display: block; width: 100%; text-align: left; padding: 10px 16px; border: 0; border-radius: 10px; background: none; color: var(--shop-ink); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.shop-user__menu a:hover, .shop-user__menu button:hover { background: var(--shop-soft); }
.shop-user__name { padding: 8px 16px 10px; font-size: 13px; color: var(--shop-muted); border-bottom: 1px solid var(--shop-line); margin-bottom: 6px; }

/* Каталог — выпадающее дерево */
.shop-mega { position: absolute; left: 0; right: 0; top: calc(100% + 12px); display: none; background: #fff; border-radius: 22px; box-shadow: 0 16px 50px rgba(0,0,0,.14); overflow: hidden; }
.shop-mega::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.shop-catalog.open .shop-mega { display: grid; grid-template-columns: 280px 1fr; }
.shop-mega__l1 { background: var(--shop-soft); padding: 14px 10px; max-height: 70vh; overflow: auto; }
.shop-mega__l1 a { display: block; padding: 10px 14px; border-radius: 12px; font-size: 14px; color: var(--shop-ink); text-decoration: none; }
.shop-mega__l1 a.on, .shop-mega__l1 a:hover { background: #fff; font-weight: 600; }
.shop-mega__panes { padding: 22px 28px; max-height: 70vh; overflow: auto; }
.shop-mega__pane { display: none; }
.shop-mega__cols { columns: 3 200px; column-gap: 28px; }
.shop-mega__pane.on { display: block; }
.shop-mega__group { break-inside: avoid; margin-bottom: 18px; }
.shop-mega__group > a { display: block; font-weight: 700; font-size: 14px; color: var(--shop-ink); text-decoration: none; margin-bottom: 6px; }
.shop-mega__group ul { list-style: none; margin: 0; padding: 0; }
.shop-mega__group li a { display: block; padding: 3px 0; font-size: 13px; color: #55574f; text-decoration: none; }
.shop-mega__group a:hover { color: var(--shop-teal); }
.shop-mega__all { display: inline-block; margin-bottom: 14px; font-weight: 700; font-size: 18px; color: var(--shop-ink); text-decoration: none; }

/* ---------- Подвал ---------- */
.shop-footer { background: var(--shop-soft); margin-top: 60px; }
.shop-footer__in { max-width: 1280px; margin: 0 auto; padding: 40px 32px 24px; }
.shop-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.shop-footer__brand { font-size: 26px; font-weight: 700; line-height: 1.2; }
.shop-footer__brand small { display: block; margin-top: 28px; font-size: 12px; font-weight: 400; color: var(--shop-muted); }
.shop-footer h4 { margin: 0 0 12px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.shop-footer ul { list-style: none; margin: 0; padding: 0; }
.shop-footer li { margin-bottom: 7px; }
.shop-footer a { color: var(--shop-ink); text-decoration: none; font-size: 14px; }
.shop-footer a:hover { color: var(--shop-teal); }
.shop-footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; padding-top: 16px; border-top: 1px solid #e3e3df; font-size: 12px; color: var(--shop-muted); }
.shop-footer__partners { display: flex; align-items: center; gap: 16px; }
.shop-footer__partners b { color: var(--shop-ink); font-weight: 700; }

/* ---------- Карточка товара ---------- */
.shop-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.shop-cards--row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 14px; }
.shop-cards--row .shop-card { flex: 0 0 195px; scroll-snap-align: start; }
.shop-card { position: relative; display: flex; flex-direction: column; padding: 6px; border-radius: 18px; background: #fff; color: var(--shop-ink); text-decoration: none; transition: box-shadow .15s; }
.shop-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.10); }
.shop-card__media { position: relative; }
.shop-card__img { display: block; aspect-ratio: 1 / 1.1; border-radius: 14px; background: var(--shop-soft); overflow: hidden; }
.shop-card__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shop-card__fav, .shop-card__cart { position: absolute; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #fff; color: var(--shop-ink); cursor: pointer; padding: 0; }
.shop-card__fav { top: 8px; right: 8px; background: transparent; }
.shop-card__fav svg, .shop-card__cart svg { width: 18px; height: 18px; }
.shop-card__fav.on svg { fill: #e2574c; stroke: #e2574c; }
.shop-card__cart { bottom: 8px; right: 8px; }
.shop-card__cart:hover, .shop-card__cart.added { background: var(--shop-lime); }
.shop-card a, .shop-card a:hover, .shop-card a:visited { color: var(--shop-ink); text-decoration: none; }
.shop-card__body { padding: 10px 6px 4px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.shop-card__brand { font-size: 12px; color: var(--shop-muted) !important; }
.shop-card__name { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; }
.shop-card__rating { font-size: 12px; color: var(--shop-ink); display: flex; align-items: center; gap: 4px; }
.shop-card__rating span { color: var(--shop-muted); }
.shop-card__price { margin-top: auto; font-size: 14px; font-weight: 800; }
.shop-card__price s { font-size: 12px; font-weight: 400; color: #b0b2ad; margin-left: 6px; }
.shop-badge { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 6px; background: var(--shop-lime); font-size: 11px; font-weight: 700; }

/* ---------- Общая обёртка контента витрины ---------- */
body.shop-mode .t-wrapper, body.shop-mode .t-main { display: block; }
body.shop-mode .t-container { max-width: 1280px; margin: 0 auto; padding: 0 32px; width: auto; }
body.shop-mode .t-main { padding: 0; margin: 0; }
.shop-section-h { text-align: center; margin: 56px 0 6px; font-size: 28px; font-weight: 700; }
.shop-section-sub { text-align: center; margin: 0 0 22px; font-size: 14px; color: #55574f; }

@media (max-width: 1100px) {
  .shop-top__links { display: none; }
  .shop-btn-lime { padding: 0 18px; }
}
@media (max-width: 760px) {
  .shop-header__in { padding: 8px 14px 10px; }
  .shop-bar { flex-wrap: wrap; gap: 8px; }
  .shop-logo img { height: 40px; }
  .shop-btn-lime, .shop-search, .shop-icons { height: 44px; }
  .shop-btn-lime span { display: none; }
  .shop-icons { margin-left: auto; padding: 0 6px; }
  .shop-icon { padding: 0 8px; }
  .shop-search { order: 5; flex-basis: 100%; }
  .shop-search button span { display: none; }
  .shop-catalog.open .shop-mega { grid-template-columns: 1fr; }
  .shop-mega__panes { display: none; }
  .shop-footer__grid { grid-template-columns: 1fr 1fr; }
  body.shop-mode .t-container { padding: 0 14px; }
}

/* ---------- Детальная страница товара (макет «Detailed page») ---------- */
body.shop-mode .product-detail { color: var(--shop-ink); }
body.shop-mode .product-detail__buy { background: #fff; border: 1px solid var(--shop-line); border-radius: 22px; padding: 22px 24px; box-shadow: 0 8px 30px rgba(0,0,0,.05); }
body.shop-mode .product-detail__ids { font-size: 12px; color: var(--shop-muted); }
body.shop-mode .product-detail__title { font-size: 24px; line-height: 1.25; font-weight: 700; margin: 6px 0 8px; }
body.shop-mode .product-detail__rating { font-size: 14px; }
body.shop-mode .product-detail__rating a { color: var(--shop-muted); }
body.shop-mode .product-detail__stars { color: #f5b82e; }
body.shop-mode .product-detail__price { font-size: 30px; font-weight: 800; margin: 14px 0 16px; }
body.shop-mode .product-detail__actions { display: flex; align-items: center; gap: 10px; }
body.shop-mode .product-detail__actions .buy,
body.shop-mode .product-detail__actions button[type=submit] { background: var(--shop-lime) !important; color: var(--shop-ink) !important; border: 0 !important; border-radius: 26px !important; height: 52px; font-weight: 700; }
body.shop-mode .product-detail__actions .buy:hover { background: var(--shop-lime-d) !important; }
body.shop-mode .product-detail__actions .plus, body.shop-mode .product-detail__actions .minus { background: var(--shop-soft) !important; color: var(--shop-ink) !important; border-radius: 50% !important; }
body.shop-mode .product-detail__fav { width: 52px; height: 52px; flex: none; border-radius: 50%; border: 2px solid var(--shop-lime); background: #fff; color: var(--shop-ink); font-size: 22px; cursor: pointer; }
body.shop-mode .product-detail__fav.on { color: #e2574c; }
body.shop-mode .product-detail__delivery { margin-top: 14px; font-size: 13px; color: var(--shop-muted); }
body.shop-mode .product-detail__props dt { color: var(--shop-muted); }
body.shop-mode .product-detail a:not(.shop-card__img):not(.shop-card__body) { color: var(--shop-ink); text-decoration: underline; text-decoration-color: var(--shop-lime); text-decoration-thickness: 2px; text-underline-offset: 3px; }
body.shop-mode .product-detail__all-chars { font-weight: 600; }
body.shop-mode .product-detail__section h2 { font-size: 22px; font-weight: 700; border-bottom: 0 !important; }
body.shop-mode .product-detail__chars dt, body.shop-mode .product-detail__chars dd { border-bottom: 1px dotted #d9dbd5 !important; }
body.shop-mode .product-detail__review-submit { background: var(--shop-lime); color: var(--shop-ink); border: 0; border-radius: 22px; padding: 11px 22px; font-weight: 700; cursor: pointer; }
body.shop-mode .product-detail__rate-star.is-on { color: #f5b82e; }
body.shop-mode .product-detail__thumbs-col img { border-radius: 12px; background: var(--shop-soft); }
body.shop-mode .product-detail__main-img { border-radius: 18px; background: var(--shop-soft); }
body.shop-mode .catalog-product__breadcrumb-block a { color: var(--shop-muted); }
body.shop-mode .product-detail__actions .brics-productpurchase { border: 0 !important; background: none !important; box-shadow: none !important; outline: 0 !important; }
body.shop-mode .product-detail__actions .brics-productpurchase > * { border: 0; }
