/*
Theme Name: CouponDeals Pro
Theme URI: https://example.com/coupon-deals-pro
Author: Claude
Description: قالب احترافي لمواقع الكوبونات وأكواد الخصم ومقارنة الأسعار - دعم كامل للعربية RTL
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.5
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: coupon-deals
Tags: coupons, deals, rtl-language, custom-colors, custom-logo, custom-menu, price-comparison, featured-images, translation-ready
*/

/* ============================================================
   CSS VARIABLES & RESET
============================================================ */
:root {
  --red:        #e8192c;
  --red-dark:   #b5111f;
  --red-light:  #fff0f1;
  --orange:     #ff6b00;
  --orange-lt:  #fff4eb;
  --green:      #00a651;
  --green-lt:   #ebfaf2;
  --yellow:     #ffb800;
  --yellow-lt:  #fffbeb;
  --blue:       #0066ff;
  --blue-lt:    #ebf2ff;
  --ink:        #0d0d0d;
  --ink-60:     #595959;
  --ink-30:     #ababab;
  --ink-10:     #f0f0f0;
  --surface:    #fafafa;
  --white:      #ffffff;
  --border:     #e8e8e8;
  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  20px;
  --shadow-xs:  0 1px 3px rgba(0,0,0,.07);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.08);
  --shadow-md:  0 6px 20px rgba(0,0,0,.10);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.13);
  --shadow-red: 0 6px 20px rgba(232,25,44,.25);
  --font-head:  'Cairo', 'Noto Kufi Arabic', Tahoma, sans-serif;
  --font-body:  'Cairo', 'Noto Kufi Arabic', Tahoma, sans-serif;
  --fw-regular: 400;
  --fw-medium:  600;
  --fw-bold:    700;
  --fw-black:   800;
  --transition: .22s cubic-bezier(.4,0,.2,1);
  --header-h:   68px;
  --container:  1240px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--surface);
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: var(--font-body); font-size: 1rem; }

