:root {
  --bg: #f3f5f5;
  --surface: #ffffff;
  --surface-soft: #eef2f2;
  --line: #d7dfdf;
  --text: #101314;
  --muted: #576365;
  --brand: #5cc2bd;
  --brand-strong: #2aa6a0;
  --ink: #000000;
  --ok: #1d8a52;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Barlow", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 5% 0%, #dde9e8 0%, #f3f5f5 32%), linear-gradient(180deg, #f6f8f8, #edf1f1);
}

.page-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 85% 12%, rgba(92, 194, 189, 0.2), transparent 45%);
}

.announcement {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: #ffffff;
  text-align: center;
  padding: 0.55rem 0.9rem;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

.shell {
  width: min(1240px, 96%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.logo-link {
  display: inline-flex;
  align-items: center;
}

.logo {
  width: clamp(190px, 20vw, 320px);
  height: auto;
}

.auth-panel {
  display: grid;
  gap: 0.4rem;
}

.user-state {
  font-size: 0.88rem;
  color: var(--muted);
  text-align: right;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.auth-link {
  font: inherit;
  border-radius: 0.55rem;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, var(--brand), #7ad5d0);
  color: #032221;
  padding: 0.58rem 0.7rem;
  text-decoration: none;
  font-weight: 600;
}

.auth-link.ghost {
  background: #f5f8f8;
  color: var(--text);
}

.auth-actions button {
  white-space: nowrap;
}

input,
select,
button {
  font: inherit;
  border-radius: 0.55rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0.58rem 0.7rem;
}

input,
select {
  min-width: 150px;
}

button {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  font-weight: 600;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

button.primary {
  background: linear-gradient(120deg, var(--brand), #7ad5d0);
  border-color: transparent;
  color: #032221;
}

button.ghost {
  background: #f5f8f8;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  gap: 1rem;
  margin: 0.45rem auto 1rem;
}

.hero-copy,
.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.15rem;
}

.eyebrow {
  margin: 0;
  color: var(--brand-strong);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}

.hero-copy h1 {
  margin: 0.45rem 0 0.6rem;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.5rem, 3.1vw, 2.25rem);
  line-height: 1.1;
  max-width: 20ch;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  max-width: 68ch;
}

.hero-card h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 1.1rem;
}

.hero-card ul {
  margin: 0.65rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(300px, 1fr);
  gap: 1rem;
  align-items: start;
  padding-bottom: 1.25rem;
}

.catalog-panel,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.catalog-panel {
  padding: 1rem;
}

.section-head {
  margin-bottom: 0.75rem;
}

.section-head h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 1.3rem;
}

.section-head p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.toolbar input {
  flex: 1 1 290px;
}

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

.card {
  border: 1px solid #d5dddd;
  border-radius: 0.9rem;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(8, 18, 19, 0.1);
}

.thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #dce9e8;
}

.card-content {
  display: grid;
  gap: 0.45rem;
  padding: 0.74rem;
}

.title-line {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.5rem;
}

.title-line h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 1.01rem;
  line-height: 1.25;
}

.price {
  color: var(--ok);
  font-weight: 700;
  white-space: nowrap;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  border: 1px solid #bcdedc;
  background: #f1fbfb;
  color: #1f6f6b;
  font-size: 0.73rem;
  font-weight: 600;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
}

.right-rail {
  position: sticky;
  top: 0.8rem;
  display: grid;
  gap: 0.9rem;
}

.panel {
  padding: 0.85rem;
}

.panel h2 {
  margin: 0 0 0.5rem;
  font-family: "Manrope", sans-serif;
  font-size: 1.1rem;
}

.cart-items,
.purchase-history {
  display: grid;
  gap: 0.5rem;
  max-height: 320px;
  overflow: auto;
}

.line,
.purchase {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.55rem;
  background: var(--surface-soft);
}

.line-head,
.purchase-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.totals {
  margin: 0.75rem 0;
  display: grid;
  gap: 0.2rem;
}

.totals > div {
  display: flex;
  justify-content: space-between;
}

.totals .total {
  margin-top: 0.2rem;
  border-top: 1px solid var(--line);
  padding-top: 0.35rem;
}

.hint {
  color: var(--muted);
  font-size: 0.83rem;
}

dialog {
  width: min(740px, 97vw);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.8rem;
  background: #fff;
  color: var(--text);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

#previewVideo {
  width: 100%;
  max-height: 70vh;
}

.site-footer {
  padding: 0 0 0.9rem;
}

.admin-link {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
}

.admin-link:hover {
  color: var(--brand-strong);
  text-decoration: underline;
}

@media (max-width: 980px) {
  .hero,
  .main-grid {
    grid-template-columns: 1fr;
  }

  .right-rail {
    position: static;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-state {
    text-align: left;
  }

  .auth-actions {
    justify-content: flex-start;
  }
}
