/*
Theme Name: DealUncle Sky Blue
Theme URI: https://dealuncle.com
Author: DealUncle
Author URI: https://dealuncle.com
Description: A clean, modern deals website theme for DealUncle.com. Features sky blue design, custom Deal post type, affiliate link auto-injection, and a frontend deal posting system.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: dealuncle
*/

/* =========================================================
   CSS VARIABLES
   ========================================================= */
:root {
  --sky: #0ea5e9;
  --sky-hover: #0284c7;
  --sky-light: #e0f2fe;
  --sky-mid: #bae6fd;
  --navy: #0c4a6e;
  --accent: #f43f5e;
  --yellow: #fbbf24;
  --green: #059669;
  --bg: #f0f9ff;
  --card: #ffffff;
  --text: #0c4a6e;
  --muted: #64748b;
  --border: #bae6fd;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(14,165,233,0.1);
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--sky); text-decoration: none; }
a:hover { color: var(--sky-hover); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* =========================================================
   LAYOUT
   ========================================================= */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.page-wrap { padding: 28px 0 60px; }

/* =========================================================
   TOPBAR
   ========================================================= */
.du-topbar {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  padding: 7px 0;
}
.du-topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.du-topbar strong { color: var(--yellow); }
.topbar-links { display: flex; gap: 16px; }
.topbar-links a { color: rgba(255,255,255,0.7); font-size: 12px; }
.topbar-links a:hover { color: #fff; }

/* =========================================================
   HEADER
   ========================================================= */
.du-header {
  background: #fff;
  border-bottom: 2px solid var(--sky-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.du-header .container {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}
/* Logo */
.du-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.du-logo-mark {
  background: linear-gradient(135deg, var(--sky), var(--navy));
  color: #fff;
  border-radius: 12px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900;
  box-shadow: 0 3px 10px rgba(14,165,233,0.3);
}
.du-logo-name { font-size: 22px; font-weight: 900; color: var(--navy); }
.du-logo-name span { color: var(--sky); }

/* Search */
.du-search {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  border: 2px solid var(--sky-mid);
  border-radius: 50px;
  background: var(--sky-light);
  overflow: hidden;
}
.du-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
}
.du-search button {
  background: linear-gradient(135deg, var(--sky), var(--sky-hover));
  color: #fff;
  border: none;
  padding: 9px 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.du-search button:hover { background: var(--sky-hover); }

/* Header right */
.du-header-right {
  margin-left: auto;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-shrink: 0;
}
.du-header-right a { font-size: 13px; color: var(--muted); font-weight: 500; }
.du-header-right a:hover { color: var(--sky); }
.btn-post-deal {
  background: linear-gradient(135deg, var(--accent), #e11d48);
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(244,63,94,0.25);
  text-decoration: none;
  display: inline-block;
}
.btn-post-deal:hover { background: #e11d48; color: #fff; }

/* =========================================================
   CATEGORY NAV
   ========================================================= */
.du-catnav {
  background: var(--sky-light);
  border-bottom: 1px solid var(--sky-mid);
  overflow-x: auto;
  scrollbar-width: none;
}
.du-catnav::-webkit-scrollbar { display: none; }
.du-catnav .container { display: flex; }
.du-catnav a {
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sky);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  display: block;
}
.du-catnav a:hover,
.du-catnav a.current-cat { color: var(--navy); border-bottom-color: var(--sky); }

/* =========================================================
   HERO SECTION
   ========================================================= */
.du-hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  margin-bottom: 28px;
}
.du-hero-main {
  background: linear-gradient(140deg, var(--navy) 0%, #075985 60%, var(--sky) 130%);
  border-radius: 20px;
  padding: 36px;
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.du-hero-main .deal-img-bg {
  position: absolute;
  right: 30px; top: 50%;
  transform: translateY(-50%);
  font-size: 100px;
  opacity: 0.15;
}
.hero-eyebrow {
  background: var(--yellow);
  color: var(--navy);
  font-size: 10px; font-weight: 800;
  padding: 3px 12px;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: fit-content;
}
.du-hero-main h2 { font-size: 22px; font-weight: 900; margin-bottom: 6px; line-height: 1.2; }
.du-hero-main .hero-sub { font-size: 12px; opacity: 0.75; margin-bottom: 12px; }
.hero-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.hero-price-row .sale-price { font-size: 38px; font-weight: 900; color: var(--yellow); }
.hero-price-row .orig-price { font-size: 15px; opacity: 0.6; text-decoration: line-through; }
.hero-price-row .save-tag {
  background: rgba(255,255,255,0.2);
  color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 50px;
}
.btn-hero-deal {
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800; font-size: 14px;
  padding: 11px 26px;
  border-radius: 50px;
  display: inline-block;
  width: fit-content;
}
.btn-hero-deal:hover { background: #f59e0b; color: var(--navy); }

.du-hero-side { display: flex; flex-direction: column; gap: 12px; }
.hero-mini-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--border);
  flex: 1;
  transition: border-color .2s;
}
.hero-mini-card:hover { border-color: var(--sky); }
.hero-mini-icon {
  font-size: 28px;
  background: var(--sky-light);
  border-radius: 10px;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hmc-info h5 { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 4px; line-height: 1.3; }
.hmc-price { font-size: 18px; font-weight: 900; color: var(--sky); }
.hmc-was { font-size: 11px; color: var(--muted); text-decoration: line-through; margin-left: 4px; }
.hmc-pct {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 12px; font-weight: 800;
  padding: 4px 9px; border-radius: 6px;
  flex-shrink: 0;
}

/* =========================================================
   STORE QUICK ACCESS
   ========================================================= */
.du-stores { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.store-btn {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px; font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.store-btn:hover { border-color: var(--sky); color: var(--sky); }
.store-btn .cnt {
  font-size: 11px;
  background: var(--sky-light);
  color: var(--sky);
  padding: 2px 7px;
  border-radius: 50px;
}

/* =========================================================
   FILTER BAR
   ========================================================= */
.du-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px; font-weight: 600;
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}
.filter-chip:hover,
.filter-chip.active { background: var(--sky); color: #fff; border-color: var(--sky); }
.filter-sort {
  margin-left: auto;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted);
  background: #fff;
}

/* =========================================================
   SECTION HEADERS
   ========================================================= */
.du-section { margin-bottom: 32px; }
.du-section-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.du-section-hdr h2 { font-size: 18px; font-weight: 900; }
.du-section-hdr .view-all { font-size: 13px; color: var(--sky); font-weight: 600; }

/* =========================================================
   DEAL GRID
   ========================================================= */
.du-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* =========================================================
   DEAL CARD
   ========================================================= */
.deal-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  transition: all .2s;
  display: flex;
  flex-direction: column;
}
.deal-card:hover {
  border-color: var(--sky);
  box-shadow: 0 6px 24px rgba(14,165,233,0.14);
  transform: translateY(-3px);
}
.deal-card-img {
  background: var(--sky-light);
  height: 160px;
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  position: relative;
  overflow: hidden;
}
.deal-card-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12px;
}
.deal-discount {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent);
  color: #fff; font-size: 11px; font-weight: 800;
  padding: 3px 9px; border-radius: 50px;
}
.deal-store-tag {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; font-weight: 700;
  padding: 3px 7px; border-radius: 5px;
}
.store-amazon { background: #fff8e1; color: #d97706; }
.store-walmart { background: #dbeafe; color: #1d4ed8; }
.store-target { background: #ffe4e6; color: #be123c; }
.store-bestbuy { background: #eff6ff; color: #1e3a8a; }
.store-other { background: #f3f4f6; color: #4b5563; }

.deal-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.deal-card-title {
  font-size: 13px; font-weight: 600;
  line-height: 1.4; color: var(--navy);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.deal-card-store-name { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.deal-card-prices {
  display: flex; align-items: baseline; gap: 7px;
  margin-bottom: 12px;
}
.deal-card-prices .price-now { font-size: 22px; font-weight: 900; color: var(--sky); }
.deal-card-prices .price-was { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.deal-card-prices .price-save { font-size: 11px; color: var(--green); font-weight: 700; }
.deal-card-actions { display: flex; gap: 8px; }
.btn-get-deal {
  flex: 1;
  background: linear-gradient(135deg, var(--sky), var(--sky-hover));
  color: #fff; border: none;
  padding: 10px; border-radius: 8px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; text-align: center;
  text-decoration: none; display: block;
}
.btn-get-deal:hover { background: var(--sky-hover); color: #fff; }
.btn-wishlist {
  background: var(--sky-light);
  border: none; padding: 10px 12px;
  border-radius: 8px; cursor: pointer; font-size: 15px;
}

/* =========================================================
   SINGLE DEAL PAGE
   ========================================================= */
.single-deal-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
.single-deal-main { background: #fff; border-radius: var(--radius); padding: 28px; border: 1.5px solid var(--border); }
.single-deal-img { background: var(--sky-light); border-radius: 12px; height: 300px; display: flex; align-items: center; justify-content: center; font-size: 100px; margin-bottom: 20px; }
.single-deal-img img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.single-deal-store { font-size: 12px; color: var(--muted); margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.single-deal-title { font-size: 22px; font-weight: 900; color: var(--navy); margin-bottom: 14px; line-height: 1.3; }
.single-deal-prices { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.single-deal-prices .now { font-size: 36px; font-weight: 900; color: var(--sky); }
.single-deal-prices .was { font-size: 18px; color: var(--muted); text-decoration: line-through; }
.single-deal-prices .save { background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 50px; }
.single-deal-desc { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 20px; }
.btn-deal-main {
  display: block; width: 100%;
  background: linear-gradient(135deg, var(--sky), var(--sky-hover));
  color: #fff; text-align: center;
  padding: 16px; border-radius: 12px;
  font-size: 16px; font-weight: 800;
  margin-bottom: 10px;
}
.btn-deal-main:hover { background: var(--sky-hover); color: #fff; }

.single-deal-sidebar { display: flex; flex-direction: column; gap: 16px; }
.deal-info-box { background: #fff; border-radius: var(--radius); padding: 18px; border: 1.5px solid var(--border); }
.deal-info-box h4 { font-size: 14px; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.info-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--muted); }
.info-row .value { font-weight: 700; color: var(--navy); }

/* =========================================================
   DEAL SUBMISSION FORM (Frontend)
   ========================================================= */
.post-deal-wrap { max-width: 700px; margin: 0 auto; }
.post-deal-wrap h1 { font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.post-deal-wrap .subtitle { color: var(--muted); margin-bottom: 28px; }

.affiliate-settings {
  background: var(--sky-light);
  border: 1.5px solid var(--sky-mid);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 24px;
}
.affiliate-settings h3 { font-size: 15px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.affiliate-settings p { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.aff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.aff-field label { font-size: 11px; font-weight: 700; color: #0369a1; display: block; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.aff-field input { width: 100%; padding: 8px 12px; border: 1.5px solid var(--sky-mid); border-radius: 8px; font-size: 13px; background: #fff; outline: none; }
.aff-field input:focus { border-color: var(--sky); }

.deal-form-card {
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  overflow: hidden;
}
.form-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.form-section:last-child { border-bottom: none; }
.form-section h4 { font-size: 14px; font-weight: 800; color: var(--navy); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.form-field { margin-bottom: 14px; }
.form-field:last-child { margin-bottom: 0; }
.form-field label { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 9px; font-size: 13px;
  color: var(--text); outline: none;
  background: #fff;
  transition: border-color .15s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--sky); }
.form-field textarea { height: 90px; resize: vertical; }
.form-field .hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.url-preview {
  background: var(--sky-light);
  border: 1px solid var(--sky-mid);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--navy);
  margin-top: 8px;
  display: none;
  word-break: break-all;
}
.btn-submit-deal {
  display: block; width: 100%;
  background: linear-gradient(135deg, var(--sky), var(--sky-hover));
  color: #fff; border: none;
  padding: 15px;
  border-radius: 12px;
  font-size: 16px; font-weight: 800;
  cursor: pointer; margin: 20px 24px;
  width: calc(100% - 48px);
}
.btn-submit-deal:hover { background: var(--sky-hover); }
.deal-success {
  background: #dcfce7; border: 1.5px solid #86efac;
  border-radius: 12px; padding: 16px;
  color: #166534; font-weight: 600;
  display: none; margin: 16px 24px;
  font-size: 14px;
}

/* =========================================================
   PAGINATION
   ========================================================= */
.du-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.du-pagination a,
.du-pagination span {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  background: #fff;
}
.du-pagination a:hover,
.du-pagination .current {
  background: var(--sky);
  color: #fff; border-color: var(--sky);
}

/* =========================================================
   NO DEALS MESSAGE
   ========================================================= */
.no-deals { text-align: center; padding: 60px 20px; color: var(--muted); }
.no-deals .icon { font-size: 60px; margin-bottom: 16px; }
.no-deals h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--navy); }

/* =========================================================
   FOOTER
   ========================================================= */
.du-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 36px 0 20px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
.footer-brand .du-logo-name { color: #fff; font-size: 20px; margin-bottom: 10px; }
.footer-brand p { font-size: 13px; line-height: 1.7; margin-bottom: 14px; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.6); font-size: 13px; }
.footer-col ul li a:hover { color: var(--yellow); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.footer-bottom strong { color: var(--yellow); }
.affiliate-disclosure { font-size: 11px; color: rgba(255,255,255,0.45); text-align: center; margin-top: 10px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .du-hero { grid-template-columns: 1fr; }
  .du-hero-side { display: grid; grid-template-columns: repeat(3,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .single-deal-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .du-header .container { height: auto; padding: 12px; flex-wrap: wrap; gap: 10px; }
  .du-search { order: 3; max-width: 100%; flex-basis: 100%; }
  .du-hero { grid-template-columns: 1fr; }
  .du-hero-side { display: none; }
  .du-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .aff-grid, .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .du-grid { grid-template-columns: 1fr; }
}
