/*
Theme Name: DealForge
Theme URI: https://dealforge.example.com
Author: DealForge Team
Author URI: https://dealforge.example.com
Description: A lightweight, premium, mobile-first WordPress theme for content-driven affiliate websites. Optimized for LiteSpeed Cache, Core Web Vitals, Google Search Essentials, schema-rich SEO, and full compatibility with Rank Math, Yoast, WooCommerce, and affiliate plugins. Includes dedicated deal, coupon, and cashback templates, dark mode, and Gutenberg support.
Version: 1.1.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dealforge
Tags: blog, news, e-commerce, one-column, two-columns, right-sidebar, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks, accessibility-ready
*/

/* ==========================================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   Light theme by default; dark theme via [data-theme="dark"].
   ========================================================================== */
:root {
  /* Brand palette */
  --df-primary: #e8590c;        /* Ember orange — CTAs, accents */
  --df-primary-hover: #d9480f;
  --df-primary-soft: #fff0e6;
  --df-secondary: #0b7285;      /* Deep teal — links, secondary actions */
  --df-secondary-hover: #095c6b;
  --df-success: #2b8a3e;
  --df-warning: #e67700;
  --df-danger: #c92a2a;

  /* Surfaces & text */
  --df-bg: #faf9f7;
  --df-surface: #ffffff;
  --df-surface-2: #f1efe9;
  --df-border: #e6e2d8;
  --df-text: #1f2428;
  --df-text-muted: #5c6670;
  --df-text-faint: #8a939c;

  /* Typography scale (1.25 Major Third, fluid) */
  --df-font-body: Georgia, 'Times New Roman', serif;
  --df-font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --df-text-xs: 0.75rem;
  --df-text-sm: 0.875rem;
  --df-text-base: 1rem;
  --df-text-md: clamp(1.125rem, 1rem + 0.4vw, 1.25rem);
  --df-text-lg: clamp(1.25rem, 1.1rem + 0.8vw, 1.563rem);
  --df-text-xl: clamp(1.563rem, 1.3rem + 1.2vw, 1.953rem);
  --df-text-2xl: clamp(1.953rem, 1.6rem + 1.8vw, 2.441rem);
  --df-text-3xl: clamp(2.441rem, 1.9rem + 2.6vw, 3.052rem);
  --df-leading-tight: 1.2;
  --df-leading-body: 1.7;

  /* Spacing tokens (4px base) */
  --df-space-1: 0.25rem;
  --df-space-2: 0.5rem;
  --df-space-3: 0.75rem;
  --df-space-4: 1rem;
  --df-space-5: 1.5rem;
  --df-space-6: 2rem;
  --df-space-7: 3rem;
  --df-space-8: 4rem;
  --df-space-9: 6rem;

  /* Radii & shadows */
  --df-radius-sm: 6px;
  --df-radius-md: 10px;
  --df-radius-lg: 16px;
  --df-radius-pill: 999px;
  --df-shadow-sm: 0 1px 2px rgba(31, 36, 40, 0.06);
  --df-shadow-md: 0 4px 12px rgba(31, 36, 40, 0.08);
  --df-shadow-lg: 0 12px 32px rgba(31, 36, 40, 0.12);

  /* Layout */
  --df-container: 1200px;
  --df-content: 720px;
  --df-header-h: 64px;

  color-scheme: light;
}

