﻿:root {
  --bg-base: #f3efe8;
  --bg-soft: #ffffff;
  --bg-muted: #f6f7fb;
  --text-main: #0f172a;
  --text-muted: #51607a;
  --line: #dfe3ea;
  --brand: #ff6a2a;
  --brand-strong: #de4c10;
  --teal: #0d9488;
  --chip: #edf1f8;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --warning-bg: #fff0dd;
  --warning-line: #fdbb7b;
  --warning-text: #9a3412;
  --shadow-soft: 0 14px 34px rgba(15, 23, 42, 0.14);
  --shadow-lift: 0 20px 36px rgba(15, 23, 42, 0.2);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 12px;
  --layout-max: 1200px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body.public-page {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text-main);
  line-height: 1.45;
  background:
    radial-gradient(circle at 8% 6%, rgba(255, 106, 42, 0.2), transparent 24%),
    radial-gradient(circle at 92% 5%, rgba(13, 148, 136, 0.18), transparent 28%),
    linear-gradient(180deg, #f8f4ee 0%, var(--bg-base) 40%, #f7f8fb 100%);
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

p {
  margin: 0;
}

.layout-shell {
  width: min(var(--layout-max), calc(100% - 2rem));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 999;
  background: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
}

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

.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #475569;
  font-weight: 700;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(248, 245, 238, 0.94), rgba(243, 248, 246, 0.94));
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 74px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(260px, auto);
  grid-template-areas: "brand nav search";
  align-items: center;
  gap: 1rem;
}