/* ============================================================
   LAYOUT UTILS
============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }
.grid-5 { grid-template-columns: repeat(5,1fr); }

/* Section Header */
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 10px;
}
.sec-head h2 {
  font-size: 1.45rem;
  font-weight: var(--fw-black);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec-head h2 .icon { font-size: 1.5rem; }
.see-all {
  font-size: .875rem;
  font-weight: var(--fw-medium);
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.see-all:hover { color: var(--red-dark); }

/* ============================================================
   TYPOGRAPHY
============================================================ */
h1 { font-size: clamp(1.6rem,4vw,2.4rem); font-weight: var(--fw-black); }
h2 { font-size: clamp(1.3rem,3vw,1.8rem); font-weight: var(--fw-black); }
h3 { font-size: 1.1rem; font-weight: var(--fw-bold); }
h4 { font-size: 1rem; font-weight: var(--fw-bold); }
p  { margin-bottom: .75rem; }

/* ============================================================
   BADGES & TAGS
============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: var(--fw-bold);
  letter-spacing: .3px;
  white-space: nowrap;
}
.badge-red    { background: var(--red);    color: #fff; }
.badge-orange { background: var(--orange); color: #fff; }
.badge-green  { background: var(--green);  color: #fff; }
.badge-yellow { background: var(--yellow); color: var(--ink); }
.badge-blue   { background: var(--blue);   color: #fff; }
.badge-ghost  { background: var(--ink-10); color: var(--ink-60); }
.badge-outline-red { border: 1.5px solid var(--red); color: var(--red); background: var(--red-light); }

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: .65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-bold);
  font-size: .9375rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  line-height: 1.2;
  white-space: nowrap;
}
.btn-primary { background: var(--red); color: #fff; border-color: var(--red); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-red); }
.btn-green   { background: var(--green); color: #fff; border-color: var(--green); }
.btn-green:hover { background: #007a3d; border-color: #007a3d; color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-sm { padding: .45rem 1rem; font-size: .8125rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }

/* Coupon Copy Button */
.btn-copy {
  position: relative;
  background: var(--green);
  color: #fff;
  border: 2px dashed rgba(255,255,255,.6);
  border-radius: var(--radius-sm);
  padding: .6rem 1.25rem;
  font-weight: var(--fw-bold);
  font-size: .875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  letter-spacing: .5px;
}
.btn-copy:hover { background: #007a3d; transform: translateY(-1px); }
.btn-copy.copied { background: var(--ink); }

/* ============================================================
   TOP BAR
============================================================ */
.topbar {
  background: var(--ink);
  color: rgba(255,255,255,.75);
  font-size: .8125rem;
  padding: 7px 0;
  direction: rtl;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-right a {
  color: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  gap: 5px;
}
.topbar-right a:hover { color: #fff; }
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-alert {
  background: var(--red);
  color: #fff;
  padding: 2px 10px;
  border-radius: 50px;
  font-weight: var(--fw-bold);
  font-size: .72rem;
  animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
  0%,100% { opacity:1; } 50% { opacity:.7; }
}

/* ============================================================
   HEADER
============================================================ */
#masthead {
  position: sticky;
  top: 0;
  z-index: 900;
  background: #fff;
  box-shadow: var(--shadow-sm);
  height: var(--header-h);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
}

/* Logo */
.site-branding { flex-shrink: 0; }
.site-logo-text {
  font-size: 1.5rem;
  font-weight: var(--fw-black);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}
.site-logo-text .logo-icon {
  background: var(--red);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.site-logo-text span { color: var(--red); }
.custom-logo { height: 44px; width: auto; }

/* Search Bar */
.header-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: .6rem 1rem .6rem 3rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: .9375rem;
  outline: none;
  transition: var(--transition);
}
.header-search input:focus { border-color: var(--red); background: #fff; box-shadow: 0 0 0 3px rgba(232,25,44,.1); }
.header-search input::placeholder { color: var(--ink-30); }
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-30);
  pointer-events: none;
  font-size: .95rem;
}
.search-submit-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .35rem .9rem;
  font-size: .8125rem;
  font-weight: var(--fw-bold);
  cursor: pointer;
  transition: var(--transition);
}
.search-submit-btn:hover { background: var(--red-dark); }

/* Nav */
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: .45rem .9rem;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-medium);
  font-size: .9rem;
  color: var(--ink);
  white-space: nowrap;
}
.header-nav a:hover { background: var(--red-light); color: var(--red); }
.header-nav a.active { color: var(--red); }
.header-nav a .nav-badge {
  background: var(--red);
  color: #fff;
  font-size: .65rem;
  font-weight: var(--fw-black);
  padding: 1px 5px;
  border-radius: 50px;
  line-height: 1.4;
}

/* Header Actions */
.header-actions { margin-right: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Mobile Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  font-size: 1.3rem;
  padding: 6px;
}

/* ============================================================
   CATEGORY NAV BAR
============================================================ */
.cat-nav-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-nav-bar::-webkit-scrollbar { display: none; }
.cat-nav-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 20px;
  min-width: max-content;
}
.cat-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  font-size: .85rem;
  font-weight: var(--fw-medium);
  color: var(--ink-60);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  cursor: pointer;
}
.cat-nav-item:hover { color: var(--red); border-bottom-color: var(--red); }
.cat-nav-item.active { color: var(--red); border-bottom-color: var(--red); font-weight: var(--fw-bold); }
.cat-nav-item .cat-icon { font-size: 1.1rem; }

