:root {
  --accent: #d9362b;
  --accent-dark: #b92b22;
  --soft-red: #fff3f1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  display: block;
  position: sticky;
  top: 0;
  z-index: 50;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 1px 0 rgba(36, 59, 50, .1);
  backdrop-filter: blur(12px);
}

.header-inner,
.channel-nav-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(260px, 560px) auto;
  align-items: center;
  gap: 28px;
}

.site-header .brand {
  font-size: 21px;
  line-height: 1.05;
  letter-spacing: 1px;
  white-space: nowrap;
}

.site-header .brand span {
  margin-top: 4px;
  font-size: 7px;
  letter-spacing: 2.5px;
}

.header-search {
  display: flex;
  margin: 0;
  height: 38px;
}

.header-search input {
  min-width: 0;
  height: 38px;
  margin: 0;
  padding: 8px 14px;
  border: 2px solid var(--accent);
  border-right: 0;
  border-radius: 5px 0 0 5px;
  background: #fff;
}

.header-search button {
  flex: 0 0 auto;
  min-width: 70px;
  height: 38px;
  padding: 0 22px;
  border-color: var(--accent);
  border-radius: 0 5px 5px 0;
  background: var(--accent);
  font-size: 14px;
  white-space: nowrap;
}

.header-search button:hover {
  background: var(--accent-dark);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  white-space: nowrap;
}

.main-nav a {
  line-height: 58px;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.channel-nav {
  border-top: 1px solid #f0f0eb;
  background: #fff;
}

.channel-nav-inner {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 26px;
  overflow-x: auto;
  scrollbar-width: none;
  font-size: 13px;
  white-space: nowrap;
}

.channel-nav-inner::-webkit-scrollbar {
  display: none;
}

.channel-nav a:first-child {
  color: var(--accent);
  font-weight: 700;
}

main {
  max-width: 1180px;
  padding-top: 24px;
}

footer {
  max-width: 1180px;
}

.featured-carousel {
  position: relative;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #e5e2d9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(36, 59, 50, .06);
}

.carousel-track {
  display: flex;
  overflow: hidden;
  scroll-snap-type: x mandatory;
}

.featured-slide {
  min-width: 100%;
  height: 310px;
  display: grid;
  grid-template-columns: 48% 52%;
  scroll-snap-align: start;
}

.featured-visual {
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #e8eee0, #c7d5be);
}

.featured-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .4s ease;
}

.featured-visual:hover img {
  transform: scale(1.025);
}

.featured-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 58px;
}

.featured-slide.no-cover {
  display: block;
  background: linear-gradient(135deg, #edf2e8, #fff);
}

.featured-slide.no-cover .featured-copy {
  width: min(760px, 100%);
  height: 100%;
}

.featured-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
}

.featured-copy h1 {
  display: -webkit-box;
  margin: 12px 0 10px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.25;
}

.featured-copy p {
  display: -webkit-box;
  margin: 0 0 22px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
}

.featured-copy .button,
.product-action {
  background: var(--accent);
  border-color: var(--accent);
}

.featured-copy .button:hover {
  background: var(--accent-dark);
}

.carousel-controls {
  position: absolute;
  right: 22px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.carousel-arrow {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #d8d5cc;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.carousel-dots {
  display: flex;
  gap: 6px;
}

.carousel-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c8c7c0;
}

.carousel-dots button[aria-current="true"] {
  width: 20px;
  border-radius: 6px;
  background: var(--accent);
}

.featured-empty {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 32px;
  padding: 28px;
  border-radius: 7px;
  background: #edf1e8;
  color: var(--muted);
}

.featured-empty strong {
  color: var(--ink);
}

.content-filters {
  padding: 14px 18px;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.content-filters select {
  min-width: 160px;
  padding: 8px 11px;
  margin-top: 4px;
  font-size: 14px;
}

.content-filters button {
  padding: 8px 18px;
}

.product-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.product-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #e2e1da;
  border-radius: 7px;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(36, 59, 50, .08);
}

.product-thumb {
  min-height: 160px;
  overflow: hidden;
  background: #e8eee0;
}

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

.product-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 9px 10px;
}

.product-card.no-cover {
  grid-template-columns: 1fr;
}

