/*
Theme Name: Promo by WPLogist
Theme URI: https://wplogist.com/
Author: WPLogist
Author URI: https://wplogist.com/
Description: A fast, accessible affiliate deals and coupon theme with store and category filtering.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: promo-by-wplogist
Tags: blog, e-commerce, news, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

:root {
  --promo-ink: #17211b;
  --promo-muted: #617066;
  --promo-surface: #fff;
  --promo-soft: #f3f7f2;
  --promo-line: #dfe8df;
  --promo-brand: #126c47;
  --promo-brand-dark: #0a4d32;
  --promo-accent: #ffcb45;
  --promo-danger: #a33a2c;
  --promo-radius: 18px;
  --promo-shadow: 0 14px 40px rgba(24, 57, 39, .09);
  --promo-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--promo-ink); background: #fbfcfa; font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
img { max-width: 100%; height: auto; }
a { color: var(--promo-brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--promo-brand-dark); }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--promo-accent); outline-offset: 3px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 9999; width: auto; height: auto; padding: .65rem 1rem; clip: auto; background: #fff; }
.container { width: min(calc(100% - 32px), var(--promo-container)); margin-inline: auto; }
.site-main { min-height: 55vh; }

.site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--promo-line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.header-inner { display: flex; min-height: 74px; align-items: center; gap: 30px; }
.site-branding { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.custom-logo { display: block; max-height: 46px; width: auto; }
.site-title { color: var(--promo-ink); font-size: 1.3rem; font-weight: 800; text-decoration: none; }
.site-description { margin: 0; color: var(--promo-muted); font-size: .78rem; }
.menu-toggle { display: none; padding: .55rem .75rem; color: var(--promo-ink); border: 1px solid var(--promo-line); border-radius: 10px; background: #fff; }
.primary-menu { display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.primary-menu a { color: var(--promo-ink); font-weight: 650; text-decoration: none; }
.primary-menu a:hover, .primary-menu .current-menu-item > a { color: var(--promo-brand); }

.hero { overflow: hidden; padding: clamp(58px, 8vw, 104px) 0; background: radial-gradient(circle at 82% 18%, rgba(255,203,69,.36), transparent 25%), linear-gradient(135deg, #e7f6eb, #f8fbf3); }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 52px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--promo-brand); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { max-width: 760px; margin: 0 0 18px; font-size: clamp(2.5rem, 6vw, 5.2rem); line-height: .98; letter-spacing: -.055em; }
.hero-copy { max-width: 660px; color: var(--promo-muted); font-size: clamp(1rem, 2vw, 1.2rem); }
.deal-search { display: flex; gap: 10px; max-width: 650px; margin-top: 28px; padding: 8px; border: 1px solid var(--promo-line); border-radius: 16px; background: #fff; box-shadow: var(--promo-shadow); }
.deal-search input { min-width: 0; flex: 1; padding: .75rem; border: 0; background: transparent; }
.button, .wp-element-button, input[type="submit"] { display: inline-flex; justify-content: center; align-items: center; padding: .78rem 1.15rem; color: #fff; border: 0; border-radius: 12px; background: var(--promo-brand); font-weight: 750; line-height: 1.2; text-decoration: none; transition: transform .2s, background .2s; }
.button:hover, .wp-element-button:hover, input[type="submit"]:hover { color: #fff; background: var(--promo-brand-dark); transform: translateY(-1px); }
.button-secondary { color: var(--promo-brand); border: 1px solid var(--promo-brand); background: transparent; }
.hero-card { padding: 28px; border: 1px solid rgba(18,108,71,.12); border-radius: 30px; background: rgba(255,255,255,.75); box-shadow: var(--promo-shadow); transform: rotate(2deg); }
.hero-card strong { display: block; font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 1; }
.hero-card span { color: var(--promo-muted); }

.section { padding: clamp(54px, 7vw, 88px) 0; }
.section-soft { background: var(--promo-soft); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-heading h1, .section-heading h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -.035em; }
.section-heading p { max-width: 620px; margin: 8px 0 0; color: var(--promo-muted); }
.text-link { font-weight: 750; white-space: nowrap; }
.deal-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.deal-card { position: relative; display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--promo-line); border-radius: var(--promo-radius); background: var(--promo-surface); box-shadow: 0 4px 20px rgba(24,57,39,.04); transition: transform .2s, box-shadow .2s; }
.deal-card:hover { transform: translateY(-4px); box-shadow: var(--promo-shadow); }
.deal-layout-list { grid-template-columns: 1fr; }
.deal-layout-list .deal-card { display: grid; grid-template-columns: minmax(220px, 30%) minmax(0,1fr); }
.deal-layout-list .deal-card-media { height: 100%; aspect-ratio: auto; }
.deal-layout-list .deal-card-body { min-height: 250px; }
.deal-card-media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: #edf3ed; }
.deal-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.deal-card:hover .deal-card-media img { transform: scale(1.035); }
.deal-placeholder { display: grid; height: 100%; place-items: center; color: var(--promo-brand); font-size: 2rem; font-weight: 900; }
.badge { position: absolute; top: 14px; left: 14px; z-index: 1; padding: .35rem .65rem; color: #553f00; border-radius: 999px; background: var(--promo-accent); font-size: .75rem; font-weight: 850; }
.deal-card-body { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.deal-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--promo-muted); font-size: .8rem; font-weight: 650; }
.deal-card h2, .deal-card h3 { margin: 10px 0 8px; font-size: 1.25rem; line-height: 1.25; }
.deal-card h2 a, .deal-card h3 a { color: var(--promo-ink); text-decoration: none; }
.deal-excerpt { margin: 0 0 18px; color: var(--promo-muted); font-size: .93rem; }
.deal-pricing { display: flex; align-items: baseline; gap: 9px; margin-top: auto; margin-bottom: 16px; }
.deal-price { font-size: 1.35rem; font-weight: 850; }
.deal-old-price { color: var(--promo-muted); font-size: .9rem; text-decoration: line-through; }
.deal-actions { display: flex; gap: 9px; }
.deal-actions .button { flex: 1; }
.coupon-button { overflow: hidden; position: relative; border: 1px dashed var(--promo-brand); background: #eef8f1; color: var(--promo-brand); }
.coupon-button:hover { color: #fff; }
.coupon-reveal-control { position: relative; display: flex; min-width: 0; flex: 1; align-items: stretch; }
.coupon-button-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.coupon-button-label { margin-left: 7px; }
.coupon-button.is-revealed, .coupon-button.is-revealed:disabled { color: var(--promo-brand); border-style: dashed; background: #fff; opacity: 1; cursor: default; }
.coupon-copy-icon { position: relative; display: inline-grid; width: 44px; min-height: 42px; flex: 0 0 44px; place-items: center; margin-left: 7px; color: var(--promo-brand); border: 1px solid var(--promo-line); border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(24,57,39,.08); }
.coupon-copy-icon[hidden] { display: none; }
.coupon-copy-icon:hover, .coupon-copy-icon.is-copied { color: #fff; border-color: var(--promo-brand); background: var(--promo-brand); }
.coupon-copy-status { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 5; width: max-content; max-width: 210px; padding: 7px 10px; color: #fff; border-radius: 7px; background: var(--promo-ink); font-size: .78rem; font-weight: 700; line-height: 1.2; box-shadow: 0 5px 15px rgba(0,0,0,.16); pointer-events: none; animation: promo-copy-feedback .18s ease-out; }
.coupon-copy-status[hidden] { display: none; }
@keyframes promo-copy-feedback { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.term-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.term-card { display: flex; min-height: 180px; flex-direction: column; justify-content: end; padding: 20px; color: var(--promo-ink); border: 1px solid var(--promo-line); border-radius: 16px; background: #fff; text-decoration: none; }
.term-card:hover { border-color: var(--promo-brand); }
.term-card strong { font-size: 1.1rem; }
.term-card small { color: var(--promo-muted); }
.term-card-media { display: grid; min-height: 80px; flex: 1; place-items: center; margin-bottom: 14px; }
.term-card-image { display: block; width: 100%; max-width: 130px; height: 70px; object-fit: contain; }

.archive-header { padding: 55px 0 32px; background: var(--promo-soft); }
.archive-header h1 { margin: 0 0 8px; font-size: clamp(2rem,5vw,3.8rem); line-height: 1.05; letter-spacing: -.04em; }
.archive-description { max-width: 720px; color: var(--promo-muted); }
.taxonomy-header-inner { display: flex; align-items: center; gap: 28px; }
.store-archive-media { display: grid; width: 150px; height: 150px; flex: 0 0 150px; place-items: center; padding: 20px; border: 1px solid var(--promo-line); border-radius: 22px; background: #fff; }
.store-archive-image { width: 100%; height: 100%; object-fit: contain; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; padding: 16px; border: 1px solid var(--promo-line); border-radius: 16px; background: #fff; }
.filter-bar select, .filter-bar input { min-height: 44px; padding: .55rem .75rem; border: 1px solid var(--promo-line); border-radius: 10px; background: #fff; }
.empty-state { grid-column: 1/-1; padding: 48px; border: 1px dashed var(--promo-line); border-radius: var(--promo-radius); background: #fff; text-align: center; }
.pagination { margin-top: 36px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { display: grid; min-width: 42px; min-height: 42px; place-items: center; padding: 4px 10px; border: 1px solid var(--promo-line); border-radius: 10px; background: #fff; text-decoration: none; }
.page-numbers.current { color: #fff; border-color: var(--promo-brand); background: var(--promo-brand); }

.content-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 48px; }
.entry-card { padding: clamp(22px,4vw,48px); border: 1px solid var(--promo-line); border-radius: var(--promo-radius); background: #fff; }
.entry-title { margin-top: 0; font-size: clamp(2rem,5vw,3.7rem); line-height: 1.05; letter-spacing: -.04em; }
.entry-content > * { max-width: 760px; }
.entry-content > .alignwide { max-width: 1040px; }
.entry-content > .alignfull { max-width: none; }
.entry-content blockquote { margin-inline: 0; padding-left: 20px; border-left: 4px solid var(--promo-brand); }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 10px; border: 1px solid var(--promo-line); text-align: left; }
.deal-panel { margin: 24px 0; padding: 24px; border: 1px solid #cfe3d4; border-radius: 18px; background: #f1faf3; }
.deal-panel-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.coupon-display { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px dashed var(--promo-brand); border-radius: 12px; background: #fff; }
.coupon-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 850; letter-spacing: .06em; }
.affiliate-disclosure { padding: 12px 14px; color: #6c5410; border-radius: 10px; background: #fff8df; font-size: .83rem; }
.sidebar .widget { margin-bottom: 20px; padding: 22px; border: 1px solid var(--promo-line); border-radius: 16px; background: #fff; }
.widget-title { margin-top: 0; font-size: 1.05rem; }
.widget ul { padding-left: 18px; }

.site-footer { margin-top: 70px; color: #dce9df; background: #13231a; }
.footer-widgets { display: grid; grid-template-columns: repeat(3,1fr); gap: 30px; padding: 55px 0 35px; }
.site-footer a { color: #fff; }
.site-info { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .main-navigation { display: none; position: absolute; top: 74px; left: 16px; right: 16px; padding: 16px; border: 1px solid var(--promo-line); border-radius: 14px; background: #fff; box-shadow: var(--promo-shadow); }
  .main-navigation.is-open { display: block; }
  .primary-menu { align-items: stretch; flex-direction: column; gap: 8px; }
  .primary-menu a { display: block; padding: 8px; }
  .hero-grid, .content-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 520px; transform: none; }
  .deal-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .term-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
  .site-description { display: none; }
  .hero { padding-top: 48px; }
  .deal-search, .section-heading, .site-info { align-items: stretch; flex-direction: column; }
  .deal-grid, .term-grid, .footer-widgets { grid-template-columns: 1fr; }
  .deal-actions { flex-direction: column; }
  .section-heading { align-items: flex-start; }
  .taxonomy-header-inner { align-items: flex-start; flex-direction: column; }
  .store-archive-media { width: 110px; height: 110px; flex-basis: 110px; }
  .deal-layout-list .deal-card { display: flex; }
  .deal-layout-list .deal-card-media { aspect-ratio: 16/10; }
}
