/* style.css: white page, soft pink accent, rounded cards, phone first */

:root {
  --bg: #ffffff;
  --soft: #fdf0f5;      /* light pink backgrounds */
  --soft-2: #fbe1ec;    /* light pink hover */
  --line: #f3d9e3;      /* borders */
  --ink: #1f2937;       /* main text */
  --muted: #6b7280;     /* small text */
  --accent: #c2185b;    /* pink buttons (white text passes contrast) */
  --accent-dark: #9c1449;
  --radius: 16px;
  --shadow: 0 2px 12px rgba(194, 24, 91, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- header ---------- */

.site-header {
  background: linear-gradient(180deg, var(--soft) 0%, var(--bg) 100%);
  text-align: center;
  padding: 40px 0 16px;
}

.site-name {
  margin: 0;
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 8px 0 0;
  color: var(--muted);
}

.header-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.tagline:empty,
.header-links:empty { display: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;              /* easy to tap */
  padding: 10px 16px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}

.btn-buy { background: var(--accent); color: #fff; }
.btn-buy:hover { background: var(--accent-dark); }

.btn-video { background: var(--soft); color: var(--accent-dark); }
.btn-video:hover { background: var(--soft-2); }

.btn-outline { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--soft); }

/* ---------- categories + search ---------- */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;              /* swipe sideways on phones */
  scrollbar-width: none;
}

.chip {
  flex: none;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.chip:hover { background: var(--soft); }

.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

/* ---------- product grid ---------- */

.status {
  margin: 0;
  padding: 32px 0;
  color: var(--muted);
  text-align: center;
}

.status:empty { display: none; }

.grid {
  list-style: none;
  margin: 8px 0 48px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));   /* 2 cards on phones */
  gap: 12px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.card-media {
  aspect-ratio: 1 / 1;
  background: var(--soft);
}

.card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
}

.tag {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-name {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.card-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.card-actions {
  margin-top: auto;              /* buttons always at the bottom */
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
}

.card-actions .btn { width: 100%; padding: 8px 12px; }

/* ---------- footer ---------- */

.site-footer {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer p { margin: 4px 0; }

/* ---------- video pop-up ---------- */

.video-dialog {
  width: min(92vw, calc(85vh * 9 / 16));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: #000;
  overflow: visible;
}

.video-dialog::backdrop { background: rgba(17, 24, 39, 0.75); }

.video-box { aspect-ratio: 9 / 16; }

.video-box iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius);
}

.close {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}

/* ---------- bigger screens ---------- */

@media (min-width: 720px) {
  .toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .search input { width: 260px; }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
  }

  .card-body { padding: 16px; }
}
