/* Eco shop chrome: header, catalogue menu, search, phone drawer, footer,
   product cards, carousels, photo slots and the cart pop-up. */

.only-phone { display: none !important; }
@media (max-width: 760px) {
  .only-desk { display: none !important; }
  .only-phone { display: inline-grid !important; }
}

/* Wordmark */
.wm { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.wm:hover { color: var(--muted); }
.wm-icon { width: 58px; height: 44px; color: var(--accent); }
.wm-text { font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1; text-transform: uppercase; white-space: nowrap; }

/* Header */
.hdr { background: var(--surface-2); position: relative; z-index: 30; }
.hdr-in { height: var(--header-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-4); }
.hdr-start { display: flex; align-items: center; gap: var(--space-1); }
.hdr-end { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-1); }
.hdr-end .icon-btn + .icon-btn { margin-left: 4px; }
.catmenu { position: relative; }
.cat-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-fg); font-weight: 700; font-size: var(--text-base); cursor: pointer;
}
.cat-btn:hover { background: var(--accent-hover); }
.cat-btn svg:first-child { width: 16px; height: 16px; }
.cat-btn svg:last-child { width: 16px; height: 16px; stroke-width: 2.2; transition: transform .15s; }
.cat-btn[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }
.cat-list {
  position: absolute; top: 100%; left: 0; width: 211px; margin: 0; padding: 0; list-style: none;
  background: var(--surface); box-shadow: var(--shadow-menu); z-index: 40;
}
.cat-list a { display: block; padding: 8px 16px; line-height: 18px; color: var(--fg); }
.cat-list a:hover, .cat-list a[aria-current] { color: var(--accent-ink); background: var(--accent-soft); }
.lang { position: relative; margin-left: 6px; }
.lang-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--muted); cursor: pointer; line-height: 28px; }
.lang-btn svg { width: 14px; height: 14px; }
.lang-drop { position: absolute; right: 0; top: 100%; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: 8px 0; min-width: 56px; }
.lang-drop a { display: block; padding: 8px 16px; }
.search-bar { background: var(--surface-2); border-top: var(--border-width) solid var(--line-soft); }
.search-in { display: flex; gap: var(--space-2); align-items: center; padding-top: var(--space-3); padding-bottom: var(--space-3); }
.search-in .field { flex: 1; min-width: 0; }

@media (max-width: 760px) {
  .hdr-in { height: var(--header-h-phone); gap: var(--space-2); }
  .hdr-start .icon-btn, .hdr-end .icon-btn { color: var(--accent); }
  .hdr-wm .wm-icon { width: 34px; height: 26px; }
  .hdr-wm { gap: 6px; }
  .hdr-wm .wm-text { font-size: 24px; }
}
@media (max-width: 360px) { .hdr-wm .wm-text { font-size: 20px; } }

/* Phone drawer */
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 62; width: min(320px, 86vw); overflow: auto;
  background: var(--surface); box-shadow: var(--shadow-pop);
  padding: max(var(--space-4), env(safe-area-inset-top)) var(--space-4) max(var(--space-4), env(safe-area-inset-bottom)) max(var(--space-4), env(safe-area-inset-left));
}
.drawer ~ .scrim, #drawerScrim { z-index: 61; }
.drawer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-4); }
.drawer-top .wm-icon { width: 34px; height: 26px; }
.drawer-top .wm-text { font-size: 24px; }
.drawer-h { font-weight: 700; font-size: var(--text-base); margin: var(--space-2) 0; }
.drawer-list { list-style: none; margin: 0 0 var(--space-4); padding: 0; border-top: var(--border-width) solid var(--line-soft); }
.drawer-list a { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: var(--border-width) solid var(--line-soft); font-size: var(--text-base); }
.drawer-list a[aria-current] { color: var(--accent-ink); }
.badge-in { color: var(--accent-ink); font-weight: 700; }
.drawer-theme { display: flex; align-items: center; gap: var(--space-2); border: var(--border-width) solid var(--line); border-radius: var(--radius); background: none; padding: 8px 12px; cursor: pointer; width: 100%; }
.drawer-theme svg { width: 20px; height: 20px; }
.drawer-lang { margin-top: var(--space-4); color: var(--muted); display: flex; gap: var(--space-4); }

/* Sections */
.band { background: var(--surface-2); }
.sec { padding: var(--space-7) 0; }
.sec-h { font-size: var(--text-xl); font-weight: 700; margin-bottom: var(--space-5); }

/* Photo slot: a soft tinted panel with the name, sized like the photo it waits for */
.photo-slot {
  display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; padding: var(--space-4);
  width: 100%; height: 100%; min-height: 120px;
  background: radial-gradient(circle at 50% 40%, var(--slot-bg-2), var(--slot-bg) 70%); color: var(--slot-ink);
}
.photo-slot svg { width: 34px; height: 34px; opacity: .8; }
.slot-name { font-size: var(--text-base); line-height: 1.25; max-width: 22ch; }
.slot-cat { font-size: var(--text-xs); color: var(--muted); }

