/* ==========================================================================
   Вишлист Валерия — основной файл стилей
   ========================================================================== */

:root {
  --bg: #fff8f0;
  --bg-deep: #fdf0e4;
  --surface: #fffdfb;
  --surface-2: #fff6ec;
  --ink: #3b2a23;
  --ink-soft: #5e4a40;
  --muted: #8e786d;
  --line: #efddcf;
  --line-strong: #e5cbb8;

  --accent: #d95d39;
  --accent-dark: #b94625;
  --accent-soft: #fce9df;
  --accent-light: #f9d6c8;

  --sage: #658a6b;
  --sage-dark: #4e6e54;
  --sage-soft: #e8f1e8;

  --gold: #e7b04b;
  --gold-soft: #fbf0d4;
  --pink: #f4a7b9;
  --danger: #ac3b2b;
  --danger-soft: #fff0ec;

  --shadow-sm: 0 4px 16px rgba(91, 52, 35, 0.06);
  --shadow: 0 24px 60px -32px rgba(91, 52, 35, 0.45), 0 6px 20px -12px rgba(91, 52, 35, 0.16);
  --shadow-hover: 0 30px 65px -30px rgba(91, 52, 35, 0.52), 0 10px 26px -14px rgba(91, 52, 35, 0.22);

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1180px;

  --font-body: "Segoe UI", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Trebuchet MS", "Avenir Next", "Segoe UI", Arial, sans-serif;

  color-scheme: light;
}

/* ---------- Сброс и база ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  background:
    radial-gradient(circle at 8% 0%, #ffe1cc 0, transparent 34rem),
    radial-gradient(circle at 96% 6%, #f9e9bd 0, transparent 30rem),
    linear-gradient(180deg, #fff9f3 0%, #fff6ed 55%, #fffaf5 100%);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: radial-gradient(rgba(217, 93, 57, 0.11) 1px, transparent 1px);
  background-size: 26px 26px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
}

img {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

::selection {
  color: #fff;
  background: var(--accent);
}

:focus-visible {
  outline: 3px solid rgba(217, 93, 57, 0.38);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 10px;
  color: #fff;
  background: var(--ink);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.hero,
.container,
.footer,
.admin-header,
.admin-main {
  position: relative;
  z-index: 1;
}

/* ---------- Декор фона ---------- */

.page-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.page-decor__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.5;
}

.page-decor__blob--one {
  top: -190px;
  left: -180px;
  width: 520px;
  height: 520px;
  background: #ffd5bc;
}

