/*
Theme Name: Abacus Lite
Author: Martyn Chadderton
Version: 3.0 Cleaned & Fixed
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

:root {
  --font-body: 'Poppins', sans-serif;
  --font-heading: 'Poppins', sans-serif;
  --color-bg: #fff;
  --color-text: #333;
  --color-heading: #222;
  --color-accent: #ffc0cb;
  --color-link: #4169e1;
  --color-link-hover: #191970;
  --container-width: 1200px;
  --gap: 1.5rem;
  --border-radius: 12px;
  --box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  --transition: all 0.2s ease;
}

/* ==========================================================================
   1. BASE & RESET STYLES
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   2. TYPOGRAPHY
   ========================================================================== */

/* Base Heading Styles */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.3;
}

/* H1: The main page title */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0 0 2rem;
}

/* H2: Major section heading */
h2 {
  font-size: 2rem;
  font-weight: 600;
  border-bottom: 2px solid #e5e5e5;
  padding-bottom: 0.5rem;
  margin: 2.5rem 0 1.5rem;
}

/* H3: Sub-section heading */
h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
}

/* H4: Minor heading */
h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

/* H5 & H6: Utility headings */
h5 {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 1.5rem 0 0.5rem;
}

h6 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}

/* Fix for H1 font-size deprecation warning */
article h1,
aside h1,
nav h1,
section h1 {
  font-size: 2.5rem;
}

p {
  margin-bottom: 1.25rem;
}

/* For main, centered section titles */
.section-heading {
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
}

/* For the descriptive text below a .section-heading */
.section-subheading {
  font-size: 1.125rem;
  max-width: 60ch;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: #555;
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */

.site-header {
  background: white;
  border-bottom: 1px solid #eee;
  padding: 0.75rem 0;
  position: relative;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  max-width: var(--container-width);  
  margin: 0 auto;
  padding: 0 1.5rem;                  
}

.site-logo img {
  height: 48px;
  width: auto;
  max-height: 48px;
}

/* Desktop Primary Navigation */
.primary-nav {
  display: flex;
  flex-grow: 1;
  justify-content: center;
}

.primary-nav ul.primary-menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.primary-nav ul.primary-menu li a {
  color: var(--color-text);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  position: relative;
  text-decoration: none;
}

.primary-nav ul.primary-menu li a:hover {
  color: var(--color-link);
  background: rgba(65, 105, 225, 0.07);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Desktop Utility Navigation */
.utility-nav {
  flex-shrink: 0;
}

.utility-nav ul.utility-menu {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  align-items: center;
  padding-left: 0;
  margin: 0;
}

.utility-nav ul.utility-menu li {
  list-style: none;
}

.utility-nav ul.utility-menu li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: var(--transition);
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-decoration: none;
  line-height: 1;
  font-size: 0;
  padding: 0;
}

.utility-nav ul.utility-menu li a:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
  text-decoration: none;
}

.utility-nav .nav-text {
  display: none;
}

.utility-nav .nav-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0;
}

.utility-nav ul.utility-menu li a:hover .nav-icon {
  transform: translate(-50%, -50%) scale(1.1);
  filter: none;
  opacity: 1;
}

/* Mobile menu toggle - hidden by default */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: relative;
  width: 44px;
  height: 44px;
  z-index: 1001;
  border-radius: 50%;
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  min-width: 44px;
}

.menu-toggle:hover {
  background: rgba(0,0,0,0.05);
}

/* Burger icon styles */
.menu-toggle .burger-icon {
  position: relative;
  width: 20px;
  height: 2px;
  background-color: #333;
  border-radius: 1px;
  transition: all 0.3s ease;
  display: block;
  margin: 0 auto;
  padding: 0;
  left: 0;
  transform: none;
}

.menu-toggle .burger-icon::before,
.menu-toggle .burger-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background-color: #333;
  border-radius: 1px;
  transition: all 0.3s ease;
  margin: 0;
  padding: 0;
  transform: translateX(0);
}

.menu-toggle .burger-icon::before { 
  top: -7px;
}

.menu-toggle .burger-icon::after { 
  top: 7px;
}

/* Active state (X formation) */
.menu-toggle.active .burger-icon { 
  background-color: transparent;
}