/* ============================================================
   HERO / BANNER SLIDER
============================================================ */
.hero-section {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a0000 60%, #2d0a0a 100%);
  padding: 0;
  overflow: hidden;
  position: relative;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 0;
  min-height: 340px;
}
.hero-content {
  padding: 48px 40px 48px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.hero-content .badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.hero-content h1 {
  color: #fff;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  line-height: 1.25;
  margin-bottom: 14px;
}
.hero-content h1 .highlight {
  color: var(--yellow);
  position: relative;
}
.hero-content p {
  color: rgba(255,255,255,.7);
  font-size: 1rem;
  margin-bottom: 24px;
  max-width: 500px;
}
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-side {
  background: rgba(255,255,255,.04);
  border-right: 1px solid rgba(255,255,255,.08);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.hero-side-title {
  font-size: .8125rem;
  color: rgba(255,255,255,.5);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

/* Featured Store Mini Cards */
.store-mini-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: var(--transition);
  cursor: pointer;
}
.store-mini-card:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.2); }
.store-mini-left { display: flex; align-items: center; gap: 8px; }
.store-mini-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.store-mini-name { font-size: .875rem; font-weight: var(--fw-bold); color: #fff; }
.store-mini-count { font-size: .72rem; color: rgba(255,255,255,.5); }
.store-mini-discount {
  background: var(--red);
  color: #fff;
  font-size: .72rem;
  font-weight: var(--fw-black);
  padding: 3px 8px;
  border-radius: 50px;
  flex-shrink: 0;
}

/* ============================================================
   STATS BAR
============================================================ */
.stats-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.stats-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 16px;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.stat-icon.red    { background: var(--red-light);    color: var(--red); }
.stat-icon.green  { background: var(--green-lt);     color: var(--green); }
.stat-icon.orange { background: var(--orange-lt);    color: var(--orange); }
.stat-icon.yellow { background: var(--yellow-lt);    color: var(--yellow); }
.stat-info .num   { font-size: 1.1rem; font-weight: var(--fw-black); color: var(--ink); line-height: 1; }
.stat-info .lbl   { font-size: .75rem; color: var(--ink-60); }

/* ============================================================
   COUPON CARD
============================================================ */
.coupon-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}
.coupon-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: #ddd; }
.coupon-card.featured {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(232,25,44,.12);
}

/* Ribbon */
.coupon-ribbon {
  position: absolute;
  top: 14px;
  left: 0;
  background: var(--red);
  color: #fff;
  font-size: .7rem;
  font-weight: var(--fw-black);
  padding: 4px 10px 4px 14px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%);
  z-index: 2;
  letter-spacing: .5px;
}

/* Store Logo Area */
.coupon-store {
  padding: 16px 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.coupon-store-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  overflow: hidden;
}
.coupon-store-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.coupon-store-name { font-weight: var(--fw-bold); font-size: .9rem; color: var(--ink); }
.coupon-store-cat  { font-size: .75rem; color: var(--ink-60); }

