/*
Theme Name: Grabcodez Follow Layout
Theme URI: https://grabcodez.com/
Author: Grabcodez
Author URI: https://grabcodez.com/
Description: An original coupon and deals WordPress theme with a compact dark header, promotional strip, top-coupon card grid, merchant offers, popular searches and multi-column footer. Built for affiliate publishers and inspired by the layout shown in the user's references without copying third-party code or brand assets.
Version: 2.5.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: grabcodez
Tags: custom-logo, custom-menu, featured-images, theme-options, translation-ready, blog, e-commerce, full-width-template
*/

:root {
  --gc-accent: #19d8e8;
  --gc-accent-2: #1d74ff;
  --gc-accent-dark: #0a62cf;
  --gc-header: #171717;
  --gc-announcement: #ddfbff;
  --gc-page: #effaff;
  --gc-footer: #111820;
  --gc-ink: #182438;
  --gc-muted: #687b8f;
  --gc-border: #cde7ec;
  --gc-card: #ffffff;
  --gc-soft-white: rgba(255, 255, 255, .66);
  --gc-brand-gradient: linear-gradient(135deg, var(--gc-accent) 0%, var(--gc-accent-2) 100%);
  --gc-brand-gradient-hover: linear-gradient(135deg, var(--gc-accent-2) 0%, var(--gc-accent) 100%);
  --gc-shadow: 0 2px 6px rgba(9, 66, 102, .10);
  --gc-shadow-hover: 0 12px 28px rgba(9, 66, 102, .17);
  --gc-container: 1120px;
  --gc-radius: 7px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--gc-ink);
  background: #fff;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gc-accent); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px;
  margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.gc-container { width: min(calc(100% - 36px), var(--gc-container)); margin-inline: auto; }
