/*
Theme Name: Wonder Deals
Theme URI: https://example.com/wonder-deals
Author: Wonder Deals
Author URI: https://example.com
Description: A clean, blue store directory theme for deals. Custom Store post type with descriptions, native-comment reviews, affiliate product carousels, category menus, a front-end submission form and paid listing plan templates. SEO-optimized for "deals" keywords.
Version: 1.2.0
Requires at least: 6.0
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: wonder-deals
Tags: directory, deals, affiliate, reviews, blue, two-columns
*/

:root {
  --wd-blue: #2563eb;
  --wd-blue-dark: #1e40af;
  --wd-blue-light: #dbeafe;
  --wd-ink: #172554;
  --wd-muted: #64748b;
  --wd-border: #e2e8f0;
  --wd-bg: #f8fafc;
  --wd-radius: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, "Segoe UI", sans-serif;
  color: var(--wd-ink);
  background: #fff;
  line-height: 1.6;
}
h1, h2, h3, .wd-display { font-family: "Plus Jakarta Sans", "Inter", sans-serif; letter-spacing: -0.02em; }
a { color: var(--wd-blue); }
img { max-width: 100%; height: auto; }

.wd-container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Header */
.wd-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--wd-border); }
.wd-header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wd-logo { font-weight: 800; font-size: 20px; text-decoration: none; color: var(--wd-ink); }
.wd-logo span { color: var(--wd-blue); }
.wd-nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.wd-nav a { text-decoration: none; color: var(--wd-ink); font-weight: 500; font-size: 14px; }
.wd-nav a:hover { color: var(--wd-blue); }