/* Coupon Body */
.coupon-body { padding: 14px 16px; flex: 1; }
.coupon-title {
  font-size: .9375rem;
  font-weight: var(--fw-bold);
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.coupon-discount {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.coupon-pct {
  font-size: 2rem;
  font-weight: var(--fw-black);
  color: var(--red);
  line-height: 1;
}
.coupon-pct-off { font-size: .8rem; color: var(--red); font-weight: var(--fw-bold); align-self: flex-end; margin-bottom: 4px; }
.coupon-or-price { font-size: .8rem; color: var(--ink-60); align-self: flex-end; margin-bottom: 4px; }

/* Code Box */
.coupon-code-wrap {
  padding: 10px 16px 14px;
  border-top: 1px dashed var(--border);
}
.coupon-code-inner {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px dashed var(--green);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.coupon-code-text {
  flex: 1;
  padding: .5rem .75rem;
  font-family: 'Courier New', monospace;
  font-size: .875rem;
  font-weight: var(--fw-black);
  color: var(--green);
  letter-spacing: 1.5px;
  background: var(--green-lt);
  text-align: center;
}
.coupon-code-btn {
  background: var(--green);
  color: #fff;
  border: none;
  padding: .5rem .9rem;
  font-size: .8125rem;
  font-weight: var(--fw-bold);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}
.coupon-code-btn:hover { background: #007a3d; }
.coupon-code-btn.copied { background: var(--ink); }

/* No-code deal */
.coupon-deal-btn {
  padding: 10px 16px 14px;
}

/* Coupon Footer */
.coupon-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--ink-10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--ink-60);
  background: var(--surface);
  flex-wrap: wrap;
  gap: 6px;
}
.coupon-expiry.urgent { color: var(--red); font-weight: var(--fw-bold); }
.coupon-used { display: flex; align-items: center; gap: 4px; }

/* ============================================================
   DEAL CARD (Sale / Offer)
============================================================ */
.deal-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.deal-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.deal-thumb {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: var(--ink-10);
}
.deal-thumb img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.deal-card:hover .deal-thumb img { transform: scale(1.05); }
.deal-thumb-placeholder {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--red-light), var(--orange-lt));
  color: var(--red);
}
.deal-badge-abs {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.deal-save-abs {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--yellow);
  color: var(--ink);
  font-size: .72rem;
  font-weight: var(--fw-black);
  padding: 3px 8px;
  border-radius: 50px;
}
.deal-body { padding: 14px; flex: 1; }
.deal-title {
  font-size: .9rem;
  font-weight: var(--fw-bold);
  color: var(--ink);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
.deal-price-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.deal-price-new { font-size: 1.2rem; font-weight: var(--fw-black); color: var(--red); }
.deal-price-old { font-size: .875rem; color: var(--ink-30); text-decoration: line-through; }
.deal-price-save { font-size: .75rem; font-weight: var(--fw-bold); color: var(--green); }
.deal-footer { padding: 10px 14px; border-top: 1px solid var(--ink-10); background: var(--surface); }

/* ============================================================
   STORE CARD
============================================================ */
.store-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  gap: 10px;
}
.store-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: #ddd; }
.store-card-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--surface);
  overflow: hidden;
}
.store-card-logo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.store-card-name { font-weight: var(--fw-bold); font-size: .95rem; color: var(--ink); }
.store-card-count { font-size: .78rem; color: var(--ink-60); }
.store-card-max-off {
  background: var(--red-light);
  color: var(--red);
  font-size: .8rem;
  font-weight: var(--fw-black);
  padding: 4px 12px;
  border-radius: 50px;
  width: 100%;
  text-align: center;
}

/* ============================================================
   PRICE COMPARISON TABLE
============================================================ */
.compare-section {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.compare-header {
  background: linear-gradient(135deg, var(--ink) 0%, #2d1818 100%);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.compare-header h2 { color: #fff; margin: 0; display: flex; align-items: center; gap: 10px; }
.compare-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-sm);
  padding: .45rem 1rem;
  flex: 1;
  max-width: 320px;
}
.compare-search input {
  background: none;
  border: none;
  outline: none;
  color: #fff;
  flex: 1;
  font-size: .875rem;
}
.compare-search input::placeholder { color: rgba(255,255,255,.4); }
.compare-search i { color: rgba(255,255,255,.5); }

/* Table */
.compare-table-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.compare-table thead tr { background: var(--ink-10); }
.compare-table th {
  padding: 13px 18px;
  font-size: .82rem;
  font-weight: var(--fw-bold);
  color: var(--ink-60);
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.compare-table th:first-child { padding-right: 24px; }
.compare-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink-10);
  vertical-align: middle;
  font-size: .9rem;
}
.compare-table td:first-child { padding-right: 24px; }
.compare-table tbody tr { transition: var(--transition); }
.compare-table tbody tr:hover { background: var(--surface); }
.compare-table tbody tr.best-price { background: var(--green-lt); }
.compare-table tbody tr:last-child td { border-bottom: none; }

