/*
Theme Name: CouponsCodeDeal Theme
Theme URI: https://couponscodedeal.com
Author: Your Name
Author URI: https://couponscodedeal.com
Description: Lightweight coupon website theme designed for CouponsCodeDeal.com. Works with Coupon Manager Core plugin.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: couponcodedeal
Tags: coupons, deals, affiliate, two-columns, responsive-layout, custom-colors
*/

/* ========================================
   RESET & BASE STYLES
======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --secondary-color: #10b981;
  --accent-color: #f59e0b;
  --danger-color: #ef4444;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --border-color: #e5e7eb;
  --bg-light: #f9fafb;
  --white: #ffffff;

  /* Typography */
  --font-primary:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font-heading: "Georgia", serif;

  /* Spacing */
  --container-width: 1200px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--white);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
  color: var(--text-color);
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.75rem;
}
h4 {
  font-size: 1.5rem;
}
h5 {
  font-size: 1.25rem;
}
h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ========================================
   BUTTONS
======================================== */

.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: #059669;
  color: var(--white);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 18px;
}

/* ========================================
   HEADER
======================================== */

.site-header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-sm) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  height: 60px; /* Fixed height for consistency across all pages */
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  width: 100%;
  height: 100%;
}

.site-branding {
  flex-shrink: 0;
  z-index: 1001; /* Above mobile menu */
  height: 100%;
  display: flex;
  align-items: center;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  max-height: 40px; /* Limit logo height for consistency */
}

.site-logo:hover {
  color: var(--primary-dark);
}

/* Navigation */
.main-navigation {
  margin-left: auto;
  margin-right: 20px;
  height: 100%;
  display: flex;
  align-items: center;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 30px;
}

.main-navigation li {
  position: relative;
}

.main-navigation a {
  font-weight: 600;
  color: var(--text-color);
  font-size: 15px;
  padding: 10px 0;
  display: block;
  transition: color 0.3s ease;
}

.main-navigation a:hover {
  color: var(--primary-color);
}

/* Desktop Submenu Indicator */
.main-navigation .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  vertical-align: middle;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.main-navigation .menu-item-has-children:hover > a::after {
  opacity: 1;
  transform: translateY(-2px);
}

/* Submenu */
.main-navigation .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 220px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 100;
  padding: 10px 0;
  display: block; /* Hidden by opacity/visibility */
  border-top: 2px solid var(--primary-color);
}

.main-navigation .sub-menu li {
  display: block;
  margin: 0;
}

.main-navigation .sub-menu a {
  padding: 10px 20px;
  font-size: 14px;
  color: #4b5563;
}

.main-navigation .sub-menu a:hover {
  background: #f3f4f6;
  color: var(--primary-color);
}

/* Hide Submenu Toggle on Desktop */
.submenu-toggle {
  display: none;
}

/* Show Submenu on Hover (Desktop) */
.main-navigation li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
}

.header-search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.header-search-toggle:hover {
  background: #f3f4f6;
  color: var(--primary-color);
}

/* Mobile Actions */
.mobile-actions {
  display: none; /* Hidden on Desktop */
}

/* ========================================
   FOOTER
======================================== */

.site-footer {
  background-color: var(--text-color);
  color: var(--white);
  margin-top: var(--spacing-xl);
}

/* Footer Main */
.footer-main {
  padding: 60px 0 40px;
}

.footer-widgets {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 0;
}

/* Footer Widget */
.footer-widget {
  display: flex;
  flex-direction: column;
}

/* Footer About Column */
.footer-about .footer-logo {
  display: inline-block;
  margin-bottom: 20px;
}

.footer-about .footer-logo img {
  max-width: 250px;
  height: auto;
}

