/* GlorySmile — shop page (body[data-page='shop']), "V34 Night".
   Bands: title + grid on the violet base, the Glory Kit in the dark room (the loudest moment), trust facts. */

/* ---------- Title: one huge word lit from behind ---------- */
.shop-head {
  position: relative; isolation: isolate; container-type: inline-size;
  display: grid; gap: clamp(1.25rem, 3vw, 2rem);
  padding-top: clamp(2.25rem, 6vw, 5.5rem);
  padding-bottom: clamp(2.25rem, 5vw, 4.5rem);
}
/* the light source: a soft ultraviolet bloom behind the word (inside the box, so it never widens the page) */
.shop-head::before {
  content: ''; position: absolute; z-index: -1; inset: 0 0 -20% 0; pointer-events: none;
  background:
    radial-gradient(38% 46% at 24% 52%, rgba(108, 59, 255, 0.5), transparent 70%),
    radial-gradient(30% 40% at 62% 40%, rgba(169, 139, 255, 0.16), transparent 70%);
}
.shop-head__title {
  font-size: 19cqi;   /* "Магазин" is 5.09em wide: the word spans the column on phones */
  line-height: 0.86; letter-spacing: -0.05em;
  text-shadow: 0 0 60px rgba(169, 139, 255, 0.35);
}
.shop-head__aside { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.shop-head__line { font-size: var(--t-l); line-height: 1.35; color: var(--text-2); max-width: 22ch; }
.shop-head__kit { flex: none; }
/* Side by side only where the word (5.09em at 13.5cqi = 69% of the row) still fits beside the aside */
@media (min-width: 1100px) {
  .shop-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 3rem; }
  .shop-head__title { font-size: min(13.5cqi, 13rem); }
  .shop-head__aside { flex-direction: column; align-items: flex-end; padding-bottom: 0.35em; }
  .shop-head__line { text-align: right; }
}

/* ---------- Product grid ---------- */
.shop-grid__list {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(0.75rem, 2vw, 1.5rem);
  row-gap: clamp(2.25rem, 6vw, 3.5rem);
}
.shop-tile--hero { grid-column: 1 / -1; }
.shop-tile--hero .tile__name {
  font-family: var(--f-display); font-weight: 300; font-size: var(--t-xl);
  letter-spacing: -0.03em; line-height: 1.05;
}
.shop-tile--hero .tile__price { font-size: var(--t-l); }
/* Small tiles: names in the text face (h2 would otherwise pull in the display face) */
.shop-tile:not(.shop-tile--hero) .tile__name { font-family: var(--f-text); font-weight: 600; letter-spacing: -0.01em; }
.shop-tile .tile__price { color: var(--text-2); }

/* Media: the packshot sits on its own violet sweep. A hairline of light defines the edge,
   hover lifts the light (ring + ultraviolet bloom), keyboard focus rings the whole picture. */
.shop-tile .tile__media {
  background: var(--night);
  box-shadow: 0 0 0 1px rgba(169, 139, 255, 0.14);
  transition: box-shadow 0.5s var(--ease);
}
.shop-tile .tile__media img { object-fit: cover; }
.shop-tile:hover .tile__media { box-shadow: 0 0 0 1px rgba(169, 139, 255, 0.45), 0 30px 90px -30px rgba(108, 59, 255, 0.85); }
.shop-tile:has(.tile__name a:focus-visible) .tile__media { outline: 3px solid var(--violet-hi); outline-offset: 4px; }
.shop-tile .tile__name a:focus-visible { outline: none; text-decoration: underline; text-decoration-thickness: 2px; }
.shop-tile .tile__name a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; }

/* LED in the dark room: the night packshot with a blue bloom, but the same tile rhythm as the others
   (no card, so names and prices stay on one edge) and the same "+" */
.shop-tile.tile--night { background: none; border-radius: 0; overflow: visible; padding-bottom: 0; box-shadow: none; color: inherit; }
.shop-tile.tile--night .tile__media { border-radius: var(--r-soft); box-shadow: 0 0 0 1px rgba(61, 139, 255, 0.22); }
.shop-tile.tile--night:hover .tile__media { box-shadow: 0 0 0 1px rgba(61, 139, 255, 0.55), 0 30px 90px -30px rgba(61, 139, 255, 0.75); }
.shop-tile.tile--night .tile__row { padding-inline: 0; }
.shop-tile.tile--night .tile__price { color: var(--text-2); }
.shop-tile.tile--night :focus-visible { outline-color: var(--violet-hi); }

/* Phones: hero full width, then two columns. The "+" floats on the image corner
   so the name gets the full tile width (100cqi = tile width = square media height). */
@media (max-width: 639px) {
  .shop-tile { gap: 0.75rem; }
  .shop-tile:not(.shop-tile--hero) { container-type: inline-size; }
  .shop-tile:not(.shop-tile--hero) .tile__name { font-size: var(--t-s); line-height: 1.25; }
  .shop-tile:not(.shop-tile--hero) .tile__price { font-size: var(--t-s); }
  .shop-tile:not(.shop-tile--hero) .icon-btn {
    position: absolute; right: 8px; top: 8px; top: calc(100cqi - 52px);
    width: 44px; height: 44px;
  }
  .shop-tile:not(.shop-tile--hero) .tile__row { padding-inline: 0; }
}

/* Tablets: hero becomes a wide crop */
@media (min-width: 640px) and (max-width: 1023px) {
  .shop-tile--hero .tile__media { aspect-ratio: 5 / 4; }
}

/* Desktop: 6-column editorial grid.
   Row 1-2: large hero (4 cols, 2 rows) beside two small tiles stacked.
   Row 3: two medium tiles, the LED one in the dark room. */
