:root {
  --teal: #0D9488;
  --teal-dark: #0f766e;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --blue: #2563eb;
  --blue-light: #dbeafe;
  --purple: #7c3aed;
  --text: #0F172A;
  --text-muted: #6B7280;
  --bg: #F8FAFC;
  --card-bg: #FFFFFF;
  --border: #E5E7EB;
  --verified: #16A34A;
  --urgent: #DC2626;
  --font: 'Inter', -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { overflow-x: hidden; }
body {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* —— Header (ReeDiscount style) —— */
.site-header {
  background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  position: relative;
  min-height: 72px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.logo-icon {
  width: 72px;
  height: 72px;
  background: var(--teal);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.75rem;
  flex-shrink: 0;
  overflow: hidden;
}

.logo-icon .logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.logo-icon .logo-img-fallback {
  display: none;
}

.logo-title-wrap {
  display: inline-flex;
  align-items: center;
}

.logo-title-wrap .logo-title-img {
  height: 46px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  display: block;
}

.logo-title-wrap .logo-text-fallback {
  display: none;
}

.logo-text {
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--text);
}

.logo-wrap:hover .logo-icon { background: var(--teal-dark); }
.logo-wrap:hover .logo-text { color: var(--teal); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 8px;
  min-height: 48px;
  box-sizing: border-box;
}

.nav-link:hover { background: var(--bg); color: var(--teal); text-decoration: underline; }

.nav-icon {
  font-size: 1.2rem;
  opacity: 0.9;
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card-bg);
}

.search-input {
  width: 260px;
  padding: 14px 18px;
  border: none;
  font: inherit;
  font-size: 1rem;
  min-height: 50px;
  box-sizing: border-box;
}

.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { outline: none; }

.search-icon-btn {
  padding: 14px 18px;
  background: var(--bg);
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  min-height: 50px;
  box-sizing: border-box;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 32px;
  right: 32px;
  max-width: 480px;
  margin-left: auto;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 8px 0;
  display: none;
  z-index: 50;
}

.search-results.visible { display: block; }

.search-results .result-item {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.search-results .result-item:last-child { border-bottom: none; }
.search-results .result-item:hover { background: var(--bg); }

.site-header { position: relative; }
.nav-dropdowns {
  position: absolute;
  top: 100%;
  left: 32px;
  z-index: 60;
  pointer-events: none;
}
.nav-dropdowns .nav-dropdown-panel {
  pointer-events: auto;
  position: absolute;
  top: 4px;
  left: 0;
  display: none;
  min-width: 220px;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  padding: 8px 0;
}
.nav-dropdown-panel.visible { display: block; }
.nav-dropdown-panel a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}
.nav-dropdown-panel a:hover { background: var(--bg); color: var(--teal); text-decoration: underline; }
.header-inner { position: relative; }

/* —— Store page —— */
.store-page {
  max-width: 1600px;
  margin: 0 auto;
  padding: 48px 32px 64px;
}

.store-top-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  padding: 24px;
}

.store-top-bar-head {
  display: flex;
  flex-wrap: wrap;
  flex: 1;
  min-width: 240px;
  gap: 28px;
  align-items: center;
}