[data-theme='dark'] {
  --df-primary: #ff8a3d;
  --df-primary-hover: #ff9d5c;
  --df-primary-soft: #3a2417;
  --df-secondary: #3bc9db;
  --df-secondary-hover: #66d9e8;
  --df-bg: #14181c;
  --df-surface: #1d2329;
  --df-surface-2: #262d35;
  --df-border: #333c45;
  --df-text: #e9ecef;
  --df-text-muted: #a5adb5;
  --df-text-faint: #78828c;
  --df-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --df-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --df-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

/* ==========================================================================
   2. BASE / RESET (lean, Preflight-style)
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  background: var(--df-bg);
  color: var(--df-text);
  font-family: var(--df-font-body);
  font-size: var(--df-text-md);
  line-height: var(--df-leading-body);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
img { border-radius: var(--df-radius-sm); }
a { color: var(--df-secondary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--df-secondary-hover); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--df-font-ui);
  font-weight: 800;
  line-height: var(--df-leading-tight);
  margin: 0 0 var(--df-space-3);
  letter-spacing: -0.015em;
}
h1 { font-size: var(--df-text-2xl); }
h2 { font-size: var(--df-text-xl); }
h3 { font-size: var(--df-text-lg); }
h4 { font-size: var(--df-text-md); }
p { margin: 0 0 var(--df-space-4); }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--df-border); padding: var(--df-space-2) var(--df-space-3); text-align: left; }
blockquote {
  margin: var(--df-space-5) 0;
  padding: var(--df-space-4) var(--df-space-5);
  border-left: 4px solid var(--df-primary);
  background: var(--df-surface-2);
  border-radius: 0 var(--df-radius-md) var(--df-radius-md) 0;
  font-style: italic;
}
code, pre { font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; font-size: 0.9em; }
pre { background: var(--df-surface-2); padding: var(--df-space-4); border-radius: var(--df-radius-md); overflow-x: auto; }

/* Accessibility */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute !important; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: var(--df-surface); clip: auto !important; clip-path: none;
  color: var(--df-text); display: block; font-size: var(--df-text-sm);
  height: auto; left: 5px; top: 5px; line-height: normal; padding: 15px 23px 14px;
  text-decoration: none; width: auto; z-index: 100000; box-shadow: var(--df-shadow-md);
}
:focus-visible { outline: 3px solid var(--df-primary); outline-offset: 2px; border-radius: 2px; }
.skip-link { position: absolute; left: -9999px; z-index: 999999; }
.skip-link:focus { left: 8px; top: 8px; background: var(--df-primary); color: #fff; padding: 10px 18px; border-radius: var(--df-radius-sm); }

/* ==========================================================================
   3. LAYOUT PRIMITIVES
   ========================================================================== */
.df-container { max-width: var(--df-container); margin-inline: auto; padding-inline: var(--df-space-4); }
.df-content-width { max-width: var(--df-content); margin-inline: auto; }
.df-grid { display: grid; gap: var(--df-space-5); }
@media (min-width: 640px) { .df-grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .df-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .df-grid--4 { grid-template-columns: repeat(4, 1fr); }
  /* Two columns only when a sidebar actually renders; otherwise the
     content spans full width — layout adapts cleanly when ads/widgets
     are disabled (sidebar.php collapses to no output). */
  .df-layout-sidebar:has(> aside) { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--df-space-7); }
}
.df-section { padding-block: var(--df-space-7); }
.df-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--df-space-4); margin-bottom: var(--df-space-5); }
.df-section__title { margin: 0; position: relative; padding-left: var(--df-space-3); }
.df-section__title::before { content: ''; position: absolute; left: 0; top: 0.15em; bottom: 0.15em; width: 4px; border-radius: 2px; background: var(--df-primary); }
.df-section__more { font-family: var(--df-font-ui); font-size: var(--df-text-sm); font-weight: 700; text-decoration: none; white-space: nowrap; }