.featured-badge {
  padding: 1px 8px;
  border-radius: 3px;
  background: var(--soft-red);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.product-card h2 {
  display: -webkit-box;
  margin: 4px 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 19px;
  line-height: 1.4;
}

.product-card-copy > p {
  display: -webkit-box;
  margin: 0 0 4px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.product-card .content-meta {
  margin: 4px 0;
}

.product-card .content-meta > span:last-child,
.product-card .content-meta time {
  display: none;
}

.product-detail {
  max-width: 680px;
  margin-top: 24px;
}

.product-detail h1 {
  margin: 10px 0 8px;
  font-size: 30px;
  line-height: 1.35;
}

.product-detail .content-meta {
  margin: 8px 0 14px;
}

.product-detail .lead {
  margin: 10px 0 20px;
  font-size: 16px;
}

.product-detail .purchase {
  margin-top: 32px;
  padding-top: 20px;
}

.article-date {
  font-size: 12px;
  white-space: nowrap;
}

.search-summary {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.search-section + .search-section {
  margin-top: 28px;
}

.search-section > h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

@media (max-width: 700px) {
  .product-detail h1 {
    font-size: 26px;
  }
}

.product-action {
  margin-left: auto;
  color: var(--accent);
  background: none;
  font-size: 13px;
  font-weight: 700;
}

.product-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 5px;
}

.inline-form {
  margin: 0;
}

.table-toggle {
  padding: 5px 10px;
  border-color: #c9cec6;
  background: #fff;
  color: var(--green);
  font-size: 12px;
  white-space: nowrap;
}

.table-toggle:hover,
.table-toggle.selected {
  border-color: var(--accent);
  background: var(--soft-red);
  color: var(--accent);
}

.editor-page main {
  padding-top: 16px;
  padding-bottom: 40px;
}

.editor-page main > h1 {
  margin: 7px 0 2px;
  font-size: 30px;
}

.editor-page main > .muted {
  margin: 0 0 10px;
}

.editor-page .editor {
  max-width: 860px;
}

.editor-options {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 8px 0 14px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.editor-options .check {
  margin: 0;
  font-weight: 600;
}

.editor-page .editor > label {
  margin-bottom: 11px;
}

.editor-page .editor input:not([type="checkbox"]),
.editor-page .editor select,
.editor-page .editor textarea {
  margin-top: 4px;
  padding: 9px 10px;
}

.editor-page .taxonomy-fields {
  margin: 15px 0;
  padding: 14px 16px;
}

.editor-page .field-grid {
  gap: 14px;
}

.editor-page .taxonomy-fields label {
  margin-bottom: 10px;
}

.editor-page .tag-options {
  gap: 6px 12px;
  margin: 7px 0 11px;
}

.editor-page .tag-options .check {
  padding: 3px 7px;
}

.editor-page .markdown-editor {
  margin: 15px 0;
}

.editor-page .markdown-toolbar {
  gap: 4px;
  padding: 7px;
}

.editor-page .editor-help {
  margin: 5px 0 0;
}

.editor-page .editor-status {
  min-height: 18px;
  margin: 2px 0;
}

.editor-page .delete-form {
  margin-top: 14px;
}

.admin-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 28px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.admin-settings h2,
.admin-settings p {
  margin: 0;
}

.admin-settings p {
  color: var(--muted);
  font-size: 13px;
}

.admin-settings form {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
}

.admin-settings .check {
  margin: 0;
  white-space: nowrap;
}

.admin-settings button {
  padding: 7px 14px;
  white-space: nowrap;
}

@media (max-width: 800px) {
  .admin-settings,
  .admin-settings form {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-settings form {
    gap: 10px;
  }
}

.product-action:hover {
  color: var(--accent-dark);
}

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: auto minmax(220px, 1fr);
    gap: 16px;
    padding: 8px 0;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-content: center;
    height: 28px;
  }

  .main-nav a {
    line-height: 28px;
  }

  .product-feed {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .site-header {
    position: static;
  }

  .header-inner,
  .channel-nav-inner {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    grid-template-columns: auto 1fr;
    padding: 8px 0 6px;
  }

  .header-search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .main-nav {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    gap: 14px;
  }

  .channel-nav-inner {
    gap: 20px;
  }

  main {
    padding-top: 14px;
  }

  .featured-slide {
    height: auto;
    grid-template-columns: 1fr;
  }

  .featured-visual {
    height: 185px;
  }

  .featured-copy {
    min-height: 220px;
    padding: 24px 24px 52px;
  }

  .featured-copy h1 {
    font-size: 27px;
  }

  .carousel-controls {
    right: 18px;
    bottom: 14px;
  }

  .content-filters {
    align-items: flex-end;
  }

  .content-filters label {
    min-width: calc(50% - 6px);
  }

  .product-card {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .product-thumb {
    min-height: 145px;
  }

  .product-card-copy {
    padding: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .featured-visual img,
  .product-card {
    transition: none;
  }
}