/* Buttons & badges */
.wd-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--wd-blue); color: #fff; padding: 12px 24px; border-radius: 10px; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; }
.wd-btn:hover { background: var(--wd-blue-dark); color: #fff; }
.wd-btn--outline { background: transparent; color: var(--wd-blue); border: 1px solid var(--wd-blue); }
.wd-btn--outline:hover { background: var(--wd-blue); color: #fff; }
.wd-badge { display: inline-block; background: var(--wd-blue); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.wd-badge--light { background: var(--wd-blue-light); color: var(--wd-blue-dark); }

/* Hero */
.wd-hero { background: linear-gradient(180deg, var(--wd-blue-light), #fff); padding: 80px 0; border-bottom: 1px solid var(--wd-border); }
.wd-hero h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.08; margin: 12px 0 16px; }
.wd-hero p { color: var(--wd-muted); font-size: 18px; max-width: 560px; }
.wd-eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: 12px; font-weight: 800; color: var(--wd-blue); }

/* Store grid */
.wd-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin: 32px 0; }
.wd-store-card { border: 1px solid var(--wd-border); border-radius: var(--wd-radius); overflow: hidden; background: #fff; transition: transform .2s, box-shadow .2s; }
.wd-store-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(37,99,235,.12); }
.wd-store-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }
.wd-store-card-body { padding: 20px; }
.wd-store-card h3 { margin: 0 0 4px; font-size: 18px; }
.wd-store-card p { margin: 0; color: var(--wd-muted); font-size: 14px; }
.wd-store-meta { display: flex; justify-content: space-between; margin-top: 12px; font-size: 12px; color: var(--wd-muted); }

/* Category chips */
.wd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.wd-chip { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--wd-border); background: #fff; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--wd-ink); }
.wd-chip:hover, .wd-chip.is-active { background: var(--wd-blue); border-color: var(--wd-blue); color: #fff; }

/* Single store */
.wd-store-hero img { width: 100%; aspect-ratio: 21/9; object-fit: cover; border-radius: var(--wd-radius); }
.wd-stars { color: #f59e0b; letter-spacing: 2px; }

/* Product carousel */
.wd-carousel { position: relative; margin: 24px 0; }
.wd-carousel-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.wd-carousel-track::-webkit-scrollbar { display: none; }
.wd-product { flex: 0 0 260px; scroll-snap-align: start; border: 1px solid var(--wd-border); border-radius: var(--wd-radius); overflow: hidden; background: #fff; }
.wd-product img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.wd-product-body { padding: 16px; }
.wd-product h4 { margin: 0 0 8px; font-size: 15px; }
.wd-price { font-size: 20px; font-weight: 800; color: var(--wd-blue); }
.wd-price-old { text-decoration: line-through; color: var(--wd-muted); font-size: 14px; margin-left: 8px; }
.wd-carousel-nav { display: flex; gap: 8px; }
.wd-carousel-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--wd-border); background: #fff; cursor: pointer; font-size: 18px; }
.wd-carousel-btn:hover { border-color: var(--wd-blue); color: var(--wd-blue); }

/* Reviews */
.wd-review { border: 1px solid var(--wd-border); border-radius: var(--wd-radius); padding: 20px; margin-bottom: 16px; background: #fff; }
.wd-review header { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }

/* Forms */
.wd-form { max-width: 720px; }
.wd-field { margin-bottom: 20px; }
.wd-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.wd-field input, .wd-field select, .wd-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--wd-border); border-radius: 10px; font: inherit;
}
.wd-field input:focus, .wd-field select:focus, .wd-field textarea:focus { outline: 2px solid rgba(37,99,235,.25); border-color: var(--wd-blue); }
.wd-notice { background: var(--wd-blue-light); border: 1px solid var(--wd-blue); color: var(--wd-blue-dark); padding: 16px 20px; border-radius: var(--wd-radius); }

/* Plans */
.wd-plans { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 40px 0; }
.wd-plan { border: 1px solid var(--wd-border); border-radius: 16px; padding: 28px; background: #fff; }
.wd-plan.is-featured { border-color: var(--wd-blue); box-shadow: 0 16px 40px rgba(37,99,235,.15); }
.wd-plan-price { font-size: 44px; font-weight: 800; color: var(--wd-blue); }
.wd-plan ul { list-style: none; padding: 0; margin: 20px 0; }
.wd-plan li { padding: 6px 0 6px 26px; position: relative; font-size: 14px; }
.wd-plan li::before { content: "✓"; position: absolute; left: 0; color: var(--wd-blue); font-weight: 800; }

/* Offers */
.wd-offers { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin: 24px 0; }
.wd-offer { border: 1px solid var(--wd-border); border-left: 4px solid var(--wd-blue); border-radius: var(--wd-radius); padding: 20px; background: #fff; }
.wd-offer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.wd-offer-head h3 { margin: 0; font-size: 17px; }
.wd-offer-discount { background: var(--wd-blue-light); color: var(--wd-blue-dark); font-weight: 800; font-size: 12px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.wd-offer-desc { margin: 8px 0 12px; color: var(--wd-muted); font-size: 14px; }
.wd-offer-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--wd-muted); }
.wd-offer-coupon strong { color: var(--wd-blue); font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }

/* Product badge */
.wd-product { position: relative; }
.wd-product .wd-product-badge { position: absolute; top: 10px; left: 10px; background: var(--wd-blue); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }

/* Store card placeholder (no featured image) */
.wd-store-card-placeholder { width: 100%; aspect-ratio: 3/2; display: flex; align-items: center; justify-content: center; background: var(--wd-blue-light); color: var(--wd-blue-dark); font-weight: 700; font-size: 16px; padding: 16px; text-align: center; }

/* Reviews */
.wd-reviews { margin-top: 24px; }
.wd-reviews-title { font-size: 18px; margin: 0 0 16px; }
.wd-review-list { list-style: none; padding: 0; margin: 0 0 32px; }
.wd-review-list .wd-review { border: 1px solid var(--wd-border); border-radius: var(--wd-radius); padding: 20px; margin-bottom: 16px; background: #fff; list-style: none; }
.wd-review-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.wd-review-head time { color: var(--wd-muted); }
.wd-review-body { font-size: 14px; color: var(--wd-ink); }
.wd-reply-title { font-size: 18px; margin: 0 0 16px; }
.wd-reviews .comment-form input, .wd-reviews .comment-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--wd-border); border-radius: 10px; font: inherit; }
.wd-reviews .comment-form input:focus, .wd-reviews .comment-form textarea:focus { outline: 2px solid rgba(37,99,235,.25); border-color: var(--wd-blue); }
.wd-reviews .comment-form .comment-form-comment { margin-bottom: 16px; }
.wd-reviews .comment-form .comment-form-author, .wd-reviews .comment-form .comment-form-email { margin-bottom: 16px; }
.wd-reviews .comment-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.wd-reviews .comment-reply-title small { font-size: 12px; }

/* Footer */
.wd-footer { border-top: 1px solid var(--wd-border); background: var(--wd-bg); padding: 48px 0 24px; margin-top: 64px; }
.wd-footer small { color: var(--wd-muted); }

@media (max-width: 720px) {
  .wd-nav ul { flex-wrap: wrap; gap: 12px; }
  .wd-hero { padding: 48px 0; }
}