.brand {
  grid-area: brand;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.brand-wordmark {
  display: grid;
  line-height: 0.9;
  text-transform: uppercase;
}

.brand-wordmark strong,
.brand-wordmark span {
  font-family: "Sora", "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-wordmark strong {
  font-size: 1.25rem;
}

.brand-wordmark span {
  font-size: 1.05rem;
  color: #2563eb;
}

.primary-nav {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.nav-pill {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  text-decoration: none;
  color: #6b7280;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-pill-button {
  font: inherit;
  cursor: pointer;
}

.nav-pill:hover,
.nav-pill:focus-visible {
  color: var(--brand-strong);
  border-color: #f0b293;
  transform: translateY(-1px);
}

.nav-category-menu {
  position: relative;
}

.nav-category-list {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 140;
  min-width: 260px;
  max-height: min(420px, calc(100vh - 140px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 0.45rem;
}

.nav-category-list[hidden] {
  display: none;
}

.nav-category-list a {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
  border-radius: 10px;
  color: var(--text-main);
  text-decoration: none;
  padding: 0.55rem 0.65rem;
}

.nav-category-list a:hover,
.nav-category-list a:focus-visible {
  background: #f8fafc;
  color: var(--brand-strong);
}

.nav-category-list strong {
  color: var(--brand-strong);
}

.nav-category-all {
  font-weight: 700;
}

.header-search {
  grid-area: search;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  position: relative;
}

.search-field {
  position: relative;
  width: min(290px, 50vw);
}

.header-search input {
  width: min(290px, 50vw);
  border: 1px solid #c8cfd9;
  border-radius: 10px;
  padding: 0.62rem 0.75rem;
  background: rgba(255, 255, 255, 0.85);
  font: inherit;
}

.search-field input {
  width: 100%;
}

.search-suggest {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  z-index: 130;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.search-suggest a,
.search-suggest-empty {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  text-decoration: none;
}

.search-suggest a:hover,
.search-suggest a:focus-visible {
  background: #f8fafc;
}

.search-suggest img,
.search-suggest-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

.search-suggest strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.2;
}

.search-suggest span {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.header-search button,
.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.62rem 0.9rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.header-search button {
  color: var(--teal);
  border-color: var(--teal);
  background: transparent;
}

.header-search button:hover {
  background: var(--teal);
  color: #fff;
}

.nav-toggle {
  grid-area: toggle;
  justify-self: end;
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: #1f2937;
}

.brands-rail {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.brands-rail::-webkit-scrollbar {
  display: none;
}

.brands-track {
  width: min(var(--layout-max), calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  min-width: max-content;
}

.brand-chip {
  min-width: 130px;
  max-width: 130px;
  height: 76px;
  border: 1px solid #e4e7ed;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f6f8fc);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
}

.brand-chip img {
  max-height: 54px;
  object-fit: contain;
}

.brand-chip span {
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
}

.logo-fallback[data-fallback]::after {
  content: attr(data-fallback);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.brand-chip.logo-fallback[data-fallback]::after {
  display: block;
  max-width: 9rem;
  font-size: 0.92rem;
}

.deal-shop-logo[data-fallback]::after {
  content: attr(data-fallback);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  font-size: 0.75rem;
}

.detail-logo-panel.logo-fallback[data-fallback]::after {
  font-size: 1rem;
}

.home-page,
.content-page {
  padding-top: 1.6rem;
  padding-bottom: 2.7rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1.35rem;
  margin-bottom: 1.5rem;
}

.hero-card-main,
.hero-expiring,
.section-hero-compact,
.detail-card,
.notice-card,
.category-sidebar,
.filters-panel,
.deal-card,
.shop-card,
.newsletter-panel,
.partner-links {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--bg-soft);
  box-shadow: var(--shadow-soft);
}

.hero-card-main {
  padding: 1.7rem;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 106, 42, 0.13), transparent 42%),
    linear-gradient(180deg, #ffffff, #fbfcff);
}

.hero-card-main h1 {
  font-size: clamp(2rem, 3.9vw, 4.1rem);
  line-height: 1.04;
  margin-bottom: 1rem;
}

.hero-card-main > p {
  font-size: 1.2rem;
  max-width: 92%;
  color: var(--text-muted);
}

.hero-actions {
  margin-top: 1.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
}

.btn-muted {
  background: var(--chip);
  color: var(--text-main);
  border-color: var(--chip);
}

.btn-muted:hover {
  background: #e3e9f3;
}

.hero-stats {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.hero-stats div {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  padding: 0.7rem 0.8rem;
}

.hero-stats strong {
  display: block;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 1.65rem;
}

.hero-stats span {
  color: #374151;
}

.hero-expiring {
  padding: 1.55rem;
  background:
    radial-gradient(circle at 90% 5%, rgba(13, 148, 136, 0.12), transparent 38%),
    #ffffff;
}

.hero-expiring h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.hero-expiring ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.hero-expiring li a,
.hero-expiring li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: var(--warning-bg);
  border: 1px dashed var(--warning-line);
  color: var(--warning-text);
  text-decoration: none;
}

.hero-expiring strong {
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 1.05rem;
}

.section-headline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.8rem 0 1rem;
}

.section-headline-row h2,
.section-heading h2,
.partner-links h2 {
  font-size: clamp(1.65rem, 2.3vw, 2.4rem);
}

.section-heading p,
.partner-links p {
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.trend-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.trend-chips a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, #f6f8fd);
  color: #6b7280;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  font-weight: 600;
}

.trend-chips a:hover {
  color: var(--brand-strong);
  border-color: #f2b59a;
}

.filters-panel {
  padding: 0.8rem;
  margin-bottom: 1.05rem;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.filter-item {
  display: grid;
  gap: 0.3rem;
  min-width: 210px;
  flex: 1 1 200px;
}

.filter-item label {
  font-weight: 600;
  color: var(--text-muted);
}

.filter-item select,
.newsletter-form input {
  border: 1px solid #cfd6df;
  border-radius: 10px;
  padding: 0.56rem 0.65rem;
  background: #fff;
  font: inherit;
}

.filter-checkbox {
  align-self: stretch;
  display: flex;
  align-items: flex-end;
}

.filter-checkbox label {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.56rem 0.75rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}

.filter-checkbox input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--brand);
}

.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
}

.deal-card {
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  min-height: 272px;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 106, 42, 0.08), transparent 40%),
    linear-gradient(180deg, #ffffff, #f9fbff);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.deal-card.is-urgent {
  border-color: #fca5a5;
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.11);
}

.deal-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.deal-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.deal-shop {
  text-decoration: none;
  color: #475569;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.deal-shop:hover {
  color: var(--brand-strong);
}

.deal-tag {
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.deal-shop-logo {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  color: var(--brand-strong);
}

.deal-shop-logo img {
  width: 100%;
  height: 100%;
  padding: 0.18rem;
  object-fit: contain;
}

.deal-title-link {
  text-decoration: none;
  color: var(--text-main);
  margin-top: 0.8rem;
}

.deal-title-link h3 {
  font-size: 1.42rem;
  line-height: 1.22;
}

.deal-description {
  margin-top: 0.45rem;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.deal-secret {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.25rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px dashed #f6c39f;
  background: #fff7ed;
}

.deal-secret p {
  font-size: 0.75rem;
  font-weight: 700;
  color: #9a3412;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.deal-secret-code,
.deal-secret-code-mask {
  font-family: "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.12em;
  font-size: 1rem;
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}

.deal-card-bottom {
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 0.7rem;
}

.deal-expiry {
  color: #475569;
  font-weight: 500;
}

.deal-expiry.soon,
.detail-validity.soon {
  color: #b91c1c;
  font-weight: 700;
}

.deal-actions {
  display: flex;
  gap: 0.55rem;
}

.deal-actions .btn {
  flex: 1;
  text-align: center;
}

.pager {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
}

.load-more-panel {
  margin-top: 1rem;
  display: grid;
  justify-items: center;
  gap: 0.45rem;
}

.load-more-panel p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.pager a {
  text-decoration: none;
  color: var(--brand-strong);
  font-weight: 700;
}

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

.content-grid {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}

.content-grid > .category-sidebar {
  grid-column: 1;
}

.content-grid > section {
  grid-column: 2;
  min-width: 0;
}

.category-sidebar {
  padding: 1rem;
  height: fit-content;
  position: sticky;
  top: 110px;
}

.category-sidebar h2 {
  margin-bottom: 0.7rem;
  font-size: 1.6rem;
}

.category-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.category-sidebar a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  border-radius: 10px;
  padding: 0.55rem 0.6rem;
  border: 1px solid transparent;
}

.category-sidebar a:hover {
  border-color: var(--line);
  background: #f8fafc;
}

.section-hero-compact {
  margin-bottom: 1.2rem;
  padding: 1.2rem 1.35rem;
}

.section-hero-compact h1 {
  font-size: clamp(2rem, 3vw, 3.2rem);
  margin-top: 0.4rem;
}

.section-hero-compact p {
  margin-top: 0.45rem;
  color: var(--text-muted);
  max-width: 75ch;
}

.shop-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.shop-hero img {
  max-height: 70px;
  max-width: 200px;
  object-fit: contain;
}

.shops-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.shop-card {
  padding: 0.9rem;
  text-decoration: none;
  display: grid;
  gap: 0.65rem;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.shop-card img {
  max-height: 42px;
  object-fit: contain;
}

.shop-card h3 {
  font-size: 1.05rem;
}

.partner-links {
  margin-top: 1.35rem;
  padding: 1.2rem;
}

.partner-grid {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.partner-grid a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  text-decoration: none;
  background: #fff;
  color: #4b5563;
}

.partner-grid a:hover {
  color: var(--brand-strong);
  border-color: #f1b69c;
}

.detail-card {
  padding: clamp(1rem, 2.4vw, 1.75rem);
  display: grid;
  gap: 1rem;
}

.detail-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.detail-breadcrumbs a {
  text-decoration: none;
}

.detail-head {
  display: grid;
  grid-template-columns: minmax(132px, 200px) 1fr;
  align-items: start;
  gap: 1.2rem;
}

.detail-logo-panel {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.detail-logo-panel img {
  max-height: 84px;
  max-width: 170px;
  object-fit: contain;
}

.detail-head h1 {
  font-size: clamp(1.85rem, 3.2vw, 3rem);
}

.detail-validity {
  margin-top: 0.3rem;
  color: var(--text-muted);
}

.detail-text {
  color: #374151;
  max-width: 84ch;
}

.coupon-code-box {
  border: 1px dashed #fb923c;
  background: #fff7ed;
  border-radius: 12px;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  align-items: center;
}

.coupon-code-box.is-masked {
  border-color: #f1b07e;
  background: #fff3e7;
}

.coupon-code-box strong {
  display: block;
  font-family: "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
  margin-top: 0.35rem;
  margin-bottom: 0.7rem;
  font-size: 1.55rem;
}

.coupon-secret--blurred {
  filter: blur(6px);
  user-select: none;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.notice-card {
  padding: 1.15rem;
}

.notice-card h1,
.notice-card h2 {
  font-size: clamp(1.7rem, 2.7vw, 2.4rem);
}

.notice-card p {
  margin-top: 0.6rem;
  color: var(--text-muted);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.category-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  min-height: 104px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.category-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-right: 1px solid var(--line);
}

.category-card-media img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.category-card-copy {
  padding: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.category-card-copy > span {
  font-weight: 700;
}

.category-card strong {
  color: var(--brand-strong);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  margin-top: 1.5rem;
  padding: 1.5rem 0 1rem;
}

.newsletter-panel {
  padding: 1.1rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.1rem;
}

.newsletter-copy h2 {
  margin-top: 0.4rem;
  font-size: clamp(1.4rem, 2.3vw, 2rem);
}

.newsletter-copy p:last-child {
  margin-top: 0.45rem;
  color: var(--text-muted);
}

.newsletter-form {
  display: grid;
  gap: 0.6rem;
  align-content: center;
}

.newsletter-form button {
  border: none;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  padding: 0.65rem 0.8rem;
}

.newsletter-form button:hover {
  background: var(--brand-strong);
}

.newsletter-status {
  min-height: 1.2rem;
  color: #475569;
  font-size: 0.92rem;
}

.footer-links-wrap {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

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

.footer-links a {
  color: #4b5563;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--brand-strong);
}

.footer-copy {
  color: #6b7280;
}

@media (max-width: 1260px) {
  .shops-grid,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand toggle"
      "search search"
      "nav nav";
    padding: 0.55rem 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    display: none;
    position: static;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 0.7rem;
    justify-content: flex-start;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .primary-nav.is-open {
    display: grid;
  }

  .primary-nav .nav-pill,
  .primary-nav .nav-pill-button {
    width: 100%;
    text-align: center;
  }

  .nav-category-menu {
    width: 100%;
  }

  .nav-category-list {
    position: static;
    min-width: 0;
    max-height: 250px;
    margin-top: 0.45rem;
    box-shadow: none;
  }

  .header-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  .header-search input {
    width: 100%;
    min-width: 0;
  }

  .search-field {
    width: 100%;
  }

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

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

  .content-grid > .category-sidebar,
  .content-grid > section {
    grid-column: 1;
  }

  .category-sidebar {
    position: static;
  }

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

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

}

@media (max-width: 680px) {
  .layout-shell {
    width: calc(100% - 1.2rem);
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    gap: 0.7rem;
    padding: 0.5rem 0;
  }

  .brand-wordmark strong {
    font-size: 1.05rem;
  }

  .brand-wordmark span {
    font-size: 0.9rem;
  }

  .header-search {
    width: 100%;
  }

  .header-search button {
    white-space: nowrap;
  }

  .primary-nav.is-open {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-category-menu {
    grid-column: 1 / -1;
  }

  .nav-category-list a {
    padding: 0.7rem 0.65rem;
  }

  .hero-card-main,
  .hero-expiring,
  .detail-card,
  .section-hero-compact,
  .notice-card,
  .category-sidebar,
  .newsletter-panel,
  .filters-panel {
    padding: 0.95rem;
    border-radius: 14px;
  }

  .hero-card-main > p {
    font-size: 1rem;
    max-width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .section-headline-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .deals-grid,
  .shops-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .category-card-media img {
    width: 62px;
    height: 62px;
  }

  .shop-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .shop-hero img {
    max-width: 100%;
  }

  .deal-title-link h3 {
    font-size: 1.3rem;
  }

  .detail-head {
    grid-template-columns: 1fr;
  }

  .coupon-code-box {
    grid-template-columns: 1fr;
  }

  .detail-actions .btn,
  .deal-actions .btn {
    width: 100%;
  }

  .footer-links-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

}

@media (prefers-reduced-motion: reduce) {
  .deal-card,
  .brand-chip,
  .nav-pill,
  .btn {
    transition: none;
  }
}