@media (min-width: 1024px) {
  .shop-grid__list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: clamp(1.25rem, 1.8vw, 2rem);
    row-gap: clamp(2.75rem, 4vw, 4.25rem);
  }
  .shop-tile:nth-child(1) { grid-column: 1 / span 4; grid-row: 1 / span 2; }
  .shop-tile:nth-child(2) { grid-column: 5 / span 2; grid-row: 1; }
  .shop-tile:nth-child(3) { grid-column: 5 / span 2; grid-row: 2; }
  .shop-tile:nth-child(4) { grid-column: 1 / span 3; grid-row: 3; }
  .shop-tile:nth-child(5) { grid-column: 4 / span 3; grid-row: 3; }

  /* Hero media stretches to the height of the two stacked tiles */
  .shop-tile--hero { grid-template-rows: minmax(0, 1fr) auto; }
  .shop-tile--hero .tile__media { aspect-ratio: auto; height: 100%; min-height: 0; }
  .shop-tile--hero .tile__media img { position: absolute; inset: 0; }
  .shop-tile--hero .tile__name { font-size: min(var(--t-xl), 2.75rem); }
}

/* ---------- Glory Kit: the dark room, the loudest moment ----------
   The flat lay inside a glowing halo with an ultraviolet light source behind it,
   then name, tagline, what is inside, the price (GS.kitPriceHTML) and the add button. */
.kit {
  position: relative; isolation: isolate;
  margin-top: clamp(4.5rem, 9vw, 8rem);
  padding-block: var(--section);
  background: var(--night); color: var(--text);
  overflow: clip;
  box-shadow: 0 -1px 0 rgba(169, 139, 255, 0.12);
}
.kit__in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 7rem); align-items: center; }

.kit__visual { position: relative; display: grid; place-items: center; aspect-ratio: 1; }
/* light source: the ring and the kit glow from inside */
.kit__visual::before {
  content: ''; position: absolute; inset: -8%; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(108, 59, 255, 0.62), rgba(108, 59, 255, 0.18) 55%, transparent);
}
.kit__media { position: relative; z-index: 1; width: 68%; aspect-ratio: 1; background: var(--surface); box-shadow: 0 40px 120px -30px rgba(108, 59, 255, 0.9), 0 0 0 1px rgba(169, 139, 255, 0.25); }
.kit__halo {
  --size: 100%;   /* circumscribes the square shot (68% x 1.41 = 96%) */
  --ring: 4px;
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  filter: saturate(2.2) drop-shadow(0 0 22px rgba(169, 139, 255, 0.9)) drop-shadow(0 0 60px rgba(108, 59, 255, 0.7));
}
.kit__media img { transition: transform 0.8s var(--ease); }
.kit__visual:hover .kit__media img { transform: scale(1.04); }

.kit__body { container-type: inline-size; display: grid; justify-items: start; min-width: 0; }
.kit__title { font-size: min(var(--t-3xl), 21cqi); font-weight: 300; letter-spacing: -0.045em; line-height: 0.92; }
.kit__tagline { margin-top: 1.1rem; font-size: var(--t-l); line-height: 1.35; color: var(--text-2); }

/* What is inside: five circles with their short names, one row */
.kit__inside {
  list-style: none; padding: 0; width: 100%;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(0.4rem, 1.2vw, 0.9rem);
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}
.kit__item { display: grid; justify-items: center; gap: 0.5rem; text-decoration: none; font-size: var(--t-xs); font-weight: 600; color: var(--text-2); text-align: center; }
.kit__thumb {
  display: block; width: min(100%, 76px);
  box-shadow: 0 0 0 1.5px var(--hair);
  transition: box-shadow 0.25s var(--ease);
}
.kit__item:hover { color: var(--text); }
.kit__item:hover .kit__thumb { box-shadow: 0 0 0 2px var(--violet-hi), 0 0 24px rgba(169, 139, 255, 0.5); }
.kit__thumb img { transition: transform 0.6s var(--ease); }
.kit__item:hover .kit__thumb img { transform: scale(1.06); }
.kit__item-name { line-height: 1.2; }
/* Phones: the names stay at 14px. 'Лентички' and 'Коректор' (~64px) may run a few px into the column gap on a 360px screen;
   their neighbours are short words, so nothing touches. */
@media (max-width: 639px) { .kit__item-name { font-size: 0.875rem; letter-spacing: -0.01em; } }

.kit__buy { display: grid; justify-items: start; gap: 1.5rem; margin-top: clamp(2rem, 4vw, 3rem); width: 100%; padding-top: clamp(1.5rem, 3vw, 2.25rem); border-top: 1px solid rgba(169, 139, 255, 0.18); }
.kit__price .kitprice__now { font-size: var(--t-2xl); }
.kit__price .kitprice__sep { color: var(--text-2); }
.kit__add { box-shadow: 0 18px 50px -14px rgba(108, 59, 255, 0.9); }

/* Phones: one column, the ring fully inside its square box so it never crosses the name below */
@media (max-width: 599px) {
  .kit__in { grid-template-columns: minmax(0, 1fr); }
  .kit__visual { width: 100%; }
  .kit__media { width: 66%; }
  .kit__halo { --size: 96%; --ring: 3px; }   /* still circumscribes the shot (66% x 1.41 = 93%) */
  .kit__add { width: 100%; }
}
/* Tablets: the ring above, the body full width under it, so the five names never break mid-word */
@media (min-width: 600px) and (max-width: 899px) {
  .kit__visual { width: min(100%, 520px); justify-self: center; }
}
@media (max-width: 899px) {
  .kit__in { grid-template-columns: minmax(0, 1fr); }
}

/* No-JS fallback list */
.shop-grid__fallback { display: grid; gap: 0.75rem; font-size: var(--t-l); }
