@import url("./styles/tokens.css");
@import url("./styles/base.css");

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(234, 214, 200, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: block;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
}

.top-nav {
  display: flex;
  gap: clamp(12px, 3vw, 32px);
  margin-left: auto;
  color: var(--muted);
  font-weight: 700;
}

.top-nav a,
.text-link {
  text-decoration: none;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-nav a span {
  color: var(--green);
  font-size: 0.95rem;
  line-height: 1;
}

.top-nav .nav-icon {
  position: relative;
  flex: 0 0 auto;
  width: 17px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 4px 3px 3px 4px;
  color: var(--sale);
  transform: rotate(-16deg);
}

.top-nav .nav-icon-products::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -6px;
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 2px 0 0 2px;
  background: #fff;
  transform: translateY(-50%) rotate(45deg);
}

.top-nav .nav-icon-products::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.top-nav a:hover,
.text-link:hover {
  color: var(--green-dark);
}

.top-nav a.is-active {
  color: var(--green-dark);
}


.account-menu {
  display: block;
  position: relative;
  margin-left: 0;
}

.account-menu summary {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  list-style: none;
  box-shadow: 0 8px 20px rgba(107, 58, 25, 0.1);
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.guest-avatar {
  position: relative;
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff7ed 0%, #f4dfcf 100%);
  box-shadow: inset 0 0 0 1px rgba(234, 214, 200, 0.92);
}

.guest-avatar::before,
.guest-avatar::after {
  position: absolute;
  left: 50%;
  content: "";
  transform: translateX(-50%);
}

.guest-avatar::before {
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted);
}

.guest-avatar::after {
  bottom: 5px;
  width: 16px;
  height: 9px;
  border-radius: 999px 999px 6px 6px;
  background: var(--muted);
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 172px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(107, 58, 25, 0.16);
}

.account-menu-panel a,
.account-menu-disabled,
.account-menu-action {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 11px 12px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.account-menu-icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--sale);
}

.account-menu-icon::before,
.account-menu-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.account-menu-icon--personal::before {
  left: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.account-menu-icon--personal::after {
  left: 5px;
  top: 6px;
  width: 8px;
  height: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.account-menu-icon--login::before {
  left: 6px;
  top: 2px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.account-menu-icon--login::after {
  left: 3px;
  bottom: 2px;
  width: 12px;
  height: 8px;
  border-radius: 999px 999px 4px 4px;
  background: currentColor;
}

.account-menu-action {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.account-menu-panel a:hover,
.account-menu-action:hover {
  background: #fff7ed;
  color: var(--green-dark);
}

.account-menu-disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.72;
}

.account-menu-disabled small {
  color: var(--sale);
  font-size: 0.74rem;
  font-weight: 800;
}

.customer-auth-panel {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
}

.customer-auth-panel input {
  width: 100%;
  margin-bottom: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.customer-auth-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.customer-auth-page {
  min-height: calc(100dvh - 84px);
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(24, 33, 47, 0.82), rgba(24, 33, 47, 0.2)),
    url("https://images.unsplash.com/photo-1556742049-0cfed4f6a45d?auto=format&fit=crop&w=1800&q=80") center / cover;
}

.customer-auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(22px, 4vw, 48px);
  width: min(980px, 100%);
  margin: 0 auto;
  align-items: center;
}

.customer-auth-copy {
  color: #fff;
}

.customer-auth-copy .eyebrow {
  color: #ffd89a;
}

.customer-auth-copy h1 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 4.8rem);
  line-height: 0.98;
}

.customer-auth-copy p:not(.eyebrow) {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.customer-auth-page .customer-auth-panel {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 58px rgba(24, 33, 47, 0.24);
}

.customer-auth-form {
  display: grid;
  gap: 12px;
}

.customer-auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.customer-auth-page .customer-auth-panel input {
  width: 100%;
  min-height: 46px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffaf4;
  color: var(--ink);
  font: inherit;
}

.customer-auth-page .customer-auth-actions .button {
  flex: 1 1 140px;
}

.customer-auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.customer-auth-divider::before,
.customer-auth-divider::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: var(--line);
}

.customer-oauth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-oauth-button {
  justify-content: center;
  gap: 10px;
  background: #fff;
}

.customer-oauth-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.account-points {
  margin: 6px 12px 10px;
  color: var(--green-dark);
  font-weight: 800;
}

.page-view[hidden] {
  display: none !important;
}

.page-section {
  padding-top: clamp(32px, 5vw, 56px);
}

.hero {
  position: relative;
  z-index: 2;
  min-height: 0;
  display: grid;
  align-items: center;
  overflow: visible;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 208, 128, 0.24), transparent 28%),
    radial-gradient(circle at 70% 120%, rgba(249, 115, 22, 0.28), transparent 38%),
    linear-gradient(135deg, #2b1d16, #5b2c18);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, transparent, #000 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(880px, 100%);
  display: grid;
  justify-items: center;
  gap: 22px;
  margin: 0 auto;
  padding: clamp(42px, 7vw, 72px) clamp(18px, 5vw, 72px);
  color: #fff;
  text-align: center;
}

.hero-content h1 {
  font-size: clamp(2.7rem, 7vw, 4.8rem);
  line-height: 1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffdc9f;
  font-size: 0.82rem;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

h3 {
  margin: 0;
  font-size: 1.1rem;
}

.skeleton,
.skeleton-line {
  position: relative;
  overflow: hidden;
  background: #f0e4d8;
}

.skeleton::after,
.skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), transparent);
  transform: translateX(-100%);
  animation: skeleton-shimmer 1.25s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  to {
    transform: translateX(100%);
  }
}

.skeleton-card {
  pointer-events: none;
}

.skeleton-line {
  display: block;
  width: 100%;
  height: 12px;
  border-radius: 999px;
}

.skeleton-heading {
  width: min(520px, 92%);
  height: 34px;
}

.skeleton-title {
  width: 78%;
  height: 18px;
}

.skeleton-medium {
  width: 58%;
}

.skeleton-short {
  width: 34%;
}

.skeleton-pill {
  width: 84px;
  height: 24px;
}

.skeleton-price {
  width: 108px;
  height: 22px;
}

.skeleton-image {
  aspect-ratio: 4 / 3;
  border-radius: 0;
}

.skeleton-button {
  width: 100%;
  min-height: 38px;
  border-radius: 8px;
}

.skeleton-meta-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.skeleton-detail {
  display: grid;
  gap: 16px;
}

.skeleton-related-row .skeleton-title {
  flex: 1 1 auto;
}

.skeleton-related-row .skeleton-pill,
.skeleton-related-row .skeleton-short {
  flex: 0 0 auto;
}

.hero-search-box {
  width: min(680px, 100%);
  text-align: left;
}

.hero .hero-search-box input {
  min-height: 56px;
  border: 0;
  padding-right: 62px;
  box-shadow: 0 14px 34px rgba(28, 14, 8, 0.24);
  font-size: 1rem;
}

.hero-search-box .search-submit-button {
  top: 7px;
  right: 7px;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #f97316, #d93622);
}