.page-decor__blob--two {
  top: 12%;
  right: -190px;
  width: 460px;
  height: 460px;
  background: #f8e5a5;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #e36a43 0%, #cf4f2d 100%);
  box-shadow:
    0 12px 24px -12px rgba(217, 93, 57, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 30px -14px rgba(217, 93, 57, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  color: var(--ink-soft);
  background: #fffaf6;
  border: 1px solid var(--line);
}

.btn--ghost:hover {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-color: var(--accent-light);
}

.btn--danger-ghost {
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #f3c9c0;
}

.btn--danger-ghost:hover {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.btn--small {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 0.79rem;
}

.btn--full {
  width: 100%;
  min-height: 50px;
}

.btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

/* ---------- Шапка / hero ---------- */

.hero {
  padding: 24px 24px 0;
}

.hero__inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 26px clamp(22px, 5vw, 62px) 38px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 12%, rgba(249, 214, 200, 0.65) 0, transparent 28rem),
    radial-gradient(circle at 4% 100%, rgba(251, 240, 212, 0.8) 0, transparent 24rem),
    linear-gradient(135deg, rgba(255, 253, 248, 0.97), rgba(255, 243, 229, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 36px;
  box-shadow: var(--shadow);
}

.hero__inner::before,
.hero__inner::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.hero__inner::before {
  top: -82px;
  right: -54px;
  width: 230px;
  height: 230px;
  border: 28px solid rgba(231, 176, 75, 0.16);
}

.hero__inner::after {
  right: 11%;
  bottom: -115px;
  width: 240px;
  height: 240px;
  background: rgba(217, 93, 57, 0.07);
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 1.35rem;
  background: linear-gradient(145deg, #fff, #fbe7d8);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px -10px rgba(91, 52, 35, 0.4);
  transition: transform 0.2s ease;
}

.brand:hover .brand__icon {
  transform: rotate(-8deg) scale(1.05);
}

.brand__text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.brand__dot {
  color: var(--accent);
}

.topbar__admin {
  padding: 9px 15px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.topbar__admin:hover {
  color: var(--accent-dark);
  background: #fff;
  border-color: var(--accent-light);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin-top: clamp(34px, 6vw, 64px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(249, 214, 200, 0.9);
  border-radius: 999px;
}

.hero h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(2.65rem, 7.1vw, 5.2rem);
  font-weight: 800;
  line-height: 0.99;
  letter-spacing: -0.055em;
}

.highlight {
  position: relative;
  display: inline-block;
  color: var(--accent);
}

.highlight::after {
  content: "";
  position: absolute;
  right: -0.04em;
  bottom: -0.08em;
  left: -0.04em;
  height: 0.2em;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  opacity: 0.55;
  transform: rotate(-1.4deg);
}

.hero__lead {
  max-width: 60ch;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.9vw, 1.14rem);
  line-height: 1.65;
}

.stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px -22px rgba(91, 52, 35, 0.45);
  backdrop-filter: blur(8px);
}

.stat__icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: 1.2rem;
  background: linear-gradient(145deg, #fff7ee, #fbe3d3);
}

.stat__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.25;
}

.stat__body strong {
  font-family: var(--font-display);
  font-size: 1.13rem;
  letter-spacing: -0.02em;
}

.stat__body > span {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress {
  position: relative;
  z-index: 1;
  height: 8px;
  margin-top: 18px;
  overflow: hidden;
  background: rgba(179, 132, 102, 0.15);
  border-radius: 999px;
}

.progress__bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  box-shadow: 0 0 16px rgba(217, 93, 57, 0.45);
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Контейнер и панель фильтров ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 24px 30px;
}

.toolbar {
  margin-bottom: 26px;
  padding: 20px;
  background: rgba(255, 253, 250, 0.9);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.toolbar__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
}

.search {
  position: relative;
  display: block;
}

.search__icon {
  position: absolute;
  top: 50%;
  left: 17px;
  color: var(--accent);
  font-size: 1.65rem;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-54%) rotate(-15deg);
}

.search input {
  width: 100%;
  height: 52px;
  padding: 0 18px 0 49px;
  color: var(--ink);
  font-size: 1rem;
  background: #fffaf5;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.search input::placeholder {
  color: #b6a196;
}

.search input:focus {
  background: #fff;
  border-color: var(--accent-light);
  box-shadow: 0 0 0 4px rgba(217, 93, 57, 0.09);
}

.select-wrap {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.select-wrap__label {
  padding-left: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

select {
  width: 100%;
  height: 52px;
  padding: 0 40px 0 15px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  background-color: #fffaf5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%238e786d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  cursor: pointer;
  appearance: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

select:hover {
  border-color: var(--line-strong);
}

select:focus {
  background-color: #fff;
  border-color: var(--accent-light);
  box-shadow: 0 0 0 4px rgba(217, 93, 57, 0.09);
}

.toolbar__filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-top: 16px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 2px;
  color: var(--ink-soft);
  font-size: 0.87rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch__track {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 46px;
  height: 27px;
  background: #eadbcf;
  border: 1px solid #e3d1c3;
  border-radius: 999px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(91, 52, 35, 0.25);
  transition: transform 0.2s ease;
}

.switch input:checked + .switch__track {
  background: var(--accent);
  border-color: var(--accent);
}

.switch input:checked + .switch__track .switch__thumb {
  transform: translateX(19px);
}

.switch input:focus-visible + .switch__track {
  outline: 3px solid rgba(217, 93, 57, 0.35);
  outline-offset: 2px;
}

.toolbar__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.results {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.link-button {
  padding: 4px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(217, 93, 57, 0.3);
  text-underline-offset: 4px;
}

.link-button:hover {
  text-decoration-color: currentColor;
}

/* ---------- Сетка и карточки подарков ---------- */

.gift-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.gift-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 14px 34px -30px rgba(91, 52, 35, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.gift-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.gift-card--booked {
  background: linear-gradient(180deg, #fffdfb 0%, #fff8f1 100%);
}

.gift-card__media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  min-height: 172px;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.9) 0, transparent 45%),
    radial-gradient(circle at 78% 80%, rgba(231, 176, 75, 0.2) 0, transparent 50%),
    linear-gradient(145deg, #fff1e5, #fbe3d3);
  border-bottom: 1px solid rgba(239, 221, 207, 0.75);
}

.gift-card--booked .gift-card__media {
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.85) 0, transparent 45%),
    radial-gradient(circle at 78% 80%, rgba(101, 138, 107, 0.22) 0, transparent 50%),
    linear-gradient(145deg, #f2f8f1, #fdf0e4);
}

.gift-card__emoji {
  position: relative;
  z-index: 1;
  font-size: clamp(3.5rem, 7vw, 4.7rem);
  line-height: 1;
  filter: drop-shadow(0 12px 16px rgba(91, 52, 35, 0.18));
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gift-card:hover .gift-card__emoji {
  transform: rotate(-6deg) scale(1.08);
}

.gift-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(59, 42, 35, 0.09));
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 11px;
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 999px;
}

.gift-card > .gift-card__media > .badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  box-shadow: 0 5px 14px -8px rgba(59, 42, 35, 0.5);
  backdrop-filter: blur(7px);
}

.badge--free {
  color: var(--sage-dark);
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(101, 138, 107, 0.22);
}

.badge--booked {
  color: #fff;
  background: rgba(217, 93, 57, 0.94);
  border-color: rgba(255, 255, 255, 0.3);
}

.gift-card__content {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 20px 21px 21px;
}

.gift-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 9px;
  overflow: hidden;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
}

.pill--category {
  color: var(--sage-dark);
  background: var(--sage-soft);
}

.pill--market {
  color: #8a641e;
  background: var(--gold-soft);
}

.gift-card__title {
  margin: 0 0 8px;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.gift-card__description {
  display: -webkit-box;
  margin: 0 0 16px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow-wrap: anywhere;
}

.gift-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.gift-card__price {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.gift-card__link {
  padding: 3px 2px;
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(217, 93, 57, 0.25);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.gift-card__link:hover {
  color: var(--accent);
  border-color: currentColor;
}

.gift-card__book {
  width: 100%;
  min-height: 47px;
  margin-top: 16px;
  border-radius: 13px;
  font-size: 0.92rem;
}

.gift-card__booking {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 9px 10px 9px 12px;
  background: var(--sage-soft);
  border: 1px solid rgba(101, 138, 107, 0.13);
  border-radius: 13px;
}

.gift-card__booking-icon {
  flex: 0 0 auto;
  font-size: 1rem;
}

.gift-card__booking-text {
  min-width: 0;
  color: var(--sage-dark);
  font-size: 0.8rem;
  line-height: 1.3;
}

.gift-card__booking-text strong {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.gift-card__release {
  flex: 0 0 auto;
  min-height: 30px;
  margin-left: auto;
  padding: 0 9px;
  color: var(--sage-dark);
  font-size: 0.71rem;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(101, 138, 107, 0.2);
}

.gift-card__release:hover {
  color: var(--danger);
  background: #fff;
  border-color: #f3c9c0;
}

/* ---------- Загрузка, пустые состояния ---------- */

.skeleton-card {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  background: rgba(255, 253, 250, 0.75);
  border: 1px solid var(--line);
  border-radius: 26px;
}

.skeleton-card span {
  position: absolute;
  display: block;
  overflow: hidden;
  background: #f5e6da;
  border-radius: 10px;
}

.skeleton-card span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.4s infinite;
}

.skeleton-card span:nth-child(1) {
  top: 0;
  right: 0;
  left: 0;
  height: 45%;
  border-radius: 0;
}

.skeleton-card span:nth-child(2) {
  top: 54%;
  right: 20px;
  left: 20px;
  height: 24px;
}

.skeleton-card span:nth-child(3) {
  top: 64%;
  right: 20px;
  left: 20px;
  height: 92px;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.empty {
  padding: 64px 24px;
  text-align: center;
  background: rgba(255, 253, 250, 0.85);
  border: 1px dashed var(--line-strong);
  border-radius: 26px;
}

.empty__icon {
  margin-bottom: 16px;
  font-size: 3.8rem;
  line-height: 1;
  animation: float 3.6s ease-in-out infinite;
}

.empty h2 {
  margin-bottom: 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.empty p {
  max-width: 48ch;
  margin: 0 auto 20px;
  color: var(--muted);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-8px) rotate(3deg);
  }
}

/* ---------- Подвал ---------- */

.footer {
  margin-top: 20px;
  padding: 24px;
  background: rgba(255, 253, 250, 0.55);
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer__inner p {
  margin: 0;
}

.footer a {
  color: var(--ink-soft);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.footer a:hover {
  color: var(--accent-dark);
}

/* ---------- Модальные окна ---------- */

.modal {
  width: min(92vw, 460px);
  max-width: none;
  max-height: calc(100vh - 36px);
  padding: 0;
  overflow: visible;
  color: var(--ink);
  background: transparent;
  border: 0;
}

.modal--wide {
  width: min(94vw, 720px);
}

.modal::backdrop {
  background: rgba(59, 42, 35, 0.42);
  backdrop-filter: blur(5px);
}

.modal[open] {
  animation: modal-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal__card {
  position: relative;
  max-height: calc(100vh - 36px);
  padding: 30px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  box-shadow: 0 40px 100px -30px rgba(59, 42, 35, 0.55);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 15px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--muted);
  font-size: 1.45rem;
  line-height: 1;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.modal__close:hover {
  color: var(--accent-dark);
  background: var(--accent-soft);
  transform: rotate(8deg);
}

.modal__icon {
  margin-bottom: 10px;
  font-size: 2.8rem;
  line-height: 1;
  text-align: center;
}

.modal__card > h2 {
  margin-bottom: 8px;
  font-size: 1.65rem;
  text-align: center;
}

.modal__text {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.modal__text strong {
  color: var(--ink-soft);
}

.modal__hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
  text-align: center;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
  text-align: left;
}

.field__label {
  padding-left: 2px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.required {
  color: var(--accent);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 0.94rem;
  background: #fffaf6;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.field input,
.field select {
  height: 47px;
}

.field textarea {
  min-height: 86px;
  line-height: 1.5;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #b6a196;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  background: #fff;
  border-color: var(--accent-light);
  box-shadow: 0 0 0 4px rgba(217, 93, 57, 0.09);
}

.form-error {
  margin: 4px 0 14px;
  padding: 10px 13px;
  color: var(--danger);
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1.4;
  background: var(--danger-soft);
  border: 1px solid #f3c9c0;
  border-radius: 12px;
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  margin-top: 20px;
}

.form-grid .field {
  margin-bottom: 15px;
}

.field--wide {
  grid-column: 1 / -1;
}

/* ---------- Уведомления и конфетти ---------- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 1100;
  max-width: min(92vw, 580px);
  padding: 13px 20px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
  background: #3b2a23;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 40px -18px rgba(59, 42, 35, 0.65);
  opacity: 0;
  transform: translate(-50%, 18px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast[data-type="error"] {
  background: #9f3527;
}

.confetti {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  pointer-events: none;
}

.confetti span {
  position: absolute;
  top: -24px;
  display: block;
  border-radius: 2px;
  animation-name: confetti-fall;
  animation-timing-function: cubic-bezier(0.2, 0.6, 0.4, 1);
  animation-fill-mode: forwards;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0);
  }
  100% {
    opacity: 0.8;
    transform: translate(var(--drift), 106vh) rotate(var(--spin));
  }
}

/* ==========================================================================
   Админ-панель
   ========================================================================== */

.admin-page {
  min-height: 100vh;
}

.admin-header {
  padding: 20px 24px;
}

.admin-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
}

.admin-header__actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-badge {
  padding: 6px 11px;
  color: var(--accent-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--accent-light);
  border-radius: 999px;
}

.admin-main {
  width: 100%;
  max-width: var(--container);
  min-height: calc(100vh - 100px);
  margin: 0 auto;
  padding: 20px 24px 80px;
}

.admin-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  padding: 130px 20px;
  color: var(--muted);
}

.spinner {
  width: 38px;
  height: 38px;
  border: 4px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Вход ---------- */

.login-shell {
  display: grid;
  min-height: calc(100vh - 170px);
  place-items: center;
  padding: 20px 0;
}

.login-card {
  width: min(100%, 440px);
  padding: 36px;
  text-align: center;
  background:
    radial-gradient(circle at 90% 0%, rgba(249, 214, 200, 0.45) 0, transparent 16rem),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.login-card__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  font-size: 2rem;
  background: linear-gradient(145deg, #fff6ed, #fbe3d3);
  border: 1px solid #fff;
  border-radius: 22px;
  box-shadow: 0 12px 26px -16px rgba(91, 52, 35, 0.45);
}

.login-card .eyebrow {
  margin-bottom: 12px;
}

.login-card h1 {
  margin-bottom: 10px;
  font-size: 2rem;
  line-height: 1.08;
}

.login-card__text {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.91rem;
}

.login-card .field {
  margin-bottom: 14px;
}

.login-card__back {
  display: inline-block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.login-card__back:hover {
  color: var(--accent-dark);
}

/* ---------- Дашборд ---------- */

.admin-dashboard {
  animation: fade-in 0.25s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin: 6px 0 26px;
}

.admin-heading .eyebrow {
  margin-bottom: 12px;
}

.admin-heading h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  line-height: 1.05;
}

.admin-heading p {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 24px;
}

.admin-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 15px 17px;
  background: rgba(255, 253, 250, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.admin-stat__label {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
}

.admin-stat strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.admin-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  background: #f6e8dc;
  border-radius: 14px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.tab:hover {
  color: var(--ink);
}

.tab--active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 3px 10px -6px rgba(91, 52, 35, 0.35);
}

.tab__count {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  place-items: center;
  color: var(--ink-soft);
  font-size: 0.68rem;
  background: #f1e1d4;
  border-radius: 999px;
}

.tab--active .tab__count {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.admin-panel {
  padding: 22px;
  background: rgba(255, 253, 250, 0.9);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-heading h2 {
  margin: 0 0 3px;
  font-size: 1.28rem;
}

.panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto auto;
  gap: 17px;
  align-items: center;
  padding: 12px 14px;
  background: #fffdfb;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.admin-row:hover {
  border-color: var(--line-strong);
  box-shadow: 0 10px 26px -22px rgba(91, 52, 35, 0.5);
  transform: translateY(-1px);
}

.admin-row__thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px;
  height: 70px;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.9) 0, transparent 45%),
    linear-gradient(145deg, #fff1e5, #fbe3d3);
  border: 1px solid rgba(239, 221, 207, 0.7);
  border-radius: 13px;
}

.admin-row__emoji {
  font-size: 2rem;
  line-height: 1;
}

.admin-row__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-row__main {
  min-width: 0;
}

.admin-row__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.admin-row__title {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.admin-row__badge {
  padding: 4px 8px;
  font-size: 0.62rem;
}

.admin-row__meta {
  margin: 0 0 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row__desc {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.admin-row__price {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.07rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.admin-row__actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.admin-empty {
  padding: 50px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
}

.admin-empty > span {
  display: block;
  margin-bottom: 11px;
  font-size: 2.8rem;
  line-height: 1;
}

.admin-empty h3 {
  margin-bottom: 6px;
  font-size: 1.22rem;
}

.admin-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ==========================================================================
   Адаптивность
   ========================================================================== */

@media (max-width: 1080px) {
  .gift-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero__inner {
    border-radius: 30px;
  }

  .toolbar__filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .switch {
    grid-column: 1 / -1;
    min-height: 40px;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 14px 14px 0;
  }

  .hero__inner {
    padding: 20px 20px 28px;
    border-radius: 26px;
  }

  .container {
    padding: 20px 14px 24px;
  }

  .toolbar {
    padding: 16px;
    border-radius: 20px;
  }

  .toolbar__top {
    grid-template-columns: 1fr;
  }

  .toolbar__filters {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .switch {
    grid-column: auto;
  }

  .toolbar__bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 25px;
  }

  .stat {
    padding: 10px 13px;
  }

  .stat__icon {
    width: 38px;
    height: 38px;
  }

  .hero__content {
    margin-top: 36px;
  }

  .hero h1 {
    margin-top: 14px;
  }

  .gift-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gift-card {
    border-radius: 22px;
  }

  .footer__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .admin-header {
    padding: 14px;
  }

  .admin-header__actions {
    gap: 6px;
  }

  .admin-badge {
    display: none;
  }

  .admin-main {
    padding: 14px 14px 60px;
  }

  .admin-panel {
    padding: 15px;
    border-radius: 20px;
  }

  .admin-stats {
    gap: 9px;
  }

  .admin-stat {
    padding: 12px 14px;
  }

  .admin-stat strong {
    font-size: 1.35rem;
  }

  .admin-tabs-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .tabs {
    width: 100%;
  }

  .tab {
    flex: 1;
    justify-content: center;
  }

  .admin-row {
    grid-template-columns: 65px minmax(0, 1fr);
    gap: 11px 13px;
    padding: 11px;
  }

  .admin-row__thumb {
    width: 65px;
    height: 65px;
    grid-row: span 2;
  }

  .admin-row__price {
    grid-column: 2;
    font-size: 1rem;
  }

  .admin-row__actions {
    grid-column: 2;
    flex-wrap: wrap;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .modal__card {
    padding: 26px 20px 22px;
    border-radius: 23px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field--wide {
    grid-column: auto;
  }

  .login-card {
    padding: 30px 22px;
    border-radius: 24px;
  }
}

@media (max-width: 460px) {
  .brand__text {
    font-size: 1.1rem;
  }

  .topbar__admin {
    padding: 8px 11px;
    font-size: 0.78rem;
  }

  .hero h1 {
    font-size: 2.55rem;
  }

  .hero__lead {
    font-size: 0.95rem;
  }

  .eyebrow {
    font-size: 0.68rem;
  }

  .gift-card__content {
    padding: 17px 17px 18px;
  }

  .gift-card__price {
    font-size: 1.3rem;
  }

  .gift-card__bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .admin-header__actions .btn {
    padding: 0 10px;
  }

  .modal__actions {
    flex-direction: column-reverse;
  }

  .modal__actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