.store-top-bar-center {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.store-brand-box {
  flex-shrink: 0;
  width: 190px;
  min-height: 120px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.store-brand-box .store-brand-logo {
  max-width: 100%;
  max-height: 110px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.store-brand-box .store-brand-name {
  display: block;
}

.store-brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.02em;
}

.store-reg { font-size: 0.7rem; color: var(--text-muted); }

.store-top-bar-center .store-title-tabs { flex: none; min-width: 0; }
.store-top-bar-center .store-page-title { margin-bottom: 0; }
.store-title-tabs { min-width: 240px; }

.store-coupon-count {
  display: none;
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

.store-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.filter-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-tabs .tab {
  padding: 14px 24px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 50px;
  box-sizing: border-box;
}

.filter-tabs .tab:hover { border-color: var(--teal); color: var(--teal); background: var(--card-bg); }
.filter-tabs .tab.active { background: var(--teal); border-color: var(--teal); color: #fff; }

.btn-visit-store {
  flex-shrink: 0;
  padding: 16px 32px;
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  align-self: center;
  transition: background 0.2s;
  min-height: 54px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-visit-store:hover { background: var(--teal-dark); color: #fff; }

/* —— Two column layout —— */
.store-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-rows: auto auto;
  gap: 48px;
  align-items: start;
}

.store-sidebar {
  grid-column: 1;
  grid-row: 1;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  position: sticky;
  top: 80px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.store-content {
  grid-column: 2;
  grid-row: 1;
}

.store-layout .about-section {
  grid-column: 2;
  grid-row: 2;
}

.sidebar-heading {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--teal);
  padding: 18px 20px;
  margin: 0;
  letter-spacing: 0.02em;
  border-radius: 8px 8px 0 0;
}

.sidebar-categories {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-categories li {
  border-bottom: 1px solid var(--border);
}

.sidebar-categories li:last-child { border-bottom: none; }

.sidebar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  width: 100%;
  color: var(--text);
  font-size: 1rem;
  box-sizing: border-box;
}

.sidebar-categories a.sidebar-row {
  text-decoration: none;
}

.sidebar-categories a.sidebar-row:hover {
  color: var(--teal);
  text-decoration: underline;
  background: var(--bg);
}

.sidebar-cat-icon { font-size: 1.05rem; opacity: 0.85; flex-shrink: 0; }
.sidebar-cat-label { flex: 1; }
.sidebar-cat-count { color: var(--text-muted); margin-left: auto; font-size: 0.9rem; flex-shrink: 0; }

.sidebar-categories .sidebar-row:not(a) .sidebar-cat-count { font-weight: 500; }

/* —— Coupon cards (ReeDiscount style – new & attractive) —— */
.content-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.coupon-cards { display: flex; flex-direction: column; gap: 22px; }

.coupon-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px 28px;
  min-height: 120px;
  box-sizing: border-box;
  overflow: visible;
  max-height: none;
  transition: box-shadow 0.2s ease;
}

.coupon-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.coupon-card.exclusive {
  border-color: var(--teal);
  box-shadow: 0 2px 8px rgba(13,148,136,0.12);
}

.coupon-card.exclusive:hover {
  box-shadow: 0 4px 12px rgba(13,148,136,0.15);
}

.coupon-ribbon {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 48px 48px 48px 0;
  border-color: var(--teal) transparent transparent transparent;
  z-index: 10;
  pointer-events: none;
}

.coupon-ribbon-text {
  position: absolute;
  top: 9px;
  left: 3px;
  color: var(--teal);
  font-size: 0.47rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-45deg);
  transform-origin: top left;
  z-index: 11;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.coupon-offer-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 165px;
  min-height: 84px;
  flex-shrink: 0;
}

.coupon-offer-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
  max-width: 100%;
}

.coupon-card.exclusive .coupon-offer-value {
  color: var(--teal-dark);
}

.coupon-offer-suffix {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--teal);
  margin-top: 4px;
  line-height: 1.25;
  text-align: center;
  display: block;
}

.coupon-card.exclusive .coupon-offer-suffix {
  color: var(--teal-dark);
}

.coupon-card-body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  overflow: visible;
  max-height: none;
}

.coupon-desc {
  font-size: 1.25rem;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
  font-weight: 700;
}

.coupon-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--verified);
  font-weight: 600;
}

.coupon-verified::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--verified);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-size: 10px;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.coupon-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-shrink: 0;
  min-width: 0;
}

.coupon-actions .coupon-verified {
  margin-right: auto;
}

.coupon-details-wrap {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  width: 100%;
  flex-basis: 100%;
}