.hero-search-box .search-submit-button:hover {
  background: linear-gradient(135deg, #e45e0b, #b92d18);
}

.hero-search-box .search-suggestions {
  color: var(--ink);
  text-shadow: none;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  max-width: 560px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.hero-points li {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(0.9rem, 1.7vw, 1rem);
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.hero-points li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ffdc9f;
  box-shadow: 0 0 0 3px rgba(255, 220, 159, 0.18);
}

.hero-actions,
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.dialog-actions {
  justify-content: flex-end;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: linear-gradient(135deg, #f97316, #d93622);
  color: #fff;
}

.button.primary:hover {
  background: linear-gradient(135deg, #e45e0b, #b92d18);
}

.button.ghost {
  border-color: rgba(255, 255, 255, 0.46);
  color: #fff;
}

.button.ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.catalog-section,
.partners-section,
.top-products-section,
.saved-products-section,
.budget-products-section,
.partner-page-section,
.get-link-section,
.blog-section,
.blog-detail-section,
.trust-section,
.contact-section,
.admin-section {
  padding: clamp(32px, 5vw, 64px) clamp(18px, 5vw, 72px);
}

#products,
#products-title {
  scroll-margin-top: 92px;
  padding-bottom: 4px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.catalog-section .section-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 580px);
  align-items: end;
}

[data-page-view="home"] .catalog-section {
  padding-top: clamp(26px, 4vw, 44px);
}

#products-title {
  white-space: nowrap;
}

.search-box {
  position: relative;
  width: min(430px, 100%);
}

.catalog-controls {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: end;
  justify-content: flex-end;
  width: min(580px, 100%);
}

.catalog-controls .search-box {
  flex: 1 1 300px;
  width: auto;
}

.sort-box {
  display: grid;
  flex: 0 0 210px;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.search-box input,
.sort-box select,
.post-form input,
.post-form select,
.post-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.search-box input {
  min-height: 48px;
  padding: 0 52px 0 16px;
}

.search-submit-button {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}

.search-submit-button::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
  transform: translate(-1px, -1px);
}

.search-submit-button::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(7px, 7px) rotate(45deg);
}

.search-submit-button:hover {
  background: var(--sale);
}

.search-suggestions {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(107, 58, 25, 0.16);
}

.search-suggestion-item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid rgba(234, 214, 200, 0.72);
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  text-align: left;
}

.search-suggestion-item:last-child {
  border-bottom: 0;
}

.search-suggestion-item:hover,
.search-suggestion-item:focus-visible,
.search-suggestion-item.is-active {
  background: #fff7ed;
}

.search-suggestion-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-suggestion-item small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.sort-box select {
  min-height: 48px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}

.search-box input:focus,
.sort-box select:focus,
.post-form input:focus,
.post-form select:focus,
.post-form textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(23, 123, 103, 0.12);
}

.category-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 14px;
  scrollbar-width: thin;
}

.category-tabs .tab {
  flex: 0 0 auto;
}

.category-tabs .filter-chip {
  min-height: 36px;
  padding: 0 14px;
  border-color: #f08a24;
  background: #fff0dc;
  color: #8a3f08;
  box-shadow: 0 3px 10px rgba(216, 104, 18, 0.2);
  font-weight: 800;
}

.category-tabs .filter-chip:not(:disabled):hover {
  border-color: #d96812;
  background: #ffe3bd;
  color: #6f2f05;
}

.category-tabs .filter-chip:focus-visible {
  outline: 3px solid rgba(240, 138, 36, 0.35);
  outline-offset: 2px;
}

.category-tabs .tab.filter-chip.is-active,
.category-tabs .tab.filter-chip.is-active:not(:disabled):hover {
  border-color: #9f4208;
  background: #c9570b;
  color: #fff;
  box-shadow: 0 4px 12px rgba(159, 66, 8, 0.3);
}

.category-tabs .filter-chip:disabled {
  box-shadow: none;
  opacity: 0.55;
}

.category-tabs .voucher-filter-chip {
  border-color: #fb923c;
  background: #fff7ed;
  color: #b45309;
}

.category-tabs .voucher-filter-chip.is-active,
.category-tabs .voucher-filter-chip.is-active:not(:disabled):hover {
  border-color: #ea580c;
  background: #ea580c;
  color: #fff;
}

.filter-note {
  margin: -4px 0 16px;
  color: var(--muted);
  font-weight: 700;
}

.catalog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.catalog-meta .filter-note {
  margin: 0;
}

.catalog-meta .sort-box {
  width: min(210px, 48%);
}

