/*
Theme Name: CouponFlow
Theme URI: https://github.com/yourname/couponflow
Author: Your Name
Author URI: https://example.com
Description: Лёгкая купонная тема без плагинов. Быстрая, SEO-friendly, готова к массовому деплою.
Version: 1.0.0
License: MIT
Text Domain: couponflow
*/

:root {
  --cf-primary: #2563eb;
  --cf-secondary: #1e40af;
  --cf-accent: #f59e0b;
  --cf-bg: #f8fafc;
  --cf-surface: #ffffff;
  --cf-text: #1e293b;
  --cf-text-muted: #64748b;
  --cf-border: #e2e8f0;
  --cf-radius: 10px;
  --cf-shadow: 0 1px 3px rgba(0,0,0,0.08);
  --cf-shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
  --cf-font: 'Open Sans', system-ui, -apple-system, sans-serif;
  --cf-max-width: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--cf-font);
  background: var(--cf-bg);
  color: var(--cf-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cf-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* Container */
.cf-container {
  width: 100%;
  max-width: var(--cf-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */
.cf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--cf-radius);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s ease;
}

.cf-btn-primary {
  background: var(--cf-primary);
  color: #fff;
}
.cf-btn-primary:hover {
  background: var(--cf-secondary);
  text-decoration: none;
}

.cf-btn-accent {
  background: var(--cf-accent);
  color: #1e293b;
}

.cf-btn-ghost {
  background: transparent;
  color: var(--cf-primary);
  border: 2px solid var(--cf-primary);
}

/* Header */
.cf-header {
  background: var(--cf-surface);
  border-bottom: 1px solid var(--cf-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.cf-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.cf-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--cf-primary);
  letter-spacing: -0.5px;
}

.cf-nav {
  display: flex;
  gap: 28px;
  list-style: none;
}

.cf-nav a {
  font-weight: 500;
  color: var(--cf-text);
  font-size: 0.95rem;
}
.cf-nav a:hover { color: var(--cf-primary); }

/* Footer */
.cf-footer {
  background: var(--cf-surface);
  border-top: 1px solid var(--cf-border);
  padding: 40px 0;
  margin-top: 60px;
  color: var(--cf-text-muted);
  font-size: 0.9rem;
}

/* Coupon Card */
.cf-coupon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.cf-coupon-card {
  background: var(--cf-surface);
  border-radius: var(--cf-radius);
  border: 1px solid var(--cf-border);
  box-shadow: var(--cf-shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .2s, box-shadow .2s;
}

.cf-coupon-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--cf-shadow-hover);
}

.cf-coupon-store {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cf-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cf-coupon-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}

.cf-coupon-desc {
  font-size: 0.9rem;
  color: var(--cf-text-muted);
  line-height: 1.5;
}

.cf-coupon-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--cf-border);
}

.cf-coupon-discount {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--cf-accent);
}

.cf-coupon-btn {
  padding: 10px 20px;
  border-radius: var(--cf-radius);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Coupon Single */
.cf-coupon-single {
  background: var(--cf-surface);
  border-radius: var(--cf-radius);
  border: 1px solid var(--cf-border);
  padding: 40px;
  margin: 32px 0;
}

.cf-coupon-single-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.cf-coupon-single-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--cf-radius);
  background: var(--cf-bg);
  padding: 10px;
}

.cf-coupon-single-info h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.cf-coupon-code-box {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--cf-bg);
  padding: 16px;
  border-radius: var(--cf-radius);
  border: 2px dashed var(--cf-border);
  margin: 24px 0;
}

.cf-coupon-code {
  font-family: 'Courier New', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1px;
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--cf-text);
}

.cf-countdown {
  font-size: 0.85rem;
  color: var(--cf-text-muted);
}

/* Archive header */
.cf-archive-header {
  text-align: center;
  padding: 48px 0 32px;
}

.cf-archive-header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.cf-archive-header p {
  color: var(--cf-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Pagination */
.cf-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
}

.cf-pagination a,
.cf-pagination span {
  padding: 10px 16px;
  border-radius: var(--cf-radius);
  background: var(--cf-surface);
  border: 1px solid var(--cf-border);
}

.cf-pagination .current {
  background: var(--cf-primary);
  color: #fff;
  border-color: var(--cf-primary);
}

/* Utility */
.cf-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .cf-header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 12px; }
  .cf-nav { gap: 16px; flex-wrap: wrap; }
  .cf-coupon-grid { grid-template-columns: 1fr; }
  .cf-coupon-single { padding: 24px; }
  .cf-coupon-single-header { flex-direction: column; }
}