/* ==========================================================================
   4. HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: color-mix(in srgb, var(--df-surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--df-border);
}
.site-header__inner { display: flex; align-items: center; gap: var(--df-space-4); min-height: var(--df-header-h); }
.site-branding { display: flex; align-items: center; gap: var(--df-space-2); font-family: var(--df-font-ui); }
.site-title { font-size: 1.35rem; font-weight: 900; margin: 0; letter-spacing: -0.03em; }
.site-title a { color: var(--df-text); text-decoration: none; }
.site-title a strong { color: var(--df-primary); }
.custom-logo { max-height: 40px; width: auto; }

.main-navigation { margin-left: auto; font-family: var(--df-font-ui); }
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--df-space-1); }
.main-navigation a {
  display: block; padding: var(--df-space-2) var(--df-space-3);
  color: var(--df-text); text-decoration: none; font-weight: 600; font-size: var(--df-text-sm);
  border-radius: var(--df-radius-sm);
}
.main-navigation a:hover, .main-navigation .current-menu-item > a { color: var(--df-primary); background: var(--df-primary-soft); }
.main-navigation .sub-menu {
  position: absolute; min-width: 220px; background: var(--df-surface);
  border: 1px solid var(--df-border); border-radius: var(--df-radius-md);
  box-shadow: var(--df-shadow-lg); padding: var(--df-space-2);
  display: none; flex-direction: column;
}
.main-navigation li { position: relative; }
.main-navigation li:hover > .sub-menu, .main-navigation li:focus-within > .sub-menu { display: flex; }

.header-actions { display: flex; align-items: center; gap: var(--df-space-2); }
.df-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--df-radius-pill);
  border: 1px solid var(--df-border); background: var(--df-surface);
  cursor: pointer; color: var(--df-text);
}
.df-icon-btn:hover { border-color: var(--df-primary); color: var(--df-primary); }

.menu-toggle { display: none; }
@media (max-width: 959px) {
  .menu-toggle { display: inline-flex; }
  .main-navigation {
    position: fixed; inset: var(--df-header-h) 0 auto 0;
    background: var(--df-surface); border-bottom: 1px solid var(--df-border);
    box-shadow: var(--df-shadow-lg); padding: var(--df-space-4);
    display: none; max-height: calc(100vh - var(--df-header-h)); overflow-y: auto;
  }
  .main-navigation.is-open { display: block; }
  .main-navigation ul { flex-direction: column; }
  .main-navigation .sub-menu { position: static; display: flex; box-shadow: none; border: 0; padding-left: var(--df-space-4); }
}

/* ==========================================================================
   5. COMPONENTS
   ========================================================================== */