.menu-toggle.active .burger-icon::before { 
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle.active .burger-icon::after { 
  top: 0;
  transform: rotate(-45deg);
}

/* Navigation overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.primary-nav .mobile-utility-nav {
  display: none;
}

/* ==========================================================================
   4. FOOTER
   ========================================================================== */

.site-footer {
  background: #fff;
  border-top: 1px solid #eee;
  color: #333;
  padding: 4rem 1.5rem 2rem;
  font-size: 0.9rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
}

.footer-brand, 
.footer-form, 
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand .custom-logo-link img {
  height: 48px;
  width: auto;
  margin-bottom: 1rem;
}

.footer-brand p {
  max-width: 300px;
  line-height: 1.6;
  color: #666;
}

.footer-form h2, 
.footer-links h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-bottom {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
  font-size: 0.85rem;
  color: #666;
}

/* Social links */
.social-links {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: flex-start;
  margin-bottom: 1rem;
  padding-left: 0;
  list-style: none;
}

.social-links a {
  position: relative;
  display: flex;
  width: 50px;
  height: 50px;
  background: #f5f5f5;
  border-radius: 50%;
  transition: var(--transition);
  text-decoration: none;
}

.social-links a:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  text-decoration: none;
}

.social-links img,
.social-links svg {
  width: 30px;
  height: 30px;
  object-fit: contain;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ==========================================================================
   5. GENERAL PAGE & COMPONENT STYLES
   ========================================================================== */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.post-thumbnail img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  transition: var(--transition);
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.entry-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.entry-title a {
  color: var(--color-text);
  text-decoration: none;
}

.entry-title a:hover {
  color: var(--color-link);
}

.entry-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

.entry-summary {
  margin-bottom: 1.5rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
}

/* Pagination */
.navigation.pagination {
  text-align: center;
  margin: 3rem 0;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  background: #f5f5f5;
  color: var(--color-text);
  border-radius: var(--border-radius);
  transition: var(--transition);
  font-weight: 500;
  text-decoration: none;
}

.page-numbers:hover,
.page-numbers.current {
  background: var(--color-accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
  text-decoration: none;
}

/* ==========================================================================
   6. SPECIAL PAGE LAYOUTS
   ========================================================================== */

.hero-section {
  padding: 3rem 0;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fb 100%);
}

.hero-intro {
  animation: fadeInUp 0.6s ease-out;
}

.hero-intro h1,
.hero-intro h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-heading);
}

.hero-intro p {
  font-size: 1.25rem;
  max-width: 60ch;
  margin: 0 auto;
  color: #555;
}

@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* Buy logos section */
.buy-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 1rem;
  align-items: center;
}

.buy-logos a img {
  height: 120px;
  width: auto;
  max-width: 300px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.buy-logos a img:hover {
  transform: scale(1.05);
}

/* Free products iframe */
.free-products-page .responsive-iframe-container {
  position: relative;
  padding-bottom: 75%;
  height: 0;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  margin-top: 2rem;
}

.free-products-page .responsive-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Error 404 page */
.error-404-page .error-section {
  padding: 4rem 1.5rem;
  text-align: center;
}

.error-404-page .error-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.error-404-page .error-message {
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
}

.error-404-page .error-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   7. ABOUT US PAGE STYLES
   ========================================================================== */

.about-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.about-hero {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: var(--border-radius);
  margin-bottom: 4rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.about-page-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-heading);
  line-height: 1.2;
}

.about-page-subtitle {
  font-size: 1.25rem;
  color: #666;
  max-width: 60ch;
  margin: 0 auto;
  line-height: 1.6;
}

.about-story {
  margin-bottom: 4rem;
}

.story-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
  margin-top: 2rem;
}

.story-image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transition: transform 0.3s ease;
}

.story-image img:hover {
  transform: scale(1.02);
}

.story-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--color-heading);
  font-weight: 700;
}

.story-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: #555;
}

.about-philosophy {
  background: white;
  padding: 4rem 3rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  margin-bottom: 4rem;
  border: 1px solid #eee;
}

.about-philosophy h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--color-heading);
  font-weight: 700;
}

.philosophy-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.philosophy-points .point {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.philosophy-points .point:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
  border-color: var(--color-accent);
}

.philosophy-points .point h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-heading);
  font-weight: 600;
}

.philosophy-points .point p {
  font-size: 1rem;
  line-height: 1.6;
  color: #666;
  margin-bottom: 0;
}