.coupon-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.coupon-toggle-details {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--teal);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.coupon-toggle-details:hover {
  color: var(--teal-dark);
}

.coupon-toggle-details::after {
  content: '▼';
  font-size: 0.75em;
  opacity: 0.9;
}

.coupon-toggle-details[aria-expanded="true"]::after {
  content: '▲';
}

.coupon-valid-till {
  display: none !important;
}

.coupon-valid-icon {
  display: none;
}

.coupon-details {
  margin-top: 14px;
  padding: 16px 0 0;
  border-top: none;
  width: 100%;
}

.coupon-details-inner {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.65;
}

.coupon-details-list {
  margin: 0;
  padding-left: 1.35em;
  list-style: disc;
}

.coupon-details-list li {
  margin-bottom: 8px;
}

.coupon-details-list li:last-child {
  margin-bottom: 0;
}

.coupon-details-empty {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.coupon-detail-row {
  margin: 0 0 8px;
}

.coupon-detail-row:last-child { margin-bottom: 0; }

.coupon-detail-row code {
  background: var(--card-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  border: 1px solid var(--border);
}

.get-code-wrap,
.deal-wrap {
  display: flex;
  align-items: center;
  width: 200px;
  flex-shrink: 0;
  min-height: 54px;
}

.get-code-wrap {
  position: relative;
  justify-content: flex-end;
}

.deal-wrap {
  justify-content: flex-end;
}

.btn-get-code,
.btn-click-deal {
  padding: 12px 20px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 54px;
  box-sizing: border-box;
  transition: background 0.2s;
}

.btn-get-code:hover,
.btn-click-deal:hover {
  background: var(--teal-dark);
}

.code-teaser-box {
  padding: 0 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  min-width: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  letter-spacing: 0.5px;
  box-sizing: border-box;
  min-height: 54px;
}

/* —— About section (after coupons) —— */
.about-section {
  margin-top: 48px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
}

.about-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  padding: 20px 24px 20px 28px;
  border-left: 4px solid var(--teal);
  background: var(--card-bg);
  letter-spacing: -0.01em;
}

.about-content {
  padding: 0 24px 24px 28px;
}

.about-content p {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 1em;
}

.about-content p:last-child { margin-bottom: 0; }

.about-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.5em 0 0.4em;
}

.about-subtitle:first-of-type { margin-top: 0.5em; }

/* —— Footer —— */
.site-footer {
  background: var(--text);
  color: var(--text-muted);
  padding: 48px 20px 24px;
  margin-top: 64px;
  text-align: center;
}

.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 20px;
}

.site-footer .footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1rem;
}

