:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --text: #182230;
  --muted: #667085;
  --line: #d7dde8;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --accent: #f59e0b;
  --danger: #dc2626;
  --ink: #111827;
  --soft: #e9f6f4;
  --shadow: 0 16px 38px rgba(15, 23, 42, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Tahoma, Arial, "Segoe UI", sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

button,
.buy-button {
  border: 0;
  cursor: pointer;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  padding: 12px 18px;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

button:hover,
.buy-button:hover {
  background: var(--brand-strong);
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.18);
  transform: translateY(-1px);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(245, 158, 11, 0.42);
  outline-offset: 2px;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.site-footer p,
.note,
.deal-card p,
.hero-copy p {
  color: var(--muted);
}

.nav,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.nav a,
.footer-links a,
.category-strip a {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.nav a:hover,
.footer-links a:hover,
.category-strip a:hover {
  background: var(--soft);
  color: var(--brand-strong);
}

.disclosure {
  margin: 0 0 18px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff8d8;
  color: #6b4e00;
  font-size: 14px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 24px;
  align-items: stretch;
  padding: 34px 0 26px;
}

.hero-panel,
.admin-panel,
.login-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(16px, 3vw, 34px) 0;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 8px 0 14px;
  color: var(--ink);
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.12;
}

.eyebrow,
.category {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.search-bar,
.filters {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.search-bar input,
.filters input,
.filters select,
.admin-form input,
.admin-form select,
.admin-form textarea,
.login-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-bar input:focus,
.filters input:focus,
.filters select:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus,
.login-card input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  background: #111827;
  color: #fff;
}

.hero-panel span {
  color: #a7f3d0;
}

.hero-panel strong {
  direction: ltr;
  font-size: 24px;
}

.hero-panel p {
  color: #dbeafe;
}

.category-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 0 24px;
}

.category-strip a {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.section,
.page-head {
  padding: 26px 0;
}

.section-head,
.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section h2,
.page-head h1 {
  margin: 0 0 14px;
  color: var(--ink);
}

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

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

.deal-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.deal-card:hover {
  border-color: rgba(15, 118, 110, 0.34);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.deal-image {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: #eef2f7;
}

.deal-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}

.image-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 180px;
  color: var(--muted);
  font-weight: 800;
}

.image-placeholder.large {
  min-height: 420px;
}

.discount {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  padding: 4px 9px;
  font-weight: 800;
}

.discount.inline {
  position: static;
  background: #fee2e2;
  color: var(--danger);
}

.deal-body {
  padding: 16px;
}

.deal-body h3 {
  min-height: 58px;
  margin: 6px 0 8px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
}

.price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.price-row strong {
  color: var(--brand-strong);
  font-size: 20px;
}

.price-row del {
  color: var(--muted);
}

.deal-show {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 26px;
  padding: 28px 0;
}

.product-media,
.product-info {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 24px;
}

.product-media img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.product-info h1 {
  margin: 8px 0 12px;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
}

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

.highlights {
  padding: 0;
  margin: 20px 0;
  list-style: none;
}

.highlights li {
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--soft);
}

.buy-button {
  display: inline-flex;
  justify-content: center;
  min-width: 220px;
  margin-top: 8px;
}

.prose {
  max-width: 860px;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.login-body,
.admin-body {
  min-height: 100vh;
  background: #eef2f7;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

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

.login-card label,
.admin-form label {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: var(--ink);
  font-weight: 700;
}

.check-row {
  display: flex !important;
  grid-column: auto;
  align-items: center;
  gap: 8px;
}

.check-row input {
  width: auto;
}

.error-box,
.status-message {
  margin: 16px 0;
  border-radius: 8px;
  padding: 12px 14px;
}

.error-box {
  background: #fee2e2;
  color: #991b1b;
}

.error-box ul {
  margin: 8px 0 0;
  padding-inline-start: 22px;
}

.status-message {
  background: #dcfce7;
  color: #166534;
}

.admin-body {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  padding: 22px;
  background: var(--ink);
  color: #fff;
}

.admin-sidebar nav {
  display: grid;
  gap: 8px;
}

.admin-sidebar nav a,
.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  padding: 10px 12px;
}

.ghost-button {
  color: var(--ink);
  background: #fff;
}

.ghost-button:hover {
  background: #eef2f7;
  box-shadow: none;
}

.admin-sidebar .ghost-button {
  width: 100%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.admin-main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.admin-head h1 {
  margin: 0;
  color: var(--ink);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

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

.stat strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 28px;
}

.admin-panel {
  margin-top: 18px;
}

.inline-editor {
  min-width: 220px;
}

.inline-editor summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  padding: 8px 12px;
  cursor: pointer;
}

.compact-form {
  min-width: min(760px, 82vw);
  margin: 8px 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

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

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

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: right;
  vertical-align: top;
}

td small {
  display: block;
  color: var(--muted);
}

nav[role="navigation"] {
  margin-top: 20px;
}

nav[role="navigation"] svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 900px) {
  .hero,
  .deal-show,
  .admin-body {
    grid-template-columns: 1fr;
  }

  .deal-grid,
  .featured-grid,
  .stats-grid,
  .grid-form {
    grid-template-columns: 1fr;
  }

  .site-header,
  .site-footer,
  .section-head,
  .page-head,
  .filters,
  .search-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }
}
