/* =========================================================
   WPBakery Sytem - Independent Coupon/Store UI
   Version: 1.2.7

   Design goals:
   - Theme-independent layout for Store Directory, Category archives, Store pages and homepage coupon blocks.
   - Full-viewport breakout is scoped only to CPS wrappers, not to the whole theme.
   - No body:has hacks, no viewport-height shadow hacks, no header/footer interference.
   ========================================================= */

:root {
    --cps-bg: #f5f5f5;
    --cps-card: #ffffff;
    --cps-border: #dddddd;
    --cps-border-soft: #eeeeee;
    --cps-text: #333333;
    --cps-muted: #666666;
    --cps-shadow: 0 1px 4px rgba(0, 0, 0, 0.045);
    --cps-inner: 1680px;
    --cps-gap: 28px;
    --cps-side-gap: 48px;
}

/* Shared safety */
.cps-app-page,
.cps-app-page *,
.cps-page-wrap,
.cps-page-wrap *,
.cps-home-section,
.cps-home-section *,
.cps-store-search,
.cps-store-search * {
    box-sizing: border-box;
}

body.single-cps_store,
body.tax-coupon_category {
    background: var(--cps-bg);
}

body.home.cps-front-page-active,
body.front-page.cps-front-page-active {
    background: #f8f8f7;
}

body.home.cps-front-page-active main,
body.home.cps-front-page-active .wp-site-blocks,
body.home.cps-front-page-active .entry-content,
body.home.cps-front-page-active .wp-block-post-content,
body.front-page.cps-front-page-active main,
body.front-page.cps-front-page-active .wp-site-blocks,
body.front-page.cps-front-page-active .entry-content,
body.front-page.cps-front-page-active .wp-block-post-content {
    background: #f8f8f7;
}


/* Full-width independent shell for Store Directory, Category and Single Store.
   The shell breaks out of theme content wrappers without relying on theme containers. */
.cps-app-page,
.cps-page-wrap {
    position: relative;
    left: auto;
    right: auto;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: var(--cps-bg);
    color: var(--cps-text);
    font-family: Arial, Helvetica, sans-serif;
    padding: 28px 0 60px;
    overflow-x: clip;
}

@supports not (overflow-x: clip) {
    .cps-app-page,
    .cps-page-wrap {
        overflow-x: hidden;
    }
}

.cps-app-inner,
.cps-store-layout {
    width: min(var(--cps-inner), calc(100vw - (var(--cps-side-gap) * 2)));
    max-width: var(--cps-inner);
    margin-left: auto;
    margin-right: auto;
}

/* Shared search. Default version is safe for homepage/page shortcodes and escapes narrow theme containers. */
.cps-store-search {
    position: relative;
    left: auto;
    right: auto;
    width: min(var(--cps-inner), calc(100vw - (var(--cps-side-gap) * 2)));
    max-width: var(--cps-inner);
    margin-left: calc(50% - 50vw + var(--cps-side-gap));
    margin-right: 0;
    display: flex;
    font-family: Arial, Helvetica, sans-serif;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--cps-border);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 42px;
}

/* Search inside independent CPS pages follows the CPS inner container. */
.cps-app-page .cps-store-search,
.cps-page-wrap .cps-store-search {
    width: min(var(--cps-inner), calc(100vw - (var(--cps-side-gap) * 2)));
    max-width: var(--cps-inner);
    margin-left: auto;
    margin-right: auto;
}

.cps-store-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 54px;
    padding: 0 24px;
    border: 0;
    border-right: 1px solid var(--cps-border);
    background: #fff;
    color: var(--cps-text);
    font-size: 18px;
    line-height: 1;
    outline: 0;
    box-shadow: none;
}