/* Table specific cells */
.ct-product { display: flex; align-items: center; gap: 12px; }
.ct-product-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  overflow: hidden;
}
.ct-product-name { font-weight: var(--fw-bold); font-size: .875rem; color: var(--ink); }
.ct-product-sku  { font-size: .72rem; color: var(--ink-60); }
.ct-store { display: flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: var(--fw-medium); }
.ct-store-icon { width: 24px; height: 24px; border-radius: 4px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: .8rem; }
.ct-price-new { font-weight: var(--fw-black); font-size: 1rem; color: var(--ink); }
.ct-price-new.lowest { color: var(--green); }
.ct-price-old { font-size: .75rem; color: var(--ink-30); text-decoration: line-through; }
.ct-discount { font-size: .8rem; font-weight: var(--fw-bold); }
.ct-discount.high { color: var(--red); }
.ct-discount.mid  { color: var(--orange); }
.ct-discount.low  { color: var(--ink-60); }
.best-badge-cell { display: flex; align-items: center; gap: 6px; }
.best-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--green);
  color: #fff;
  font-size: .7rem;
  font-weight: var(--fw-black);
  padding: 3px 8px;
  border-radius: 50px;
}

/* Compare Footer */
.compare-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface);
}
.compare-meta { font-size: .8125rem; color: var(--ink-60); display: flex; align-items: center; gap: 6px; }

