:root {
  --bg: #f4f5f7;
  --bg-tint: #eef0f4;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eff1f5;
  --text: #14171f;
  --text-soft: #3a4150;
  --muted: #6b7280;
  --line: #e6e8ee;
  --line-soft: #eef0f4;

  --primary: #1f9d6b;
  --primary-dark: #157a52;
  --primary-soft: #e6f6ee;
  --accent: #6d5efc;
  --accent-soft: #ecebff;
  --star: #f4a31c;
  --price: #0f7a4f;

  --shadow-sm: 0 1px 2px rgba(20, 23, 31, 0.05), 0 1px 3px rgba(20, 23, 31, 0.04);
  --shadow-md: 0 6px 18px rgba(20, 23, 31, 0.07);
  --shadow-lg: 0 18px 48px rgba(20, 23, 31, 0.12);
  --shadow-primary: 0 10px 24px rgba(31, 157, 107, 0.28);

  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(109, 94, 252, 0.1), transparent 60%),
    radial-gradient(900px 480px at -6% 4%, rgba(31, 157, 107, 0.1), transparent 58%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family:
    "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

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

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

::selection {
  background: rgba(31, 157, 107, 0.2);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #2bbf86);
  color: white;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: var(--shadow-primary);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
}

.brand strong {
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.brand small,
.muted {
  color: var(--muted);
}

.brand small {
  font-size: 0.78rem;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.top-nav a {
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.top-nav a:hover {
  background: var(--surface-3);
  color: var(--text);
}

/* ---------- Layout ---------- */
main {
  width: min(1320px, calc(100% - 2.5rem));
  margin: 0 auto;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.6fr);
  gap: 1.25rem;
  align-items: stretch;
  padding: clamp(1.5rem, 4vw, 3rem) 0 1.25rem;
}

.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;
}

.subscribe-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(130% 120% at 0% 0%, rgba(31, 157, 107, 0.1), transparent 55%),
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-md);
}

.subscribe-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #4b3fae;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.subscribe-card h2 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.subscribe-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.subscribe-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  align-items: stretch;
}

.subscribe-form input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease),
    background 0.16s var(--ease);
}

.subscribe-form input[type="email"]:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(31, 157, 107, 0.14);
}

.subscribe-form .button {
  flex: 0 0 auto;
  padding: 0 1.1rem;
  min-height: 2.85rem;
}

.subscribe-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex: 1 1 100%;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.subscribe-consent input {
  margin-top: 0.15rem;
  flex-shrink: 0;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.subscribe-consent .footer-link {
  font-size: inherit;
  color: var(--primary-dark);
}

.subscribe-msg {
  min-height: 1.1rem;
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.subscribe-msg.error {
  color: #c0392b;
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: clamp(1.8rem, 4vw, 3.2rem);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(109, 94, 252, 0.08), transparent 55%),
    linear-gradient(180deg, #ffffff, #fbfcfe);
  box-shadow: var(--shadow-md);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 157, 107, 0.18);
}

h1 {
  max-width: 18ch;
  margin-bottom: 1rem;
  font-size: clamp(2.1rem, 4.6vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.hero-text {
  max-width: 46rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.96rem;
  cursor: pointer;
  transition: transform 0.16s var(--ease), box-shadow 0.18s var(--ease),
    background 0.18s var(--ease), border-color 0.18s var(--ease);
}

.button.primary {
  background: linear-gradient(135deg, var(--primary), #28b87e);
  color: white;
  box-shadow: var(--shadow-primary);
}

.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(31, 157, 107, 0.36);
}

.button.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.button.secondary:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  transform: translateY(-2px);
}

.hero-panel {
  display: grid;
  gap: 0.85rem;
  align-content: stretch;
}

.hero-panel > div {
  display: grid;
  align-content: center;
  gap: 0.2rem;
  min-height: 6rem;
  padding: 1.3rem 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.hero-panel > div:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-value {
  display: block;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text), var(--primary-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- Info cards ---------- */
.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0.5rem 0 1.6rem;
}

.info-card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(31, 157, 107, 0.35);
  box-shadow: var(--shadow-md);
}

.info-icon {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 800;
}

.info-card h2 {
  margin-bottom: 0.5rem;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
}

.info-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- Catalog shell ---------- */
.catalog-shell {
  display: grid;
  grid-template-columns: 17.5rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 3.5rem;
}

.sidebar {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 6.5rem);
  overflow: auto;
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--line);
}

.sidebar-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.sidebar-header .muted {
  font-size: 0.78rem;
  font-weight: 600;
}

.search-box {
  display: grid;
  gap: 0.45rem;
  margin: 1.1rem 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  padding: 0.75rem 0.95rem;
  outline: none;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease),
    background 0.16s var(--ease);
}