.tab {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.tab.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.top-products-section {
  background: #fff7ed;
  padding-bottom: clamp(28px, 4vw, 44px);
}

.saved-products-section {
  background: #fffaf4;
  padding-bottom: clamp(28px, 4vw, 44px);
}

.budget-products-section {
  background: #fff;
}

.partners-section {
  padding-top: clamp(18px, 3vw, 34px);
  padding-bottom: clamp(18px, 3vw, 34px);
  background: #fffaf4;
}

.partner-section-heading {
  margin-bottom: 14px;
}

.partner-section-heading h2 {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.partner-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.partner-card {
  display: flex;
  align-items: center;
  flex: 0 0 clamp(220px, 24vw, 300px);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  scroll-snap-align: start;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.partner-card:hover {
  border-color: rgba(216, 92, 39, 0.42);
  background: #fff7ed;
  box-shadow: 0 10px 22px rgba(107, 58, 25, 0.1);
  transform: translateY(-1px);
}

.partner-card strong {
  min-width: 0;
  font-size: 0.98rem;
  line-height: 1.25;
}

.partner-logo {
  display: grid;
  flex: 0 0 112px;
  width: 112px;
  height: 86px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(234, 214, 200, 0.84);
  border-radius: 8px;
  background: #fff7ed;
  color: var(--sale);
  font-size: 1.4rem;
  font-weight: 900;
}

.partner-logo img {
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: contain;
  padding: 0;
}

.partner-page-section {
  padding: 0;
  background: #fffaf4;
}

.partner-cover {
  min-height: clamp(160px, 28vw, 280px);
  background: linear-gradient(135deg, #2b1d16, #d85c27);
  background-position: center;
  background-size: cover;
}

.partner-detail-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: -42px clamp(18px, 5vw, 72px) 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(107, 58, 25, 0.12);
}

.partner-logo--large {
  width: 112px;
  height: 84px;
}

.partner-detail-card h1 {
  color: var(--ink);
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.partner-detail-card p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
  white-space: pre-line;
}

[data-page-view="shop"] .partner-detail-card {
  border-color: rgba(247, 178, 58, 0.5);
  background: #fff3dc;
  box-shadow: 0 16px 34px rgba(107, 58, 25, 0.14);
}

.partner-catalog-section {
  padding-top: clamp(28px, 5vw, 52px);
}

.partner-catalog-section .shop-section-heading {
  display: block;
  grid-template-columns: none;
  margin-bottom: 16px;
}

.shop-section-heading .catalog-controls {
  display: block;
  width: 100%;
  justify-content: stretch;
}

.shop-section-heading .search-box {
  flex: 1 1 100%;
  width: 100%;
  max-width: none;
}

.top-products-carousel {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 14px;
}

.top-products-viewport {
  overflow: hidden;
  min-width: 0;
}

.top-products-track {
  display: flex;
  gap: 10px;
  will-change: transform;
  transition: transform 0.32s ease;
}

.carousel-nav {
  position: static;
  z-index: auto;
  display: flex;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(216, 92, 39, 0.28);
  border-radius: 50%;
  background: #fff;
  color: var(--sale);
  font-size: 1.75rem;
  line-height: 1;
  padding: 0 0 3px;
  box-shadow: 0 8px 20px rgba(107, 58, 25, 0.1);
  cursor: pointer;
}

.carousel-nav:hover:not(:disabled) {
  background: var(--sale);
  color: #fff;
}

.carousel-nav:disabled {
  cursor: default;
  opacity: 0.55;
}

.top-product-card {
  position: relative;
  display: flex;
  flex: 0 0 calc((100% - 40px) / 5);
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(107, 58, 25, 0.08);
  text-decoration: none;
  color: inherit;
}

.top-product-card__details {
  display: grid;
  flex: 1;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.top-product-card__image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f3ebe3 center / cover;
}

.top-product-card__discount {
  position: absolute;
  top: 8px;
  left: 8px;
  border-radius: 4px;
  padding: 2px 6px;
  background: var(--sale);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.freshness-label {
  position: absolute;
  right: 8px;
  bottom: 8px;
  border-radius: 999px;
  padding: 5px 8px;
  background: #11805a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(17, 128, 90, 0.22);
}

.freshness-label--updated {
  background: #2563eb;
}

.top-product-card__body {
  display: grid;
  gap: 4px;
  padding: 7px 9px 9px;
}

.deal-signal {
  color: var(--green-dark);
  font-size: 0.76rem;
  font-weight: 800;
}

.top-product-card__actions {
  display: flex;
  justify-content: center;
  padding: 0 9px 9px;
}

.top-product-card__actions .buy-button {
  width: 100%;
  min-height: 32px;
  font-size: 0.82rem;
}

.top-product-card__body h3 {
  margin: 0;
  overflow: hidden;
  font-size: 0.84rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.top-product-card__price {
  color: var(--sale);
  font-size: 0.95rem;
  font-weight: 800;
}

.top-product-card__original {
  color: var(--muted);
  font-size: 0.75rem;
  text-decoration: line-through;
}

.load-sentinel {
  width: 100%;
  height: 1px;
}

.load-more-status {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
}

.load-more-status:empty {
  display: none;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  transition: opacity 0.16s ease;
}

.product-grid[aria-busy="true"] {
  opacity: 0.58;
  pointer-events: none;
}

.product-grid .empty-state {
  grid-column: 1 / -1;
}

.shop-result-card {
  grid-column: 1 / -1;
  overflow: hidden;
  border: 1px solid rgba(247, 178, 58, 0.42);
  border-radius: 8px;
  background: #243142;
  box-shadow: 0 18px 42px rgba(24, 33, 47, 0.18);
}

.shop-result-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  min-height: 138px;
  padding: 22px;
  color: #fff;
  text-decoration: none;
}

.shop-result-icon {
  display: grid;
  place-items: center;
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 2.15rem;
  font-weight: 900;
}

.shop-result-icon img,
.shop-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-result-link h3 {
  margin: 4px 0 8px;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.shop-result-link .eyebrow {
  color: #f7b23a;
}

.shop-result-link span {
  color: rgba(255, 255, 255, 0.78);
}

.shop-result-cta {
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
  font-weight: 900;
}

.shop-logo {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
}

@media (max-width: 640px) {
  .shop-result-link {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    min-height: 0;
    padding: 12px;
  }

  .shop-result-icon {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
    font-size: 1.35rem;
  }

  .shop-result-link .eyebrow {
    display: none;
  }

  .shop-result-link h3 {
    margin: 0 0 4px;
    font-size: 1.08rem;
    line-height: 1.18;
  }

  .shop-result-link span {
    font-size: 0.84rem;
  }

  .shop-result-cta {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 7px 9px;
    font-size: 0.78rem;
  }
}

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

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-top: 26px;
}

.page-button {
  display: inline-flex;
  width: 40px;
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.page-button--arrow {
  font-size: 22px;
  line-height: 1;
}

.page-button:hover:not(:disabled),
.page-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.page-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(43, 29, 22, 0.12);
}

.page-button:focus-visible {
  outline: 3px solid rgba(216, 92, 39, 0.28);
  outline-offset: 2px;
}

.page-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.page-ellipsis {
  display: inline-flex;
  min-width: 24px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 700;
  user-select: none;
}

.product-card,
.blog-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(24, 33, 47, 0.07);
}

.product-card {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.save-product-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(234, 214, 200, 0.88);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--sale);
  cursor: pointer;
  font-size: 1.24rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(107, 58, 25, 0.12);
}

.save-product-button:hover,
.save-product-button.is-saved {
  border-color: var(--sale);
  background: var(--sale);
  color: #fff;
}

.product-image {
  aspect-ratio: 1;
  background: #dfe6ee center / cover;
}

.blog-image {
  aspect-ratio: 16 / 11;
  background: #dfe6ee center / cover;
}

.product-link,
.product-title-link,
.blog-link {
  text-decoration: none;
}

.product-link {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  overflow: hidden;
}

.product-link .product-image {
  transition: transform 220ms ease;
}

.product-link:hover .product-image {
  transform: scale(1.04);
}

.product-title-link:hover {
  color: var(--green-dark);
}

.product-title-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  text-align: left;
}

.blog-link {
  display: block;
  min-height: 100%;
}

.blog-link:hover h3 {
  color: var(--green-dark);
}

.blog-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  padding: 10px;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.pill {
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff0dd;
  color: var(--green-dark);
}

.product-meta .pill {
  padding: 4px 8px;
}

.product-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
}

.product-rating__icon {
  flex-shrink: 0;
  color: #ee4d2d;
}

.product-rating__value {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
}

.product-meta .product-rating {
  font-size: inherit;
}

.product-body h3 {
  font-size: 0.98rem;
  line-height: 1.25;
}

.product-body h3,
.product-title-link {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-body p,
.blog-body p,
.blog-detail-body p,
.site-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.product-body p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.88rem;
  line-height: 1.45;
}

.back-to-top {
  display: none;
}

.dialog-shop {
  margin-top: 4px;
}

.dialog-shop-card {
  width: 100%;
  box-shadow: 0 10px 28px rgba(24, 33, 47, 0.14);
}

.dialog-shop-card .shop-result-link {
  min-height: 104px;
  padding: 14px;
}

.dialog-shop-card .shop-result-icon {
  flex-basis: 70px;
  width: 70px;
  height: 70px;
  font-size: 1.7rem;
}

.dialog-shop-copy {
  min-width: 0;
}

.dialog-shop-card .dialog-shop-copy h3 {
  overflow: hidden;
  margin: 2px 0 5px;
  font-size: 1.2rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-trust-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.shop-trust-stats .product-rating {
  border: 1px solid rgba(35, 128, 96, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  font-weight: 900;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.deal-pricing {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: baseline;
}

.original-price {
  color: #9b8275;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: line-through;
}

.price {
  color: var(--sale);
  font-size: 1.08rem;
  font-weight: 900;
}

.partner-offer-badge {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 900;
}

.voucher-card {
  border-color: #fed7aa;
}

.voucher-card__image {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%) !important;
}

.voucher-card__mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 999px;
  background: #ea580c;
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
}

.voucher-code {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 6px 10px;
  border: 1px dashed #ea580c;
  border-radius: 8px;
  color: #9a3412;
  font-weight: 900;
}

.voucher-description,
.voucher-rule {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.partner-offer-panel {
  display: grid;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #14532d;
}

.partner-offer-panel span {
  font-weight: 900;
  letter-spacing: 0;
}

.partner-offer-panel small {
  color: #166534;
}

.product-sold-count,
.top-product-card__sold {
  color: #7b6255;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.top-product-card__sold {
  display: block;
  margin-top: 2px;
}

.discount-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--sale);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(227, 54, 45, 0.28);
}

.buy-button {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.86rem;
  font-weight: 700;
  background: #f97316;
  color: #fff;
}

.buy-button:hover {
  background: #d85c27;
}

.details-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 900;
  cursor: pointer;
}

.details-button:hover {
  color: var(--green-dark);
}

.blog-card.featured {
  grid-column: span 2;
}

.blog-detail {
  overflow: hidden;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.blog-detail-image {
  min-height: clamp(260px, 42vw, 520px);
  background: #dfe6ee center / cover;
}

.blog-detail-body {
  display: grid;
  gap: 18px;
  max-width: 880px;
  padding: clamp(22px, 5vw, 48px);
}

.blog-detail-body h2 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1.08;
}