.gc-site-main { min-height: 40vh; }
.gc-empty { padding: 28px; border: 1px dashed #b9c4ce; border-radius: 6px; background: #fff; color: var(--gc-muted); }

/* Announcement */
.gc-announcement {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  background: var(--gc-announcement);
  color: #123747;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .01em;
}
.gc-announcement a { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.gc-announcement a:hover { color: var(--gc-accent-dark); }

/* Main header */
.gc-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--gc-header);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08), 0 7px 24px rgba(0, 0, 0, .10);
}
.admin-bar .gc-site-header { top: 32px; }
.gc-header-inner {
  width: min(calc(100% - 64px), 1280px);
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(230px, 270px) auto;
  align-items: center;
  gap: 24px;
}
.gc-brand-wrap { min-width: 188px; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { display: block; width: auto; max-width: 200px; max-height: 48px; object-fit: contain; }
.gc-brand {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #fff;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -.04em;
  line-height: 1;
}
.gc-brand:hover { color: #fff; }
.gc-brand-mark,
.gc-brand-grab {
  background: var(--gc-brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gc-brand-mark {
  position: relative;
  margin-right: 4px;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -.08em;
}
.gc-brand-mark::after {
  content: "✦";
  position: absolute;
  right: -5px;
  top: -9px;
  color: var(--gc-accent);
  font-size: 12px;
  -webkit-text-fill-color: var(--gc-accent);
}
.gc-brand-grab { font-weight: 800; }
.gc-brand-codez { color: #fff; font-weight: 700; }


.gc-primary-nav { min-width: 0; position: relative; z-index: 2; }
.gc-primary-nav ul { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.gc-primary-nav li { position: relative; }
.gc-primary-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 11px;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}
.gc-primary-nav a:hover,
.gc-primary-nav .current-menu-item > a,
.gc-primary-nav .current_page_item > a {
  color: #fff;
  background: var(--gc-brand-gradient);
}
.gc-primary-nav .menu-item-has-children > a::after { content: "⌄"; margin-left: 6px; font-size: 12px; opacity: .8; }
.gc-primary-nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: none;
  min-width: 210px;
  padding: 8px;
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--gc-shadow-hover);
}
.gc-primary-nav .sub-menu a { min-height: 38px; color: var(--gc-ink); }
.gc-primary-nav .sub-menu a:hover { color: #fff; }
.gc-primary-nav li:hover > .sub-menu,
.gc-primary-nav li:focus-within > .sub-menu { display: block; }

.gc-header-search { min-width: 0; position: relative; z-index: 1; }
.gc-search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  overflow: hidden;
  background: #fff;
  border: 2px solid var(--gc-accent);
  border-radius: 4px;
  box-shadow: none;
}
.gc-search-form:focus-within { box-shadow: 0 0 0 3px rgba(25, 216, 232, .24); }
.gc-search-leading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  color: #78909f;
}
.gc-search-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.gc-search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 0;
  outline: 0;
  padding: 0 10px 0 0;
  color: var(--gc-header);
  background: transparent;
}
.gc-search-form input::placeholder { color: #8da0af; }
.gc-search-form button {
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  border: 0;
  position: absolute;
  right: 0;
}
.gc-account-actions { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.gc-signin,
.gc-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 17px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.gc-signin {
  color: #fff;
  border: 2px solid transparent;
  background: transparent;
}
.gc-signin:hover,
.gc-signin:focus-visible {
  color: #fff;
  border-color: var(--gc-accent);
  background: var(--gc-brand-gradient);
}
.gc-join {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .88);
  background: transparent;
}
.gc-join:hover {
  color: #fff;
  border-color: var(--gc-accent);
  background: var(--gc-brand-gradient);
}
.gc-menu-toggle,
.gc-search-toggle { display: none; color: #fff; background: transparent; border: 0; }
.gc-menu-toggle svg,
.gc-search-toggle svg { width: 27px; height: 27px; stroke: currentColor; }
.gc-menu-close-icon { display: none; }
.gc-mobile-control-label { font-size: 18px; font-weight: 500; line-height: 1; }
.gc-mobile-account-actions { display: none; }

/* CouponFollow-style top section (original implementation) */
.gc-top-coupons-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #f5fdff 0%, var(--gc-page) 100%);
  padding: 48px 0 28px;
}
.gc-top-coupons-inner { position: relative; z-index: 2; }
.gc-top-coupons-title {
  margin: 0 0 34px;
  text-align: center;
  color: var(--gc-ink);
  font-size: clamp(32px, 4vw, 43px);
  line-height: 1.1;
  letter-spacing: -.03em;
}
.gc-cloud {
  position: absolute;
  width: 130px;
  height: 28px;
  border-radius: 30px;
  background: rgba(255, 255, 255, .55);
}
.gc-cloud::before,
.gc-cloud::after {
  content: "";
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
}
.gc-cloud::before { left: 26px; width: 58px; height: 58px; }
.gc-cloud::after { right: 14px; width: 42px; height: 42px; }
.gc-cloud-one { left: 5%; top: 74px; }
.gc-cloud-two { left: 19%; top: 140px; transform: scale(.72); }
.gc-cloud-three { right: 9%; top: 72px; transform: scale(.95); }
.gc-cloud-four { right: 2%; top: 178px; transform: scale(.65); }

.gc-top-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.gc-top-feature-card {
  min-height: 345px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 24px;
  text-align: center;
  color: var(--gc-ink);
  background: var(--gc-card);
  border: 1px solid var(--gc-border);
  border-radius: var(--gc-radius);
  box-shadow: var(--gc-shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.gc-top-feature-card:hover { color: var(--gc-ink); transform: translateY(-3px); border-color: #9edee8; box-shadow: var(--gc-shadow-hover); }
.gc-top-feature-logo { min-height: 132px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.gc-top-feature-card .gc-store-logo,
.gc-top-feature-card .gc-store-initials { width: 145px; height: 145px; object-fit: contain; border-radius: 4px; }
.gc-top-feature-card .gc-store-initials { display: grid; place-items: center; color: #fff; background: #111; font-size: 34px; font-weight: 900; }
.gc-top-feature-store { color: #8a8a8a; font-size: 14px; margin-top: 4px; }
.gc-top-feature-card h2 { max-width: 310px; margin: 8px 0 0; font-size: 25px; line-height: 1.2; letter-spacing: -.025em; }
.gc-top-feature-card p { margin: 12px 0 0; color: #8a8a8a; font-size: 15px; }
.gc-cashback-card { padding-top: 24px; }
.gc-cashback-coin {
  position: relative;
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border: 8px solid #ffb10d;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #ffd665 0 19%, #ffa30b 42% 100%);
  box-shadow: inset 0 0 0 5px #ffc63d, 0 7px 0 #e08c00;
  color: #fff1a3;
  text-shadow: 0 3px 0 #d58100;
}
.gc-cashback-coin::before { content: "✦"; position: absolute; left: -24px; top: 18px; color: #ffd046; font-size: 17px; }
.gc-cashback-coin::after { content: "✦"; position: absolute; right: -17px; top: -10px; color: #ffd046; font-size: 13px; }
.gc-cashback-coin span { font-size: 40px; font-weight: 900; letter-spacing: -.06em; }
.gc-placeholder-logo { display: grid; place-items: center; width: 145px; height: 145px; border-radius: 5px; color: #fff; background: #111; font-size: 30px; font-weight: 900; }

.gc-top-mini-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.gc-top-mini-card {
  min-height: 191px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
  color: var(--gc-ink);
  background: #fff;
  border-radius: var(--gc-radius);
  box-shadow: var(--gc-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.gc-top-mini-card:hover { color: var(--gc-ink); transform: translateY(-2px); box-shadow: var(--gc-shadow-hover); }
.gc-top-mini-logo { min-height: 128px; display: flex; align-items: center; justify-content: center; padding: 18px 14px 6px; }
.gc-top-mini-card .gc-store-logo,
.gc-top-mini-card .gc-store-initials { width: 88px; height: 88px; object-fit: contain; border-radius: 4px; }
.gc-top-mini-card .gc-store-initials { display: grid; place-items: center; color: #fff; background: var(--gc-header); font-size: 24px; font-weight: 900; }
.gc-top-mini-store { min-height: 29px; display: flex; align-items: center; justify-content: center; padding: 4px 8px 9px; color: #878787; text-align: center; font-size: 14px; }
.gc-top-mini-offer {
  margin-top: auto;
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  color: #fff;
  background: var(--gc-brand-gradient);
  text-align: center;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.1;
}
.gc-placeholder-logo-small { width: 88px; height: 88px; font-size: 24px; background: var(--gc-header); }
.gc-trending-box,
.gc-popular-articles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 22px;
  padding: 17px 24px;
  border: 1px dashed #9bcbd5;
  color: var(--gc-muted);
  text-align: center;
  font-size: 15px;
}
.gc-trending-box strong,
.gc-popular-articles strong { color: var(--gc-ink); }
.gc-trending-box a:hover,
.gc-popular-articles a:hover { color: var(--gc-accent-dark); text-decoration: underline; }

/* Lower homepage content */
.gc-home-content-section { background: var(--gc-page); padding: 10px 0 56px; }
.gc-home-content-card { padding: 32px; background: #fff; border-radius: 8px; box-shadow: var(--gc-shadow); }
.gc-section-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.gc-section-heading-row h2 { margin: 3px 0 0; color: var(--gc-ink); font-size: 30px; }
.gc-section-heading-row > a { color: var(--gc-accent-dark); font-weight: 800; }
.gc-eyebrow { color: var(--gc-accent-dark); font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.gc-popular-articles { margin-top: 48px; background: transparent; }

/* Standard coupon list */
.gc-coupon-list { display: grid; gap: 12px; }
.gc-coupon-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 160px;
  align-items: center;
  gap: 20px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--gc-border);
  border-radius: 7px;
}
.gc-coupon-badge { min-height: 94px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; background: var(--gc-brand-gradient); border-radius: 6px; text-align: center; }
.gc-coupon-badge strong { font-size: 20px; line-height: 1.1; }
.gc-coupon-badge span { font-size: 12px; opacity: .85; }
.gc-coupon-store { display: flex; align-items: center; gap: 8px; color: var(--gc-muted); font-size: 13px; font-weight: 800; }
.gc-coupon-store-dot { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--gc-header); font-size: 10px; }
.gc-coupon-content h3 { margin: 6px 0 5px; font-size: 20px; line-height: 1.25; }
.gc-coupon-content h3 a:hover { color: var(--gc-accent-dark); }
.gc-coupon-summary { margin: 0; color: var(--gc-muted); font-size: 14px; }
.gc-coupon-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 8px; color: #83909b; font-size: 12px; }
.gc-verified { color: var(--gc-accent-dark); font-weight: 900; }
.gc-coupon-action { position: relative; text-align: right; }
.gc-coupon-button { width: 100%; min-height: 46px; border: 0; border-radius: 5px; color: #fff; background: var(--gc-brand-gradient); font-weight: 900; }
.gc-coupon-button:hover { background: var(--gc-brand-gradient-hover); }
.gc-code-reveal { margin-top: 8px; padding: 7px; border: 1px dashed var(--gc-accent); color: var(--gc-accent-dark); text-align: center; font-weight: 900; opacity: 0; }
.gc-code-reveal.is-visible { opacity: 1; }
.gc-copied-note { color: var(--gc-accent-dark); font-size: 12px; }

/* Stores and archives */
.gc-section { padding: 58px 0; }
.gc-section--soft { background: var(--gc-page); }
.gc-section-title { margin: 0; font-size: 34px; color: var(--gc-ink); }
.gc-section-copy { margin: 8px 0 0; color: var(--gc-muted); }
.gc-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.gc-text-link { color: var(--gc-accent-dark); font-weight: 800; }
.gc-store-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.gc-store-card { min-height: 155px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 18px 12px; background: #fff; border: 1px solid var(--gc-border); border-radius: 7px; box-shadow: var(--gc-shadow); text-align: center; }
.gc-store-card:hover { color: var(--gc-accent-dark); transform: translateY(-2px); box-shadow: var(--gc-shadow-hover); }
.gc-store-logo { width: 72px; height: 72px; object-fit: contain; }
.gc-store-initials { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 6px; color: #fff; background: var(--gc-header); font-weight: 900; }
.gc-category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gc-category-card { min-height: 105px; display: flex; align-items: center; gap: 12px; padding: 18px; background: #fff; border: 1px solid var(--gc-border); border-radius: 7px; font-weight: 800; }
.gc-category-card:hover { color: var(--gc-accent-dark); border-color: var(--gc-accent); }
.gc-category-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--gc-brand-gradient); }
.gc-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gc-step { padding: 22px; background: #fff; border: 1px solid var(--gc-border); border-radius: 7px; }
.gc-step h3 { margin: 0 0 6px; }
.gc-step p { margin: 0; color: var(--gc-muted); }
.gc-faq { display: grid; gap: 10px; }
.gc-faq details { padding: 18px 20px; border: 1px solid var(--gc-border); border-radius: 7px; background: #fff; }
.gc-faq summary { cursor: pointer; font-weight: 900; }

/* Pages and posts */
.gc-content-area { width: min(calc(100% - 36px), 900px); margin: 50px auto; }
.gc-entry-card { padding: 34px; background: #fff; border: 1px solid var(--gc-border); border-radius: 8px; box-shadow: var(--gc-shadow); }
.entry-title { margin-top: 0; color: var(--gc-ink); }
.entry-content a { color: var(--gc-accent-dark); text-decoration: underline; }
.gc-store-hero { padding: 48px 0; background: var(--gc-page); }
.gc-store-hero-grid { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.gc-store-hero-logo,
.gc-store-hero-initials { width: 150px; height: 150px; object-fit: contain; display: grid; place-items: center; border-radius: 8px; background: #fff; box-shadow: var(--gc-shadow); }
.gc-store-hero-initials { color: #fff; background: var(--gc-header); font-size: 34px; font-weight: 900; }
.gc-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: 5px; font-weight: 900; }
.gc-button--primary { color: #fff; background: var(--gc-brand-gradient); }
.gc-button--primary:hover { color: #fff; background: var(--gc-brand-gradient-hover); }
.gc-button--light { color: var(--gc-accent-dark); background: #fff; border-color: var(--gc-accent); }

/* Footer */
.gc-site-footer { color: #fff; background: var(--gc-footer); }
.gc-footer-grid { display: grid; grid-template-columns: 1.25fr .9fr .95fr .9fr 1.35fr; gap: 44px; padding: 42px 0 54px; }
.gc-brand-footer { margin-bottom: 16px; }
.gc-footer-custom-logo .custom-logo { max-width: 180px; filter: none; }
.gc-country-row { display: flex; align-items: center; gap: 7px; margin-top: 16px; color: #fff; font-size: 14px; }
.gc-footer-column h2,
.gc-footer-about h2 { margin: 0 0 18px; color: #fff; font-size: 18px; }
.gc-footer-column ul { margin: 0; padding: 0; list-style: none; }
.gc-footer-column li + li { margin-top: 13px; }
.gc-footer-column a,
.gc-footer-about a { color: #8fdce8; font-size: 14px; }
.gc-footer-column a:hover,
.gc-footer-about a:hover { color: var(--gc-accent); }
.gc-footer-about p { margin: 0 0 18px; color: #fff; font-size: 13px; line-height: 1.7; }
.gc-footer-bottom { padding: 14px 0; color: #fff; background: #0b1016; text-align: center; font-size: 12px; }

/* Dialog */
.gc-coupon-dialog { position: fixed; inset: 0; z-index: 999; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(6, 20, 31, .78); }
.gc-coupon-dialog.is-open { display: flex; }
.gc-dialog-card { width: min(100%, 520px); padding: 30px; border-radius: 8px; background: #fff; box-shadow: 0 25px 70px rgba(0, 0, 0, .28); }
.gc-dialog-card h2 { margin-top: 0; }
.gc-dialog-code { display: block; margin: 18px 0; padding: 14px; border: 2px dashed var(--gc-accent); color: var(--gc-accent-dark); text-align: center; font-size: 25px; font-weight: 900; }
.gc-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Elementor friendly */
.elementor-page .gc-site-main { overflow: hidden; }
.elementor-page .entry-content { margin: 0; }
.elementor-page .gc-content-area { width: 100%; max-width: none; margin: 0; }

@media (max-width: 1240px) {
  .gc-header-inner { width: min(calc(100% - 40px), 1180px); grid-template-columns: auto minmax(0, 1fr) minmax(200px, 230px) auto; gap: 14px; }
  .gc-brand-wrap { min-width: 170px; }
  .custom-logo { max-width: 178px; }
  .gc-primary-nav a { padding-inline: 8px; font-size: 13px; }
  .gc-account-actions { gap: 8px; }
  .gc-signin, .gc-join { padding-inline: 13px; }
  .gc-top-feature-grid { gap: 18px; }
  .gc-top-mini-grid { grid-template-columns: repeat(3, 1fr); }
  .gc-store-grid { grid-template-columns: repeat(4, 1fr); }
  .gc-footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .gc-footer-about { grid-column: span 2; }
}

@media (max-width: 1040px) {
  .admin-bar .gc-site-header { top: 46px; }
  .gc-site-header { position: relative; }
  .gc-header-inner {
    width: 100%;
    min-height: 70px;
    grid-template-columns: minmax(92px, 1fr) auto minmax(92px, 1fr);
    gap: 8px;
    padding: 0 18px;
  }
  .gc-brand-wrap {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
  }
  .custom-logo { max-width: 185px; max-height: 44px; }
  .gc-brand { font-size: 21px; }
  .gc-menu-toggle,
  .gc-search-toggle {
    min-height: 70px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    white-space: nowrap;
  }
  .gc-menu-toggle {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }
  .gc-search-toggle {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }
  .gc-menu-toggle[aria-expanded="true"] .gc-menu-open-icon { display: none; }
  .gc-menu-toggle[aria-expanded="true"] .gc-menu-close-icon { display: block; }
  .gc-primary-nav {
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    width: calc(100% + 36px);
    margin-left: -18px;
    padding: 28px 20px 44px;
    color: var(--gc-ink);
    background: #fff;
    border-radius: 0;
    box-shadow: 0 12px 24px rgba(20, 36, 49, .10);
  }
  .gc-primary-nav.is-open { display: block; }
  .gc-mobile-account-actions {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
  }
  .gc-mobile-signin,
  .gc-mobile-join {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 19px;
    font-weight: 800;
  }
  .gc-mobile-signin {
    color: var(--gc-accent-dark);
    border: 2px solid var(--gc-accent);
    background: #fff;
  }
  .gc-mobile-join {
    color: #fff;
    border: 2px solid var(--gc-accent);
    background: var(--gc-brand-gradient);
  }
  .gc-primary-nav ul { display: block; }
  .gc-primary-nav li + li { margin-top: 2px; }
  .gc-primary-nav a {
    min-height: 52px;
    padding: 10px 12px;
    border-radius: 0;
    color: var(--gc-ink);
    font-size: 19px;
    font-weight: 500;
  }
  .gc-primary-nav a:hover,
  .gc-primary-nav .current-menu-item > a,
  .gc-primary-nav .current_page_item > a {
    color: var(--gc-accent-dark);
    background: rgba(25, 216, 232, .11);
  }
  .gc-primary-nav .sub-menu { position: static; display: block; padding: 0 0 0 12px; background: transparent; box-shadow: none; }
  .gc-primary-nav .sub-menu a { color: var(--gc-ink); font-size: 17px; }
  .gc-header-search {
    display: none;
    grid-column: 1 / -1;
    grid-row: 3;
    width: calc(100% + 36px);
    margin-left: -18px;
    padding: 16px 20px 22px;
    background: #fff;
    box-shadow: 0 12px 24px rgba(20, 36, 49, .10);
  }
  .gc-header-search.is-open { display: block; }
  .gc-account-actions { display: none; }
  .gc-top-feature-grid { grid-template-columns: 1fr; }
  .gc-top-feature-card { min-height: 315px; }
  .gc-cashback-card { order: -1; }
  .gc-top-mini-grid { grid-template-columns: repeat(3, 1fr); }
  .gc-coupon-card { grid-template-columns: 110px minmax(0, 1fr); }
  .gc-coupon-action { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
  .gc-coupon-button { width: 180px; }
  .gc-footer-grid { grid-template-columns: repeat(2, 1fr); }
  .gc-footer-about { grid-column: 1 / -1; }
  .gc-store-hero-grid { grid-template-columns: 130px 1fr; }
  .gc-store-hero-grid > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .gc-container { width: min(calc(100% - 24px), var(--gc-container)); }
  .gc-announcement { font-size: 13px; }
  .gc-header-inner { min-height: 68px; padding-inline: 15px; }
  .gc-menu-toggle, .gc-search-toggle { min-height: 68px; gap: 6px; }
  .gc-mobile-control-label { font-size: 17px; }
  .gc-menu-toggle svg, .gc-search-toggle svg { width: 25px; height: 25px; }
  .custom-logo { max-width: 155px; }
  .gc-brand { font-size: 18px; }
  .gc-primary-nav, .gc-header-search { width: calc(100% + 30px); margin-left: -15px; }
  .gc-top-coupons-section { padding-top: 38px; }
  .gc-top-coupons-title { margin-bottom: 25px; font-size: 31px; }
  .gc-top-feature-card { min-height: 295px; padding: 24px 18px; }
  .gc-top-feature-card h2 { font-size: 22px; }
  .gc-top-feature-card .gc-store-logo,
  .gc-top-feature-card .gc-store-initials,
  .gc-placeholder-logo { width: 120px; height: 120px; }
  .gc-top-mini-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gc-top-mini-card { min-height: 175px; }
  .gc-top-mini-logo { min-height: 112px; }
  .gc-top-mini-card .gc-store-logo,
  .gc-top-mini-card .gc-store-initials,
  .gc-placeholder-logo-small { width: 72px; height: 72px; }
  .gc-trending-box, .gc-popular-articles { align-items: flex-start; justify-content: flex-start; text-align: left; }
  .gc-home-content-card { padding: 20px 14px; }
  .gc-section-heading-row { display: block; }
  .gc-section-heading-row > a { display: inline-block; margin-top: 8px; }
  .gc-coupon-card { display: block; }
  .gc-coupon-badge { min-height: 76px; margin-bottom: 14px; }
  .gc-coupon-action { display: block; margin-top: 16px; }
  .gc-coupon-button { width: 100%; }
  .gc-store-grid { grid-template-columns: repeat(2, 1fr); }
  .gc-category-grid, .gc-steps { grid-template-columns: 1fr; }
  .gc-footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .gc-footer-about { grid-column: auto; }
  .gc-store-hero-grid { grid-template-columns: 1fr; text-align: center; }
  .gc-store-hero-logo, .gc-store-hero-initials { margin-inline: auto; }
  .gc-dialog-actions { display: grid; }
}

/* Legacy template wrappers used by archive and page templates */
.gc-page-hero { padding: 46px 0; background: var(--gc-page); }
.gc-page-hero h1 { margin: 0; color: var(--gc-ink); font-size: clamp(32px, 4vw, 46px); line-height: 1.1; }
.gc-page-hero p { max-width: 760px; margin: 12px 0 0; color: var(--gc-muted); }
.gc-content-wrap { padding: 46px 0 64px; background: #fff; }
.gc-content { padding: 30px; background: #fff; border: 1px solid var(--gc-border); border-radius: 8px; box-shadow: var(--gc-shadow); }
.gc-content > :first-child { margin-top: 0; }
.gc-content > :last-child { margin-bottom: 0; }
.gc-coupon-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gc-coupon-card--compact { grid-template-columns: 1fr; }
.gc-pagination { margin-top: 28px; }
.gc-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.gc-pagination .page-numbers { min-width: 38px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--gc-border); border-radius: 4px; }
.gc-pagination .current, .gc-pagination a:hover { color: #fff; background: var(--gc-brand-gradient); border-color: var(--gc-accent); }
@media (max-width: 640px) { .gc-coupon-grid { grid-template-columns: 1fr; } .gc-content { padding: 20px; } }