.about-cta {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--color-accent) 0%, #ff9ff3 100%);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 24px rgba(255, 192, 203, 0.3);
}

.about-cta h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: white;
  font-weight: 700;
}

/* Base button-primary style (will be overridden in overrides.css) */
.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 2.5rem;
  background: white;
  color: var(--color-link);
  font-weight: 700;
  font-size: 1.2rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  border: 2px solid white;
}

.button-primary:hover {
  background: transparent;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  text-decoration: none;
}

/* ==========================================================================
   8. ACCESSIBILITY & FOCUS STATES
   ========================================================================== */

.menu-toggle:focus, 
.primary-nav a:focus, 
.utility-nav a:focus, 
.button:focus, 
.btn:focus {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
}

/* ==========================================================================
   9. RESPONSIVE DESIGN & MEDIA QUERIES
   ========================================================================== */

/* Mobile responsive */
@media screen and (max-width: 768px) {
  /* Hide desktop utility nav on mobile */
  .header-container .utility-nav {
    display: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }

  /* THIS IS THE RULE TO ADD/CONFIRM */
  .desktop-search-form {
    display: none !important;
  }
  
  /* Show menu toggle */
  .menu-toggle { 
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Mobile navigation panel */
  .primary-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 90vw;
    height: 100vh;
    background: white;
    padding: 80px 0 2rem 0;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    flex-direction: column;
  }
  
  .primary-nav.nav-open {
    display: flex;
    right: 0;
  }

  /* Primary menu items */
  .primary-nav ul.primary-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 0 1.5rem;
    margin-bottom: 2rem;
  }
  
  .primary-nav ul.primary-menu li {
    border-bottom: 1px solid #f0f0f0;
  }
  
  .primary-nav ul.primary-menu li:last-child {
    border-bottom: none;
  }
  
  .primary-nav ul.primary-menu li a {
    padding: 1rem;
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 0;
  }
  
  .primary-nav ul.primary-menu li a:hover {
    background: transparent;
    color: var(--color-link);
    transform: none;
  }

  /* Mobile utility nav */
.primary-nav .mobile-utility-nav {
  display: block;
  margin-top: 2rem;
  padding: 2rem 2rem 1rem 2rem;  /* Added side padding */
  border-top: 1px solid #eee;
}