.blog-detail-body p {
  font-weight: 600;
}

.blog-detail-body .lead {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
}

.blog-detail-body h3 {
  margin: 18px 0 4px;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
}

.blog-detail-body ul,
.blog-detail-body ol {
  margin: 4px 0 12px;
  padding-left: 22px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.75;
}

.blog-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 14px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.blog-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: #fff;
}

.blog-table th,
.blog-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.blog-table th {
  background: #f6f0e8;
  color: var(--ink);
  font-weight: 900;
}

.blog-table tr:last-child td {
  border-bottom: 0;
}

.blog-related-section {
  display: grid;
  gap: 16px;
  margin-top: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.blog-related-heading {
  display: grid;
  gap: 4px;
}

.blog-related-heading h3 {
  margin: 0;
  font-size: 1.28rem;
}

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

.blog-related-post-list {
  display: grid;
  gap: 8px;
}

.related-post-link {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 7px 8px;
  color: inherit;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}

.related-post-link:hover {
  background: #fff7ed;
}

.related-post-link:hover h4 {
  color: var(--green-dark);
}

.related-post-link h4 {
  overflow: hidden;
  flex: 1 1 auto;
  margin: 0;
  font-size: 1rem;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-post-date {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.trust-section {
  background: #fffaf4;
}

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

.trust-grid article,
.contact-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(107, 58, 25, 0.08);
}

.trust-grid article {
  display: grid;
  gap: 10px;
  padding: clamp(18px, 3vw, 26px);
}

.about-feature-card {
  align-content: start;
}

.about-feature-card .eyebrow {
  margin: 0;
}

.about-feature-card h3 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.2;
}

.about-feature-list {
  display: grid;
  gap: 10px;
}

.about-feature-list p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff9f1, #fff2df);
  color: var(--ink);
  line-height: 1.55;
  box-shadow: inset 0 0 0 1px rgba(234, 214, 200, 0.78);
}

.about-feature-icon {
  display: inline-grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #15803d);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(21, 128, 61, 0.18);
}

.trust-grid p,
.contact-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.contact-section {
  display: grid;
  gap: 18px;
  margin: 0 clamp(18px, 5vw, 72px) clamp(28px, 5vw, 56px);
  padding: clamp(22px, 4vw, 36px);
}

.about-page.page-section {
  padding: clamp(48px, 8vw, 96px) clamp(18px, 5vw, 72px);
}

.about-hero {
  position: relative;
  min-height: clamp(300px, 46vh, 430px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #2b1d16;
}

.about-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(43, 29, 22, 0.94), rgba(96, 47, 22, 0.68) 50%, rgba(96, 47, 22, 0.24)),
    linear-gradient(0deg, rgba(43, 29, 22, 0.48), transparent 40%);
}

.about-hero-media {
  position: absolute;
  inset: 0;
  background-image: url("https://images.unsplash.com/photo-1607083206968-13611e3d76db?auto=format&fit=crop&w=2200&q=82");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.about-hero-content {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  padding: clamp(30px, 5vw, 52px) clamp(18px, 5vw, 72px);
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.38);
}

.about-hero .eyebrow {
  color: #ffdc9f;
}

.about-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.about-hero-points li {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.about-hero-points li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffdc9f;
}

.about-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.about-page .trust-section {
  padding: 0;
  background: transparent;
}

.about-page .contact-section {
  margin: clamp(24px, 4vw, 36px) 0 0;
  padding: clamp(22px, 3vw, 30px);
  border-top: 1px solid var(--line);
}

.admin-section {
  display: grid;
  background: #fff0df;
}

.feedback-form,
.deal-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  max-width: 860px;
}

.feedback-form {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.feedback-form .button {
  justify-self: start;
}

.feedback-form label,
.deal-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.feedback-form label {
  font-weight: 600;
}

.feedback-form label>span:not(.visually-hidden),
.preset-form label>span:not(.visually-hidden),
.preset-dialog-panel label>span:not(.visually-hidden),
.sort-box>span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.feedback-form input,
.feedback-form textarea,
.deal-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.feedback-form input:focus,
.feedback-form textarea:focus,
.deal-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(216, 92, 39, 0.12);
}

.feedback-form textarea {
  min-height: 132px;
  resize: vertical;
  padding: 12px 13px;
  line-height: 1.55;
}

.form-message {
  grid-column: 1 / -1;
  font-weight: 800;
}

.feedback-form .form-message {
  font-weight: 600;
}

.form-message.is-success {
  color: var(--green-dark);
}

.feedback-form .form-message.is-success.has-icon {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--green-dark);
}

.feedback-form .form-message.is-success.has-icon::before {
  content: "✓";
  display: inline-grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  border-radius: 999px;
  background: #ecf7f2;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.form-message.is-error {
  color: var(--sale);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(14px, 2vw, 22px);
  align-items: start;
  margin-top: 28px;
}

.admin-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  max-width: 620px;
  margin-top: 28px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-login label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 600;
}

.admin-login input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.admin-login input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(216, 92, 39, 0.12);
}

.admin-sidebar-toggle {
  display: none;
  width: 46px;
  min-height: 42px;
  padding: 0;
  font-size: 1.2rem;
}

#admin-logout-button {
  background: #c23b32;
  color: #fff;
}

#admin-logout-button:hover {
  background: #a92f27;
  color: #fff;
}

.admin-sidebar {
  position: fixed;
  top: 63px;
  right: 0;
  left: 0;
  z-index: 9;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 8px clamp(18px, 5vw, 72px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: 0 10px 24px rgba(24, 33, 47, 0.08);
  scrollbar-width: thin;
}

.admin-sidebar-close {
  display: none;
}

.admin-sidebar-button {
  flex: 0 0 auto;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  text-align: left;
}

.admin-sidebar-logout {
  margin-left: auto;
}

.admin-sidebar-button:hover,
.admin-sidebar-button.is-active {
  background: var(--ink);
  color: #fff;
}

.admin-content {
  min-width: 0;
  padding-top: 50px;
}

.admin-section-panel {
  display: none;
}

.admin-section-panel.is-active {
  display: block;
}

.admin-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(18px, 3vw, 28px);
  align-items: start;
}

.admin-section-panel[data-admin-panel="posts"] .admin-panel-grid {
  grid-template-columns: 1fr;
}

.post-form {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.post-form.is-admin-modal,
.admin-product-detail:not([hidden]),
.admin-preset-form:not([hidden]) {
  position: fixed;
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  z-index: 30;
  display: grid;
  width: min(920px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow:
    0 0 0 100vmax rgba(24, 33, 47, 0.42),
    0 28px 80px rgba(24, 33, 47, 0.26);
  transform: translate(-50%, -50%);
}

.admin-product-detail:not([hidden]) {
  align-content: start;
}

.admin-modal-close {
  display: none;
}

.admin-popup-close {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.admin-popup-close:hover {
  border-color: rgba(194, 59, 50, 0.32);
  color: var(--sale);
}

.post-form.is-admin-modal .admin-modal-close,
.admin-preset-form:not([hidden]) .admin-modal-close {
  display: inline-grid;
  justify-self: end;
}

.post-form.is-admin-modal {
  margin: 0;
}

.post-form-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f3ed;
}

.post-form-mode-button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
}

.post-form-mode-button:hover,
.post-form-mode-button.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(27, 24, 19, 0.08);
}

.post-mode-panel {
  display: grid;
  gap: 16px;
}

.post-mode-panel[hidden] {
  display: none;
}

.post-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 600;
}

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