.site-footer .footer-links a:hover { color: #fff; text-decoration: underline; }

.site-footer .footer-note,
.site-footer .footer-copy { font-size: 0.85rem; margin-top: 8px; }

/* —— Modal —— */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal.open { opacity: 1; visibility: visible; }

.modal-content {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  position: relative;
  text-align: center;
  border: 1px solid var(--border);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.modal-title { margin-bottom: 20px; font-size: 1.1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text); }
.modal-code-wrap {
  padding: 16px 24px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  background: var(--bg);
  margin-bottom: 20px;
  display: inline-block;
  min-width: 160px;
}
.modal-code { font-size: 1.5rem; font-weight: 700; color: var(--text); letter-spacing: 2px; }
.modal-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.btn-copy {
  padding: 12px 24px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
}
.btn-copy:hover { background: var(--teal-dark); color: #fff; }
.btn-goto-store {
  display: block;
  text-align: center;
  padding: 14px 24px;
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  font-size: 1rem;
}
.btn-goto-store:hover { background: var(--teal-dark); color: #fff; }

/* —— Scroll to top (phone only; shown via media query) —— */
.scroll-to-top {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(13,148,136,0.4);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s, background 0.2s;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.scroll-to-top:hover {
  background: var(--teal-dark);
  color: #fff;
}

/* —— Dropdowns for nav (hover or click) —— */
.nav-link[data-dropdown] { position: relative; }
.nav-dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  padding: 8px 0;
  margin-top: 4px;
  z-index: 60;
}
.nav-dropdown-panel.visible { display: block; }
.nav-dropdown-panel a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}
.nav-dropdown-panel a:hover { background: var(--bg); color: var(--teal); text-decoration: underline; }

/* —— Responsive —— */
@media (max-width: 900px) {
  .store-layout {
    display: flex;
    flex-direction: column;
    gap: 48px;
  }
  .store-content {
    order: 1;
  }
  .store-sidebar {
    order: 2;
    position: static;
  }
  .store-layout .about-section {
    order: 3;
  }
}

@media (max-width: 768px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .store-page,
  .store-top-bar,
  .store-layout,
  .store-content,
  .store-sidebar,
  .coupon-card,
  .about-section {
    max-width: 100%;
    box-sizing: border-box;
  }
  .store-page { width: 100%; }
  .store-layout { width: 100%; }
  .store-content { width: 100%; min-width: 0; }
  .coupon-cards { width: 100%; min-width: 0; }
  .coupon-card { width: 100%; }
  .about-section { width: 100%; }
  .header-inner {
    padding: 10px 12px;
    min-height: 48px;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
  }
  .logo-wrap { flex-shrink: 0; min-width: 0; }
  .logo-title-wrap .logo-title-img {
    height: 30px;
    max-width: 110px;
  }
  .logo-text { font-size: 0.9rem; }
  .menu-toggle {
    display: block;
    margin-left: 0;
    font-size: 0.95rem;
    padding: 4px;
  }
  .header-search {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    margin-left: 0;
    width: auto;
    overflow: hidden;
  }
  .search-input { flex: 1; min-width: 0; width: 0; }
  .search-icon-btn { flex-shrink: 0; }
  .header-search .search-input {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 0.8rem;
  }
  .search-icon-btn { min-height: 34px; padding: 6px 8px; font-size: 0.85rem; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    flex-direction: column;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .main-nav.open { display: flex; }
  .store-page {
    padding: 12px 10px 24px;
  }
  .store-top-bar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 10px;
    gap: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
  }
  .store-top-bar-head {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: 1fr;
    gap: 8px 12px;
    flex: none;
    min-width: 0;
    width: 100%;
  }
  .store-top-bar-head .store-brand-box {
    grid-column: 1;
    grid-row: 1;
    width: 44px;
    min-height: 44px;
    padding: 4px;
    flex-shrink: 0;
  }
  .store-top-bar-head .store-brand-box .store-brand-logo {
    max-height: 36px;
  }
  .store-top-bar-head .store-top-bar-center {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .store-top-bar-head .store-page-title {
    margin-bottom: 0;
    font-size: 0.85rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .store-coupon-count {
    display: block;
    margin-top: 1px;
    font-size: 0.7rem;
  }
  .store-top-bar-head .filter-tabs {
    width: 100%;
    margin-top: 0;
    gap: 4px;
  }
  .store-top-bar-head .filter-tabs .tab {
    padding: 5px 8px;
    min-height: 28px;
    border-radius: 999px;
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
  .store-top-bar-head .filter-tabs .tab.active {
    border-color: var(--teal);
    background: var(--teal);
    color: #fff;
  }
  .store-top-bar-head .filter-tabs .tab:not(.active) {
    border-color: var(--teal);
    color: var(--text);
    background: var(--card-bg);
  }
  .store-top-bar .btn-visit-store {
    align-self: stretch;
    width: 100%;
    min-height: 34px;
    padding: 8px 12px;
    font-size: 0.75rem;
  }
  .content-heading {
    font-size: 0.9rem;
    margin-bottom: 10px;
  }
  .coupon-cards { gap: 10px; }
  .coupon-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 5px 18px;
    padding: 10px;
    min-height: auto;
    min-width: 0;
    border-radius: 8px;
    overflow: visible;
    max-height: none;
    box-sizing: border-box;
    align-items: start;
  }
  .coupon-card::before {
    content: '';
    grid-column: 1 / -1;
    grid-row: 2;
    border-top: 1px solid var(--border);
    padding-top: 0;
    margin: 0;
    height: 0;
  }
  .coupon-card-body {
    display: contents;
  }
  .coupon-offer-left {
    grid-column: 1;
    grid-row: 1;
    width: auto;
    min-height: auto;
    align-items: flex-start;
  }
  .coupon-desc {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    min-width: 0;
    font-size: 1.05rem;
  }
  .coupon-details-wrap {
    grid-column: 1;
    grid-row: 3;
    min-width: 0;
    width: max-content;
    max-width: 100%;
    align-self: center;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }
  .coupon-details-header {
    justify-content: flex-start;
    gap: 8px;
  }
  .coupon-actions {
    display: contents;
  }
  .coupon-verified {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
    align-self: center;
    margin: 0;
    padding-right: 0;
    font-size: 0.7rem;
  }
  .get-code-wrap,
  .deal-wrap {
    grid-column: 1 / -1;
    grid-row: 4;
    width: 100%;
    min-width: 0;
    min-height: 34px;
    justify-content: center;
  }
  .btn-get-code,
  .btn-click-deal {
    width: 100%;
    min-width: 0;
    padding: 6px 12px;
    min-height: 34px;
    font-size: 0.7rem;
    box-sizing: border-box;
  }
  .coupon-card.exclusive:hover {
    box-shadow: 0 4px 12px rgba(13,148,136,0.15);
  }
  .coupon-offer-value { font-size: 1.2rem; }
  .coupon-offer-suffix { font-size: 0.85rem; }
  .coupon-ribbon { border-width: 28px 28px 28px 0; }
  .coupon-ribbon-text { font-size: 0.32rem; top: 4px; left: 2px; }
  .coupon-verified { font-size: 0.7rem; }
  .code-teaser-box {
    min-height: 34px;
    padding: 0 8px;
    font-size: 0.75rem;
  }
  .sidebar-heading {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
  .sidebar-row {
    padding: 6px 10px;
    font-size: 0.8rem;
    gap: 6px;
  }
  .sidebar-cat-icon { font-size: 0.85rem; }
  .sidebar-cat-count { font-size: 0.75rem; }
  .store-layout { gap: 16px; }
  .about-section {
    margin-top: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  }
  .about-title {
    border-left: none;
    padding: 10px 12px 8px 14px;
    font-size: 0.9rem;
    position: relative;
    display: inline-block;
  }
  .about-title::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 12px;
    bottom: -2px;
    height: 6px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'%3E%3Cpath d='M0 4 Q25 0 50 4 T100 4 T150 4 T200 4' stroke='%230D9488' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center;
    background-size: 100% 6px;
  }
  .about-content { padding: 0 12px 14px 14px; }
  .about-content p { font-size: 0.8rem; }
  .about-subtitle { font-size: 0.8rem; }
  .coupon-offer-left { align-items: flex-start; }
  .scroll-to-top {
    display: flex;
    width: 34px;
    height: 34px;
    bottom: 14px;
    right: 14px;
    font-size: 0.9rem;
  }
}

/* —— Small mobile (360px–430px base width) —— */
@media (max-width: 430px) {
  .header-inner {
    padding: 8px 10px;
    min-height: 44px;
    gap: 6px;
  }
  .logo-title-wrap .logo-title-img {
    height: 26px;
    max-width: 100px;
  }
  .logo-text { font-size: 0.85rem; }
  .menu-toggle { font-size: 0.9rem; padding: 4px; }
  .header-search .search-input {
    min-height: 32px;
    padding: 5px 6px;
    font-size: 0.75rem;
  }
  .search-icon-btn { min-height: 32px; padding: 5px 6px; font-size: 0.8rem; }
  .store-page {
    padding: 10px 8px 20px;
  }
  .store-top-bar {
    padding: 8px;
    gap: 6px;
    margin-bottom: 10px;
    border-radius: 8px;
  }
  .store-top-bar-head .store-brand-box {
    width: 40px;
    min-height: 40px;
    padding: 4px;
  }
  .store-top-bar-head .store-brand-box .store-brand-logo {
    max-height: 32px;
  }
  .store-top-bar-head .store-top-bar-center { gap: 4px; }
  .store-top-bar-head .store-page-title {
    font-size: 0.8rem;
    line-height: 1.2;
  }
  .store-coupon-count { font-size: 0.65rem; }
  .store-top-bar-head .filter-tabs { gap: 3px; }
  .store-top-bar-head .filter-tabs .tab {
    padding: 4px 8px;
    min-height: 26px;
    font-size: 0.65rem;
  }
  .store-top-bar .btn-visit-store {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 0.7rem;
  }
  .content-heading {
    font-size: 0.85rem;
    margin-bottom: 8px;
  }
  .coupon-cards { gap: 8px; }
  .coupon-card {
    padding: 8px;
    gap: 4px 16px;
    min-height: auto;
    border-radius: 6px;
    overflow: visible;
    max-height: none;
  }
  .coupon-card-body { display: contents; }
  .coupon-desc { font-size: 1rem; }
  .coupon-details-wrap { grid-column: 1; grid-row: 3; min-width: 0; width: max-content; max-width: 100%; align-self: center; margin-top: 0; padding-top: 0; border-top: none; }
  .coupon-details-header { justify-content: flex-start; gap: 8px; }
  .coupon-actions { display: contents; }
  .coupon-verified { grid-column: 2; grid-row: 3; justify-self: end; align-self: center; margin: 0; padding-right: 0; font-size: 0.65rem; }
  .get-code-wrap,
  .deal-wrap { grid-column: 1 / -1; grid-row: 4; width: 100%; min-width: 0; min-height: 30px; justify-content: center; }
  .btn-get-code,
  .btn-click-deal {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 6px 10px;
    min-height: 30px;
    font-size: 0.65rem;
  }
  .coupon-offer-value { font-size: 1.1rem; }
  .coupon-offer-suffix { font-size: 0.8rem; }
  .coupon-ribbon { border-width: 24px 24px 24px 0; }
  .coupon-ribbon-text { font-size: 0.28rem; top: 3px; left: 1px; }
  .coupon-verified { font-size: 0.65rem; }
  .code-teaser-box {
    min-height: 30px;
    padding: 0 8px;
    font-size: 0.7rem;
  }
  .sidebar-heading {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
  .sidebar-row {
    padding: 6px 10px;
    font-size: 0.75rem;
    gap: 6px;
  }
  .sidebar-cat-icon { font-size: 0.8rem; }
  .sidebar-cat-count { font-size: 0.7rem; }
  .store-layout { gap: 14px; }
  .about-section { margin-top: 14px; border-radius: 6px; }
  .about-title {
    padding: 8px 10px 6px 12px;
    font-size: 0.85rem;
  }
  .about-title::after {
    left: 12px;
    right: 10px;
  }
  .about-content { padding: 0 10px 12px 12px; }
  .about-content p { font-size: 0.75rem; }
  .about-subtitle { font-size: 0.75rem; }
  .scroll-to-top {
    width: 30px;
    height: 30px;
    bottom: 12px;
    right: 12px;
    font-size: 0.85rem;
  }
}

/* —— Extra narrow (below 280px) —— */
@media (max-width: 280px) {
  .header-inner {
    padding: 5px 6px;
    min-height: 38px;
    gap: 4px;
  }
  .logo-title-wrap .logo-title-img {
    height: 22px;
    max-width: 78px;
  }
  .logo-text { font-size: 0.8rem; }
  .menu-toggle { font-size: 0.85rem; padding: 3px 4px; }
  .header-search .search-input {
    min-height: 28px;
    padding: 4px 5px;
    font-size: 0.7rem;
  }
  .search-icon-btn { min-height: 28px; padding: 4px 5px; font-size: 0.75rem; }
  .store-page { padding: 6px 5px 16px; }
  .store-top-bar {
    padding: 6px;
    gap: 4px;
    margin-bottom: 8px;
    border-radius: 6px;
  }
  .store-top-bar-head .store-brand-box {
    width: 34px;
    min-height: 34px;
    padding: 3px;
  }
  .store-top-bar-head .store-brand-box .store-brand-logo {
    max-height: 26px;
  }
  .store-top-bar-head .store-top-bar-center { gap: 3px; }
  .store-top-bar-head .store-page-title {
    font-size: 0.75rem;
    line-height: 1.2;
  }
  .store-coupon-count { font-size: 0.6rem; }
  .store-top-bar-head .filter-tabs { gap: 2px; }
  .store-top-bar-head .filter-tabs .tab {
    padding: 3px 6px;
    min-height: 22px;
    font-size: 0.6rem;
  }
  .store-top-bar .btn-visit-store {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 0.6rem;
  }
  .content-heading {
    font-size: 0.8rem;
    margin-bottom: 6px;
  }
  .coupon-cards { gap: 6px; }
  .coupon-card {
    padding: 6px;
    gap: 4px 14px;
    border-radius: 5px;
    overflow: visible;
    max-height: none;
  }
  .coupon-card-body { display: contents; }
  .coupon-details-wrap { grid-column: 1; grid-row: 3; min-width: 0; width: max-content; max-width: 100%; align-self: center; margin-top: 0; padding-top: 0; border-top: none; }
  .coupon-details-header { justify-content: flex-start; gap: 8px; }
  .coupon-actions { display: contents; }
  .coupon-verified { grid-column: 2; grid-row: 3; justify-self: end; align-self: center; margin: 0; padding-right: 0; font-size: 0.6rem; }
  .get-code-wrap,
  .deal-wrap { grid-column: 1 / -1; grid-row: 4; width: 100%; min-width: 0; min-height: 26px; justify-content: center; }
  .btn-get-code,
  .btn-click-deal {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 4px 8px;
    min-height: 26px;
    font-size: 0.6rem;
  }
  .coupon-offer-value { font-size: 1rem; }
  .coupon-offer-suffix { font-size: 0.75rem; }
  .coupon-ribbon { border-width: 20px 20px 20px 0; }
  .coupon-ribbon-text { font-size: 0.25rem; top: 2px; left: 1px; }
  .coupon-verified { font-size: 0.6rem; }
  .code-teaser-box {
    min-height: 26px;
    padding: 0 6px;
    font-size: 0.65rem;
  }
  .sidebar-heading {
    padding: 5px 6px;
    font-size: 0.7rem;
  }
  .sidebar-row {
    padding: 5px 6px;
    font-size: 0.7rem;
    gap: 5px;
  }
  .sidebar-cat-icon { font-size: 0.75rem; }
  .sidebar-cat-count { font-size: 0.65rem; }
  .store-layout { gap: 12px; }
  .about-section { margin-top: 12px; border-radius: 5px; }
  .about-title {
    padding: 6px 8px 5px 10px;
    font-size: 0.8rem;
  }
  .about-title::after {
    left: 10px;
    right: 8px;
    height: 4px;
  }
  .about-content { padding: 0 8px 10px 10px; }
  .about-content p { font-size: 0.7rem; }
  .about-subtitle { font-size: 0.7rem; }
  .scroll-to-top {
    width: 28px;
    height: 28px;
    bottom: 8px;
    right: 8px;
    font-size: 0.8rem;
  }
}
