/*
Theme Name: BestMax Coupons
Theme URI: https://example.com/bestmax-coupons
Author: BestMax
Author URI: https://example.com
Description: A coupons & deals theme — stores, coupons, categories, a "Get Code" modal with auto-copy, and affiliate redirects — built in the spirit of FashionCouponLab, using the BestMaxReviews color system.
Version: 1.3.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: bestmax-coupons
*/

/* =========================================================
   0. Design tokens — BestMaxReviews palette
   (the brand color can be changed in Customize -> BestMax Coupons)
   ========================================================= */
:root {
  --brand: #2a14b4;
  --brand-dark: #1e0f8a;
  --brand-hover: #3a22d6;
  --brand-light: #eef2ff;
  --danger: #dc2c4f;
  --text-dark: #0b1c30;
  --text-muted: #6e6e7d;
  --bg-soft: #f8f9ff;
  --border-soft: #e3e6f2;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 2px 10px rgba(11, 28, 48, 0.05);
  --shadow-card-hover: 0 12px 28px rgba(11, 28, 48, 0.10);
}

*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--text-dark); background: #fff; margin: 0; overflow-x: hidden; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
ul { margin: 0; }
h1, h2, h3, h4, h5 { line-height: 1.25; }
.bmc-container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.text-brand { color: var(--brand) !important; }
.text-muted { color: var(--text-muted); }
.mb-3 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 1.5rem; } .mb-5 { margin-bottom: 3rem; }
.mt-2 { margin-top: .5rem; } .mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; }
.py-5 { padding: 3rem 0; } .text-center { text-align: center; } .fw-semibold { font-weight: 600; } .small { font-size: .85rem; }
.bmc-hidden { display: none !important; }

/* =========================================================
   1. Buttons
   ========================================================= */
