/* Figma Make: «Аккуратный колхоз». Presentation only; no data dependencies. */
:root {
  --ink: #000;
  --yellow: #ffe500;
  --paper: #fff;
  --red: #ff2200;
  --card-width: 300px;
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--yellow);
  background-image: radial-gradient(circle, rgb(0 0 0 / 12%) 2px, transparent 2px);
  background-size: 20px 20px;
  font-family: 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;
}
body.modal-open { overflow: hidden; }
button, input, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
:focus, :focus-visible { outline: none; box-shadow: none; }
[hidden], .hidden { display: none !important; }
.page, .wishlist-page { min-height: 100dvh; display: flex; flex-direction: column; }
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
  border-bottom: 3px solid var(--ink);
  background: var(--yellow);
}
.hero-copy { min-width: 0; }
.brand, [data-wishlist-title] {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.glitch { margin: 8px 0 0; font-size: 14px; line-height: 1.3; font-weight: 700; }
.glitch br { display: none; }
.sub, [data-wishlist-subtitle], [data-wishlist-instructions] {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #494200;
}
#countdown {
  flex-shrink: 0;
  border: 2px solid var(--ink);
  padding: 8px 14px;
  min-width: 130px;
  background: white;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
#countdown:empty, #counter:empty, #crypto-wallets:empty { display: none; }
.carousel-wrap { position: relative; min-width: 0; }
.slider, #gifts-list {
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  padding: 16px 20px 24px;
  margin: 0;
  list-style: none;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 20px;
  scrollbar-color: black var(--yellow);
  scrollbar-width: thin;
}
.slide { flex: 0 0 var(--card-width); min-width: 0; display: flex; scroll-snap-align: start; }
.card, .gift-item {
  position: relative;
  display: flex;
  flex-direction: column;
  width: var(--card-width);
  min-width: 0;
  flex: 0 0 var(--card-width);
  border: 3px solid var(--ink);
  background: var(--paper);
  overflow-wrap: anywhere;
  scroll-snap-align: start;
}
.slider, #gifts-list { counter-reset: gift; }
.card, .gift-item { counter-increment: gift; }
.card::after, .gift-item::after {
  content: '№' counter(gift, decimal-leading-zero);
  position: absolute;
  top: 8px;
  right: 0;
  padding: 3px 9px;
  background: black;
  color: var(--yellow);
  font-size: 11px;
  font-weight: 900;
  pointer-events: none;
}
.image-frame { position: relative; border-bottom: 3px solid black; background: #f5f5f5; }
.card img, .gift-item > img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f5f5f5;
}
.gift-item > img { border-bottom: 3px solid black; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 12px; }
.card h2, .gift-item > h3 { margin: 0 0 6px; font-size: 14px; font-weight: 900; text-transform: uppercase; line-height: 1.2; }
.gift-item > h3 { margin: 12px 12px 6px; }
.description, .gift-item > p { margin: 0 0 8px; font-size: 12px; line-height: 1.4; color: #595959; }
.gift-item > p { margin-inline: 12px; }
.price, .gift-item > p + p {
  display: block;
  margin: 0 0 8px;
  padding: 5px 8px;
  background: var(--yellow);
  border: 2px solid black;
  color: black;
  font-size: 18px;
  font-weight: 900;
}
.gift-item > p + p { margin: auto 12px 8px; }
.joy { margin: 0 0 10px; padding: 5px 6px; background: #f5f5f5; border: 1px solid #ddd; font: 12px monospace; }
.eyebrow { align-self: flex-start; margin: 0 0 8px; padding: 3px 8px; background: var(--red); color: white; border: 2px solid black; font-size: 11px; font-weight: 900; letter-spacing: 1px; }
.actions { display: flex; gap: 6px; margin-top: auto; }
.buy-link, .reserve-btn, .gift-item > a, .reserved-label,
#confirm, #close, #reserve-confirm, #reserve-cancel, .filters button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 8px;
  border: 2px solid black;
  border-radius: 0;
  background: white;
  color: black;
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.actions > * { flex: 1; }
.reserve-btn, #confirm, #reserve-confirm { background: black; color: var(--yellow); font-weight: 900; }
.gift-item > a, .gift-item > .reserve-btn, .gift-item > .reserved-label { margin: 0 12px 8px; }
.gift-item > :last-child { margin-bottom: 12px; }
.reserved-label, .reserve-btn:disabled, .reserve-btn.disabled { background: #e5e5e5; color: #555; cursor: default; }
.gift-item.reserved { filter: grayscale(1); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 20px 0; }
.gift-catalog { min-width: 0; }
.arrow { position: absolute; top: 50%; z-index: 1; transform: translateY(-50%); width: 44px; height: 44px; border: 2px solid black; background: black; color: var(--yellow); font-size: 22px; }
.arrow-left { left: 0; }
.arrow-right { right: 0; }
.carousel-wrap:not(:has(.slide, .card)) .arrow { display: none; }
.footer { margin-top: auto; padding: 12px 20px; border-top: 2px solid black; background: var(--yellow); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.footer:has(#crypto-wallets:empty) { display: none; }
.modal, #reserve-modal { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: center; padding: 16px; overflow-y: auto; background: rgb(0 0 0 / 65%); }
.modal-inner, .modal-content { width: 100%; max-width: 380px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; border: 4px solid black; background: var(--yellow); }
.modal h3, .modal-content h3 { margin: 0 0 16px; font-size: 18px; font-weight: 900; text-transform: uppercase; }
.modal label, .modal-content label { display: block; margin-bottom: 6px; font-size: 13px; }
.modal input:not([type=checkbox]), .modal-content input { width: 100%; min-height: 44px; margin: 0 0 12px; padding: 8px 10px; border: 2px solid black; border-radius: 0; background: white; font-size: 16px; }
.modal input[aria-invalid=true] { border-color: #b30000; }
.modal .checkbox { display: flex; gap: 8px; align-items: center; margin: 4px 0 16px; }
.checkbox input { width: 20px; height: 20px; accent-color: black; }
#confirm, #close, #reserve-confirm, #reserve-cancel { width: 100%; }
#close, #reserve-cancel { margin-top: 8px; }
@media (hover: hover) {
  .buy-link:hover, .gift-item > a:hover, .filters button:hover { background: var(--yellow); }
  .reserve-btn:not(:disabled):hover, #confirm:hover, #reserve-confirm:hover { background: #292929; }
}
@media (max-width: 600px) {
  :root { --card-width: 242px; }
  .hero { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .brand, [data-wishlist-title] { font-size: 18px; }
  .glitch { font-size: 12px; }
  .sub, [data-wishlist-subtitle], [data-wishlist-instructions] { font-size: 11px; }
  #countdown { min-width: 110px; padding: 6px 10px; font-size: 15px; }
  .slider, #gifts-list { padding: 12px 12px 20px; scroll-padding-inline: 12px; }
  .card-body { padding: 10px; }
  .card h2, .gift-item > h3 { font-size: 13px; }
  .price, .gift-item > p + p { font-size: 16px; }
  .filters { padding: 10px 12px 0; }
  .footer { padding: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Homepage: birthday panel and continuous, pausable gift strip. */
.countdown-label { display: block; margin-bottom: 4px; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; }
#birthday-days { display: block; font-size: 22px; }
.page > .gift-catalog { padding-top: clamp(32px, 7vh, 72px); padding-bottom: 32px; }
#gifts-list.is-looping { scroll-snap-type: none; scroll-behavior: auto; scrollbar-width: none; overflow-anchor: none; }
#gifts-list.is-looping::-webkit-scrollbar { display: none; }
.gift-item[data-gift-number]::after { content: '№' attr(data-gift-number); }
@media (max-width: 600px) {
  .page > .hero { flex-wrap: nowrap; align-items: flex-start; }
  .page .hero-copy { flex: 1; }
  .page #countdown { min-width: 106px; width: 120px; padding: 6px; }
  .countdown-label { font-size: 8px; letter-spacing: .5px; }
  #birthday-days { font-size: 18px; }
  .page > .gift-catalog { padding-top: 28px; }
}

/* Keep native swipes and vertical scrolling, without gesture zoom. */
body { touch-action: pan-x pan-y; }
#gifts-list { cursor: grab; touch-action: pan-x pan-y; }
#gifts-list.is-dragging, #gifts-list.is-dragging * { cursor: grabbing; user-select: none; }
#gifts-list img { -webkit-user-drag: none; user-select: none; }
#reserve-email:focus { outline: none; box-shadow: none; }

.shop-reminder {
  width: min(380px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 24px;
  border: 4px solid black;
  background: var(--yellow);
  color: black;
}
.shop-reminder::backdrop { background: rgb(0 0 0 / 65%); }
.shop-reminder h3 { margin: 0 0 14px; font-size: 20px; font-weight: 900; text-transform: uppercase; }
.shop-reminder p { margin: 0 0 20px; font-size: 16px; line-height: 1.5; }
.shop-reminder-proceed, .shop-reminder-close {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 44px; padding: 10px;
  border: 2px solid black; border-radius: 0;
  background: black; color: var(--yellow);
  text-align: center; text-decoration: none;
  font-size: 13px; font-weight: 700; text-transform: uppercase;
}
.shop-reminder-close { margin-top: 8px; background: white; color: black; }

/* Optional public name is explicitly opt-in; email remains private. */
.email-hint { font-weight: 400; line-height: 1.4; }
#reserve-name-toggle {
  width: 100%; min-height: 44px; margin: 0 0 12px; padding: 9px 10px;
  border: 2px solid black; border-radius: 0; background: white;
  color: black; font-size: 13px; font-weight: 700; text-align: center;
}
#reserve-name-toggle[aria-expanded="true"] { background: black; color: var(--yellow); }
.reserved-label { text-transform: none; }

/* Disable selection of page copy, while preserving editing in form controls. */
body { -webkit-user-select: none; user-select: none; }
input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; }