/* Product card: centred like the demo; on hover it lifts and shows quantity, buy and favourites */
.pcard { position: relative; height: 100%; }
.pcard-box { position: relative; height: 100%; display: flex; flex-direction: column; background: var(--surface); border: var(--border-width) solid transparent; border-radius: var(--radius); }
.pcard-photo { position: relative; display: block; margin: 15px 15px 15px; height: 300px; }
.pcard-photo img, .pcard-photo .photo-slot { width: 100%; height: 100%; object-fit: contain; border-radius: var(--radius-sm); }
.pcard-info { padding: 0 15px 15px; text-align: center; display: grid; gap: 8px; flex: 1; align-content: start; }
.pcard-name { font-size: var(--text-lg); font-weight: 400; line-height: 1.3; min-height: 2.6em; display: grid; place-items: center; }
.pcard-price .price { font-size: var(--text-lg); }
.pcard-more { display: grid; gap: 14px; justify-items: center; padding: 0 15px 15px; }
.pcard-buy { display: flex; gap: 15px; justify-content: center; align-items: center; }
.pcard-out { color: var(--muted); }
.fav-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; font-size: var(--text-sm); color: var(--ink); padding: 0; }
.fav-ic { width: 22px; height: 22px; display: grid; place-items: center; }
.fav-ic svg { width: 22px; height: 22px; }
.fav-btn.on .fav-ic { color: var(--sale); }
.fav-btn.on .fav-ic svg path { fill: currentColor; }
@media (hover: hover) and (min-width: 761px) {
  .pcard-more { position: absolute; top: 100%; left: -1px; right: -1px; background: var(--surface); border: var(--border-width) solid var(--accent); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-card); visibility: hidden; opacity: 0; }
  .pcard:hover, .pcard:focus-within { z-index: 5; }
  .pcard:hover .pcard-box, .pcard:focus-within .pcard-box { border-color: var(--accent); border-bottom-color: transparent; border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow-card); }
  .pcard:hover .pcard-more, .pcard:focus-within .pcard-more { visibility: visible; opacity: 1; }
}
@media (max-width: 760px) {
  .pcard-photo { margin: 12px; height: 150px; }
  .pcard-info { padding: 0 12px 10px; text-align: left; justify-items: start; }
  .pcard-name { font-size: var(--text-md); min-height: 2.6em; place-items: start; }
  .pcard-price .price { font-size: var(--text-md); }
  .pcard-more { justify-items: start; padding: 0 12px 14px; }
  .pcard-buy .counter { display: none; }
  .pcard-buy .btn { height: 36px; font-size: var(--text-base); }
  .stickers { top: 10px; left: 10px; }
  .pcard-photo .photo-slot { padding-top: 48px; }
  .pcard-photo .slot-cat { display: none; }
  .sticker { font-size: 9px; padding: 4px 9px 4px 7px; }
}

/* Grid of cards with shared hairlines, as in the demo listing */
.pgrid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); border-top: var(--border-width) solid var(--line); border-left: var(--border-width) solid var(--line); border-radius: var(--radius) 0 0 0; }
.pgrid > .pcard { border-right: var(--border-width) solid var(--line); border-bottom: var(--border-width) solid var(--line); background: var(--surface); }