.search-box input::placeholder {
  color: #9aa1ad;
}

.search-box input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(31, 157, 107, 0.14);
}

.category-list {
  display: grid;
  gap: 0.2rem;
}

.category-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 0.8rem;
  text-align: left;
  text-decoration: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.category-button:hover {
  background: var(--surface-3);
  color: var(--text);
}

.category-button.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
}

.category-button span:last-child {
  flex-shrink: 0;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.category-button.active span:last-child {
  background: rgba(31, 157, 107, 0.16);
  color: var(--primary-dark);
}

/* ---------- Product area ---------- */
.product-area {
  min-height: 40rem;
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  max-width: 30rem;
  margin: 0 auto;
}

.header-search-icon {
  position: absolute;
  left: 0.95rem;
  font-size: 0.9rem;
  opacity: 0.65;
  pointer-events: none;
}

.header-search input {
  width: 100%;
  padding: 0.62rem 2.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease),
    background 0.16s var(--ease);
}

.header-search input::placeholder {
  color: #9aa1ad;
}

.header-search input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(31, 157, 107, 0.14);
}

.search-clear {
  position: absolute;
  right: 0.7rem;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border: 0;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.search-clear:hover {
  background: var(--line);
  color: var(--text);
}

.search-clear.hidden {
  display: none;
}

.product-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem 0.3rem 1.3rem;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 1.3rem;
}

.product-toolbar .eyebrow {
  margin-bottom: 0.55rem;
}

.product-toolbar h2 {
  margin-bottom: 0;
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
  letter-spacing: -0.03em;
}

.toolbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.toolbar-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

/* ---------- Product grid + cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.1rem;
}

.product-card {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(31, 157, 107, 0.4);
  box-shadow: var(--shadow-lg);
}

.product-card-media,
.product-card-copy {
  color: inherit;
  text-decoration: none;
}

.product-card-media {
  display: block;
}

.product-card-copy {
  display: grid;
  gap: 0.35rem;
}

.product-image-wrap {
  position: relative;
  display: grid;
  min-height: 13.5rem;
  place-items: center;
  background:
    radial-gradient(80% 80% at 50% 30%, #ffffff, #f3f5f8);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}

.product-image-wrap img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 13.5rem;
  object-fit: contain;
  padding: 1.1rem;
  transition: transform 0.3s var(--ease);
}

.product-card:hover .product-image-wrap img {
  transform: scale(1.05);
}

.rank-badge {
  position: absolute;
  left: 0.8rem;
  top: 0.8rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: rgba(20, 23, 31, 0.82);
  color: white;
  font-weight: 800;
  font-size: 0.8rem;
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow-sm);
}

.product-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem 1.1rem 1.15rem;
}

.product-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.2rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  font-weight: 650;
  font-size: 0.96rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text);
}

.product-brand {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto;
}

.price-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--price);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.amazon-price-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.7rem 0.32rem 0.4rem;
  border-radius: 999px;
  background: #232f3e;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s var(--ease), transform 0.15s var(--ease);
}

.amazon-price-link:hover {
  background: #131921;
  color: #fff;
}

.amazon-price-icon {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #ff9900;
  color: #131921;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  text-transform: lowercase;
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  color: var(--text-soft);
  font-weight: 700;
  font-size: 0.86rem;
}

.rating .stars {
  color: var(--star);
  letter-spacing: 0.04em;
  font-size: 0.82rem;
}

.reviews-pill {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
}

/* ---------- Skeleton loading ---------- */
.skeleton-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.skeleton-img {
  height: 13.5rem;
  background: var(--surface-3);
}

.skeleton-body {
  display: grid;
  gap: 0.6rem;
  padding: 1rem 1.1rem 1.2rem;
}

.skeleton-line {
  height: 0.7rem;
  border-radius: 999px;
  background: var(--surface-3);
}

.skeleton-line.short {
  width: 55%;
}

.skeleton-line.pill {
  width: 40%;
  height: 1.4rem;
  margin-top: 0.4rem;
}

.skeleton-card .skeleton-img,
.skeleton-line {
  position: relative;
  overflow: hidden;
}

.skeleton-card .skeleton-img::after,
.skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.65),
    transparent
  );
  animation: shimmer 1.4s infinite;
}

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

/* ---------- States ---------- */
.empty-state,
.loading-card {
  margin: 2rem auto;
  max-width: 34rem;
  padding: 2.5rem 2rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  text-align: center;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.scroll-sentinel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.6rem;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}