.footer-about .footer-site-title {
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.footer-about .footer-site-title a {
  color: var(--white);
  text-decoration: none;
}

.footer-description {
  color: #d1d5db;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* Footer Widget Title */
.footer-widget-title {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: capitalize;
}

/* Footer Menu Lists */
.footer-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu-list li {
  margin-bottom: 12px;
}

.footer-menu-list a {
  color: #d1d5db;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-menu-list a:hover {
  color: var(--white);
  transform: translateX(3px);
}

/* Footer Bottom */
.footer-bottom {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-inner {
  text-align: center;
}

.footer-copyright {
  margin: 0;
  color: #9ca3af;
  font-size: 0.9rem;
}

.footer-copyright a {
  color: #d1d5db;
  text-decoration: none;
}

.footer-copyright a:hover {
  color: var(--white);
}

/* Footer Responsive */
@media (max-width: 991px) {
  .footer-widgets {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 576px) {
  .footer-main {
    padding: 40px 0 30px;
  }

  .footer-widgets {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-about {
    grid-column: auto;
  }

  .footer-about .footer-logo img {
    max-width: 200px;
  }

  .footer-widget-title {
    font-size: 1rem;
  }
}

/* ========================================
   UTILITY CLASSES
======================================== */

.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.mt-sm {
  margin-top: var(--spacing-sm);
}
.mt-md {
  margin-top: var(--spacing-md);
}
.mt-lg {
  margin-top: var(--spacing-lg);
}
.mb-sm {
  margin-bottom: var(--spacing-sm);
}
.mb-md {
  margin-bottom: var(--spacing-md);
}
.mb-lg {
  margin-bottom: var(--spacing-lg);
}
.pt-lg {
  padding-top: var(--spacing-lg);
}
.pb-lg {
  padding-bottom: var(--spacing-lg);
}

/* Badge */
.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 12px;
  text-transform: uppercase;
}

.badge-verified {
  background-color: var(--secondary-color);
  color: var(--white);
}

.badge-exclusive {
  background-color: var(--accent-color);
  color: var(--white);
}

.badge-featured {
  background-color: var(--primary-color);
  color: var(--white);
}

.badge-expired {
  background-color: var(--danger-color);
  color: var(--white);
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 991px) {
  .site-header {
    padding: 5px 0;
    height: 50px; /* Slightly smaller fixed height on mobile */
  }

  .header-inner {
    position: static; /* Let absolute menu position relative to header logic */
  }

  .mobile-actions {
    display: flex;
    align-items: center;
    gap: 15px;
  }

  .header-actions {
    display: none; /* Hide desktop search */
  }

  .main-navigation {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden off-canvas */
    width: 300px; /* Drawer width */
    height: 100vh;
    background: #fff;
    padding: 80px 30px 30px;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.3s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1000;
    overflow-y: auto;
    margin: 0;
  }

  .mobile-menu-open .main-navigation {
    right: 0; /* Slide in */
  }

  /* Overlay when menu is open */
  .mobile-menu-open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
    pointer-events: none; /* Let clicks pass to overlay closer logic if implemented */
    animation: fadeIn 0.3s ease forwards;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 0;
  }

  .main-navigation li {
    border-bottom: 1px solid #f3f4f6;
  }

  .main-navigation a {
    padding: 15px 0;
    font-size: 16px;
  }

  /* Hide desktop chevron indicator on mobile */
  .main-navigation .menu-item-has-children > a::after {
    display: none;
  }

  /* Mobile Submenu */
  .main-navigation .sub-menu {
    position: static;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none; /* Toggled by JS */
    padding-left: 20px;
    background: #f9fafb;
    border-top: none;
    min-width: auto;
  }

  /* Submenu Toggle Button */
  .submenu-toggle {
    display: flex; /* Show on mobile */
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: all 0.3s ease;
    border-radius: 4px;
  }

  .submenu-toggle:hover {
    background: #f3f4f6;
    color: var(--primary-color);
  }

  .submenu-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
  }

  .submenu-toggle.toggled-on svg {
    transform: rotate(180deg);
  }

  .submenu-toggle.toggled-on {
    color: var(--primary-color);
  }

  /* Mobile Search */
  .mobile-search-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Hamburger Menu */
  .mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001; /* Above overlay */
    position: relative;
  }

  .hamburger-box {
    width: 24px;
    height: 20px;
    display: inline-block;
    position: relative;
  }

  .hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -1px;
  }

  .hamburger-inner,
  .hamburger-inner::before,
  .hamburger-inner::after {
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    position: absolute;
    transition-property: transform;
    transition-duration: 0.15s;
    transition-timing-function: ease;
  }

  .hamburger-inner::before,
  .hamburger-inner::after {
    content: "";
    display: block;
  }

  .hamburger-inner::before {
    top: -8px;
  }

  .hamburger-inner::after {
    bottom: -8px;
  }

  .mobile-menu-toggle.is-active .hamburger-inner {
    transform: rotate(45deg);
    background-color: transparent; /* Hide middle bar */
  }

  .mobile-menu-toggle.is-active .hamburger-inner::before {
    top: 0;
    transform: rotate(0);
    background-color: var(--text-color);
  }

  /* Correct logic for hamburger cross */
  .mobile-menu-toggle.is-active .hamburger-inner {
    background-color: transparent !important;
  }
  .mobile-menu-toggle.is-active .hamburger-inner::before {
    top: 0;
    transform: rotate(45deg);
  }
  .mobile-menu-toggle.is-active .hamburger-inner::after {
    bottom: 0;
    transform: rotate(-45deg);
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  h3 {
    font-size: 1.5rem;
  }

  .footer-widgets {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   SEARCH OVERLAY
======================================== */

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay-inner {
  width: 100%;
  max-width: 800px;
  padding: 20px;
  position: relative;
  text-align: center;
}

.search-close {
  position: absolute;
  top: -60px;
  right: 0;
  font-size: 40px;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  line-height: 1;
  padding: 0 10px;
}

@media (max-width: 768px) {
  .search-close {
    position: fixed;
    top: 20px;
    right: 20px;
  }
}

.search-overlay .search-form {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-overlay .search-field {
  width: 100%;
  padding: 15px 0;
  font-size: 24px;
  border: none;
  border-bottom: 2px solid #ddd;
  background: transparent;
  text-align: center;
  color: #333;
}

.search-overlay .search-field:focus {
  outline: none;
  border-color: var(--primary-color);
}

.search-overlay .search-submit {
  margin-top: 20px;
  padding: 12px 30px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-overlay .search-submit:hover {
  background: var(--primary-dark);
}

.search-suggestions {
  margin-top: 30px;
  font-size: 14px;
  color: #666;
}

.search-suggestions span {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

.search-suggestions a {
  display: inline-block;
  margin: 5px;
  padding: 6px 14px;
  background: #f3f4f6;
  border-radius: 20px;
  color: #4b5563;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.search-suggestions a:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* ========================================
   SEARCH RESULTS PAGE
======================================== */

.search-results-page {
  padding: 40px 0;
  background: #f9fafb;
  min-height: 60vh;
}

.search-header {
  text-align: center;
  margin-bottom: 30px;
}

.search-title {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

.search-term {
  color: var(--primary-color);
  font-weight: 700;
}

.search-count {
  color: var(--text-light);
  font-size: 1rem;
  margin: 0;
}

/* Search Form on Results Page */
.search-form-wrapper {
  max-width: 600px;
  margin: 0 auto 40px;
}

.search-form-wrapper .search-form {
  display: flex;
  gap: 10px;
  background: white;
  padding: 8px;
  border-radius: 50px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.search-form-wrapper .search-field {
  flex: 1;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  background: transparent;
}

.search-form-wrapper .search-field:focus {
  outline: none;
}

.search-form-wrapper .search-submit {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-form-wrapper .search-submit:hover {
  background: var(--primary-dark);
}

/* Search Tabs */
.search-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.search-tab {
  background: white;
  border: 2px solid #e5e7eb;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-color);
}

.search-tab:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.search-tab.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Search Results */
.search-results {
  display: grid;
  gap: 20px;
}

.search-result {
  background: white;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}

.search-result:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.result-thumbnail {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background: #f9fafb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.result-thumbnail img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.result-placeholder {
  font-size: 32px;
}

.result-content {
  flex: 1;
}

.result-type {
  display: inline-block;
  background: #e0e7ff;
  color: #3730a3;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.search-result-store .result-type {
  background: #dbeafe;
  color: #1e40af;
}

.search-result-coupon .result-type {
  background: #fef3c7;
  color: #92400e;
}

.result-title {
  font-size: 1.25rem;
  margin: 0 0 8px 0;
}

.result-title a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.result-title a:hover {
  color: var(--primary-color);
}

.result-excerpt {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.result-meta {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-light);
}

.result-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.result-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.result-action .coupon-reveal-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.result-action .coupon-reveal-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* No Results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 12px;
}

.no-results-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-results h2 {
  font-size: 1.75rem;
  margin-bottom: 10px;
}

.no-results p {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.no-results .search-suggestions {
  max-width: 500px;
  margin: 0 auto 40px;
  text-align: left;
  background: #f9fafb;
  padding: 20px;
  border-radius: 8px;
}

.no-results .search-suggestions h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
}

.no-results .search-suggestions ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.no-results .search-suggestions li {
  padding: 8px 0;
  padding-left: 25px;
  position: relative;
}

.no-results .search-suggestions li:before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.no-results-stores {
  margin-top: 40px;
}

.no-results-stores h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

/* Search Pagination */
.search-pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.search-pagination .page-numbers {
  list-style: none;
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.search-pagination .page-numbers li {
  display: inline-block;
}

.search-pagination .page-numbers a,
.search-pagination .page-numbers span {
  display: block;
  padding: 10px 16px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 600;
}

.search-pagination .page-numbers a:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.search-pagination .page-numbers .current {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Responsive Search Results */
@media (max-width: 768px) {
  .search-results-page {
    padding: 20px 0;
  }

  .search-title {
    font-size: 1.5rem;
  }

  .search-result {
    flex-direction: column;
  }

  .result-thumbnail {
    width: 100%;
    height: 120px;
  }

  .result-action {
    width: 100%;
  }

  .result-action .coupon-reveal-btn {
    width: 100%;
  }

  .search-tabs {
    gap: 8px;
  }

  .search-tab {
    padding: 8px 16px;
    font-size: 14px;
  }
}

/* ========================================
   ALL STORES ARCHIVE PAGE
======================================== */

.all-stores-page {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Featured / Trending Section */
.featured-stores-wrapper {
  padding: 24px 0;
  width: 100%;
}

.featured-stores-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 768px) {
  .featured-stores-wrapper {
    padding: 48px 0;
  }

  .featured-stores-container {
    gap: 48px;
  }
}

.section-title {
  font-family: var(--font-secondary);
  font-size: 1.5rem; /* text-2xl */
  font-weight: 700;
  margin-bottom: 24px;
  padding-left: 12px;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.25rem; /* text-4xl */
    text-align: center;
    padding-left: 0;
    margin-bottom: 48px;
  }
}

.store-cards-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px; /* gap-5 */
}

/* Store Link Card */
.store-card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 160px; /* w-40 */
  gap: 24px; /* gap-6 */
  padding: 16px;
  background-color: transparent; /* bg-image-card-default usually white/transparent */
  overflow: hidden;
  border-radius: 8px; /* rounded-lg */
  text-decoration: none;
  color: var(--text-color); /* text-link-default-text */
  transition: all 0.2s ease;
}

.store-card-link:hover {
  color: var(--link-hover-color, #2563eb); /* text-link-hover-text */
}

.store-card-link:focus-visible {
  outline: 2px solid var(--focus-color, #2563eb);
  outline-offset: 4px;
  border-radius: 2px;
}

.store-logo,
.store-logo-placeholder {
  width: 148px;
  height: 148px;
  object-fit: contain;
  border-radius: 4px; /* rounded-l */
  /* border-none: no border needed usually */
}

.store-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f3f4f6;
  font-size: 2rem;
}

.store-name {
  text-align: center;
  font-size: 0.875rem; /* text-sm */
  font-weight: 400;
}

/* Other Sections Layout (Top Merchants, Recent) */
.top-merchants-section,
.recent-section {
  background-color: #f9fafb; /* bg-page-section-primary */
  padding: 24px 0;
}

@media (min-width: 768px) {
  .top-merchants-section,
  .recent-section {
    padding: 48px 0;
  }
}

/* Top Merchants & Recent Lists */
.top-merchants-section,
.recent-section {
  background-color: #f9fafb; /* bg-page-section-primary */
}

.top-merchants-section .section-title,
.recent-section .section-title {
  text-align: left;
  padding-left: 12px;
}

@media (min-width: 768px) {
  .top-merchants-section .container,
  .recent-section .container {
    max-width: var(--container-width);
    margin: 0 auto;
  }
}

.store-list-columns {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  column-count: 1;
}

@media (min-width: 768px) {
  .store-list-columns {
    column-count: 3;
    column-gap: 40px;
  }
}

.store-list-item {
  margin-bottom: 0;
  padding: 0 12px 16px 12px;
  break-inside: avoid;
}

.store-list-item a {
  font-size: 1rem; /* text-base */
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
  display: block;
  word-break: break-word;
  transition: color 0.2s;
}

.store-list-item a:hover {
  color: var(--primary-color);
}

@media (max-width: 767px) {
  .store-list-item {
    text-align: center;
  }
}

/* Browse By Letter */
.browse-letter-section {
  background-color: var(--white);
  margin-top: 4px;
  padding-top: 16px;
  padding-bottom: 8px;
}

@media (min-width: 768px) {
  .browse-letter-section {
    padding: 24px 0;
  }
}

.section-subtitle.mobile-only {
  padding-left: 12px;
  font-size: 1.125rem; /* text-lg */
  font-weight: 700;
  margin-bottom: 24px;
  display: block;
}

@media (min-width: 768px) {
  .section-subtitle.mobile-only {
    display: none;
  }
}

.letter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(2.5rem, 1fr));
  gap: 8px;
  padding: 12px;
  justify-items: center;
}

.letter-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  background-color: #f3f4f6;
  border-radius: 6px;
  font-size: 1.125rem; /* text-lg */
  font-weight: 700;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.2s ease;
}

@media (min-width: 768px) {
  .letter-link {
    flex-grow: 0;
    width: 2rem; /* Fixed width on desktop */
  }

  .letter-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
}

.letter-link:hover {
  background-color: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
}

/* ========================================
   BLOG & SINGLE POST PAGES
======================================== */

/* Blog Hero */
.blog-hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  padding: 60px 0;
  text-align: center;
  color: var(--white);
  border-bottom: 1px solid var(--border-color);
}
.blog-hero-title {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--white);
}
.blog-hero-subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto;
}

/* Layout */
.blog-layout,
.single-post-layout {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
@media (min-width: 992px) {
  .blog-layout,
  .single-post-layout {
    flex-direction: row;
    gap: 60px;
  }
  .blog-main,
  .single-post-article {
    width: 70%;
    min-width: 0;
  }
  .blog-sidebar {
    width: 30%;
    flex-shrink: 0;
  }
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 992px) {
  .blog-grid--3col {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Blog Card */
.blog-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

/* Thumbnail */
.blog-card-thumb {
  position: relative;
  padding-top: 60%;
  overflow: hidden;
  background: #f1f5f9;
  display: block;
}
.blog-card-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-card-thumb img {
  transform: scale(1.05);
}
.blog-card-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #cbd5e1;
  padding-top: 60%;
  position: relative;
}
.blog-card-thumb--placeholder span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Card Body */
.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.blog-card-cat {
  display: inline-block;
  padding: 4px 12px;
  background: #eef2ff;
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  align-self: flex-start;
}
.blog-card-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  line-height: 1.4;
}
.blog-card-title a {
  color: var(--text-color);
  text-decoration: none;
}
.blog-card-title a:hover {
  color: var(--primary-color);
}
.blog-card-excerpt {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 8px;
}
.blog-meta-avatar {
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.blog-meta-sep {
  color: #cbd5e1;
}
.blog-card-read-more {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-top: auto;
  text-decoration: none;
}
.blog-card-read-more:hover {
  color: var(--primary-dark);
}

/* Single Post Hero */
.single-post-hero {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background: #000;
}
.single-post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}
.single-post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

/* Single Post Header */
.single-post-header {
  margin-bottom: 40px;
}
.single-post-cats {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.post-cat-badge {
  background: var(--primary-color);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.post-cat-badge:hover {
  background: var(--primary-dark);
  color: var(--white);
}
.single-post-title {
  font-size: 2.25rem;
  line-height: 1.2;
  margin-bottom: 20px;
}
@media (min-width: 768px) {
  .single-post-title {
    font-size: 3rem;
  }
}
.single-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-light);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}
.spm-author {
  display: flex;
  align-items: center;
  color: var(--text-color);
  font-weight: 600;
  text-decoration: none;
}
.spm-avatar {
  border-radius: 50%;
  margin-right: 10px;
}
.spm-sep {
  color: #cbd5e1;
}

/* Single Post Content */
.single-post-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #334155;
  margin-bottom: 40px;
}
.single-post-content p {
  margin-bottom: 24px;
}
.single-post-content h2 {
  font-size: 2rem;
  margin: 40px 0 20px;
}
.single-post-content h3 {
  font-size: 1.5rem;
  margin: 30px 0 16px;
}
.single-post-content img {
  border-radius: var(--radius-md);
  margin: 32px 0;
  max-width: 100%;
  height: auto;
}
.single-post-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding: 20px 30px;
  background: #f8fafc;
  margin: 32px 0;
  font-style: italic;
  font-size: 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.single-post-content ul,
.single-post-content ol {
  margin-bottom: 24px;
  padding-left: 20px;
}
.single-post-content li {
  margin-bottom: 10px;
}

/* Post Tags */
.single-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}
.post-tags-label {
  font-weight: 600;
  color: var(--text-color);
  margin-right: 8px;
}
.post-tag {
  background: #f1f5f9;
  color: #475569;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  text-decoration: none;
}
.post-tag:hover {
  background: var(--primary-color);
  color: var(--white);
}

/* Share Buttons */
.single-post-share {
  background: #f8fafc;
  padding: 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.share-label {
  font-weight: 700;
  font-size: 1.1rem;
}
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  transition: opacity 0.2s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.share-btn:hover {
  opacity: 0.9;
  color: var(--white);
}
.share-btn svg {
  fill: currentColor;
}
.share-btn--twitter {
  background: #1da1f2;
}
.share-btn--facebook {
  background: #1877f2;
}
.share-btn--linkedin {
  background: #0a66c2;
}
.share-btn--copy {
  background: #475569;
}

/* Author Bio */
.single-post-author-bio {
  display: flex;
  gap: 24px;
  padding: 32px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 40px;
}
.author-avatar-img {
  border-radius: 50%;
  width: 72px;
  height: 72px;
}
.author-bio-body {
  flex-grow: 1;
}
.author-bio-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.author-bio-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
  display: block;
  margin-bottom: 12px;
  text-decoration: none;
}
.author-bio-desc {
  color: var(--text-light);
  margin: 0;
  line-height: 1.6;
}

/* Post Navigation */
.single-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}
.post-nav-link {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}
.post-nav-link:hover {
  background: var(--white);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}
.post-nav-link--next {
  text-align: right;
  align-items: flex-end;
}
.post-nav-dir {
  font-size: 0.85rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  font-weight: 600;
}
.post-nav-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.4;
}

