/* Cosmetics page (/kosmetika): header with the cart, intro, catalogue cards, product details, cart bar, order sheet. */

.shop .section { padding: clamp(48px, 8vw, 96px) 0; }
.shop svg use { pointer-events: none; }

/* ---------- Header: phone, Telegram and the cart ---------- */
.hd { display: flex; align-items: center; gap: 6px; }
.hd svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hd__tel, .hd__ic {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(255, 253, 251, 0.7); color: var(--wine); text-decoration: none;
  transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.hd__tel span { display: none; }
@media (max-width: 439px) { .shop .site-header .brand__name { display: none; } } /* the cart with its counter needs the room */
.hd__cart { gap: 8px; margin-left: 4px; }
.hd__n { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fff7f3; color: var(--wine-deep); font: 700 12.5px/1 var(--sans); }
@media (hover: hover) { .hd__tel:hover, .hd__ic:hover { border-color: var(--wine); background: var(--paper); transform: translateY(-1px); } }
@media (min-width: 720px) {
  .hd__tel { display: inline-flex; gap: 9px; width: auto; margin-right: 6px; padding: 0 4px; border: 0; background: none; color: var(--ink); font: 600 15.5px/1 var(--sans); white-space: nowrap; }
  .hd__tel span { display: inline; }
  .hd__tel svg { color: var(--wine); }
  .hd__tel:hover { background: none; color: var(--wine); transform: none; }
  .hd__cart { margin-left: 8px; }
}

/* ---------- Intro ---------- */
.shop-hero { padding: calc(var(--header-h) + clamp(28px, 6vw, 64px)) 0 clamp(8px, 2vw, 20px); }
.shop-hero__in { display: grid; gap: 28px; }
.shop-hero__text { display: grid; gap: 18px; max-width: 720px; }
/* how to order: one compact card on a phone (the catalogue must start on the first screen), three cards on a wide screen */
.shop-steps { display: grid; gap: 10px; margin: 0; padding: 14px 16px; list-style: none; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.shop-steps li { display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 1.35; color: var(--ink); }
.shop-steps b { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--blush); color: var(--wine); font: 600 15px/1 var(--serif); }
@media (min-width: 720px) {
  .shop-steps { grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0; border: 0; background: none; }
  .shop-steps li { align-items: flex-start; gap: 14px; padding: 14px 18px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); font-size: 15px; line-height: 1.4; }
  .shop-steps b { width: 34px; height: 34px; font-size: 19px; }
}
.shop-nojs { display: none; margin: 0 0 24px; padding: 14px 18px; border-radius: 16px; background: var(--blush); font-size: 15px; line-height: 1.5; }
.shop-nojs a { color: var(--wine); font-weight: 600; }
.no-js .shop-nojs { display: block; }
.no-js .ctl, .no-js .pcard__link, .no-js .hd__cart { display: none; }