.scroll-sentinel::before {
  content: "";
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.scroll-sentinel.hidden {
  display: none !important;
}

/* ---------- Product detail page ---------- */
.product-page {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.5rem 0 3.5rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.3rem 0 1.2rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--primary-dark);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.category-page {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.5rem 0 3.5rem;
}

.category-page .catalog-shell {
  margin-bottom: 0;
}

.category-header {
  margin-bottom: 1.5rem;
}

.category-header h1 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  line-height: 1.15;
}

.category-intro {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.category-sibling-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  margin: 0 0 1.75rem;
}

.category-sibling-links a {
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.92rem;
}

.category-sibling-links a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
}

.product-detail-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(18rem, 0.85fr) minmax(0, 1.15fr);
  gap: 1.6rem;
  padding: clamp(1.3rem, 3vw, 2.2rem);
}

.detail-image {
  display: grid;
  min-height: 30rem;
  place-items: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
  background:
    radial-gradient(80% 80% at 50% 30%, #ffffff, #f3f5f8);
}

.detail-image img {
  max-height: 28rem;
  object-fit: contain;
  padding: 1.5rem;
}

.detail-content h1 {
  max-width: none;
  margin-bottom: 0.6rem;
  font-size: clamp(1.8rem, 3.4vw, 2.9rem);
  line-height: 1.08;
}

.detail-content .eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
}

.detail-meta,
.aspect-list,
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.detail-meta {
  margin: 1rem 0;
}

.detail-meta .pill {
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.4rem 0;
}

.category-pills a.pill:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.detail-section {
  padding: 0 clamp(1.3rem, 3vw, 2.2rem) clamp(1.3rem, 3vw, 2.2rem);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.1rem;
}

.detail-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  padding: 1.4rem;
}

.detail-box h2 {
  margin-bottom: 0.8rem;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.detail-box p,
.detail-box li {
  color: var(--text-soft);
  line-height: 1.7;
}

.detail-box ul {
  margin: 0;
  padding-left: 1.1rem;
}

.detail-box li {
  margin-bottom: 0.4rem;
}

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

.details-table th,
.details-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0;
  text-align: left;
  vertical-align: top;
  font-size: 0.92rem;
}

.details-table tr:last-child th,
.details-table tr:last-child td {
  border-bottom: 0;
}

.details-table th {
  width: 38%;
  color: var(--text);
  font-weight: 700;
  padding-right: 1rem;
}

.details-table td {
  color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
  width: min(1320px, calc(100% - 2.5rem));
  margin: 2.5rem auto 0;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: start;
  padding-bottom: 1.6rem;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-brand .brand-mark {
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1rem;
  flex-shrink: 0;
}

.footer-brand strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.footer-brand p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
}

.footer-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s var(--ease);
}

.footer-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.footer-contact {
  display: grid;
  gap: 0.2rem;
}

.footer-contact-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-contact a {
  color: var(--primary-dark);
  font-weight: 700;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.84rem;
}

/* ---------- Policy pages ---------- */
.policy-page {
  padding-bottom: 3rem;
}

.policy-card {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.policy-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-soft);
}

.policy-header h1 {
  max-width: none;
  margin-bottom: 0.6rem;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
}

.policy-updated {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.policy-lead {
  margin: 0;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 52rem;
}

.policy-section {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.policy-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.policy-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.policy-section p {
  margin: 0 0 0.85rem;
  color: var(--text-soft);
  line-height: 1.7;
}

.policy-section p:last-child {
  margin-bottom: 0;
}

.policy-section ul,
.policy-steps {
  margin: 0 0 0.85rem;
  padding-left: 1.35rem;
  color: var(--text-soft);
  line-height: 1.7;
}

.policy-section li + li,
.policy-steps li + li {
  margin-top: 0.45rem;
}

.policy-section a {
  color: var(--primary-dark);
  font-weight: 600;
}

.policy-section a:hover {
  text-decoration: underline;
}

.policy-summary {
  background: var(--surface-2);
  margin: 0 -0.5rem;
  padding: 1.35rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
}

.policy-facts {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.policy-facts > div {
  display: grid;
  gap: 0.2rem;
}

.policy-facts dt {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
}

.policy-facts dd {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

/* ---------- Modal popups ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(20, 23, 31, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.18s var(--ease);
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: min(34rem, 100%);
  max-height: 85vh;
  overflow: auto;
  padding: clamp(1.5rem, 4vw, 2.2rem);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: popIn 0.2s var(--ease);
}

.modal h2 {
  margin: 0 2rem 1rem 0;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.modal-body p {
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 0.94rem;
}

.modal-body .modal-email {
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-body a {
  color: var(--primary-dark);
  font-weight: 700;
}

.modal-body a:hover {
  text-decoration: underline;
}

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.modal-close:hover {
  background: var(--line);
  color: var(--text);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

@media (max-width: 760px) {
  .footer-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  /* Two-row header: brand + nav on top, search below, aligned with main column. */
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand nav"
      "search search";
    align-items: center;
    gap: 0.7rem 1rem;
    padding: 0.75rem 1.25rem;
  }

  .site-header .brand {
    grid-area: brand;
    min-width: 0;
  }

  .site-header .top-nav {
    grid-area: nav;
    justify-self: end;
  }

  .site-header .header-search {
    grid-area: search;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .hero,
  .catalog-shell,
  .detail-hero,
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .sidebar {
    position: static;
    max-height: none;
  }

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

@media (max-width: 680px) {
  main,
  .product-page,
  .site-footer {
    width: min(100% - 1.5rem, 1320px);
  }

  .site-header {
    padding: 0.7rem 0.75rem;
  }

  .top-nav a {
    padding: 0.55rem 0.7rem;
    font-size: 0.88rem;
  }

  .hero-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 0.8rem;
  }
}

/* ---------- Cart link + badge ---------- */
.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.92rem;
}

.cart-link:hover {
  background: rgba(31, 157, 107, 0.18);
}

.cart-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.cart-badge.hidden {
  display: none;
}

/* ---------- Ghost button ---------- */
.button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-soft);
}

