:root {
  color-scheme: dark;
  --bg: #140a10;
  --surface: #27141e;
  --line: #532d3e;
  --text: #fff5f7;
  --muted: #e0bfc9;
  --accent: #ff7886;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(ellipse at 65% 0, #591328 0, transparent 43rem), var(--bg);
  font: 1rem/1.55 system-ui, sans-serif;
}
a { color: inherit; }
button, input, select { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.wrap { width: min(1220px, 92%); margin-inline: auto; }

header { background: linear-gradient(100deg, #591429, #230b17 72%); border-bottom: 1px solid #87334c; }
header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 32px;
  padding: 18px 0;
}
.brand { font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 850; text-decoration: none; }
.brand b { color: var(--accent); }
nav { display: flex; flex-wrap: wrap; gap: 7px 18px; }
nav a { color: var(--muted); text-decoration: none; font-size: .875rem; padding-block: 5px; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); }

main { padding-block: 30px 58px; }
h1, h2 { margin: 0 0 .55em; line-height: 1.13; letter-spacing: -.035em; }
h1 { font-size: clamp(2rem, 5vw, 3.35rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
.tag { color: var(--accent); font-weight: 750; font-size: .875rem; }
.muted { color: var(--muted); font-size: .875rem; }
.button {
  display: inline-block;
  width: fit-content;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--accent);
  color: #280910;
  font-weight: 760;
  text-decoration: none;
}
.button:hover { background: #ffa2ad; }
.button.secondary { background: transparent; color: var(--text); border-color: #915669; }
.button.secondary:hover { border-color: var(--accent); }
.panel, .help-strip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(18px, 3vw, 28px);
  margin-block: 18px;
}

.showcase { display: grid; grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr); gap: 15px; }
.showcase-banner { position: relative; min-width: 0; }
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 355px;
  height: 100%;
  padding: 30px clamp(22px, 4vw, 52px) 60px;
  border: 1px solid #8d3447;
  border-radius: 22px;
  background: linear-gradient(90deg, #340b19 14%, #340b19ed 36%, #340b1936 78%), url("../img/hero.jpg") right 52% / cover #35121f;
}
.hero-vouchers {
  background-image: linear-gradient(90deg, #310d19 17%, #3b1121f5 39%, #621b2f28 83%), url("../img/steam-wallet.jpg");
}
.hero-promos {
  background-image: linear-gradient(90deg, #3a1017 12%, #4e1722f5 37%, #64212b33 82%), url("../img/free-fire.jpg");
}
.hero h1, .hero h2 { max-width: 12ch; font-size: clamp(2.15rem, 4.6vw, 4rem); margin: 8px 0 0; }
.hero p { max-width: 34ch; color: #ffebef; margin: 12px 0 17px; }
.dots { position: absolute; bottom: 13px; left: clamp(22px, 4vw, 52px); display: flex; gap: 5px; }
.dots button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.dots button::after { content: ""; width: 8px; height: 8px; border-radius: 10px; background: #e4a8b5; }
.dots button[aria-pressed="true"]::after { width: 20px; background: var(--accent); }

.shortcuts { display: grid; grid-template-rows: 1fr 1fr; gap: 15px; }
.shortcut {
  display: flex;
  flex-direction: column;
  justify-content: end;
  min-height: 132px;
  padding: 18px;
  background: linear-gradient(0deg, #35111f 4%, #35111fcf 34%, #35111f08), url("../img/google-play.jpg") center 43% / cover #471925;
  border: 1px solid #823b50;
  border-radius: 17px;
  text-decoration: none;
}
.shortcut-promo {
  background-image: linear-gradient(0deg, #3b1321 4%, #3b1321db 34%, #3b132115), url("../img/mobile-legends.jpg");
  border-color: #873c46;
}
.shortcut:hover { border-color: var(--accent); }
.shortcut span { font-weight: 800; font-size: 1.2rem; }
.shortcut small { font-size: .875rem; color: #ffe7eb; }

.catalog-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  padding-block: 19px;
  margin-top: 12px;
  border-bottom: 1px solid var(--line);
}
.category-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.category-buttons button {
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.category-buttons button:hover { border-color: var(--accent); }
.category-buttons button[aria-pressed="true"] { background: var(--accent); color: #280910; font-weight: 750; }
.search-box { flex: 1 1 235px; max-width: 340px; }
.sort-box { margin-left: auto; }
label { display: block; font-size: .875rem; color: var(--muted); margin-bottom: 5px; }
input[type="search"], #sort {
  display: block;
  width: min(100%, 440px);
  padding: 10px 13px;
  border: 1px solid #865266;
  border-radius: 9px;
  color: var(--text);
  background: var(--surface);
}
input[type="search"]::placeholder { color: var(--muted); }
main > label { margin-top: 15px; }

.catalog-group { margin-top: 27px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 7px 12px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; }
.section-heading a { color: var(--accent); font-size: .875rem; text-underline-offset: 4px; }
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
main > h2 { margin-top: 25px; }
.tile {
  display: block;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
}
.tile:hover { border-color: var(--accent); }
.tile > div:not(.art) { padding: 10px 11px 12px; }
.tile strong { overflow-wrap: anywhere; }
.art { aspect-ratio: 1.38; background: #401b2a; overflow: hidden; }
.art img { display: block; width: 100%; height: 100%; object-fit: cover; }

.product-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.product-heading img { width: min(200px, 100%); height: auto; border-radius: 14px; border: 1px solid var(--line); }
.product-heading .tag { margin: 0 0 4px; }
.product-heading h1 { margin: 0; }
.help-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 32px;
  background: linear-gradient(115deg, #63152d, var(--surface));
}
.help-strip p { margin: 0; color: var(--muted); }
.help-links { display: flex; flex-wrap: wrap; gap: 8px; }
footer { color: var(--muted); border-top: 1px solid var(--line); background: #1c0b14; padding: 25px 0; }
footer strong { color: var(--text); }
footer a { margin-right: 15px; text-underline-offset: 4px; }
footer p { margin: 8px 0; font-size: .875rem; }

.product-card { position: relative; min-width: 0; }
.product-card .tile { height: 100%; }
.favorite-button {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #a96277;
  border-radius: 50%;
  background: #2c101ce8;
  color: #fff5f7;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.favorite-button:hover, .favorite-button[aria-pressed="true"] { background: var(--accent); color: #280910; }
.result-count { color: var(--muted); font-size: .875rem; margin: 12px 0 0; }
.text-button {
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.quick-faq { margin-top: 30px; }
.quick-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; margin-bottom: 8px; }
.quick-faq summary { cursor: pointer; padding: 13px 17px; font-weight: 650; }
.quick-faq details p { margin: 0; padding: 0 17px 15px; color: var(--muted); }

@media (max-width: 950px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .showcase { grid-template-columns: 1fr; }
  .shortcuts { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .hero { min-height: 335px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  nav { gap: 3px 12px; }
  main { padding-top: 17px; }
  .hero { background-image: linear-gradient(90deg, #340b19 5%, #340b19de 44%, #340b195e), url("../img/hero.jpg"); }
  .hero-vouchers { background-image: linear-gradient(90deg, #310d19 8%, #310d19e6 48%, #310d1963), url("../img/steam-wallet.jpg"); }
  .hero-promos { background-image: linear-gradient(90deg, #3a1017 8%, #3a1017e6 48%, #3a101763), url("../img/free-fire.jpg"); }
  .shortcuts { gap: 9px; }
  .sort-box { margin-left: 0; }
  .shortcut { padding: 11px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

.catalog-tools .category-buttons { flex: 1 1 100%; }
.catalog-tools .sort-box { margin-left: 0; }
.catalog-extra .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.catalog-extra .art { aspect-ratio: 2.15; }
.catalog-extra .tile > div:not(.art) { padding-inline: clamp(10px, 2vw, 18px); }

.news-section, .about-home {
  padding-top: 25px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
}
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.news-card {
  display: block;
  overflow: hidden;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  text-decoration: none;
}
.news-card:hover { border-color: var(--accent); }
.news-card img { display: block; width: 100%; height: auto; aspect-ratio: 2.35; object-fit: cover; }
.news-card div { display: grid; gap: 4px; padding: 13px 15px; }
.news-card span, .about-home p, .about-home li span { color: var(--muted); }
.about-home p { max-width: 68ch; }
.about-home ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 0; list-style: none; }
.about-home li { display: grid; gap: 4px; padding: 12px 15px; border-left: 2px solid var(--accent); background: var(--surface); }

.site-footer { background: linear-gradient(125deg, #54152b, #250d1a 75%); }
.footer-layout { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 20px; }
.footer-layout nav { display: grid; align-content: start; gap: 4px; }
.footer-layout a { margin: 0; }
.footer-bottom { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .875rem; }

@media (max-width: 700px) {
  .footer-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .catalog-extra .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-extra .art { aspect-ratio: 1.4; }
  .news-grid, .about-home ul { grid-template-columns: 1fr; }
}