.btn { display: inline-block; font-family: inherit; font-weight: 600; line-height: 1.2; border-radius: var(--radius-sm); padding: .7rem 1.15rem; border: 1px solid transparent; cursor: pointer; font-size: .92rem; transition: all .15s ease; text-align: center; }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.btn-outline-brand { background: #fff; border-color: var(--border-soft); color: var(--text-dark); }
.btn-outline-brand:hover { border-color: var(--brand); color: var(--brand); }
.w-100 { width: 100%; }
.px-4 { padding-left: 1.5rem; padding-right: 1.5rem; }

/* "Get Code" ribbon button — folded-corner coupon style */
.get-code-btn { position: relative; background: var(--brand); border: none; color: #fff; font-weight: 700; border-radius: var(--radius-sm); padding: .75rem 1.15rem; overflow: visible; }
.get-code-btn:hover { background: var(--brand-hover); }
.get-code-btn.has-ribbon::after {
  content: ""; position: absolute; height: 0; width: 0; right: -1px; top: -1px;
  border-style: solid; border-width: 8px;
  border-top-color: #fff; border-right-color: #fff;
  border-bottom-color: var(--brand-dark); border-left-color: var(--brand-dark);
  border-bottom-left-radius: 4px; border-top-right-radius: 4px;
  transition: all .1s ease-in;
}
.get-code-btn.has-ribbon:hover::after { border-width: 10px; }

/* =========================================================
   2. Header / nav
   ========================================================= */
.bmc-header { background: #fff; border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; z-index: 1030; }
.bmc-header-inner { display: flex; align-items: center; gap: 1.5rem; padding: .7rem 1.25rem; }
.bmc-logo { display: inline-flex; align-items: center; gap: .6rem; white-space: nowrap; flex-shrink: 0; }
.bmc-logo-img { display: block; height: 38px; width: auto; }
.bmc-logo-text { font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; color: #0a2a6c; }
.bmc-logo-text em { font-style: normal; color: var(--brand); margin-left: .2rem; }
.bmc-nav-menu { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; flex: 1; }
.bmc-nav-menu li a { display: block; padding: .5rem .8rem; font-weight: 500; font-size: .95rem; color: var(--text-dark); border-bottom: 2px solid transparent; }
.bmc-nav-menu li a:hover, .bmc-nav-menu li.current-menu-item a { color: var(--brand); border-bottom-color: var(--brand); }
.bmc-header-actions { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.bmc-search-form { display: flex; align-items: center; background: var(--bg-soft); border: 1px solid var(--border-soft); border-radius: 22px; padding: .25rem .3rem .25rem 1rem; }
.bmc-search-input { border: none; background: none; outline: none; font-size: .88rem; width: 190px; font-family: inherit; }
.bmc-search-form button { background: var(--brand); color: #fff; border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: .8rem; }
.bmc-mobile-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
.bmc-mobile-toggle span { width: 22px; height: 2px; background: var(--text-dark); display: block; }
@media (max-width: 900px) {
  .bmc-header-inner { position: relative; flex-wrap: wrap; gap: .75rem; }
  .bmc-nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; border-bottom: 1px solid var(--border-soft); padding: .5rem 1.25rem 1rem; box-shadow: 0 12px 20px rgba(11,28,48,.06); }
  .bmc-nav-menu.is-open { display: flex; }
  .bmc-search-input { width: 110px; }
  .bmc-mobile-toggle { display: flex; }
}
@media (max-width: 480px) { .bmc-logo-text { font-size: 1.1rem; } }

/* =========================================================
   3. Hero (text left, coupon illustration right)
   ========================================================= */
.home-hero-wrap { background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%); border-bottom: 1px solid var(--border-soft); }
.home-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 2rem; align-items: center; padding-top: 3rem; padding-bottom: 3rem; }
.home-hero .eyebrow { display: inline-block; color: var(--brand); background: var(--brand-light); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding: .35rem .8rem; border-radius: 999px; }
.home-hero h1 { font-weight: 800; font-size: 2.9rem; line-height: 1.12; letter-spacing: -.02em; margin: 1rem 0 1rem; }
.home-hero .brush-highlight { color: var(--brand); }
.home-hero .lead-text { color: var(--text-muted); font-size: 1.05rem; max-width: 480px; margin: 0 0 1.5rem; }
.home-hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 2rem; }
.home-hero-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.home-hero-stats .stat { display: flex; align-items: center; gap: .6rem; font-size: .8rem; font-weight: 600; color: var(--text-muted); line-height: 1.3; max-width: 130px; }
.home-hero-stats .stat-icon { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--border-soft); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; background: #fff; }
.home-hero-art img { display: block; width: 100%; max-width: 540px; height: auto; margin-left: auto; }
@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; padding-top: 2rem; padding-bottom: 2rem; }
  .home-hero h1 { font-size: 2.3rem; }
  .home-hero-art img { max-width: 380px; margin: 0 auto; }
}