.cps-store-search input::placeholder { color: #777; opacity: 1; }

.cps-store-search button {
    width: 84px;
    min-width: 84px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #f7f8fa;
    color: #111;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    box-shadow: none;
}

.cps-store-search button:hover { background: #eee; }

/* Shared archive layout: Store Directory and Coupon Category */
.cps-breadcrumb {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--cps-muted);
}

.cps-breadcrumb a {
    color: var(--cps-green, #009900);
    text-decoration: none;
}

.cps-archive-header {
    max-width: calc(100% - 340px - var(--cps-gap));
    margin-bottom: 18px;
}

.cps-archive-header h1 {
    margin: 0 0 12px;
    color: var(--cps-text);
    font-size: 30px;
    line-height: 1.25;
    font-weight: 500;
}

.cps-dir-desc,
.cps-cat-description {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.cps-cat-description {
    max-height: 115px;
    overflow: hidden;
}

.cps-cat-description.is-expanded { max-height: none; }

.cps-cat-show-more {
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--cps-green, #009900);
    cursor: pointer;
    font: inherit;
}

.cps-archive-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: var(--cps-gap);
    align-items: start;
}

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

.cps-archive-store-card {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 150px;
    background: var(--cps-card);
    border: 1px solid var(--cps-border);
    border-radius: 4px;
    box-shadow: var(--cps-shadow);
    overflow: hidden;
}

.cps-archive-store-logo {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 12px 10px;
    text-decoration: none;
}

.cps-archive-store-logo img,
.cps-archive-store-logo span {
    width: 76px;
    height: 76px;
}

.cps-archive-store-logo img { object-fit: contain; }

.cps-archive-store-logo span {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--cps-bg);
    color: var(--cps-green, #009900);
    font-size: 28px;
    font-weight: 700;
}

.cps-archive-store-info {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding: 18px 14px 10px 0;
}

.cps-archive-store-info h2 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 600;
}

.cps-archive-store-info h2 a {
    color: var(--cps-green, #009900);
    text-decoration: none;
}

.cps-archive-store-info p {
    margin: 0;
    color: #444;
    font-size: 14px;
    line-height: 1.45;
}

.cps-archive-store-footer {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-top: 1px solid var(--cps-border-soft);
    color: #777;
    font-size: 13px;
}

.cps-archive-store-footer a {
    color: var(--cps-green, #009900);
    text-decoration: none;
    white-space: nowrap;
}

.cps-archive-sidebar { width: 100%; }

.cps-related-box {
    background: var(--cps-card);
    border: 1px solid var(--cps-border);
    box-shadow: var(--cps-shadow);
}

.cps-related-box h2 {
    margin: 0;
    padding: 18px 16px;
    border-bottom: 1px solid var(--cps-border-soft);
    color: var(--cps-text);
    font-size: 18px;
    line-height: 1.3;
    font-weight: 500;
}

.cps-related-box ul {
    list-style: none;
    padding: 12px 16px 18px;
    margin: 0;
}

.cps-related-box li {
    margin: 0;
    padding: 8px 0;
}

.cps-related-box a {
    color: #444;
    text-decoration: none;
    font-size: 14px;
}

.cps-related-box li.active a,
.cps-related-box a:hover { color: var(--cps-green, #009900); }

.cps-pagination { margin-top: 18px; }
.cps-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 32px;
    padding: 6px 10px;
    margin-right: 4px;
    background: #fff;
    border: 1px solid var(--cps-border);
    color: #1a73e8;
    text-decoration: none;
    font-size: 13px;
}
.cps-pagination .current {
    background: var(--cps-green, #009900);
    color: #fff;
    border-color: var(--cps-green, #009900);
}
.cps-empty {
    background: #fff;
    border: 1px solid var(--cps-border);
    padding: 22px;
    color: #555;
}

/* Single store */
.cps-store-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 38px;
    align-items: start;
    margin-top: 30px;
}

.cps-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

@media (min-width: 992px) {
    .cps-sidebar {
        position: sticky;
        top: 96px;
        align-self: start;
        height: max-content;
        z-index: 5;
    }
}

.cps-main { min-width: 0; }
.cps-main h1 {
    margin: 10 0 18px;
    color: var(--cps-text);
    font-size: 30px;
    line-height: 1.22;
    font-weight: 500;
    letter-spacing: -0.015em;
}

.cps-store-heading-brand {
    color: var(--cps-green, #009900);
}

.cps-store-desc {
    margin: 0 0 24px;
    color: var(--cps-text);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
}

.cps-store-card,
.cps-stats-card,
.cps-content-box {
    background: #fff;
    border: 1px solid #e4e4e4;
    box-shadow: var(--cps-shadow);
}

.cps-store-card {
    padding: 55px 34px 28px;
    text-align: center;
}

.cps-store-logo {
    width: 110px;
    height: 110px;
    object-fit: contain;
    margin: 0 auto 32px;
    display: block;
}

.cps-store-name {
    color: var(--cps-green, #009900);
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 16px;
}

.cps-rating-stars {
    color: #f39c12;
    font-size: 30px;
    letter-spacing: 1px;
    line-height: 1;
}

.cps-rating-stars span {
    color: #777;
}

.cps-rating-stars-exact {
    position: relative;
    display: inline-block;
    line-height: 1;
    color: #777;
    white-space: nowrap;
}

.cps-rating-stars-exact .cps-rating-stars-base {
    display: block;
    color: #777;
}

.cps-rating-stars-exact .cps-rating-stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: #f39c12;
    white-space: nowrap;
}

.cps-rating-line { color: #777; font-size: 16px; margin: 14px 0 22px; }

.cps-alert-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--cps-green, #009900);
    background: #fff;
    color: var(--cps-green, #009900);
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
}
.cps-alert-btn:hover { background: var(--cps-green, #009900); color: #fff; text-decoration: none; }

.cps-stats-card { padding: 24px; }
.cps-stats-card strong { display: block; font-size: 17px; margin-bottom: 20px; }
.cps-stat-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; color: #222; font-size: 15px; }

.cps-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0 0 28px;
}
.cps-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 126px;
    height: 56px;
    padding: 0 22px;
    background: #fff;
    border-radius: 5px;
    color: var(--cps-green, #009900);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}
.cps-tabs a.active,
.cps-tabs a:hover { background: var(--cps-green, #009900); color: #fff; text-decoration: none; }

.cps-coupon-list { display: flex; flex-direction: column; gap: 16px; }
.cps-coupon-card {
    min-height: 145px;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 260px;
    align-items: center;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    box-shadow: var(--cps-shadow);
}
.cps-coupon-card[hidden], .cps-filter-empty[hidden] { display: none !important; }
.cps-discount { padding: 0 18px; color: var(--cps-green, #009900); font-size: 22px; font-weight: 600; line-height: 1.16; text-align: center; }
.cps-coupon-content { min-width: 0; padding: 22px 26px; border-left: 1px dashed #ddd; }
.cps-verified { margin: 0 0 12px; color: var(--cps-green, #009900); font-weight: 700; font-size: 18px; }
.cps-coupon-content h3 { margin: 0 0 12px; color: var(--cps-text); font-size: 20px; line-height: 1.3; font-weight: 600; }
.cps-coupon-content p { margin: 0; color: #777; font-size: 15px; line-height: 1.6; }
.cps-coupon-action { width: 260px; min-width: 260px; padding: 20px 22px; text-align: center; }

.cps-green-btn,
.cps-coupon-action > a.cps-green-btn:not(.cps-code-btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    height: 50px;
    padding: 0 24px;
    background: var(--cps-green, #009900);
    color: #fff;
    border-radius: 5px;
    border: 0;
    text-decoration: none;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}
.cps-green-btn:hover { background: var(--cps-green-dark, #007f00); color: #fff; text-decoration: none; }

.cps-code-action { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 190px; height: 48px; overflow: visible; }
.cps-code-action .cps-code-btn { position: relative; z-index: 3; width: 148px; min-width: 148px; height: 48px; padding: 0; }
.cps-code-peek { position: relative; z-index: 2; display: flex; align-items: center; justify-content: flex-end; width: 56px; min-width: 56px; height: 44px; margin-left: -16px; padding: 0 8px 0 0; border: 2px dashed var(--cps-green, #009900); border-left: 0; border-radius: 0 6px 6px 0; background: #fff; color: var(--cps-green, #009900); font-weight: 800; overflow: hidden; }
.cps-code-peek::before { content: ""; position: absolute; left: -1px; top: 0; width: 34px; height: 100%; background: linear-gradient(135deg, var(--cps-green-dark, #007f00) 0%, var(--cps-green, #009900) 50%, transparent 51%); z-index: 2; }
.cps-code-peek-text { position: relative; z-index: 1; }

.cps-store-content,
.cps-store-content-in-main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 28px;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

.cps-store-content h2 {
    max-width: 100%;
    margin: 30px 0 12px;
    color: var(--cps-text);
    font-size: 19px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: -0.005em;
    overflow-wrap: anywhere;
}

.cps-content-box {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 22px 24px;
    color: #333;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.65;
    font-weight: 400;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-wrap: anywhere;
    word-break: normal;
}

.cps-content-box h1,
.cps-content-box h2,
.cps-content-box h3,
.cps-content-box h4,
.cps-content-box h5,
.cps-content-box h6 {
    max-width: 100%;
    margin: 22px 0 10px;
    color: var(--cps-text);
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.cps-content-box h1 { font-size: 22px; }
.cps-content-box h2 { font-size: 19px; }
.cps-content-box h3 { font-size: 17px; }
.cps-content-box h4 { font-size: 15px; }
.cps-content-box h5,
.cps-content-box h6 { font-size: 14px; }

.cps-content-box p,
.cps-content-box li,
.cps-content-box div,
.cps-content-box a {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}

.cps-content-box p { margin: 0 0 13px; }
.cps-content-box ul,
.cps-content-box ol {
    margin: 0 0 14px 22px;
    padding: 0;
}

.cps-content-box li {
    margin-bottom: 7px;
}

.cps-content-box img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 16px auto;
}

.cps-faq-box p {
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}
.cps-popular-brands { column-count: 5; column-gap: 60px; margin: 30px auto; }
.cps-popular-brands a { display: block; margin-bottom: 6px; color: #008b13; text-decoration: none; font-size: 14px; line-height: 1.35; }

/* Modal */
body.cps-modal-open { overflow: hidden; }
.cps-modal { display: none; position: fixed; inset: 0; z-index: 99999; }
.cps-modal.is-active { display: block; }
.cps-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.cps-modal-box { position: relative; z-index: 2; width: min(520px, calc(100% - 32px)); margin: 8vh auto 0; background: #fff; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); padding: 24px; }
.cps-modal-close { position: absolute; right: 14px; top: 10px; border: 0; background: none; font-size: 30px; line-height: 1; cursor: pointer; }
.cps-modal-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.cps-modal-logo-wrap { width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; border: 1px solid #eee; }
.cps-modal-logo-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cps-modal-head h2 { margin: 0; padding-right: 24px; font-size: 20px; line-height: 1.3; font-weight: 600; }
.cps-modal-note { color: #555; margin: 0 0 14px; }
.cps-modal-go-btn, .cps-copy-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; background: var(--cps-green, #009900); color: #fff; border: 0; border-radius: 5px; text-decoration: none; font-weight: 800; cursor: pointer; }
.cps-copy-row { display: flex; gap: 10px; align-items: stretch; }
.cps-modal-code { flex: 1; display: flex; align-items: center; min-height: 46px; padding: 0 16px; border: 2px dashed var(--cps-green, #009900); color: var(--cps-green, #009900); font-weight: 800; font-size: 20px; }
.cps-modal-more-link { display: inline-block; margin-top: 16px; color: var(--cps-green, #009900); text-decoration: none; }


/* Plugin-owned homepage template.
   When the static front page contains CPS shortcodes, PHP routes it through
   templates/front-page-cps.php so Home is no longer constrained by theme page wrappers. */
.cps-home-page {
    background: #f8f8f7;
}

.cps-home-page .cps-home-inner {
    width: min(var(--cps-inner), calc(100vw - (var(--cps-side-gap) * 2)));
    max-width: var(--cps-inner);
    margin-left: auto;
    margin-right: auto;
}

.cps-home-page .cps-store-search,
.cps-home-page .cps-home-section {
    width: 100%;
    max-width: 100%;
    max-inline-size: 100%;
    margin-left: 0;
    margin-right: 0;
}

.cps-home-inner > p:empty {
    display: none;
}

.cps-home-inner > p {
    margin: 0;
}

/* Homepage shortcodes: independent from theme content width */
.cps-home-section {
    position: relative;
    left: auto;
    right: auto;
    width: min(var(--cps-inner), calc(100vw - (var(--cps-side-gap) * 2)));
    max-width: var(--cps-inner);
    margin-left: calc(50% - 50vw + var(--cps-side-gap));
    margin-right: 0;
    margin-bottom: 52px;
    padding: 0;
    color: var(--cps-text);
    font-family: Arial, Helvetica, sans-serif;
    clear: both;
}

.cps-home-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.cps-home-section-head h2 { margin: 0; font-size: 26px; line-height: 1.25; font-weight: 500; }
.cps-home-section-head a { color: var(--cps-green, #009900); text-decoration: none; font-size: 24px; white-space: nowrap; }
.cps-home-store-row { display: flex; flex-wrap: nowrap; gap: 24px; overflow-x: auto; overflow-y: visible; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; padding-bottom: 18px; }
.cps-home-store-item { flex: 0 0 178px; width: 178px; text-align: center; scroll-snap-align: start; }
.cps-home-store-item a { text-decoration: none; color: inherit; }
.cps-home-store-logo { display: flex; align-items: center; justify-content: center; width: 178px; height: 178px; padding: 10px; background: #fff; border: 1px solid #e5e5e5; overflow: hidden; }
.cps-home-store-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cps-home-store-letter { color: var(--cps-green, #009900); font-size: 48px; font-weight: 800; }
.cps-home-store-name { display: block; margin-top: 10px; color: #222; font-size: 18px; line-height: 1.25; }
.cps-home-deals-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.cps-home-deal-card { background: #fff; border: 1px solid #e5e5e5; box-shadow: var(--cps-shadow); overflow: hidden; }
.cps-home-deal-card a { position: relative; display: flex; flex-direction: column; color: inherit; text-decoration: none; padding-bottom: 0px; }
.cps-home-hot { position: absolute; z-index: 2; top: 18px; left: 18px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #ff4f6d; color: #ffeb3b; font-size: 15px; }
.cps-home-deal-image { height: 205px; display: flex; align-items: center; justify-content: center; padding: 18px; }
.cps-home-deal-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cps-home-deal-card h3 { min-height: 50px; margin: 0 0 4px; padding: 0 18px; color: #111; font-size: 16px; line-height: 1.35; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cps-home-price-line { min-height: 0; margin: 0 0 4px; padding: 0 18px; }
.cps-home-price-line.is-empty { display: none; }
.cps-home-old-price { color: #888; text-decoration: line-through; margin-right: 8px; }
.cps-home-sale-price { color: var(--cps-green, #009900); font-weight: 800; }
.cps-home-deal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 36px);
    min-width: 0;
    height: 38px;
    margin: 8px 18px 14px;
    background: #fff;
    color: #4f5f74;
    border: 1px solid #6f7a86;
    border-radius: 3px;
    box-shadow: none;
    font-size: 16px;
    line-height: 1;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
}

.cps-home-deal-btn:hover,
.cps-home-deal-btn:focus {
    background: #f8f8f8;
    color: #2f3f52;
    border-color: #4f5f74;
    text-decoration: none;
}

.cps-home-deals-load-more-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 24px;
}

.cps-home-deals-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 168px;
    min-height: 44px;
    padding: 11px 24px;
    border: 1px solid var(--cps-green, #009900);
    border-radius: 999px;
    background: #fff;
    color: var(--cps-green, #009900);
    box-shadow: none;
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.cps-home-deals-load-more:hover,
.cps-home-deals-load-more:focus {
    background: var(--cps-green, #009900);
    color: #fff;
    outline: none;
    text-decoration: none;
}

.cps-home-deals-load-more:disabled,
.cps-home-deals-load-more.is-loading {
    cursor: wait;
    opacity: .72;
}
.cps-home-categories-toggle { background: transparent; }
.cps-home-categories-toggle[open] { padding-bottom: 4px; }
.cps-home-categories-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    margin: 0;
    padding: 0 0 26px;
    color: var(--cps-text);
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.cps-home-categories-summary::-webkit-details-marker { display: none; }
.cps-home-categories-summary::marker { content: ''; }
.cps-home-categories-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cps-home-categories-title { display: block; color: #111827; font-size: 24px; line-height: 1.22; font-weight: 600; letter-spacing: -0.01em; }
.cps-home-categories-desc { display: block; color: #6b7280; font-size: 15px; line-height: 1.45; font-weight: 400; }
.cps-home-categories-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex: 0 0 auto;
    min-width: 276px;
    min-height: 50px;
    padding: 0 28px;
    background: #fff;
    border: 1px solid #d7dce2;
    border-radius: 999px;
    color: #111827;
    box-shadow: none;
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    text-align: center;
}
.cps-home-categories-summary:hover .cps-home-categories-toggle-btn,
.cps-home-categories-summary:focus-visible .cps-home-categories-toggle-btn {
    border-color: var(--cps-green, #009900);
    color: var(--cps-green, #009900);
}
.cps-home-categories-summary:focus-visible {
    outline: 2px solid var(--cps-green, #009900);
    outline-offset: 4px;
}
.cps-home-categories-icon {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}
.cps-home-categories-icon::before,
.cps-home-categories-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 11px;
    height: 1.5px;
    background: currentColor;
    border-radius: 999px;
    transform-origin: center;
}
.cps-home-categories-icon::before { transform: translate(-82%, -50%) rotate(45deg); }
.cps-home-categories-icon::after { transform: translate(-18%, -50%) rotate(-45deg); }
.cps-home-categories-toggle[open] .cps-home-categories-icon::before { transform: translate(-82%, -50%) rotate(-45deg); }
.cps-home-categories-toggle[open] .cps-home-categories-icon::after { transform: translate(-18%, -50%) rotate(45deg); }
.cps-home-categories-toggle .cps-label-open { display: none; }
.cps-home-categories-toggle[open] .cps-label-closed { display: none; }
.cps-home-categories-toggle[open] .cps-label-open { display: inline; }
.cps-home-category-panel {
    border-top: 1px solid #dfe3e8;
    padding-top: 28px;
}
.cps-home-category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 36px;
    row-gap: 14px;
    align-items: start;
}
.cps-home-category-grid a {
    display: block;
    padding: 0;
    background: transparent;
    border: 0;
    color: #111827;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 400;
    text-decoration: none;
}
.cps-home-category-grid a:hover,
.cps-home-category-grid a:focus {
    color: var(--cps-green, #009900);
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* Theme wrapper neutrality for pages that contain CPS homepage shortcodes.
   This prevents default block themes from adding a narrow inline-size to coupon sections. */
.cps-home-section,
.cps-store-search {
    max-inline-size: var(--cps-inner);
}

/* Responsive */
@media (max-width: 1399px) and (min-width: 992px) {
    :root { --cps-side-gap: 32px; }
    .cps-archive-layout { grid-template-columns: minmax(0,1fr) 300px; gap: 24px; }
    .cps-archive-header { max-width: calc(100% - 300px - 24px); }
    .cps-archive-store-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .cps-store-layout { grid-template-columns: 300px minmax(0,1fr); gap: 28px; }
}

@media (max-width: 1199px) {
    .cps-home-deals-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 991px) {
    :root { --cps-side-gap: 16px; }
    .cps-app-page, .cps-page-wrap { padding-top: 20px; padding-bottom: 42px; }
    .cps-archive-header { max-width: none; }
    .cps-archive-layout, .cps-store-layout { display: block; }
    .cps-archive-sidebar, .cps-sidebar { margin-top: 24px; }
    .cps-sidebar { position: static; }
    .cps-archive-store-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .cps-home-deals-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 767px) {
    /*
       Mobile-only layout correction from stable v1.1.2.
       Desktop/tablet CSS is preserved.

       Root cause:
       WordPress/default themes can force margin-left:auto / margin-right:auto
       or narrow content sizing on shortcode blocks. The v1.1.2 mobile rules
       did not use !important on the breakout formulas, so the theme could
       override them and push CPS blocks slightly to the right.

       Fix:
       Do not move parent wrappers. Do not use body:has(). Do not use shadow hacks.
       Only re-assert the CPS mobile canvas and content widths with scoped rules.
    */
    :root { --cps-side-gap: 8px; }

    body.single-cps_store,
    body.tax-coupon_category,
    body.cps-store-directory-active,
    body.cps-front-page-active {
        max-width: 100%;
        overflow-x: hidden;
    }

    .cps-app-page,
    .cps-page-wrap {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: 0 !important;
        padding-top: 14px;
        padding-bottom: 34px;
        overflow-x: hidden;
    }

    .cps-app-inner,
    .cps-store-layout {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /*
       Homepage sections and standalone homepage search:
       classic viewport breakout, but with !important so theme block wrappers
       cannot override the centering.
    */
    .cps-home-section,
    body:not(.single-cps_store):not(.tax-coupon_category) .cps-store-search {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        max-inline-size: calc(100vw - 16px) !important;
        margin-left: calc(50% - 50vw + 8px) !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        clear: both !important;
        box-sizing: border-box !important;
    }

    /*
       Search inside plugin-owned archive/single pages follows the inner container.
    */
    .cps-app-page .cps-store-search,
    .cps-page-wrap .cps-store-search {
        width: 100% !important;
        max-width: 100% !important;
        max-inline-size: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .cps-store-search {
        margin-bottom: 28px;
    }

    .cps-store-search input {
        height: 50px;
        padding: 0 14px;
        font-size: 16px;
    }

    .cps-store-search button {
        width: 54px;
        min-width: 54px;
        height: 50px;
    }

    .cps-archive-header {
        max-width: none;
    }

    .cps-archive-header h1,
    .cps-main h1 {
        font-size: 26px;
        line-height: 1.25;
    }

    .cps-archive-store-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cps-archive-store-card {
        grid-template-columns: 86px minmax(0,1fr);
        min-height: 130px;
    }

    .cps-archive-store-logo img,
    .cps-archive-store-logo span {
        width: 64px;
        height: 64px;
    }

    .cps-archive-store-info h2 {
        font-size: 17px;
    }

    .cps-archive-store-footer {
        flex-direction: column;
        gap: 6px;
    }

    .cps-store-card {
        padding: 38px 22px 26px;
    }

    .cps-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 12px;
    }

    .cps-tabs a {
        min-width: 0;
        width: 100%;
        height: 58px;
        font-size: 20px;
    }

    .cps-coupon-card {
        display: grid;
        grid-template-columns: 86px minmax(0, 1fr);
        grid-template-areas:
            "discount content"
            "discount action";
        column-gap: 0;
        row-gap: 0;
        min-height: 0;
        align-items: stretch;
    }

    .cps-discount {
        grid-area: discount;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        padding: 16px 10px;
        text-align: center;
        border-right: 1px dashed #ddd;
        box-sizing: border-box;
    }

    .cps-coupon-content {
        grid-area: content;
        min-width: 0;
        border-left: 0;
        padding: 16px 14px 10px;
        box-sizing: border-box;
    }

    .cps-coupon-action {
        grid-area: action;
        width: 100%;
        min-width: 0;
        padding: 0 14px 16px;
        text-align: left;
        box-sizing: border-box;
    }

    .cps-popular-brands {
        column-count: 2;
        column-gap: 28px;
    }

    .cps-modal-box {
        margin-top: 6vh;
        padding: 20px;
    }

    .cps-copy-row {
        flex-direction: column;
    }

    .cps-home-section {
        margin-bottom: 42px !important;
    }

    .cps-home-section-head {
        gap: 10px;
        margin-bottom: 18px;
    }

    .cps-home-section-head h2 {
        font-size: 20px;
        min-width: 0;
    }

    .cps-home-section-head a {
        font-size: 22px;
    }

    .cps-home-store-row {
        width: 100%;
        max-width: 100%;
        gap: 12px;
        padding-bottom: 14px;
        overflow-x: auto;
        overflow-y: visible;
    }

    .cps-home-store-item {
        flex: 0 0 calc((100% - 12px) / 2);
        width: calc((100% - 12px) / 2);
        max-width: calc((100% - 12px) / 2);
        min-width: 0;
    }

    .cps-home-store-logo {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .cps-home-deals-grid {
        width: 100%;
        max-width: 100%;
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 6px;
    }

    .cps-home-category-grid a {
        max-width: 100%;
    }

    .cps-home-deal-image {
        height: 136px;
        padding: 10px;
    }

    .cps-home-hot {
        top: 10px;
        left: 10px;
    }

    .cps-home-deal-card h3 {
        min-height: 58px;
        padding: 0 10px;
        font-size: 13px;
        -webkit-line-clamp: 3;
    }

    .cps-home-deal-btn {
        width: calc(100% - 20px);
        height: 38px;
        margin: 8px 10px 12px;
        background: #fff;
        color: #4f5f74;
        border: 1px solid #6f7a86;
        border-radius: 3px;
        box-shadow: none;
        font-size: 14px;
        font-weight: 500;
    }

    .cps-store-content,
    .cps-store-content-in-main {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    .cps-content-box {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 18px !important;
        font-size: 14px !important;
        line-height: 1.65 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .cps-store-content h2 {
        font-size: 19px !important;
        line-height: 1.3 !important;
        margin-top: 28px !important;
        margin-bottom: 12px !important;
    }

    /*
       Mobile coupon card row layout:
       keep discount/value column on the same horizontal row as coupon content.
       This replaces the previous stacked mobile layout only for coupon cards.
    */
    .cps-coupon-list .cps-coupon-card {
        display: grid !important;
        grid-template-columns: 86px minmax(0, 1fr) !important;
        grid-template-areas:
            "discount content"
            "discount action" !important;
        column-gap: 0 !important;
        row-gap: 0 !important;
        align-items: stretch !important;
        min-height: 0 !important;
    }

    .cps-coupon-list .cps-discount {
        grid-area: discount !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 0 !important;
        padding: 16px 10px !important;
        text-align: center !important;
        border-right: 1px dashed #ddd !important;
        box-sizing: border-box !important;
    }

    .cps-coupon-list .cps-coupon-content {
        grid-area: content !important;
        min-width: 0 !important;
        border-left: 0 !important;
        padding: 16px 14px 10px !important;
        box-sizing: border-box !important;
    }

    .cps-coupon-list .cps-coupon-action {
        grid-area: action !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 0 14px 16px !important;
        text-align: left !important;
        box-sizing: border-box !important;
    }

    .cps-coupon-list .cps-coupon-content h3,
    .cps-coupon-list .cps-coupon-description {
        max-width: 100% !important;
        overflow-wrap: anywhere !important;
    }

    .cps-coupon-list .cps-green-btn,
    .cps-coupon-list .cps-code-action {
        max-width: 100% !important;
    }

    .cps-coupon-list .cps-code-action {
        display: inline-flex !important;
        align-items: center !important;
    }


    .cps-home-page .cps-home-inner {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .cps-home-page .cps-store-search,
    .cps-home-page .cps-home-section {
        width: 100% !important;
        max-width: 100% !important;
        max-inline-size: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .cps-home-page .cps-store-search {
        margin-bottom: 28px !important;
    }
    /*
       Mobile filter safety:
       Mobile coupon cards use display:grid!important.
       This keeps JS-filtered cards hidden on mobile.
    */
    .cps-coupon-list .cps-coupon-card[hidden],
    .cps-coupon-list .cps-filter-empty[hidden] {
        display: none !important;
    }

}

@media (max-width: 390px) {
    .cps-coupon-list .cps-coupon-card {
        grid-template-columns: 78px minmax(0, 1fr) !important;
    }

    .cps-coupon-list .cps-discount {
        padding-left: 8px !important;
        padding-right: 8px !important;
        font-size: 26px !important;
        line-height: 1.1 !important;
    }

    .cps-coupon-list .cps-coupon-content {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .cps-coupon-list .cps-coupon-action {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}



@media (max-width: 767px) {
    .cps-home-categories-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
        padding-bottom: 22px;
    }

    .cps-home-categories-title {
        font-size: 22px;
    }

    .cps-home-categories-desc {
        font-size: 14px;
    }

    .cps-home-categories-toggle-btn {
        width: 100%;
        min-width: 0;
        min-height: 48px;
        padding: 0 20px;
    }

    .cps-home-category-panel {
        padding-top: 22px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cps-home-category-grid {
        display: grid;
        grid-template-columns: repeat(6, minmax(120px, 1fr));
        width: max-content;
        max-width: none;
        min-width: 820px;
        gap: 10px 24px;
        padding: 0 2px 8px;
        scroll-snap-type: none;
    }

    .cps-home-category-grid a {
        display: block;
        min-height: 0;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        color: #111827;
        line-height: 1.45;
        text-decoration: none;
    }

    .cps-home-category-grid a:hover,
    .cps-home-category-grid a:focus {
        color: var(--cps-green, #009900);
        text-decoration: underline;
        text-underline-offset: 3px;
    }
}