.primary-nav .mobile-utility-nav ul.utility-menu {
  flex-direction: column;
  width: 100%;
  gap: 0.75rem;
  padding: 0 0.5rem;  /* Adjusted padding */
  align-items: center;
  list-style: none;
  margin: 0;

}
  
  .primary-nav .mobile-utility-nav ul.utility-menu li {
    border-bottom: none;
    width: 100%;
    list-style: none;
  }
  
  .primary-nav .mobile-utility-nav ul.utility-menu li a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
    width: 100%;
    min-height: 56px;
    background-color: #f8f9fa;
    color: var(--color-text);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .primary-nav .mobile-utility-nav ul.utility-menu li a:hover {
    border-color: #ddd;
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .primary-nav .mobile-utility-nav .nav-text {
    display: inline;
    font-weight: 500;
    text-align: left;
    flex-grow: 1;
  }

  .primary-nav .mobile-utility-nav .nav-icon {
    width: 30px;
    height: 30px;
    filter: none;
    flex-shrink: 0;
    position: static;
    transform: translateX(15px);
  }

  /* Mobile About Page */
  .about-page-title {
    font-size: 2.2rem;
  }
  
  .about-page-subtitle {
    font-size: 1.1rem;
  }
  
  .story-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .story-text h2 {
    font-size: 2rem;
  }
  
  .about-philosophy {
    padding: 2rem 1.5rem;
  }
  
  .about-philosophy h2 {
    font-size: 2rem;
  }
  
  .philosophy-points {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ==========================================================================
   10. BROWSER PREFERENCES & FALLBACKS
   ========================================================================== */

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, 
  *::before, 
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast preference */
@media (prefers-contrast: high) {
  :root {
    --color-text: #000;
    --color-bg: #fff;
    --color-link: #0000ff;
    --color-link-hover: #000080;
    --color-accent: #ff1493;
  }
  
  .utility-nav ul.utility-menu li a, 
  .button, 
  .btn, 
  input[type="submit"] {
    border: 2px solid #000;
  }
}

/* Print styles */
@media print {
  .site-header, 
  .site-footer, 
  .menu-toggle, 
  .nav-overlay, 
  .cart-notification, 
  .mobile-utility-nav {
    display: none !important;
  }
  
  .container {
    max-width: none;
    padding: 0;
  }
}

/* Fallbacks for no-js */
.no-js .menu-toggle { 
  display: none; 
}

.no-js .primary-nav { 
  display: block !important; 
  position: static !important; 
}
/* ==========================================================================
   Desktop Search (New "Pill" Style)
   ========================================================================== */

/* 1. Main container for the desktop search in the header */
.desktop-search-form {
  display: flex;
  align-items: center;
  flex-grow: 1; /* Allows the form to take available space */
  justify-content: flex-end; /* Pushes search bar to the right */
  margin: 0 1rem;
}

/* 2. Style the form element into a pill shape */
.desktop-search-form .search-form {
  display: flex;
  align-items: center;
  position: relative;
  border: 1px solid #e0e0e0;
  border-radius: 50px;
  overflow: hidden;
  background: #fdfdfd;
  width: 100%;
  max-width: 200px; /* Controls the max size of the search bar */
  transition: all 0.2s ease;
}

/* 3. Add a highlight effect when the user clicks inside */
.desktop-search-form .search-form:focus-within {
  border-color: var(--color-link);
  box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.15);
}

/* 4. Style the text input field */
.desktop-search-form .search-field {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  color: #333;
}

.desktop-search-form .search-field:focus {
  outline: none;
}

/* 5. Style the submit button as an icon */
.desktop-search-form .search-submit {
  background: #E7E7E7;
  color: transparent;
  font-size: 0;
  border: none;
  border-left: 1px solid #e0e0e0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px; /* Set a fixed width for the button area */
  align-self: stretch;
  padding: 0;
  margin: 0;
  transition: background-color 0.2s ease;
}

.desktop-search-form .search-submit:hover {
  background-color: #102666;
}

/* 6. Style the search icon svg */
.desktop-search-form .search-submit svg {
  width: 18px;
  height: 18px;
  fill: #555555; /* Sets the icon to a dark grey color */
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.desktop-search-form .search-submit:hover svg {
    opacity: 1;
}
/* ==========================================================================
   Mobile Search - Repositioned and Restyled (FINAL)
   ========================================================================== */

/* 1. Style the search container */
.primary-nav .mobile-search-form {
  padding: 1rem 1.5rem 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

/* 2. Style the form itself */
.mobile-search-form .search-form {
  display: flex;
  align-items: center; /* This vertically aligns the input and button */
  width: 100%;
  position: relative;
  border: 1px solid #ddd;
  border-radius: 50px;
  overflow: hidden;
  background: #fff;
}

/* 3. Style the text input field */
.mobile-search-form .search-field {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem 1.25rem; /* Adjusted padding for better spacing */
  font-size: 1rem;
  color: #333;
}

.mobile-search-form .search-field:focus {
  outline: none;
}

/* 4. Style the submit button to be an icon-only circle */
.mobile-search-form .search-submit {
  background: #4169E1;
  color: transparent; /* Hides any text like "Search" */
  font-size: 0; /* Ensures no text takes up space */
  border: none;
  border-left: 1px solid #ddd;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0; /* Prevents the button from shrinking */
  width: 50px; /* Gives the button a fixed width */
  align-self: stretch; /* Makes button height match the form */
  padding: 0;
  margin: 0;
}

.mobile-search-form .search-submit:hover {
  background: #102666;
}

/* 5. Ensure the search icon svg is centered and visible */
.mobile-search-form .search-submit svg {
  width: 22px;
  height: 22px;
  fill: #ffffff; /* Sets the icon color to white */
}

/* Desktop hides mobile search */
@media (min-width: 769px) {
  .mobile-search-form {
    display: none;
  }
}
/* Header search: enforce icon-only button across all pages (overrides Woo) */
.site-header .search-form .search-submit{
  appearance:none;
  background:transparent;
  border:0;
  color:transparent;
  font-size:0; /* hides any fallback text */
  padding:0;
  width:44px;
}
.site-header .search-form .search-submit img,
.site-header .search-form .search-submit svg{
  display:block; width:18px; height:18px;
}