.post-form-fieldset {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.post-form-fieldset legend {
  padding: 0 6px;
  color: var(--ink);
  font-weight: 700;
}

.post-form-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.55;
}

.post-form input,
.post-form select {
  min-height: 46px;
  padding: 0 13px;
}

.post-form textarea {
  min-height: 112px;
  resize: vertical;
  padding: 12px 13px;
}

#post-raw-json {
  min-height: 74px;
}

.admin-panel {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(24, 33, 47, 0.07);
}

.admin-section .button,
.admin-section input,
.admin-section select,
.admin-section textarea {
  font-weight: 500;
}

.admin-section h3,
.admin-section label>span,
.admin-section legend,
.admin-product-table th {
  letter-spacing: 0;
}

.admin-section .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.admin-section .checkbox-label input {
  width: auto;
}

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

.admin-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-product-search {
  width: min(360px, 100%);
}

.admin-product-search-row {
  margin-top: -4px;
}

.admin-product-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.admin-scrape-grid {
  display: grid;
  gap: 18px;
}

.admin-scrape-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-scrape-pane {
  display: grid;
  gap: 10px;
}

.admin-scrape-pane[hidden] {
  display: none;
}

.admin-scrape-pane h4 {
  margin: 0;
}

.admin-scrape-table input[type="url"] {
  min-width: 260px;
}

.admin-scrape-links-row textarea {
  width: 100%;
  min-height: 130px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.admin-product-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  margin-bottom: 14px;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.admin-product-filters .tab {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.admin-inline-controls,
.admin-display-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.admin-display-panel {
  max-width: 720px;
}

.admin-inline-controls label,
.admin-display-settings label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-weight: 600;
}

.admin-inline-controls select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
}

.admin-display-settings strong {
  color: var(--ink);
}

.admin-display-settings .form-message {
  flex-basis: 100%;
}

.admin-cache-panel .cache-stats-grid,
.cache-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.cache-stat-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.96));
  box-shadow: 0 8px 20px rgba(24, 33, 47, 0.05);
}

.cache-stat-card__label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.cache-stat-card strong {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
}

.cache-stat-card small {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.cache-performance-requests {
  margin-top: 1rem;
  max-height: 28rem;
}

.admin-cache-panel,
.admin-section-panel[data-admin-panel="cache"] .admin-panel {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.admin-section-panel[data-admin-panel="cache"] .admin-panel > * {
  min-width: 0;
}

.admin-section-panel[data-admin-panel="cache"] .admin-product-table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.admin-section-panel[data-admin-panel="cache"] #cache-performance {
  min-width: 0;
}

.admin-batch-upsert-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.admin-batch-upsert-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 600;
}

.admin-batch-upsert-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.5;
  outline: none;
  resize: vertical;
}

.admin-batch-upsert-form input[type="file"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

.admin-batch-upsert-form textarea:focus,
.admin-batch-upsert-form input[type="file"]:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(216, 92, 39, 0.12);
}

.admin-product-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-product-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  background: #fff;
}

.admin-product-table th:first-child,
.admin-product-table td:first-child {
  width: 30%;
}

.admin-product-table th,
.admin-product-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: left;
  vertical-align: middle;
}

.admin-product-table th {
  background: var(--soft);
  color: var(--ink);
  font-weight: 600;
}

.admin-product-table tr:last-child td {
  border-bottom: 0;
}

.admin-product-table tbody tr {
  cursor: pointer;
}

.admin-product-table tbody tr:hover td,
.admin-product-table tbody tr:focus-visible td {
  background: #fff8ef;
}

.admin-product-table td strong,
.admin-product-table td small {
  display: block;
}

.admin-product-table td strong {
  color: var(--sale);
}

.admin-product-row-button {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-align: left;
}

.admin-product-row-button small,
.admin-product-table td small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.admin-table-empty {
  text-align: center !important;
}

.admin-product-pagination {
  margin-top: 0;
}

.admin-product-detail {
  display: grid;
  gap: 16px;
}

.admin-product-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-product-detail-heading>.details-button {
  flex: 0 0 auto;
}

.admin-product-detail-heading h3 {
  font-size: 1.18rem;
  line-height: 1.35;
}

.admin-product-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.admin-feedback-body {
  display: grid;
  gap: 10px;
  color: var(--ink);
  line-height: 1.55;
  white-space: pre-line;
}

.freshness-badge {
  display: inline-flex;
  max-width: 100%;
  min-height: 22px;
  align-items: center;
  border-radius: 999px;
  padding: 0 7px;
  background: #fff7ed;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.freshness-badge--latest {
  background: #ecf7f2;
  color: var(--green-dark);
}

.freshness-badge--old {
  background: #fff7ed;
  color: var(--sale);
}

.freshness-badge--needs_verify {
  background: #2b1d16;
  color: #fff;
}

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

.admin-product-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 600;
}

.admin-product-form input,
.admin-product-form select,
.admin-product-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.admin-product-form input,
.admin-product-form select {
  min-height: 42px;
  padding: 0 12px;
}

.admin-product-form textarea {
  resize: vertical;
  padding: 11px 12px;
  line-height: 1.5;
}

.admin-link-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-link-field .button {
  min-height: 42px;
  white-space: nowrap;
}

.admin-product-form input:focus,
.admin-product-form select:focus,
.admin-product-form textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(216, 92, 39, 0.12);
}

.admin-partner-table {
  min-width: 760px;
}

.partner-status-badge--active {
  background: #ecf7f2;
  color: var(--green-dark);
}

.partner-status-badge--inactive {
  background: #f3f0ed;
  color: var(--muted);
}

.admin-product-form__wide,
.admin-product-form-actions {
  grid-column: 1 / -1;
}

.admin-product-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.admin-product-form-actions .danger-button {
  order: -1;
  margin-right: auto;
}

.admin-product-form-actions .primary {
  order: 2;
}

.post-form.is-admin-modal .admin-product-form-actions,
.admin-product-detail:not([hidden]) .admin-product-form-actions,
.admin-preset-form:not([hidden]) .admin-product-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 10px -18px -18px;
  border-top: 1px solid var(--line);
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.danger-button {
  border-color: rgba(194, 59, 50, 0.32);
  background: #fff;
  color: #c23b32;
}

.danger-button:hover {
  background: #c23b32;
  color: #fff;
}

.admin-post-list {
  display: grid;
  gap: 10px;
}