/* ============================================================
   ALERT DEAL BANNER
============================================================ */
.alert-banner {
  background: linear-gradient(135deg, var(--red) 0%, var(--orange) 100%);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.alert-banner-icon { font-size: 2rem; flex-shrink: 0; }
.alert-banner-text h3 { color: #fff; margin-bottom: 4px; font-size: 1.05rem; }
.alert-banner-text p  { color: rgba(255,255,255,.85); font-size: .875rem; margin: 0; }
.alert-banner-action { margin-right: auto; flex-shrink: 0; }
.btn-alert { background: #fff; color: var(--red); font-weight: var(--fw-black); }
.btn-alert:hover { background: var(--yellow); color: var(--ink); }

/* Countdown Timer */
.countdown {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,.2);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  flex-shrink: 0;
}
.countdown-unit { text-align: center; }
.countdown-num {
  font-size: 1.3rem;
  font-weight: var(--fw-black);
  color: #fff;
  line-height: 1;
  font-family: 'Courier New', monospace;
  min-width: 2ch;
}
.countdown-lbl { font-size: .6rem; color: rgba(255,255,255,.7); }
.countdown-sep { color: rgba(255,255,255,.6); font-size: 1.1rem; font-weight: var(--fw-black); align-self: flex-start; margin-top: 3px; }

/* ============================================================
   FILTER BAR
============================================================ */
.filter-bar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-label { font-size: .8125rem; font-weight: var(--fw-bold); color: var(--ink-60); white-space: nowrap; }
.filter-pills { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1; }
.filter-pill {
  padding: 5px 14px;
  border-radius: 50px;
  font-size: .8125rem;
  font-weight: var(--fw-medium);
  cursor: pointer;
  border: 1.5px solid var(--border);
  color: var(--ink-60);
  background: #fff;
  transition: var(--transition);
  white-space: nowrap;
}
.filter-pill:hover { border-color: var(--red); color: var(--red); }
.filter-pill.active { background: var(--red); border-color: var(--red); color: #fff; }
.filter-sort {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
}
.filter-sort select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .4rem .75rem;
  font-size: .8125rem;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  background: #fff;
}
.filter-sort select:focus { border-color: var(--red); }

/* ============================================================
   NEWSLETTER SECTION
============================================================ */
.newsletter-section {
  background: linear-gradient(135deg, var(--ink) 0%, #1a0000 100%);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter-section::before {
  content: '🎁';
  position: absolute;
  font-size: 10rem;
  opacity: .04;
  top: -20px;
  left: 40px;
  pointer-events: none;
}
.newsletter-section h2 { color: #fff; margin-bottom: 10px; }
.newsletter-section p  { color: rgba(255,255,255,.65); max-width: 500px; margin: 0 auto 28px; }
.newsletter-form {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 440px;
  margin: 0 auto;
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,.07);
}
.newsletter-form input {
  flex: 1;
  padding: .75rem 1.1rem;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: .9375rem;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.35); }
.newsletter-form button {
  padding: .75rem 1.4rem;
  background: var(--red);
  color: #fff;
  border: none;
  font-weight: var(--fw-bold);
  font-size: .875rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.newsletter-form button:hover { background: var(--red-dark); }

/* ============================================================
   FOOTER
============================================================ */
#colophon {
  background: #111;
  color: rgba(255,255,255,.7);
  margin-top: 0;
}
.footer-top { padding: 56px 0 40px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand { }
.footer-logo-text {
  font-size: 1.4rem;
  font-weight: var(--fw-black);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.footer-logo-text .logo-icon {
  background: var(--red);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
}
.footer-brand p { font-size: .875rem; line-height: 1.75; margin-bottom: 18px; opacity: .65; }
.footer-social { display: flex; gap: 8px; }
.footer-social-link {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  transition: var(--transition);
}
.footer-social-link:hover { background: var(--red); color: #fff; }
.footer-col h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  font-size: .875rem;
  color: rgba(255,255,255,.55);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.footer-links a:hover { color: #fff; padding-right: 4px; }
.footer-links a i { font-size: .7rem; color: var(--red); }
.footer-bottom {
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .8125rem;
  color: rgba(255,255,255,.35);
}
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a { color: rgba(255,255,255,.35); }
.footer-bottom-links a:hover { color: rgba(255,255,255,.7); }

/* ============================================================
   INNER PAGE LAYOUTS
============================================================ */
.page-banner {
  background: linear-gradient(135deg, var(--ink) 0%, #2d0a0a 100%);
  padding: 36px 0;
}
.page-banner h1 { color: #fff; font-size: 1.6rem; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8125rem;
  color: rgba(255,255,255,.5);
  margin-top: 8px;
  flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,.6); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { opacity: .4; }

.layout-sidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-widget {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.sidebar-widget-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: var(--fw-bold);
  font-size: .9375rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-widget-body { padding: 14px 18px; }

/* ============================================================
   PAGINATION
============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  font-weight: var(--fw-medium);
  border: 1.5px solid var(--border);
  color: var(--ink);
  background: #fff;
  transition: var(--transition);
}
.pagination .page-numbers:hover { border-color: var(--red); color: var(--red); }
.pagination .page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; }
.pagination .page-numbers.dots { border-color: transparent; background: none; }

/* ============================================================
   UTILITIES
============================================================ */
.text-red    { color: var(--red); }
.text-green  { color: var(--green); }
.text-muted  { color: var(--ink-60); }
.fw-black    { font-weight: var(--fw-black); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .hero-inner  { grid-template-columns: 1fr; }
  .hero-side   { display: none; }
  .hero-content { padding: 40px 20px; }
  .layout-sidebar { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .header-nav  { display: none; }
  .header-nav.open { display: flex; flex-direction: column; position: fixed; top: var(--header-h); right: 0; left: 0; background: #fff; padding: 16px; box-shadow: var(--shadow-lg); border-top: 1px solid var(--border); z-index: 800; }
  .header-actions { display: none; }
  .header-search { max-width: 100%; }
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2,1fr); }
  .stats-bar-inner { justify-content: flex-start; gap: 12px; }
  .newsletter-section { padding: 36px 20px; }
  .compare-header { padding: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-top  { padding: 36px 0 24px; }
  .filter-sort { margin-right: 0; width: 100%; }
  .topbar { display: none; }
}
@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .alert-banner { flex-direction: column; text-align: center; }
  .alert-banner-action { margin-right: 0; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}