.home-sections { padding-top: 2.75rem; }
.home-section { margin-bottom: 3.25rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.section-title { font-weight: 800; font-size: 1.45rem; display: flex; align-items: center; gap: .5rem; margin: 0; letter-spacing: -.01em; }
.section-link { color: var(--brand); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.section-link:hover { text-decoration: underline; }

.page-hero { padding: 2.5rem 0 1.5rem; }
.page-hero .eyebrow { color: var(--brand); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.page-hero h1 { font-weight: 800; font-size: 2rem; margin: .4rem 0; letter-spacing: -.01em; }
.page-hero .desc { color: var(--text-muted); margin: 0; }

/* =========================================================
   4. Grids — "auto-fill" keeps every tile the SAME size no matter
   how many items there are (1 or 30), so nothing is too big/small.
   ========================================================= */
.bmc-grid { display: grid; gap: 1.25rem; }
.bmc-grid-tiles { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.bmc-grid-small { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
@media (max-width: 640px) {
  .bmc-grid-tiles { grid-template-columns: 1fr; }
  .bmc-grid-small { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   5. Store logo (fixed-size boxes) + monogram fallback
   ========================================================= */
.store-logo { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; background: #fff; border: 1px solid var(--border-soft); border-radius: 14px; }
.store-logo-sm { width: 56px; height: 56px; border-radius: 12px; }
.store-logo-md { width: 72px; height: 72px; }
.store-logo-lg { width: 128px; height: 128px; border-radius: 22px; }
.store-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.store-logo.is-mono { border-color: transparent; }
.store-logo.is-mono b { font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; }
.store-logo-sm.is-mono b { font-size: 1.1rem; }
.store-logo-lg.is-mono b { font-size: 2.6rem; }

/* =========================================================
   6. Category card / store card
   ========================================================= */
.category-card, .store-card { display: flex; flex-direction: column; align-items: center; text-align: center; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius-md); transition: all .18s ease; }
.category-card:hover, .store-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); border-color: transparent; }
.category-card { padding: 1.5rem 1rem; gap: .35rem; }
.category-icon-circle { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: .5rem; }
.category-card-name { font-weight: 700; font-size: 1rem; }
.category-card-stores { color: var(--text-muted); font-size: .82rem; }
.cat-hero-icon { width: 68px; height: 68px; margin-bottom: 1rem; }

.store-card { padding: 1.4rem 1rem 1.2rem; gap: .3rem; }
.store-card .store-logo { margin-bottom: .6rem; }
.store-card-name { font-weight: 700; font-size: .98rem; line-height: 1.25; max-width: 100%; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.store-card-coupons { color: var(--text-muted); font-size: .82rem; }
.store-card-discount { color: var(--brand); font-weight: 600; font-size: .82rem; min-height: 1.3em; }

/* =========================================================
   7. Homepage coupon / deal tile (uniform height)
   ========================================================= */
.coupon-tile { display: flex; flex-direction: column; align-items: center; text-align: center; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 1.25rem 1.1rem 1.1rem; transition: all .18s ease; }
.coupon-tile:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); border-color: transparent; }
.tile-pill { background: var(--brand-light); color: var(--brand); font-weight: 800; font-size: .8rem; letter-spacing: .02em; padding: .3rem .85rem; border-radius: 999px; margin-bottom: 1rem; text-transform: uppercase; }
.tile-logo { display: block; margin-bottom: .7rem; }
.tile-store { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: .35rem; }
.tile-title { font-size: 1rem; font-weight: 700; line-height: 1.35; margin: 0 0 .6rem; min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-meta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; font-size: .76rem; color: var(--text-muted); margin-bottom: 1rem; margin-top: auto; padding-top: .2rem; }
.meta-verified { color: #15803d; font-weight: 600; }

/* =========================================================
   8. Filters / pagination
   ========================================================= */
.filters-bar { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: .9rem 1.1rem; display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.filters-bar .form-select, .filters-bar .form-control { font-family: inherit; border-radius: var(--radius-sm); border: 1px solid var(--border-soft); font-size: .9rem; padding: .6rem .8rem; background: #fff; }
.filters-bar .form-control { flex: 1; min-width: 180px; }
.filters-form { display: flex; gap: .75rem; flex-wrap: wrap; width: 100%; }
.filters-form .form-control { flex: 1; min-width: 180px; }
.filters-form .form-select, .filters-form .form-control { font-family: inherit; border-radius: var(--radius-sm); border: 1px solid var(--border-soft); font-size: .9rem; padding: .6rem .8rem; background: #fff; }

.bmc-pagination ul { list-style: none; display: flex; gap: .5rem; justify-content: center; padding: 0; margin: 2rem 0 0; flex-wrap: wrap; }
.bmc-pagination a, .bmc-pagination span { display: flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 .7rem; border-radius: 19px; border: 1px solid var(--border-soft); color: var(--text-dark); font-weight: 600; font-size: .85rem; }
.bmc-pagination a:hover { border-color: var(--brand); color: var(--brand); }
.bmc-pagination span.current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* =========================================================
   9. Badges
   ========================================================= */
.badge-row { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .45rem; }
.badge-row:empty { display: none; }
.badge-pill { display: inline-block; background: var(--brand-light); color: var(--brand); font-size: .72rem; font-weight: 700; padding: .2rem .65rem; border-radius: 999px; }

/* =========================================================
   10. Coupon card (All Coupons page): logo | details | code+button
   ========================================================= */
.coupon-card { display: grid; grid-template-columns: 72px minmax(0, 1fr) 210px; gap: 1.25rem; align-items: center; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 1.25rem; margin-bottom: 1rem; transition: box-shadow .18s ease; }
.coupon-card:hover { box-shadow: var(--shadow-card-hover); }
.coupon-card-body { min-width: 0; }
.coupon-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 .3rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.coupon-desc { color: var(--text-muted); font-size: .88rem; margin: 0 0 .5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.coupon-meta { display: flex; gap: 1rem; font-size: .78rem; color: var(--text-muted); flex-wrap: wrap; }
.meta-store { font-weight: 600; color: var(--text-dark); }
.coupon-card-right { display: flex; flex-direction: column; gap: .6rem; }
.coupon-code-box { height: 44px; border: 1.5px dashed var(--brand); background: var(--brand-light); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; padding: 0 .8rem; }
.coupon-code-box.is-nocode { border-color: var(--border-soft); background: var(--bg-soft); }
.code-text { font-weight: 800; letter-spacing: 1px; color: var(--brand-dark); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-nocode .code-text { color: var(--text-muted); font-weight: 600; letter-spacing: 0; font-size: .85rem; }
@media (max-width: 720px) {
  .coupon-card { grid-template-columns: 56px minmax(0, 1fr); gap: 1rem; }
  .coupon-card .store-logo-md { width: 56px; height: 56px; }
  .coupon-card-right { grid-column: 1 / -1; flex-direction: row; }
  .coupon-card-right > * { flex: 1; }
}

/* =========================================================
   11. Coupon row (store / category pages): discount | details | button
   ========================================================= */
.coupon-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 170px; gap: 1.25rem; align-items: center; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 1.15rem 1.25rem; margin-bottom: 1rem; transition: box-shadow .18s ease; }
.coupon-row.has-logo { grid-template-columns: 96px 56px minmax(0, 1fr) 170px; }
.coupon-row:hover { box-shadow: var(--shadow-card-hover); }
.coupon-row-discount { width: 96px; height: 96px; border: 2px dashed #c7cdea; background: var(--bg-soft); border-radius: var(--radius-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 .3rem; }
.discount-num { font-size: 1.6rem; font-weight: 800; color: var(--brand); line-height: 1; }
.discount-label { font-size: .66rem; font-weight: 800; color: var(--brand); letter-spacing: .06em; margin-top: .3rem; text-transform: uppercase; }
.coupon-row-discount.is-long .discount-num { font-size: 1.15rem; letter-spacing: .02em; }
.coupon-row-body { min-width: 0; }
.coupon-row-title { font-weight: 700; font-size: 1.05rem; margin: 0 0 .25rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.coupon-row-desc { color: var(--text-muted); font-size: .86rem; margin: 0 0 .45rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.coupon-row-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .78rem; color: var(--text-muted); }
@media (max-width: 720px) {
  .coupon-row, .coupon-row.has-logo { grid-template-columns: 80px minmax(0, 1fr); gap: 1rem; }
  .coupon-row-discount { width: 80px; height: 80px; }
  .discount-num { font-size: 1.35rem; }
  .coupon-row.has-logo .coupon-row-logo { display: none; }
  .coupon-row-action { grid-column: 1 / -1; }
}

/* =========================================================
   12. Store single page
   ========================================================= */
.store-hero-row { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; margin: 2rem 0 1.75rem; align-items: stretch; }
.store-hero-card { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 1.5rem; align-items: start; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 1.5rem; }
.store-hero-info { min-width: 0; }
.store-hero-info h1 { font-weight: 800; font-size: 1.7rem; margin: 0 0 .2rem; letter-spacing: -.01em; }
.store-hero-info .website { color: var(--text-muted); font-size: .88rem; margin-bottom: .75rem; }
.store-hero-desc { max-width: 560px; }
.store-hero-desc p { margin: 0 0 .5rem; }
.store-hero-stats { display: flex; gap: 2rem; margin-top: 1rem; flex-wrap: wrap; }
.store-hero-stats .val { font-weight: 800; font-size: 1.05rem; } .store-hero-stats .lbl { font-size: .78rem; color: var(--text-muted); }

.benefits-panel { background: var(--bg-soft); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 1.5rem; display: flex; flex-direction: column; }
.benefits-panel h5 { font-weight: 800; font-size: 1.15rem; margin: 0 0 1rem; }
.benefits-panel ul { list-style: none; padding: 0; margin: 0 0 1.25rem; flex: 1; }
.benefits-panel li { font-size: .9rem; margin-bottom: .6rem; padding-left: 1.4rem; position: relative; }
.benefits-panel li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }

.store-tabs { list-style: none; display: flex; gap: 1.75rem; border-bottom: 1px solid var(--border-soft); margin: 0 0 1.5rem; padding: 0; flex-wrap: wrap; }
.store-tabs a { display: inline-block; color: var(--text-muted); font-weight: 600; border-bottom: 2px solid transparent; padding: .65rem .1rem; font-size: .92rem; margin-bottom: -1px; }
.store-tabs a:hover { color: var(--text-dark); }
.store-tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.store-tab-panel h4 { font-size: 1.15rem; font-weight: 800; margin: 0 0 1rem; }
.about-box { background: var(--bg-soft); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 1.5rem; }
.about-box h5 { margin: 0 0 .75rem; font-size: 1.1rem; }
@media (max-width: 900px) { .store-hero-row { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .store-hero-card { grid-template-columns: 1fr; } }

/* =========================================================
   13. "Get Code" modal
   ========================================================= */
.bmc-modal { position: fixed; inset: 0; z-index: 2000; display: none; }
.bmc-modal.is-open { display: block; }
.bmc-modal-overlay { position: absolute; inset: 0; background: rgba(11, 28, 48, .55); }
.bmc-modal-dialog { position: relative; max-width: 400px; margin: 8vh auto 0; background: #fff; border-radius: var(--radius-md); padding: 1.75rem 1.5rem 1.5rem; text-align: center; box-shadow: 0 24px 60px rgba(11,28,48,.3); width: calc(100% - 2rem); }
.bmc-modal-close { position: absolute; top: .6rem; right: .8rem; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); line-height: 1; }
.bmc-modal-logo { width: 72px; height: 72px; margin: 0 auto .75rem; border: 1px solid var(--border-soft); border-radius: 14px; display: flex; align-items: center; justify-content: center; overflow: hidden; font-weight: 800; font-size: 1.6rem; color: var(--brand); background: var(--brand-light); }
.bmc-modal-body h5 { margin: 0 0 .25rem; font-size: 1.15rem; }
.bmc-modal-title { color: var(--text-muted); font-size: .9rem; margin: 0 0 1rem; }
.coupon-modal-code-box { border: 2px dashed var(--brand); border-radius: var(--radius-sm); background: var(--brand-light); padding: .8rem 1rem; font-size: 1.4rem; font-weight: 800; letter-spacing: 1.5px; color: var(--brand-dark); }
.bmc-modal-copy-status { font-size: .85rem; margin: .6rem 0 0; color: #15803d; font-weight: 600; }
.bmc-modal-note { font-size: .88rem; color: var(--text-muted); margin: 0; }
.bmc-modal-note-danger { color: var(--danger); }

/* =========================================================
   14. Footer
   ========================================================= */
.bmc-site-footer { background: #fff; border-top: 1px solid var(--border-soft); padding: 3rem 0 1.5rem; margin-top: 2rem; }
.bmc-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.bmc-footer-tagline { color: var(--text-muted); font-size: .9rem; margin: .85rem 0 0; max-width: 340px; }
.bmc-footer-col h5 { font-weight: 700; margin: 0 0 1rem; font-size: .95rem; }
.bmc-footer-links { list-style: none; padding: 0; margin: 0; }
.bmc-footer-links li { margin-bottom: .6rem; }
.bmc-footer-links a { color: var(--text-muted); font-size: .9rem; }
.bmc-footer-links a:hover { color: var(--brand); }
.bmc-footer-divider { border: none; border-top: 1px solid var(--border-soft); margin: 1rem 0; }
.bmc-footer-copy { color: var(--text-muted); font-size: .85rem; text-align: center; margin: 0; }
@media (max-width: 700px) { .bmc-footer-grid { grid-template-columns: 1fr; } }

/* =========================================================
   15. Generic pages
   ========================================================= */
.legal-content h2 { font-size: 1.2rem; font-weight: 700; margin-top: 2rem; margin-bottom: .75rem; }
.legal-content p, .legal-content li { color: var(--text-muted); line-height: 1.7; }
.legal-content a { color: var(--brand); }

/* AJAX live search */
.bmc-search-form { position: relative; }
.bmc-search-input::-webkit-search-cancel-button { display: none; }
.bmc-live-results { position: absolute; top: calc(100% + 8px); right: 0; width: 380px; max-width: calc(100vw - 2rem); max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--border-soft); border-radius: 14px; box-shadow: 0 16px 40px rgba(11,28,48,.14); padding: .4rem; z-index: 1040; }
.bmc-live-results[hidden] { display: none; }
.bmc-live-head { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); padding: .55rem .6rem .25rem; }
.bmc-live-item { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem; border-radius: 10px; color: var(--text-dark); }
.bmc-live-item:hover, .bmc-live-item.is-active, .bmc-live-more:hover, .bmc-live-more.is-active { background: var(--brand-light); }
.bmc-live-thumb { flex: 0 0 38px; height: 38px; border-radius: 9px; background: var(--bg-soft); border: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; color: var(--brand); overflow: hidden; }
.bmc-live-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bmc-live-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.bmc-live-text strong { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bmc-live-text small { font-size: .75rem; color: var(--text-muted); }
.bmc-live-tag { font-size: .7rem; font-weight: 700; color: var(--brand); background: var(--brand-light); border-radius: 20px; padding: .15rem .55rem; white-space: nowrap; }
.bmc-live-empty { padding: 1rem; text-align: center; color: var(--text-muted); font-size: .88rem; }
.bmc-live-more { display: block; text-align: center; padding: .65rem; margin-top: .25rem; border-top: 1px solid var(--border-soft); font-weight: 600; font-size: .85rem; color: var(--brand); border-radius: 10px; }
@media (max-width: 991px) { .bmc-header-actions { flex: 1; justify-content: flex-end; } }
@media (max-width: 480px) {
  .bmc-header-inner { gap: .5rem; }
  .bmc-search-form { display: flex !important; order: 5; flex: 1 0 100%; }
  .bmc-search-input { flex: 1; width: auto; }
  .bmc-header-actions { margin-left: auto; }
  .bmc-live-results { left: 0; right: 0; width: auto; max-width: none; }
}

/* Uploaded category images */
.category-icon-circle.has-img { background: #fff !important; border: 1px solid var(--border-soft); overflow: hidden; }
.category-icon-circle .category-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Coupon / deal photos (uploaded on the coupon itself) */
.coupon-tile.has-photo { padding-top: 0; overflow: hidden; }
.tile-photo { display: block; width: calc(100% + 2.2rem); margin: 0 -1.1rem 1rem; aspect-ratio: 16 / 10; background: var(--bg-soft); overflow: hidden; }
.tile-photo img, .card-photo img, .row-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.coupon-tile.has-photo .tile-pill { margin-top: -2.4rem; position: relative; box-shadow: 0 4px 12px rgba(11,28,48,.15); background: #fff; }
.coupon-card.has-photo { grid-template-columns: 150px minmax(0, 1fr) 210px; }
.card-photo { display: block; width: 150px; height: 112px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-soft); border: 1px solid var(--border-soft); }
.coupon-row.has-photo { grid-template-columns: 96px 120px minmax(0, 1fr) 170px; }
.row-photo { display: block; width: 120px; height: 90px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-soft); border: 1px solid var(--border-soft); }
@media (max-width: 720px) {
  .coupon-card.has-photo { grid-template-columns: 96px minmax(0, 1fr); }
  .card-photo { width: 96px; height: 76px; }
  .coupon-row.has-photo { grid-template-columns: 80px minmax(0, 1fr); }
  .coupon-row.has-photo .coupon-row-logo { display: none; }
}