.admin-post {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.admin-post div:first-child {
  display: grid;
  gap: 4px;
}

.admin-post span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.danger {
  color: #c23b32;
}

code {
  border-radius: 6px;
  padding: 2px 6px;
  background: rgba(24, 33, 47, 0.08);
}

.product-dialog {
  width: min(880px, calc(100vw - 32px));
  max-height: calc(100dvh - 64px);
  margin: 32px auto;
  overflow: auto;
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.product-dialog::backdrop {
  background: rgba(12, 18, 30, 0.58);
}

.icon-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 999px;
  background: rgba(24, 33, 47, 0.66);
  color: #fff;
  cursor: pointer;
  font-size: 1.45rem;
}


.product-dialog .icon-button {
  top: 14px;
  right: 14px;
  z-index: 6;
  width: 38px;
  height: 38px;
  padding: 0;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.product-dialog .product-dialog-back {
  font-size: 1.9rem;
  font-weight: 700;
  padding-bottom: 3px;
}

.product-dialog-controls {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(234, 214, 200, 0.74);
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.product-dialog .product-dialog-controls .icon-button {
  position: static;
  top: auto;
  right: auto;
  z-index: 1;
}

.product-dialog .product-dialog-controls .product-dialog-back:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.product-dialog .price-drop-story__share {
  z-index: 0;
}

.dialog-image {
  position: relative;
  display: grid;
  min-height: 300px;
  place-items: center;
  overflow: hidden;
  background: #f6f0e8;
}

.dialog-image::after {
  position: absolute;
  inset: 0;
  background: rgba(255, 250, 244, 0.52);
  content: "";
}

.dialog-image-bg {
  position: absolute;
  inset: -18px;
  background-image: url("https://images.unsplash.com/photo-1607083206968-13611e3d76db?auto=format&fit=crop&w=2200&q=82");
  background-position: center;
  background-size: cover;
  filter: blur(4px);
  opacity: 0.8;
  transform: scale(1.03);
}

.dialog-image img {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(460px, 54vh);
  object-fit: contain;
  background: #fff;
}

.dialog-body {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 4vw, 34px);
}


.product-dialog .dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  align-items: center;
  margin: 4px calc(clamp(20px, 4vw, 34px) * -1) calc(clamp(20px, 4vw, 34px) * -1);
  border-top: 1px solid var(--line);
  padding: 12px clamp(20px, 4vw, 34px) max(12px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -12px 28px rgba(24, 33, 47, 0.08);
  backdrop-filter: blur(10px);
}

.product-dialog .dialog-actions .button {
  min-width: 132px;
}

.dialog-body h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.18;
}

.price-drop-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(216, 92, 39, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff7ed;
  color: var(--muted);
  font-weight: 800;
}

.price-drop-story__content {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 8px;
  align-items: center;
}

.price-drop-story__share {
  position: static;
  z-index: auto;
  width: 36px;
  height: 36px;
  border-color: rgba(216, 92, 39, 0.24);
  background: #fff;
  color: var(--sale);
  font-size: 0;
  box-shadow: none;
}

.price-drop-story .price-drop-story__share {
  z-index: 0;
}

.price-drop-story__share svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.price-drop-story__share:hover,
.price-drop-story__share.is-copied {
  border-color: var(--sale);
  background: var(--sale);
  color: #fff;
}

.price-drop-story__share:disabled {
  cursor: default;
  opacity: 1;
}

.price-drop-story strong {
  color: var(--sale);
  font-weight: 700;
}

.price-drop-label {
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--sale);
  color: #fff;
  font-size: 0.82rem;
}

.price-history-panel:empty {
  display: none;
}

.deal-report {
  border: 1px solid rgba(234, 214, 200, 0.88);
  border-radius: 8px;
  background: #fff;
}

.dialog-body > .deal-report:not(.deal-report--compact) {
  display: none;
}

.deal-report--compact {
  position: relative;
  flex: 0 0 auto;
  margin-right: auto;
  border: 0;
  background: transparent;
}

.deal-report summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--ink);
  font-weight: 900;
}

.deal-report-trigger {
  position: static;
  width: 42px;
  height: 42px;
  border-color: rgba(194, 59, 50, 0.22);
  background: #fff7ed;
  color: #c23b32;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: none;
}

.product-dialog .deal-report-trigger {
  position: static;
  z-index: auto;
  border-color: rgba(194, 59, 50, 0.28);
  background: #fff7ed;
  color: #c23b32;
  font-size: 1.2rem;
  font-weight: 900;
}

.product-dialog .deal-report-trigger:hover {
  border-color: #c23b32;
  background: #fff1eb;
  color: #b42318;
}

.deal-report-trigger::-webkit-details-marker {
  display: none;
}

.deal-report-form {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 0 14px 14px;
}