/* Buttons */
.df-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--df-space-2);
  font-family: var(--df-font-ui); font-weight: 700; font-size: var(--df-text-sm);
  padding: 0.75rem 1.5rem; border-radius: var(--df-radius-pill);
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  min-height: 44px; /* WCAG touch target */
}
.df-btn--primary { background: var(--df-primary); color: #fff; box-shadow: var(--df-shadow-sm); }
.df-btn--primary:hover { background: var(--df-primary-hover); color: #fff; transform: translateY(-1px); box-shadow: var(--df-shadow-md); }
.df-btn--outline { border-color: var(--df-border); color: var(--df-text); background: var(--df-surface); }
.df-btn--outline:hover { border-color: var(--df-primary); color: var(--df-primary); }
.df-btn--lg { padding: 1rem 2rem; font-size: var(--df-text-base); }
.df-btn--block { width: 100%; }

/* Badges */
.df-badge {
  display: inline-flex; align-items: center; gap: 0.35em;
  font-family: var(--df-font-ui); font-size: var(--df-text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.3em 0.85em; border-radius: var(--df-radius-pill);
  background: var(--df-surface-2); color: var(--df-text-muted);
}
.df-badge--deal { background: var(--df-primary-soft); color: var(--df-primary); }
.df-badge--coupon { background: #e6fcf5; color: #087f5b; }
[data-theme='dark'] .df-badge--coupon { background: #123b31; color: #63e6be; }
.df-badge--cashback { background: #e7f5ff; color: #1971c2; }
[data-theme='dark'] .df-badge--cashback { background: #16354d; color: #74c0fc; }
.df-badge--expired { background: var(--df-danger); color: #fff; }

/* Post card */
.df-card {
  background: var(--df-surface); border: 1px solid var(--df-border);
  border-radius: var(--df-radius-lg); overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column;
}
.df-card:hover { transform: translateY(-3px); box-shadow: var(--df-shadow-md); }
.df-card__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--df-surface-2); }
.df-card__media img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.df-card__body { padding: var(--df-space-4) var(--df-space-4) var(--df-space-5); display: flex; flex-direction: column; gap: var(--df-space-2); flex: 1; }
.df-card__title { font-size: var(--df-text-md); margin: 0; }
.df-card__title a { color: var(--df-text); text-decoration: none; }
.df-card__title a:hover { color: var(--df-primary); }
.df-card__excerpt { font-size: var(--df-text-sm); color: var(--df-text-muted); margin: 0; }
.df-card__meta { margin-top: auto; display: flex; align-items: center; gap: var(--df-space-3); font-family: var(--df-font-ui); font-size: var(--df-text-xs); color: var(--df-text-faint); }

/* Deal card */
.df-deal-card { position: relative; }
.df-deal-card__ribbon {
  position: absolute; top: var(--df-space-3); left: var(--df-space-3); z-index: 2;
}
.df-deal-card__price { display: flex; align-items: baseline; gap: var(--df-space-2); font-family: var(--df-font-ui); }
.df-deal-card__price-now { font-size: var(--df-text-lg); font-weight: 900; color: var(--df-primary); }
.df-deal-card__price-was { text-decoration: line-through; color: var(--df-text-faint); font-size: var(--df-text-sm); }
.df-deal-card__expiry { font-family: var(--df-font-ui); font-size: var(--df-text-xs); color: var(--df-warning); font-weight: 700; }
.df-deal-card__expiry.is-expired { color: var(--df-danger); }

/* Star rating */
.df-rating { display: inline-flex; align-items: center; gap: var(--df-space-2); font-family: var(--df-font-ui); }
.df-rating__stars { position: relative; display: inline-block; font-size: 1rem; line-height: 1; color: var(--df-border); letter-spacing: 2px; }
.df-rating__stars::before { content: '\2605\2605\2605\2605\2605'; }
.df-rating__fill { position: absolute; inset: 0; overflow: hidden; color: #f59f00; white-space: nowrap; }
.df-rating__fill::before { content: '\2605\2605\2605\2605\2605'; letter-spacing: 2px; }
.df-rating__value { font-size: var(--df-text-sm); font-weight: 700; }

/* Coupon code box */
.df-coupon {
  display: flex; align-items: stretch; border: 2px dashed var(--df-primary);
  border-radius: var(--df-radius-md); overflow: hidden; background: var(--df-primary-soft);
  font-family: var(--df-font-ui);
}
.df-coupon__code { flex: 1; padding: var(--df-space-3) var(--df-space-4); font-weight: 900; font-size: var(--df-text-md); letter-spacing: 0.1em; display: flex; align-items: center; }
.df-coupon__copy { border: 0; background: var(--df-primary); color: #fff; font-weight: 700; padding: 0 var(--df-space-5); cursor: pointer; min-width: 96px; }
.df-coupon__copy:hover { background: var(--df-primary-hover); }

/* CTA box */
.df-cta {
  background: linear-gradient(135deg, var(--df-primary) 0%, #bf3604 100%);
  color: #fff; border-radius: var(--df-radius-lg); padding: var(--df-space-6);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--df-space-5);
  box-shadow: var(--df-shadow-md);
}
.df-cta__content { flex: 1 1 320px; }
.df-cta__title { color: #fff; margin-bottom: var(--df-space-2); }
.df-cta__text { margin: 0; opacity: 0.92; font-size: var(--df-text-base); }
.df-cta .df-btn--primary { background: #fff; color: var(--df-primary); }
.df-cta .df-btn--primary:hover { background: var(--df-surface-2); color: var(--df-primary-hover); }

/* Affiliate disclosure */
.df-disclosure {
  font-family: var(--df-font-ui); font-size: var(--df-text-xs); color: var(--df-text-muted);
  background: var(--df-surface-2); border-left: 3px solid var(--df-secondary);
  padding: var(--df-space-3) var(--df-space-4); border-radius: 0 var(--df-radius-sm) var(--df-radius-sm) 0;
  margin-bottom: var(--df-space-5);
}

/* Breadcrumbs */
.df-breadcrumbs { font-family: var(--df-font-ui); font-size: var(--df-text-xs); color: var(--df-text-faint); margin-bottom: var(--df-space-4); }
.df-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--df-space-1); }
.df-breadcrumbs li + li::before { content: '\203A'; margin-inline: var(--df-space-1); color: var(--df-text-faint); }
.df-breadcrumbs a { color: var(--df-text-muted); text-decoration: none; }
.df-breadcrumbs a:hover { color: var(--df-primary); }

/* Hero */
.df-hero { padding-block: var(--df-space-7) var(--df-space-6); }
.df-hero__grid { display: grid; gap: var(--df-space-5); }
@media (min-width: 960px) { .df-hero__grid { grid-template-columns: 3fr 2fr; } }
.df-hero__primary .df-card__media { aspect-ratio: 16 / 10; }
.df-hero__primary .df-card__title { font-size: var(--df-text-xl); }
.df-hero__stack { display: grid; gap: var(--df-space-4); }
.df-hero__stack .df-card { flex-direction: row; }
.df-hero__stack .df-card__media { width: 160px; flex-shrink: 0; aspect-ratio: 4 / 3; }
.df-hero__stack .df-card__title { font-size: var(--df-text-base); }
@media (max-width: 480px) { .df-hero__stack .df-card__media { width: 120px; } }

/* Trending strip */
.df-trending { background: var(--df-surface); border-block: 1px solid var(--df-border); padding-block: var(--df-space-4); }
.df-trending__list { display: flex; gap: var(--df-space-4); overflow-x: auto; scrollbar-width: thin; padding-bottom: var(--df-space-1); list-style: none; margin: 0; padding-left: 0; }
.df-trending__item { flex: 0 0 auto; max-width: 300px; display: flex; gap: var(--df-space-2); align-items: baseline; font-family: var(--df-font-ui); }
.df-trending__rank { font-size: var(--df-text-lg); font-weight: 900; color: var(--df-primary); }
.df-trending__item a { color: var(--df-text); text-decoration: none; font-weight: 600; font-size: var(--df-text-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.df-trending__item a:hover { color: var(--df-primary); }

/* Category pills */
.df-cats { display: flex; flex-wrap: wrap; gap: var(--df-space-2); }
.df-cats a {
  font-family: var(--df-font-ui); font-size: var(--df-text-sm); font-weight: 700;
  text-decoration: none; color: var(--df-text); background: var(--df-surface);
  border: 1px solid var(--df-border); padding: var(--df-space-2) var(--df-space-4);
  border-radius: var(--df-radius-pill);
}
.df-cats a:hover { border-color: var(--df-primary); color: var(--df-primary); background: var(--df-primary-soft); }

/* Sidebar / widgets */
.widget { background: var(--df-surface); border: 1px solid var(--df-border); border-radius: var(--df-radius-lg); padding: var(--df-space-5); margin-bottom: var(--df-space-5); }
.widget-title { font-size: var(--df-text-base); text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 2px solid var(--df-primary); padding-bottom: var(--df-space-2); margin-bottom: var(--df-space-4); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding-block: var(--df-space-2); border-bottom: 1px solid var(--df-border); }
.widget li:last-child { border-bottom: 0; }

/* Ad slots — AdSense-compliant: labelled, CLS-safe reserved height,
   zero output when disabled (see inc/ads.php). */
.df-ad-slot { margin-block: var(--df-space-5); font-family: var(--df-font-ui); }
.df-ad-slot__label {
  display: block; text-align: center; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--df-text-faint); margin-bottom: var(--df-space-1);
}
.df-ad-slot__unit {
  display: grid; place-items: center; overflow: hidden;
  background: var(--df-surface-2); border: 1px dashed var(--df-border);
  border-radius: var(--df-radius-md);
  /* min-height comes inline from the reserved-height setting (CLS guard) */
}
.df-ad-slot__unit > * { max-width: 100%; }
.df-ad-slot--header { margin-block: var(--df-space-3) 0; }
.df-ad-slot--bottom { margin-block: var(--df-space-6) 0; }
.df-ad-slot--sidebar .df-ad-slot__unit { border-radius: var(--df-radius-lg); }

/* Single post */
.entry-header { margin-bottom: var(--df-space-5); }
.entry-title { font-size: var(--df-text-2xl); }
.entry-meta { font-family: var(--df-font-ui); font-size: var(--df-text-sm); color: var(--df-text-muted); display: flex; flex-wrap: wrap; gap: var(--df-space-3); align-items: center; }
.entry-meta .avatar { border-radius: var(--df-radius-pill); width: 32px; height: 32px; }
.entry-thumbnail { margin-block: var(--df-space-5); }
.entry-thumbnail img { border-radius: var(--df-radius-lg); width: 100%; }
.entry-content { font-size: var(--df-text-md); }
.entry-content > * { margin-bottom: var(--df-space-4); }
.entry-content h2 { margin-top: var(--df-space-6); }
.entry-content h3 { margin-top: var(--df-space-5); }
.entry-content a { text-decoration: underline; }
.entry-content .wp-block-image img { border-radius: var(--df-radius-md); }
.alignwide { max-width: var(--df-container); margin-inline: auto; }
.alignfull { max-width: 100vw; width: 100vw; margin-left: calc(50% - 50vw); }
.entry-footer { margin-top: var(--df-space-6); padding-top: var(--df-space-5); border-top: 1px solid var(--df-border); }
.entry-tags { display: flex; flex-wrap: wrap; gap: var(--df-space-2); font-family: var(--df-font-ui); font-size: var(--df-text-xs); }
.entry-tags a { background: var(--df-surface-2); padding: 0.3em 0.9em; border-radius: var(--df-radius-pill); text-decoration: none; color: var(--df-text-muted); }
.entry-tags a:hover { color: var(--df-primary); }

/* Deal single */
.df-deal-hero { display: grid; gap: var(--df-space-6); margin-bottom: var(--df-space-6); }
@media (min-width: 800px) { .df-deal-hero { grid-template-columns: 1fr 1fr; align-items: start; } }
.df-deal-panel { background: var(--df-surface); border: 1px solid var(--df-border); border-radius: var(--df-radius-lg); padding: var(--df-space-5); position: sticky; top: calc(var(--df-header-h) + 16px); }
.df-deal-panel__row { display: flex; justify-content: space-between; align-items: center; padding-block: var(--df-space-3); border-bottom: 1px solid var(--df-border); font-family: var(--df-font-ui); font-size: var(--df-text-sm); }
.df-deal-panel__row:last-of-type { border-bottom: 0; }
.df-countdown { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--df-warning); }

/* Related posts */
.df-related { margin-top: var(--df-space-7); }

/* Author box */
.df-author-box { display: flex; gap: var(--df-space-4); background: var(--df-surface); border: 1px solid var(--df-border); border-radius: var(--df-radius-lg); padding: var(--df-space-5); margin-top: var(--df-space-6); }
.df-author-box img { border-radius: var(--df-radius-pill); width: 64px; height: 64px; flex-shrink: 0; }
.df-author-box h3 { margin-bottom: var(--df-space-1); font-size: var(--df-text-base); }
.df-author-box p { margin: 0; font-size: var(--df-text-sm); color: var(--df-text-muted); }

/* Comments */
.comment-list { list-style: none; padding: 0; }
.comment-body { background: var(--df-surface); border: 1px solid var(--df-border); border-radius: var(--df-radius-md); padding: var(--df-space-4); margin-bottom: var(--df-space-4); }
.comment-list .children { list-style: none; padding-left: var(--df-space-5); }
.comment-form input[type='text'], .comment-form input[type='email'], .comment-form input[type='url'], .comment-form textarea {
  width: 100%; padding: var(--df-space-3); border: 1px solid var(--df-border);
  border-radius: var(--df-radius-sm); background: var(--df-surface); margin-bottom: var(--df-space-3);
}
.comment-form .submit { background: var(--df-primary); color: #fff; border: 0; padding: 0.75rem 1.75rem; border-radius: var(--df-radius-pill); font-weight: 700; cursor: pointer; }

/* Pagination */
.df-pagination { display: flex; justify-content: center; gap: var(--df-space-2); margin-top: var(--df-space-7); font-family: var(--df-font-ui); }
.df-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding-inline: var(--df-space-3);
  border: 1px solid var(--df-border); border-radius: var(--df-radius-sm);
  text-decoration: none; color: var(--df-text); background: var(--df-surface); font-weight: 600;
}
.df-pagination .page-numbers.current { background: var(--df-primary); border-color: var(--df-primary); color: #fff; }
.df-pagination .page-numbers:hover:not(.current) { border-color: var(--df-primary); color: var(--df-primary); }

/* Footer */
.site-footer { background: var(--df-surface); border-top: 1px solid var(--df-border); margin-top: var(--df-space-8); font-family: var(--df-font-ui); }
.site-footer__widgets { display: grid; gap: var(--df-space-6); padding-block: var(--df-space-7); }
@media (min-width: 720px) { .site-footer__widgets { grid-template-columns: repeat(3, 1fr); } }
.site-footer .widget { background: transparent; border: 0; padding: 0; }
.site-footer__bottom { border-top: 1px solid var(--df-border); padding-block: var(--df-space-4); font-size: var(--df-text-xs); color: var(--df-text-muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--df-space-3); }

/* Search / archive header */
.page-header { padding-block: var(--df-space-6); }
.archive-description { color: var(--df-text-muted); max-width: var(--df-content); }

/* Search form */
.search-form { display: flex; gap: var(--df-space-2); }
.search-form .search-field { flex: 1; padding: var(--df-space-3) var(--df-space-4); border: 1px solid var(--df-border); border-radius: var(--df-radius-pill); background: var(--df-surface); min-height: 44px; }
.search-form .search-submit { background: var(--df-primary); color: #fff; border: 0; border-radius: var(--df-radius-pill); padding-inline: var(--df-space-5); font-weight: 700; cursor: pointer; min-height: 44px; }

/* 404 */
.error-404 { text-align: center; padding-block: var(--df-space-9); }
.error-404 .error-code { font-size: clamp(4rem, 12vw, 8rem); font-weight: 900; font-family: var(--df-font-ui); color: var(--df-primary); line-height: 1; letter-spacing: -0.04em; }

/* WooCommerce essentials */
.woocommerce ul.products { display: grid; gap: var(--df-space-5); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); list-style: none; padding: 0; }
.woocommerce ul.products li.product { background: var(--df-surface); border: 1px solid var(--df-border); border-radius: var(--df-radius-lg); padding: var(--df-space-4); }
.woocommerce .button, .woocommerce a.button { background: var(--df-primary) !important; color: #fff !important; border-radius: var(--df-radius-pill) !important; font-weight: 700 !important; }

/* Gutenberg block styles */
.wp-block-button__link { border-radius: var(--df-radius-pill); background: var(--df-primary); font-family: var(--df-font-ui); font-weight: 700; }
.wp-block-quote { border-left-color: var(--df-primary); }
.wp-block-table td, .wp-block-table th { border-color: var(--df-border); }
.has-df-primary-color { color: var(--df-primary); }
.has-df-primary-background-color { background-color: var(--df-primary); }
.has-df-secondary-color { color: var(--df-secondary); }
.has-df-secondary-background-color { background-color: var(--df-secondary); }

/* Utility */
.df-mt-0 { margin-top: 0; } .df-mb-0 { margin-bottom: 0; }
.df-text-muted { color: var(--df-text-muted); }
.df-hidden { display: none !important; }
