:root {
  color-scheme: light;
  --ink: #101217;
  --muted: #5f6470;
  --line: #e7e9ee;
  --brand: #f43f5e;
  --brand-dark: #be123c;
  --accent: #10b981;
  --paper: #ffffff;
  --soft: #f7f8fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
}

.landing-page {
  min-height: 100vh;
  background: #fff;
}

.product-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: minmax(360px, 58vh) auto;
}

.media-stage {
  position: relative;
  overflow: hidden;
  background: #f3f4f6;
}

.slider,
.slide {
  position: absolute;
  inset: 0;
}

.slide {
  margin: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 700ms ease, transform 1400ms ease;
}

.slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f3f4f6;
}

.media-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.progress {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  z-index: 2;
  overflow: hidden;
}

.progress span {
  display: block;
  width: 35%;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  animation: progress 4s linear infinite;
}

.product-content {
  padding: 26px 20px 34px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.product-content h1,
.post-head h1,
.home-head h1 {
  margin: 0;
  font-size: clamp(1.55rem, 7vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.price {
  margin: 18px 0 0;
  color: var(--accent);
  font-weight: 900;
  font-size: 1.45rem;
}

.description {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin-top: 22px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(244, 63, 94, 0.28);
}

.cta:active {
  transform: translateY(1px);
}

.trust {
  margin: 14px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

.admin-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #ffffff, #f3f5f9);
}

.admin-shell,
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-panel,
.login-card {
  width: min(980px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(16, 18, 23, 0.08);
}

.login-card {
  width: min(420px, 100%);
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-panel h1,
.login-card h1 {
  font-size: 1.8rem;
  line-height: 1.1;
  margin-bottom: 22px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  font: inherit;
}

textarea {
  width: 100%;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

input[type="file"] {
  padding: 12px;
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.ghost-button,
.small-button,
.danger-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.ghost-button,
.small-button {
  background: #eef1f6;
  color: var(--ink);
}

.danger-button {
  background: #fee2e2;
  color: #991b1b;
}

.result {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.result a {
  color: var(--brand-dark);
  overflow-wrap: anywhere;
  font-weight: 800;
}

.saved-section {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.saved-section h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.page-list {
  display: grid;
  gap: 12px;
}

.page-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.page-row img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  background: #f3f4f6;
  border-radius: 8px;
}

.page-row h3 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.page-row a {
  color: var(--brand-dark);
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.row-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.muted {
  color: var(--muted);
}

.preview-frame {
  width: 100%;
  height: 560px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.error {
  color: var(--brand-dark);
  font-weight: 800;
}

.public-home {
  min-height: 100vh;
  background: #fff;
}

.home-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 22px 16px 34px;
}

.home-head {
  padding: 8px 0 18px;
}

.home-head h1 {
  font-size: clamp(1.9rem, 8vw, 3.2rem);
}

.home-head p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.45;
  margin: 10px 0 0;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.product-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.product-card a {
  color: inherit;
  text-decoration: none;
  display: block;
  min-height: 100%;
}

.post-card-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #f3f4f6;
  overflow: hidden;
}

.post-card-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 500ms ease;
}

.post-card-slider img.is-active {
  opacity: 1;
}

.product-card-body {
  padding: 12px;
}

.product-card h2 {
  margin: 4px 0 0;
  font-size: clamp(1rem, 4vw, 1.2rem);
  line-height: 1.18;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card p {
  margin: 7px 0 0;
  color: var(--accent);
  font-weight: 900;
}

.product-card .post-name {
  margin: 0;
  color: var(--brand-dark);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.product-card span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-products {
  color: var(--muted);
  text-align: center;
  padding: 40px 0;
}

.post-page {
  background: #fff;
}

.post-shell {
  width: min(1060px, 100%);
  margin: 0 auto;
  padding: 22px 16px 38px;
}

.post-head {
  padding-bottom: 18px;
}

.post-head p:not(.eyebrow) {
  color: var(--muted);
  margin: 10px 0 0;
}

.post-products {
  display: grid;
  gap: 14px;
}

.post-product {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.post-product > img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  background: #f3f4f6;
}

.post-product-content {
  padding: 16px;
}

.post-product h2 {
  margin: 0;
  font-size: clamp(1.05rem, 5vw, 1.45rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.post-product-content > p:not(.price),
.product-full {
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

.product-full {
  margin-top: 10px;
}

.more-button {
  min-height: 42px;
  margin-top: 12px;
  background: #eef1f6;
  color: var(--ink);
  width: 100%;
}

@media (min-width: 860px) {
  .product-shell {
    grid-template-columns: minmax(0, 58vw) minmax(360px, 1fr);
    grid-template-rows: 100vh;
  }

  .product-content {
    align-self: center;
    padding: 48px;
  }

  .product-content h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
  }

  .page-row {
    grid-template-columns: 86px minmax(0, 1fr) auto;
  }

  .row-actions {
    grid-column: auto;
  }

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

  .post-card-slider {
    aspect-ratio: 16 / 10;
  }

  .post-products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .post-product {
    display: flex;
    flex-direction: column;
  }
}

@keyframes progress {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(300%);
  }
}
