/*
Theme Name: BenchyDeals.com
Theme URI: https://benchydeals.com
Author: BenchyDeals.com
Description: A fast, mobile-friendly 3D printing deal website theme with deal prices, coupon codes, expiration dates, retailers, and affiliate buttons.
Version: 1.0.1
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: benchydeals
*/

:root {
  --ld-bg: #f4f6f8;
  --ld-surface: #ffffff;
  --ld-text: #17202a;
  --ld-muted: #64748b;
  --ld-border: #dbe2ea;
  --ld-accent: #ff6a00;
  --ld-accent-dark: #d95500;
  --ld-dark: #101820;
  --ld-success: #167d45;
  --ld-danger: #b42318;
  --ld-radius: 16px;
  --ld-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ld-bg);
  color: var(--ld-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }

.ld-container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(16, 24, 32, 0.96);
  color: #fff;
  border-bottom: 3px solid var(--ld-accent);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.custom-logo { max-height: 48px; width: auto; }
.site-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.site-title span { color: var(--ld-accent); }
.site-description { margin: 0; color: #cbd5e1; font-size: .78rem; }

.primary-nav { margin-left: auto; }
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.primary-nav a { color: #fff; text-decoration: none; font-weight: 700; font-size: .92rem; }
.primary-nav a:hover { color: var(--ld-accent); }

.header-search { width: min(280px, 30vw); }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
.search-field {
  width: 100%;
  border: 1px solid #475569;
  border-radius: 999px;
  padding: 10px 14px;
  background: #fff;
  color: #111827;
}
.search-submit {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--ld-accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.hero {
  padding: 54px 0 34px;
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 106, 0, .24), transparent 32%),
    linear-gradient(135deg, #101820, #263442);
  color: #fff;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr .8fr;
  gap: 32px;
  align-items: center;
}
.hero h1 {
  margin: 0 0 12px;
  max-width: 760px;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: .98;
  letter-spacing: -.05em;
}
.hero h1 em { color: var(--ld-accent); font-style: normal; white-space: nowrap; }
.hero p { max-width: 680px; color: #dbe4ec; font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.ld-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  background: var(--ld-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}
.ld-button:hover { background: var(--ld-accent-dark); }
.ld-button.secondary { background: transparent; border: 1px solid #94a3b8; }
.ld-button.secondary:hover { border-color: #fff; background: rgba(255,255,255,.08); }

.hero-panel {
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--ld-radius);
  padding: 22px;
  background: rgba(255,255,255,.07);
}
.hero-panel strong { display: block; font-size: 1.15rem; margin-bottom: 8px; }
.hero-panel ul { margin: 0; padding-left: 20px; color: #dbe4ec; }

.category-strip {
  background: var(--ld-surface);
  border-bottom: 1px solid var(--ld-border);
}
.category-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 16px 0;
  scrollbar-width: thin;
}
.category-pill {
  flex: 0 0 auto;
  border: 1px solid var(--ld-border);
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff;
  color: #334155;
  text-decoration: none;
  font-weight: 800;
  font-size: .9rem;
}
.category-pill:hover { border-color: var(--ld-accent); color: var(--ld-accent-dark); }

.content-wrap { padding: 34px 0 60px; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
}
.section-heading h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.35rem); letter-spacing: -.035em; }
.section-heading p { margin: 0; color: var(--ld-muted); }

.deal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.deal-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ld-border);
  border-radius: var(--ld-radius);
  background: var(--ld-surface);
  box-shadow: var(--ld-shadow);
}
.deal-card.expired { opacity: .72; }
.deal-image-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #eef2f6;
}
.deal-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.deal-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center;
  color: #64748b; font-size: 3rem; font-weight: 900;
}
.deal-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--ld-accent);
  color: #fff;
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.deal-badge.expired { background: var(--ld-danger); }
.deal-body { display: flex; flex: 1; flex-direction: column; padding: 18px; }
.deal-retailer { color: var(--ld-muted); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.deal-title { margin: 5px 0 10px; font-size: 1.2rem; line-height: 1.25; }
.deal-title a { text-decoration: none; }
.deal-title a:hover { color: var(--ld-accent-dark); }
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; margin-bottom: 8px; }
.current-price { color: var(--ld-success); font-size: 1.8rem; font-weight: 950; letter-spacing: -.04em; }
.regular-price { color: var(--ld-muted); text-decoration: line-through; font-size: .95rem; }
.savings { color: var(--ld-danger); font-size: .88rem; font-weight: 900; }
.deal-summary { margin: 7px 0 14px; color: #475569; }
.deal-meta { display: grid; gap: 8px; margin-top: auto; font-size: .88rem; color: #475569; }
.coupon-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px dashed var(--ld-accent);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff8f2;
}
.coupon-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 900; color: #7c2d12; }
.copy-coupon { border: 0; border-radius: 999px; padding: 6px 10px; background: var(--ld-dark); color: #fff; cursor: pointer; font-weight: 800; }
.deal-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 16px; }
.deal-actions .ld-button { border-radius: 12px; padding: 11px 14px; }
.deal-details-link {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ld-border); border-radius: 12px; padding: 11px 13px;
  text-decoration: none; font-weight: 800;
}
.expired-button { background: #94a3b8; pointer-events: none; }

.single-deal-layout {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 34px;
  align-items: start;
}
.single-deal-media,
.single-deal-box {
  border: 1px solid var(--ld-border);
  border-radius: var(--ld-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--ld-shadow);
}
.single-deal-box { padding: 26px; }
.single-deal-box h1 { margin-top: 0; line-height: 1.08; letter-spacing: -.04em; }
.single-deal-content { margin-top: 28px; padding: 26px; border-radius: var(--ld-radius); background: #fff; border: 1px solid var(--ld-border); }
.affiliate-note { margin-top: 16px; color: var(--ld-muted); font-size: .82rem; }

.notice-box {
  padding: 16px 18px;
  border-left: 5px solid var(--ld-accent);
  border-radius: 10px;
  background: #fff7ed;
}

.pagination { margin-top: 30px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 9px 13px; border-radius: 9px; background: #fff; border: 1px solid var(--ld-border); text-decoration: none; }
.pagination .current { background: var(--ld-dark); color: #fff; }

.site-footer {
  background: var(--ld-dark);
  color: #dbe4ec;
  padding: 34px 0;
}
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.site-footer a { color: #fff; }
.site-footer .menu { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; padding: 0; margin: 0; }
.copyright { margin-top: 22px; color: #94a3b8; font-size: .85rem; }

.empty-state { padding: 36px; border: 1px dashed var(--ld-border); border-radius: var(--ld-radius); background: #fff; text-align: center; }

@media (max-width: 980px) {
  .deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid, .single-deal-layout { grid-template-columns: 1fr; }
  .header-search { display: none; }
}

@media (max-width: 720px) {
  .header-inner { min-height: 64px; flex-wrap: wrap; padding: 10px 0; }
  .primary-nav { width: 100%; order: 3; overflow-x: auto; }
  .primary-nav ul { width: max-content; padding-bottom: 2px; }
  .site-description { display: none; }
  .hero { padding-top: 38px; }
  .hero-panel { display: none; }
  .deal-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .deal-actions { grid-template-columns: 1fr; }
}