.button.ghost:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  transform: translateY(-2px);
}

.button:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none !important;
}

/* ---------- Checkout page ---------- */
.checkout-page h1 {
  margin-bottom: 1.4rem;
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
  gap: 1.25rem;
  align-items: start;
}

.checkout-panel,
.summary-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.2rem, 3vw, 1.9rem);
}

.summary-panel {
  position: sticky;
  top: 5.5rem;
}

.checkout-section-title {
  margin: 0 0 0.9rem;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.checkout-panel .checkout-section-title:not(:first-child) {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-soft);
}

.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-soft);
}

.field input,
.field select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease),
    background 0.16s var(--ease);
}

.field input:focus,
.field select:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(31, 157, 107, 0.14);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.payment-note {
  margin: -0.2rem 0 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: #4b3fae;
  font-size: 0.82rem;
  line-height: 1.5;
}

.cart-notice {
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.cart-notice h2 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.cart-notice p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.cart-footnote {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.checkout-grid--single {
  grid-template-columns: 1fr;
  max-width: 42rem;
}

.summary-panel--full {
  position: static;
}

.si-seller {
  justify-self: start;
  min-height: 2.35rem;
  padding: 0 0.9rem;
  font-size: 0.82rem;
}

/* ---------- Order summary ---------- */
.summary-items {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 1rem;
}

.summary-item {
  display: grid;
  grid-template-columns: 3.6rem 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
}

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

.summary-item img,
.si-noimg {
  width: 3.6rem;
  height: 3.6rem;
  object-fit: contain;
  border-radius: 10px;
  background: var(--surface-3);
}

.si-noimg {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.62rem;
  text-align: center;
}

.si-info {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.si-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
}

.si-price {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.si-right {
  display: grid;
  justify-items: end;
  gap: 0.35rem;
  text-align: right;
}

.si-line {
  font-weight: 800;
  font-size: 0.9rem;
  white-space: nowrap;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.qty-stepper button {
  width: 1.9rem;
  height: 1.9rem;
  border: 0;
  background: var(--surface-2);
  color: var(--text-soft);
  cursor: pointer;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
  transition: background 0.15s var(--ease);
}

.qty-stepper button:hover {
  background: var(--surface-3);
}

.qty-stepper span {
  min-width: 1.9rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.si-remove {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0;
}

.si-remove:hover {
  color: #c0392b;
  text-decoration: underline;
}

.summary-totals {
  display: grid;
  gap: 0.55rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.summary-totals .row {
  display: flex;
  justify-content: space-between;
  color: var(--text-soft);
  font-weight: 600;
}

.summary-totals .row.grand {
  margin-top: 0.3rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}

.checkout-submit {
  width: 100%;
  margin-top: 1.2rem;
}

.secure-note {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

/* ---------- Order confirmation ---------- */
.order-confirm {
  max-width: 38rem;
  margin: 1rem auto;
  padding: 3rem 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.order-confirm .check {
  display: grid;
  place-items: center;
  width: 3.6rem;
  height: 3.6rem;
  margin: 0 auto 1.2rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.7rem;
  font-weight: 800;
}

.order-confirm h2 {
  margin-bottom: 0.6rem;
}

.order-confirm p {
  color: var(--muted);
  line-height: 1.7;
}

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

  .summary-panel {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