.deal-report--compact .deal-report-form {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 5;
  width: min(320px, calc(100vw - 42px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(24, 33, 47, 0.16);
}

.deal-report-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.deal-report-form select,
.deal-report-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fffaf4;
  color: var(--ink);
  font: inherit;
}

.deal-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.deal-report-actions .form-message {
  margin: 0;
}

.deal-report-toast {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  z-index: 20;
  display: flex;
  max-width: min(360px, calc(100vw - 32px));
  align-items: center;
  gap: 8px;
  transform: translateY(-8px);
  border: 1px solid rgba(17, 128, 90, 0.34);
  border-radius: 8px;
  padding: 12px 16px;
  background: #f1fff7;
  color: #11805a;
  box-shadow: 0 18px 40px rgba(17, 128, 90, 0.16);
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.deal-report-toast::before {
  content: "✓";
  display: inline-grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  border-radius: 999px;
  background: #11805a;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
}

.deal-report-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.deal-report-toast[data-type="error"] {
  border-color: rgba(194, 59, 50, 0.28);
  background: #fff7ed;
  color: var(--sale);
}

.deal-report-toast[data-type="error"]::before {
  content: "!";
  background: var(--sale);
}

.dialog-related-products {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 4px;
}

.dialog-related-products h3 {
  font-size: 1.05rem;
}

.dialog-related-products__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.related-product-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.related-product-card__image {
  display: block;
  aspect-ratio: 1;
  border-radius: 6px;
  background: #f3ebe3 center / cover;
}

.related-product-card__body {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.related-product-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.related-product-card__body > span {
  color: var(--sale);
  font-size: 0.88rem;
  font-weight: 900;
}

.related-product-card--skeleton {
  cursor: default;
  pointer-events: none;
}

.related-product-card--skeleton .skeleton-title {
  width: 100%;
  height: 28px;
  border-radius: 6px;
}

.related-product-card--skeleton .skeleton-short {
  width: 72px;
  height: 16px;
}

.price-history-skeleton .price-history-chart__canvas {
  border-radius: 8px;
}

.price-history-skeleton .price-history-chart__head .skeleton-line,
.price-history-skeleton .price-history-chart__labels .skeleton-line {
  max-width: 128px;
}

.price-history-insight,
.price-history-chart {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(35, 128, 96, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f3fbf7;
  color: var(--muted);
  font-weight: 700;
}

.price-history-insight strong,
.price-history-chart strong {
  color: var(--green-dark);
}

.price-history-insight span,
.price-history-chart span {
  font-size: 0.88rem;
}

.price-history-chart {
  color: var(--green-dark);
}

.price-history-chart__head,
.price-history-chart__labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.price-history-chart__canvas {
  position: relative;
  width: 100%;
  height: 126px;
}

.price-history-chart canvas {
  width: 100%;
  height: 126px;
}

.price-history-tooltip {
  position: absolute;
  z-index: 2;
  display: grid;
  min-width: 112px;
  gap: 2px;
  border: 1px solid rgba(35, 128, 96, 0.2);
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
  pointer-events: none;
  transform: translate(-50%, -100%);
  box-shadow: 0 10px 22px rgba(43, 29, 22, 0.12);
}

.price-history-tooltip strong {
  color: var(--green-dark);
  font-size: 0.88rem;
}

.product-detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.benefits li {
  border-radius: 8px;
  padding: 12px;
  background: var(--soft);
  color: var(--muted);
  font-weight: 700;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 72px);
  background: var(--ink);
  color: #fff;
}

.footer-brand {
  display: grid;
  gap: 5px;
}

.footer-brand strong {
  font-size: 1.04rem;
}

.footer-brand p {
  margin: 0;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.78);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  font-weight: 800;
}

.footer-links a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.social-link {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
  font-weight: 900;
  text-decoration: none;
}

.social-link svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.social-link:hover {
  border-color: rgba(255, 255, 255, 0.38);
  transform: translateY(-1px);
}

.social-link--facebook {
  background: #1877f2;
}

.social-link--telegram {
  background: #229ed9;
}

@media (max-width: 1180px) {
  .top-product-card {
    flex-basis: calc((100% - 30px) / 4);
  }

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

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

@media (max-width: 980px) {
  .top-product-card {
    flex-basis: calc((100% - 20px) / 3);
  }

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

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

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

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .feedback-form,
  .deal-form,
  .admin-login {
    grid-template-columns: 1fr;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .catalog-section .section-heading {
    grid-template-columns: minmax(220px, auto) minmax(0, 1fr);
  }

  .admin-panel-grid {
    grid-template-columns: 1fr;
  }

  .post-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-product-search {
    width: 100%;
  }

  .admin-product-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-product-tools .button {
    width: 100%;
  }
}

@media (max-width: 720px) {

  .section-heading,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 14px;
    padding-top: 10px;
    padding-right: 12px;
    padding-bottom: 10px;
    padding-left: 12px;
  }

  .brand {
    min-width: 0;
  }

  .account-menu {
    grid-column: 2;
    grid-row: 1;
  }

  .customer-auth-page {
    min-height: calc(100dvh - 76px);
    align-items: start;
    margin: 0 -12px;
    padding: 24px 14px 36px;
    background-position: center top;
  }

  .customer-auth-card {
    grid-template-columns: 1fr;
    gap: 18px;
    width: min(100%, 420px);
  }

  .customer-auth-copy {
    padding: 0 2px;
  }

  .customer-auth-copy .eyebrow {
    margin-bottom: 8px;
    font-size: 0.72rem;
    font-weight: 800;
  }

  .customer-auth-copy h1 {
    font-size: clamp(2.05rem, 10vw, 2.75rem);
    font-weight: 800;
    line-height: 1.04;
  }

  .customer-auth-copy p:not(.eyebrow) {
    margin-top: 10px;
    font-size: 0.98rem;
    font-weight: 500;
  }

  .customer-auth-page .customer-auth-panel {
    gap: 14px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 36px rgba(24, 33, 47, 0.18);
  }

  .customer-auth-form label {
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 700;
  }

  .customer-auth-page .customer-auth-actions .button,
  .customer-oauth-button {
    min-height: 46px;
    font-weight: 800;
  }

  .customer-auth-divider {
    font-size: 0.82rem;
    font-weight: 700;
  }

  .customer-oauth-actions {
    grid-template-columns: 1fr;
  }

  .top-nav {
    grid-column: 1 / -1;
  }

  .catalog-section .section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(126px, 42%);
    align-items: end;
    gap: 10px 12px;
    text-align: left;
  }

  .catalog-section .section-heading>div:first-child {
    min-width: 0;
    text-align: left;
  }

  #products-title {
    white-space: normal;
  }

  .catalog-controls {
    display: contents;
  }

  .catalog-controls .search-box {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .partner-catalog-section .section-heading {
    grid-template-columns: minmax(0, 1fr);
  }

  .partner-catalog-section .section-heading>div:first-child,
  .partner-catalog-section .catalog-controls,
  .partner-catalog-section .catalog-controls .search-box {
    grid-column: 1;
  }

  .partner-catalog-section .shop-section-heading {
    margin-bottom: 14px;
  }

  .admin-cache-panel .cache-stats-grid,
  .cache-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-width: 100%;
  }

  .cache-stat-card {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border-radius: 8px;
  }

  .cache-stat-card__label {
    font-size: 0.68rem;
  }

  .cache-stat-card strong {
    font-size: 0.96rem;
  }

  .cache-stat-card small {
    font-size: 0.74rem;
  }

  .sort-box {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: min(156px, 100%);
    min-width: 0;
  }

  .sort-box select {
    min-height: 40px;
    padding-right: 28px;
    padding-left: 10px;
    font-size: 0.82rem;
  }

  .catalog-meta {
    gap: 10px;
    margin-bottom: 14px;
  }

  .catalog-meta .sort-box {
    width: min(156px, 48%);
  }

  .top-nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .top-nav a[data-nav="personal"] {
    display: none;
  }

  .top-nav a {
    gap: 5px;
    font-size: 0.92rem;
    line-height: 1.1;
  }

  .hero {
    min-height: 0;
  }

  .hero::after {
    mask-image: linear-gradient(0deg, transparent, #000);
  }

  .hero-content {
    gap: 18px;
    padding-right: 12px;
    padding-top: 38px;
    padding-bottom: 40px;
    padding-left: 12px;
  }

  .catalog-section {
    padding-right: 12px;
    padding-left: 12px;
  }

  .back-to-top {
    position: fixed;
    z-index: 40;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 900;
    box-shadow: 0 10px 28px rgba(43, 29, 22, 0.26);
  }

  .back-to-top[hidden] {
    display: none;
  }

  .hero-content h1 {
    font-size: clamp(2.7rem, 14vw, 3.8rem);
  }

  .hero .hero-search-box input {
    min-height: 52px;
  }

  .hero-search-box .search-submit-button {
    width: 38px;
    height: 38px;
  }

  .about-hero {
    min-height: 340px;
    align-items: center;
  }

  .about-hero::after {
    background: linear-gradient(0deg, rgba(43, 29, 22, 0.94), rgba(96, 47, 22, 0.42));
  }

  .category-tabs {
    gap: 6px;
    padding-bottom: 14px;
  }

  .tab {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .top-product-card {
    flex-basis: calc((100% - 10px) / 2);
  }

  .partner-detail-card {
    grid-template-columns: 1fr;
    margin-top: -30px;
  }

  .blog-grid,
  .benefits {
    grid-template-columns: 1fr;
  }

  .blog-detail {
    margin-top: 12px;
    border-radius: 8px;
  }

  .blog-detail-image {
    min-height: clamp(180px, 58vw, 260px);
  }

  .blog-detail-body {
    gap: 14px;
    padding: 18px 14px 22px;
  }

  .blog-detail-body h2 {
    font-size: clamp(1.55rem, 8vw, 2rem);
    line-height: 1.12;
  }

  .blog-detail-body .lead {
    font-size: 1rem;
  }

  .blog-detail-body ul,
  .blog-detail-body ol {
    padding-left: 18px;
  }

  .blog-related-section {
    gap: 12px;
    padding-top: 16px;
  }

  .related-post-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 8px;
    align-items: center;
    padding: 9px 8px;
  }

  .related-post-link h4 {
    grid-column: 1 / -1;
    font-size: 0.95rem;
    white-space: normal;
  }

  .related-post-link .pill {
    justify-self: start;
  }

  .related-post-date {
    justify-self: end;
    font-size: 0.8rem;
  }

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

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

  .top-products-carousel {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 8px;
  }

  .carousel-nav {
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
    padding-bottom: 2px;
  }

  .admin-post {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .buy-button {
    width: 100%;
  }

  .product-body {
    padding: 10px;
  }

  .product-body h3 {
    font-size: 0.92rem;
  }

  .product-dialog {
    max-height: calc(100dvh - 32px);
    margin: 16px auto;
  }

  .product-dialog .dialog-actions {
    justify-content: stretch;
  }

  .product-dialog .dialog-actions .button {
    flex: 1 1 140px;
  }

  .dialog-related-products__grid {
    grid-template-columns: 1fr;
  }

  .dialog-shop-card .shop-result-link {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 0;
    padding: 10px;
  }

  .dialog-shop-card .shop-result-icon {
    width: 48px;
    height: 48px;
    min-width: 0;
    flex-basis: auto;
    font-size: 1.2rem;
  }

  .dialog-shop-card .dialog-shop-copy h3 {
    margin: 0 0 3px;
    font-size: 0.98rem;
  }

  .dialog-shop-card .dialog-shop-copy>span {
    display: block;
    overflow: hidden;
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dialog-shop-card .shop-result-cta {
    align-self: center;
    padding: 6px 8px;
    font-size: 0.74rem;
    white-space: nowrap;
  }


  .product-meta {
    display: none;
  }

  .admin-sidebar-toggle {
    display: inline-flex;
    flex: 0 0 46px;
  }

  .admin-sidebar {
    top: 63px;
    bottom: 0;
    left: 0;
    right: auto;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    width: min(78vw, 260px);
    border-radius: 0 8px 8px 0;
    padding: 12px;
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .admin-sidebar-close {
    display: grid;
    width: 36px;
    height: 36px;
    margin-left: auto;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
  }

  .admin-layout.is-sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .admin-content {
    padding-top: 0;
  }

  .post-form.is-admin-modal,
  .admin-product-detail:not([hidden]),
  .admin-preset-form:not([hidden]) {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    padding: 14px;
  }

  .post-form.is-admin-modal .admin-product-form-actions,
  .admin-product-detail:not([hidden]) .admin-product-form-actions,
  .admin-preset-form:not([hidden]) .admin-product-form-actions {
    margin: 4px -14px -14px;
    padding: 10px 14px;
  }

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

  .admin-link-field {
    grid-template-columns: 1fr;
  }

  .admin-product-form-actions {
    justify-content: stretch;
  }

  .admin-product-form-actions .button {
    width: 100%;
  }

  .blog-card.featured {
    grid-column: span 1;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-links,
  .footer-social {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .catalog-meta {
    gap: 8px;
  }

  .catalog-meta .filter-note {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .catalog-meta .sort-box {
    flex: 0 0 calc((100% - 10px) / 2);
    width: calc((100% - 10px) / 2);
  }

  .catalog-meta .sort-box select {
    padding-right: 22px;
    padding-left: 8px;
    font-size: 0.76rem;
  }

  .partner-catalog-section .shop-section-heading {
    margin-bottom: 12px;
  }
}

.personal-section {
  min-height: 56vh;
  padding-top: 0;
}

.personal-hero {
  display: grid;
  min-height: clamp(150px, 24vw, 230px);
  align-items: end;
  margin: calc(clamp(28px, 5vw, 72px) * -1) calc(clamp(18px, 4vw, 44px) * -1) 18px;
  padding: clamp(26px, 6vw, 54px) clamp(18px, 4vw, 44px);
  background:
    linear-gradient(90deg, rgba(24, 33, 47, 0.78), rgba(24, 33, 47, 0.18)),
    url("https://images.unsplash.com/photo-1607082350899-7e105aa886ae?auto=format&fit=crop&w=1800&q=80") center / cover;
  color: #fff;
}

.personal-hero h1 {
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 0.95;
}

.personal-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  margin-bottom: 14px;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.personal-tab-action {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 4px;
}

.personal-chip {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.personal-chip-copy {
  display: grid;
  gap: 1px;
  text-align: left;
}

.personal-chip-label {
  line-height: 1.1;
}

.personal-chip-code {
  color: var(--sale);
  font-size: 0.71rem;
  font-weight: 800;
  line-height: 1.1;
}

.personal-chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.personal-chip.is-active .personal-chip-code {
  color: rgba(255, 231, 214, 0.88);
}

.personal-chip--add {
  border-style: dashed;
  color: var(--sale);
}

.personal-chip-remove {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 1rem;
  line-height: 1;
}

.get-link-section {
  min-height: calc(100vh - 178px);
  display: grid;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.94) 0%, rgba(248, 250, 252, 0.98) 52%, rgba(238, 253, 245, 0.96) 100%);
}

.get-link-panel {
  position: relative;
  display: grid;
  gap: 20px;
  width: min(880px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(209, 111, 57, 0.18);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 42px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(48, 30, 22, 0.11);
}

.get-link-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #f4511e, #11805a, #2563eb);
}

.get-link-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  border: 1px solid rgba(31, 41, 55, 0.12);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.get-link-form label {
  min-width: 0;
}

.get-link-form input {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
}

.get-link-form input:focus {
  outline: 2px solid rgba(17, 128, 90, 0.24);
  outline-offset: 2px;
}

.get-link-form .button {
  min-height: 48px;
  padding-inline: 24px;
  box-shadow: 0 10px 24px rgba(244, 81, 30, 0.22);
}

.get-link-card,
.requested-link-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.get-link-card {
  border-color: rgba(17, 128, 90, 0.2);
  background: linear-gradient(180deg, #ffffff, #f8fffb);
}

.get-link-card--ready {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 18px;
}

.get-link-card--ready .status-pill {
  grid-column: 1 / -1;
}

.get-link-card strong,
.requested-link-card strong,
.requested-link-card p {
  overflow-wrap: anywhere;
}

.get-link-card strong {
  font-size: clamp(1rem, 2vw, 1.16rem);
}

.requested-link-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.requested-link-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.affiliate-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.affiliate-link-actions .icon-button {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-color: rgba(17, 128, 90, 0.18);
  background: #eefdf5;
  color: var(--brand);
  font-size: 1.1rem;
  font-weight: 800;
}

.affiliate-link-actions .icon-button:hover,
.affiliate-link-actions .icon-button[data-copied="true"] {
  border-color: rgba(17, 128, 90, 0.28);
  background: var(--brand);
  color: #fff;
}

.admin-affiliate-inline-edit {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.admin-affiliate-inline-edit input {
  min-width: 0;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.status-pill--ready {
  background: rgba(17, 128, 90, 0.12);
  color: var(--brand);
}

.status-pill--failed {
  background: rgba(214, 69, 65, 0.12);
  color: var(--sale);
}

@media (max-width: 640px) {
  .get-link-form {
    grid-template-columns: 1fr;
  }

  .get-link-card--ready {
    grid-template-columns: 1fr;
  }
}

.preset-form,
.admin-preset-form {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.preset-form[hidden],
.admin-preset-form[hidden] {
  display: none;
}

.preset-form label,
.admin-preset-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
}

.preset-form input,
.admin-preset-form input,
.admin-preset-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.admin-preset-form textarea {
  min-height: 76px;
  padding-top: 10px;
  resize: vertical;
}

.preset-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preset-dialog {
  width: min(460px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  box-shadow: var(--shadow);
}

.preset-dialog::backdrop {
  background: rgba(12, 18, 30, 0.58);
}

.preset-dialog-panel {
  position: relative;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
}

.preset-dialog-panel h3 {
  padding-right: 42px;
}

.preset-dialog-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.preset-dialog-panel input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.preset-dialog-panel input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(216, 92, 39, 0.12);
  outline: none;
}

.preset-dialog-close {
  top: 12px;
  right: 12px;
}

.preset-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.admin-preset-product-results,
.admin-preset-selected {
  display: grid;
  gap: 8px;
}

.admin-preset-product-option,
.admin-preset-selected-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
}

.admin-preset-product-option {
  cursor: pointer;
}

.admin-preset-product-option:hover {
  background: #fff7ed;
}

.admin-preset-product-option img {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  object-fit: cover;
  background: #fff7ed;
}

.admin-preset-product-option span,
.admin-preset-selected-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.admin-preset-selected-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-preset-selected-item button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--sale);
  cursor: pointer;
  font-size: 1.1rem;
}

@media (max-width: 720px) {
  .personal-tabs {
    gap: 7px;
  }

  .personal-chip {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.92rem;
  }

  .personal-chip-code {
    font-size: 0.68rem;
  }

  .preset-form,
  .admin-preset-form {
    padding: 12px;
  }
}

.admin-preset-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.admin-preset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-preset-actions .button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.88rem;
  font-weight: 700;
}

.admin-cache-panel .cache-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
}

.admin-cache-panel .cache-stat-card {
  min-width: 0;
  max-width: 100%;
}