/* Carousel */
.car { position: relative; }
.car-view { overflow-x: clip; overflow-y: visible; touch-action: pan-y; }
.car-track { display: flex; transition: transform .35s ease; }
.car-track > * { flex: 0 0 calc(100% / var(--per, 4)); min-width: 0; }
.car-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 6; }
.car-arrow[data-prev] { left: -18px; }
.car-arrow[data-next] { right: -18px; }
.car-arrow:disabled { visibility: hidden; }
.pcar .car-view { border: var(--border-width) solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pcar .car-track > .pcard { border-right: var(--border-width) solid var(--line); }
@media (max-width: 1100px) { .car-track > * { --per: 3; } }
@media (max-width: 760px) {
  .car-track > * { flex-basis: 47%; }
  .car-arrow { display: none; }
  .pcar .car-view { border: 0; background: none; }
  .pcar .car-track > .pcard { border-right: 0; }
}

/* Up button */
.up-btn { position: fixed; right: 0; bottom: 120px; z-index: 20; width: 36px; height: 36px; display: grid; place-items: center; border: var(--border-width) solid var(--line-soft); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; }
.up-btn svg { width: 18px; height: 18px; stroke-width: 2.4; }

/* Footer */
.foot { background: var(--surface-2); color: var(--muted); font-size: var(--text-sm); padding: var(--space-6) 0 var(--space-5); }
.foot-in { display: grid; grid-template-columns: 1.95fr 1fr 1fr 1.9fr; gap: var(--space-6); }
.foot a:hover { color: var(--accent-ink); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13px; }
.foot-h { font-weight: 700; font-size: var(--text-md); margin-bottom: 12px; }
.foot-brand { display: grid; gap: var(--space-4); align-content: start; }
.foot-wm .wm-icon { width: 76px; height: 58px; }
.foot-wm .wm-text { font-size: 44px; }
.foot-brand p { line-height: 1.35; }
.pay { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--fg); }
.pay svg { width: 26px; height: 26px; color: var(--accent); }
.pay span { margin-right: 10px; }
.foot-soc-h { margin: var(--space-6) 0 8px; }
.foot-soc { display: flex; gap: 10px; }
.foot-soc svg { width: 24px; height: 24px; }
.foot-contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-5); align-content: start; }
.foot-contacts .foot-h { grid-column: 1 / -1; }
.foot-ic li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; }
.foot-ic svg { width: 16px; height: 16px; }
.foot-note { margin-top: var(--space-6); font-size: var(--text-xs); color: var(--muted); }
@media (max-width: 980px) { .foot-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .foot-in { grid-template-columns: 1fr; text-align: center; gap: var(--space-5); justify-items: center; }
  .foot-brand { justify-items: center; }
  .foot-wm .wm-icon { width: 50px; height: 38px; }
  .foot-wm .wm-text { font-size: 30px; }
  .foot-contacts { grid-template-columns: 1fr; justify-items: center; gap: 10px; }
  .foot-ic li { grid-template-columns: 18px auto; text-align: left; }
  .foot-soc { justify-content: center; }
  .foot-note { text-align: center; padding-bottom: env(safe-area-inset-bottom); }
}

/* Cart pop-up */
.pop-h { font-size: var(--text-3xl); font-weight: 400; margin-bottom: var(--space-2); }
.pop-head { display: grid; grid-template-columns: 1fr 92px 110px; gap: var(--space-4); text-align: center; padding: 0 20px 6px; }
.pop-head span:first-child { grid-column: 2; }
.pop-list { border: var(--border-width) solid var(--line-soft); border-radius: var(--radius); }
.pop-row { display: grid; grid-template-columns: 30px 70px 1fr auto 110px; gap: var(--space-4); align-items: center; padding: 15px 20px 15px 6px; }
.pop-row + .pop-row { border-top: var(--border-width) solid var(--line-soft); }
.pop-del { width: 30px; height: 30px; color: var(--faint); }
.pop-del svg { width: 16px; height: 16px; }
.pop-ph { display: block; width: 70px; height: 70px; }
.pop-ph img, .pop-ph .photo-slot { width: 100%; height: 100%; object-fit: contain; min-height: 0; padding: 4px; }
.pop-ph .photo-slot .slot-name, .pop-ph .photo-slot .slot-cat { display: none; }
.pop-name { display: grid; gap: 8px; }
.pop-sum { text-align: right; }
.pop-foot { display: grid; grid-template-columns: 1fr auto; gap: var(--space-4); align-items: center; border: var(--border-width) solid var(--line-soft); border-radius: var(--radius); padding: 20px; margin-top: 6px; }
.pop-total { grid-column: 1 / -1; justify-self: end; display: flex; align-items: baseline; gap: 14px; }
.pop-total b { font-size: var(--text-xl); }
.pop-back { display: inline-flex; align-items: center; gap: 12px; border: 0; background: none; cursor: pointer; font-size: var(--text-lg); padding: 0; }
.pop-back svg { width: 18px; height: 18px; }
.pop-rec-h { font-size: var(--text-base); margin: var(--space-5) 0 var(--space-4); }
.pop-rec { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.pop-rec-i { display: grid; gap: 6px; font-size: var(--text-sm); align-content: start; justify-items: start; }
.pop-rec-i a { display: grid; gap: 8px; }
.pop-rec-i img, .pop-rec-i .photo-slot { width: 100%; aspect-ratio: 1; height: auto; object-fit: contain; min-height: 0; }
.pop-rec-i .slot-name { font-size: var(--text-sm); }
.pop-rec-i .slot-cat { display: none; }
@media (max-width: 760px) {
  .pop-head { display: none; }
  .pop-row { grid-template-columns: 56px 1fr auto; grid-template-areas: "ph name del" "ph qty sum"; padding: 12px; gap: 8px 12px; }
  .pop-ph { grid-area: ph; width: 56px; height: 56px; }
  .pop-name { grid-area: name; }
  .pop-del { grid-area: del; }
  .pop-row .counter { grid-area: qty; justify-self: start; }
  .pop-sum { grid-area: sum; }
  .pop-foot { grid-template-columns: 1fr; }
  .pop-foot .btn { width: 100%; }
  .pop-rec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