/* Sidebar */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.sidebar-widget {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
.sidebar-widget-title {
  font-size: 1.25rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f5f9;
  position: relative;
}
.sidebar-widget-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary-color);
}

/* Sidebar Search */
.sidebar-search-form {
  position: relative;
  display: flex;
}
.sidebar-search-input {
  width: 100%;
  padding: 12px 16px;
  padding-right: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #f8fafc;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}
.sidebar-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--white);
}
.sidebar-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
}
.sidebar-search-btn:hover {
  color: var(--primary-color);
}

/* Sidebar Categories */
.sidebar-categories {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-categories li {
  margin-bottom: 12px;
}
.sidebar-categories li:last-child {
  margin-bottom: 0;
}
.sidebar-categories a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-color);
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  text-decoration: none;
}
.sidebar-categories a:hover {
  background: var(--primary-color);
  color: var(--white);
}
.cat-count {
  background: var(--white);
  color: var(--text-light);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}
.sidebar-categories a:hover .cat-count {
  color: var(--primary-color);
}

/* Sidebar Recent Posts */
.sidebar-recent-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-recent-post {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}
.sidebar-recent-post:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.srp-thumb {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.srp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.srp-body {
  flex-grow: 1;
}
.srp-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.4;
  margin-bottom: 6px;
  text-decoration: none;
}
.srp-title:hover {
  color: var(--primary-color);
}
.srp-date {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Sidebar Tags */
.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sidebar-tag {
  background: #f8fafc;
  color: #475569;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}
.sidebar-tag:hover {
  background: var(--white);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Pagination */
.blog-pagination {
  margin-top: 50px;
  text-align: center;
}
.blog-pagination .page-numbers {
  display: inline-flex;
  list-style: none;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.blog-pagination .page-numbers li {
  display: inline-block;
}
.blog-pagination .page-numbers a,
.blog-pagination .page-numbers span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-color);
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
}
.blog-pagination .page-numbers a:hover {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}
.blog-pagination .page-numbers .current {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

/* Related Posts */
.related-posts-section {
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .single-post-author-bio {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .share-buttons {
    justify-content: center;
    width: 100%;
  }
  .single-post-share {
    flex-direction: column;
    text-align: center;
  }
}

/* ========================================
   GLOBAL BREADCRUMBS
======================================== */

.footer-breadcrumbs {
  margin-top: 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-light);
}

.footer-breadcrumbs .container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-breadcrumbs ul.breadcrumb {
  list-style: none !important;
  list-style-type: none !important;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.footer-breadcrumbs ul.breadcrumb li.segment {
  list-style: none !important;
  list-style-type: none !important;
  color: var(--text-light);
  white-space: nowrap;
  margin: 0;
  padding: 0;
}

.footer-breadcrumbs ul.breadcrumb li.segment::before {
  content: none !important;
  display: none !important;
}

.footer-breadcrumbs ul.breadcrumb li.segment:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--border-color);
}

.footer-breadcrumbs ul.breadcrumb li.segment .link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-breadcrumbs ul.breadcrumb li.segment .link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.footer-breadcrumbs ul.breadcrumb li.segment:last-child {
  color: var(--text-color);
  font-weight: 600;
}

@media (max-width: 768px) {
  .footer-breadcrumbs {
    padding: 1rem 0;
  }

  .footer-breadcrumbs ul.breadcrumb {
    font-size: 0.8125rem;
    gap: 0.2rem;
  }

  .footer-breadcrumbs ul.breadcrumb li.segment:not(:last-child)::after {
    margin-left: 0.35rem;
  }
}