/* ---------- Catalogue ---------- */
.shop-cat { padding-top: clamp(28px, 5vw, 56px) !important; }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; }
.pcard { display: flex; flex-direction: column; min-width: 0; }
.pcard__pic { position: relative; display: block; width: 100%; margin: 0 0 12px; padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow-sm); cursor: pointer; aspect-ratio: 1; }
.pcard__pic picture, .pcard__pic img { display: block; width: 100%; height: 100%; }
.pcard__pic img { object-fit: cover; transition: transform 1.2s var(--ease); }
@media (hover: hover) { .pcard__pic:hover img { transform: scale(1.04); } }
.pcard__pic:focus-visible, .pcard__link:focus-visible, .qty button:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
.pcard__badge { position: absolute; z-index: 1; top: 10px; left: 10px; padding: 6px 10px; border-radius: 999px; background: var(--wine); color: #fff; font: 700 12px/1 var(--sans); }
.pcard__title { margin: 0; font: 600 19px/1.15 var(--serif); color: var(--ink); overflow-wrap: anywhere; }
.pcard__sub { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.pcard__vars { display: grid; gap: 6px; margin-top: 10px; }
.pcard__vars label { position: relative; }
.pcard__vars input { position: absolute; opacity: 0; pointer-events: none; }
.pcard__vars span { display: block; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--paper); font: 600 13px/1.2 var(--sans); color: var(--ink-2); text-align: center; white-space: nowrap; cursor: pointer; transition: background 0.25s, border-color 0.25s, color 0.25s; }
.pcard__vars input:checked + span { border-color: var(--wine); background: var(--wine); color: #fff; }
.pcard__vars input:focus-visible + span { outline: 2px solid var(--wine); outline-offset: 2px; }
.pcard__vars span[data-n]::after {
  content: attr(data-n); position: absolute; top: -7px; right: -5px; display: grid; place-items: center; min-width: 20px; height: 20px;
  padding: 0 5px; border-radius: 999px; background: var(--gold-ink); color: #fff; font: 700 11.5px/1 var(--sans); box-shadow: 0 0 0 2px var(--bg);
}
.pcard__buy { display: grid; gap: 10px; margin-top: auto; padding-top: 12px; }
.pcard__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; }
.pcard__price b { font-size: 25px; font-weight: 600; line-height: 1; color: var(--wine); white-space: nowrap; }
.pcard__price s { font-size: 15px; color: var(--muted); white-space: nowrap; }
.pcard__price small { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.pcard__link { align-self: flex-start; margin-top: 10px; padding: 4px 0; border: 0; background: none; font: 600 13px/1.2 var(--sans); color: var(--wine); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; cursor: pointer; }

/* add button / quantity stepper: one control for a card, the details and an order line */
.ctl { display: flex; min-width: 0; }
.ctl__add { width: 100%; padding: 0 12px; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; border-radius: 999px; background: var(--blush); }
.qty button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; font: 500 22px/1 var(--sans); color: var(--wine); cursor: pointer; }
.qty button:active { background: var(--rose); }
.qty button:disabled { opacity: 0.3; cursor: default; }
.qty output { min-width: 24px; font: 700 15px/1 var(--sans); color: var(--ink); text-align: center; }

@media (min-width: 600px) {
  .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 20px; }
  .pcard__title { font-size: 22px; }
  .pcard__sub { font-size: 13.5px; }
}
@media (min-width: 960px) {
  .pgrid { gap: 52px 32px; } /* nine products: three full rows */
  .pcard__buy { grid-template-columns: minmax(0, 1fr) 148px; align-items: center; }
  .pcard__vars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* the tenth tile: ask me what to choose (beside the last product on a phone, a line under the catalogue on a wide screen) */
.pask { display: flex; flex-direction: column; justify-content: center; gap: 14px; min-width: 0; padding: 18px 14px; border-radius: 18px; background: var(--blush); }
.pask__btns { display: grid; gap: 8px; }
.pask__btns .btn { gap: 8px; padding-inline: 10px; background: var(--paper); }
.pask__btns svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 600px) {
  .pask { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 28px; border-radius: 22px; }
  .pask__btns { display: flex; gap: 10px; }
  .pask__btns .btn { padding-inline: 20px; }
}

/* ---------- After the catalogue ---------- */
.shop-more__in { display: grid; gap: 8px; }
.shop-more .section__head { margin-bottom: 28px; }
.shop-more__btns { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 479px) { .shop-more__btns .btn { width: 100%; } }

/* ---------- Cart bar ---------- */
.cartbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; max-width: 520px; margin-inline: auto;
  padding: 10px 10px 10px 20px; border-radius: 999px; background: rgba(255, 253, 251, 0.94); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow); animation: rise 0.5s var(--ease);
}
.cartbar__sum { display: grid; gap: 3px; margin: 0; font-size: 12.5px; line-height: 1; color: var(--muted); }
.cartbar__sum b { font-size: 22px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.shop.has-sticky .site-footer { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

/* ---------- Product details ---------- */
.pdlg { max-width: 560px; }
.pdlg__pics { display: flex; gap: 10px; margin: 26px -4px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 18px; }
.pdlg__pics::-webkit-scrollbar { display: none; }
.pdlg__pics picture { flex: 0 0 100%; scroll-snap-align: center; border-radius: 18px; overflow: hidden; background: var(--bg-2); aspect-ratio: 1; }
.pdlg__pics.is-many picture { flex-basis: 88%; }
.pdlg__pics img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pdlg__sub { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.pdlg__buy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(132px, 180px); align-items: center; gap: 12px; margin: 6px 0; }
.pdlg__go { margin-bottom: 4px; }
.pdlg__more { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.pdlg__more h4 { margin: 16px 0 6px; font: 600 11px/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-ink); }
.pdlg__more p { margin: 0; }
.pdlg__more ul { margin: 0; padding: 0 0 0 18px; }
.pdlg__more li { margin: 2px 0; }

/* ---------- Order sheet ---------- */
.order__empty { margin: 4px 0 10px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.order__lines { display: grid; gap: 0; margin: 4px 0 0; padding: 0; list-style: none; }
.order__line { display: grid; grid-template-columns: minmax(0, 1fr) 124px; align-items: center; gap: 6px 12px; padding: 12px 0; border-top: 1px dashed var(--line-2); }
.order__name { grid-column: 1 / -1; font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.order__line .ctl { grid-column: 2; grid-row: 2; }
.order__line .qty { min-height: 40px; }
.order__line .qty button { width: 40px; height: 40px; }
.order__sum { grid-column: 1; grid-row: 2; font-size: 21px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.order__total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.order__total b { font-size: 30px; font-weight: 600; color: var(--wine); white-space: nowrap; }

/* ---------- The narrowest phones (320): labels stay on one line ---------- */
@media (max-width: 359px) {
  .pcard__link { font-size: 12px; letter-spacing: -0.01em; white-space: nowrap; }
  .shop-more__btns .btn { padding-inline: 12px; font-size: 14px; }
}
