/*
Theme Name: Flag Swag
Theme URI: https://flagswag.ca
Author: Dominion Flag Swag Incorporated
Author URI: https://flagswag.ca
Description: Premium Canadian heritage e-commerce theme for Dominion Flag Swag — featuring the Canadian Red Ensign color palette, WooCommerce integration, WPML bilingual support, zero-lag AJAX search, dark mode, and mobile-first responsive design. Compatible with Ninja Forms, WP Hide & Security, CSS Hero, and WPML.
Version: 1.0.2
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: Proprietary
License URI: https://flagswag.ca/license
Text Domain: flagswag
Domain Path: /languages
WC requires at least: 8.0
WC tested up to: 9.5
Tags: e-commerce, woocommerce, custom-colors, custom-logo, custom-menu, featured-images, translation-ready, rtl-language-support
*/

/* ================================================================
   DESIGN SYSTEM — CANADIAN RED ENSIGN PALETTE
   Colors extracted from the Canadian Red Ensign flag:
   - Heritage Red (#D80621) — the red field
   - Royal Blue (#012169) — Union Jack blue  
   - Heraldic Gold (#CFAB2B) — lions, harp, fleur-de-lis
   - Maple Green (#2D6A3F) — maple leaves
   - Pure White (#FFFFFF) — crosses, shield base
   ================================================================ */

:root {
  /* ── Primary Palette (Red Ensign) ── */
  --c-red:             #D80621;
  --c-red-dark:        #B00518;
  --c-red-light:       #FF2D4A;
  --c-red-muted:       rgba(216,6,33,0.12);

  --c-blue:            #012169;
  --c-blue-dark:       #001140;
  --c-blue-light:      #1A3A8F;
  --c-blue-muted:      rgba(1,33,105,0.10);

  --c-gold:            #CFAB2B;
  --c-gold-dark:       #A88B1E;
  --c-gold-light:      #E5C84D;
  --c-gold-muted:      rgba(207,171,43,0.12);

  --c-green:           #2D6A3F;
  --c-green-dark:      #1E4A2C;
  --c-green-light:     #3D8A53;
  --c-green-muted:     rgba(45,106,63,0.10);

  --c-white:           #FFFFFF;
  --c-off-white:       #F8F6F1;

  /* ── Semantic Colors ── */
  --c-primary:         var(--c-red);
  --c-primary-hover:   var(--c-red-dark);
  --c-secondary:       var(--c-blue);
  --c-accent:          var(--c-gold);
  --c-success:         var(--c-green);
  --c-danger:          #E53E3E;
  --c-warning:         var(--c-gold);
  --c-info:            var(--c-blue-light);

  /* ── Light Mode (default) ── */
  --c-bg:              #FAFAF8;
  --c-bg2:             #F2F0EB;
  --c-bg3:             #E8E5DE;
  --c-surface:         var(--c-white);
  --c-surface2:        #F5F3EF;
  --c-surface-hover:   #FAF9F7;
  --c-border:          rgba(1,33,105,0.10);
  --c-border-strong:   rgba(1,33,105,0.20);
  --c-text:            #1A1A2E;
  --c-text2:           #4A4A5A;
  --c-text3:           #7A7A8A;
  --c-text-inverse:    var(--c-white);
  --c-overlay:         rgba(1,33,105,0.60);

  /* ── Typography ── */
  --font-display:      'Playfair Display', 'Georgia', serif;
  --font-body:         'Source Sans 3', 'Segoe UI', sans-serif;
  --font-mono:         'JetBrains Mono', 'Consolas', monospace;

  /* ── Spacing Scale ── */
  --space-3xs:         0.125rem;
  --space-2xs:         0.25rem;
  --space-xs:          0.5rem;
  --space-sm:          0.75rem;
  --space-md:          1rem;
  --space-lg:          1.5rem;
  --space-xl:          2rem;
  --space-2xl:         3rem;
  --space-3xl:         4rem;
  --space-4xl:         6rem;
  --space-5xl:         8rem;

  /* ── Border Radii ── */
  --r-xs:              2px;
  --r-sm:              4px;
  --r-md:              8px;
  --r-lg:              12px;
  --r-xl:              16px;
  --r-2xl:             24px;
  --r-full:            9999px;

  /* ── Shadows ── */
  --shadow-xs:         0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm:         0 2px 4px rgba(0,0,0,0.06);
  --shadow-md:         0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:         0 8px 24px rgba(0,0,0,0.10);
  --shadow-xl:         0 16px 48px rgba(0,0,0,0.12);
  --shadow-glow-red:   0 0 30px rgba(216,6,33,0.15);
  --shadow-glow-gold:  0 0 30px rgba(207,171,43,0.15);
  --shadow-glow-blue:  0 0 30px rgba(1,33,105,0.15);

  /* ── Transitions ── */
  --ease:              cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring:       cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:          cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:            0.15s;
  --t-mid:             0.25s;
  --t-slow:            0.5s;

  /* ── Layout ── */
  --header-h:          72px;
  --max-w:             1320px;
  --max-w-narrow:      860px;
  --max-w-wide:        1520px;
  --sidebar-w:         280px;
}

/* ================================================================
   DARK MODE
   ================================================================ */
[data-theme="dark"] {
  --c-bg:              #0D0D14;
  --c-bg2:             #14141F;
  --c-bg3:             #1C1C2B;
  --c-surface:         #1E1E30;
  --c-surface2:        #262640;
  --c-surface-hover:   #2A2A45;
  --c-border:          rgba(255,255,255,0.08);
  --c-border-strong:   rgba(255,255,255,0.16);
  --c-text:            #E8E6F0;
  --c-text2:           #A0A0B8;
  --c-text3:           #6A6A80;
  --c-text-inverse:    #0D0D14;
  --c-overlay:         rgba(0,0,0,0.70);

  --c-primary:         var(--c-red-light);
  --c-primary-hover:   var(--c-red);

  --shadow-xs:         0 1px 2px rgba(0,0,0,0.20);
  --shadow-sm:         0 2px 4px rgba(0,0,0,0.25);
  --shadow-md:         0 4px 12px rgba(0,0,0,0.30);
  --shadow-lg:         0 8px 24px rgba(0,0,0,0.35);
  --shadow-xl:         0 16px 48px rgba(0,0,0,0.40);
}

/* System preference detection (before JS loads) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg:            #0D0D14;
    --c-bg2:           #14141F;
    --c-bg3:           #1C1C2B;
    --c-surface:       #1E1E30;
    --c-surface2:      #262640;
    --c-surface-hover: #2A2A45;
    --c-border:        rgba(255,255,255,0.08);
    --c-border-strong: rgba(255,255,255,0.16);
    --c-text:          #E8E6F0;
    --c-text2:         #A0A0B8;
    --c-text3:         #6A6A80;
    --c-text-inverse:  #0D0D14;
    --c-overlay:       rgba(0,0,0,0.70);
  }
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body { background: var(--c-bg); color: var(--c-text); font-family: var(--font-body); font-weight: 400; line-height: 1.65; overflow-x: hidden; transition: background var(--t-mid), color var(--t-mid); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
a { color: var(--c-primary); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--c-primary-hover); }
strong, b { font-weight: 600; }
code, pre { font-family: var(--font-mono); }

::selection { background: var(--c-red-muted); color: var(--c-red-dark); }
[data-theme="dark"] ::selection { background: rgba(255,45,74,0.30); color: var(--c-white); }

/* Focus visible for accessibility */
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; border-radius: var(--r-sm); }

/* ================================================================
   TYPOGRAPHY
   ================================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--c-text);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.3rem, 3vw, 2rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.375rem); }
h5 { font-size: 1.05rem; }
h6 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; }

p { color: var(--c-text2); line-height: 1.75; }

.overline {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-red);
  display: inline-block;
}
.lead { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--c-text2); line-height: 1.75; }
.display-text { font-size: clamp(2.5rem, 7vw, 5rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.03em; }
.text-gradient { background: linear-gradient(135deg, var(--c-red) 0%, var(--c-gold) 50%, var(--c-green) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-heritage { background: linear-gradient(135deg, var(--c-red) 0%, var(--c-blue) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ================================================================
   LAYOUT
   ================================================================ */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.container--narrow { max-width: var(--max-w-narrow); }
.container--wide { max-width: var(--max-w-wide); }
section { padding-block: clamp(3rem, 7vw, 6rem); }

/* Grid system */
.grid { display: grid; gap: var(--space-lg); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-lg); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-lg); }

@media (max-width: 1100px) { .grid-4, .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3xl); align-items: center; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* Flex utilities */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

/* ================================================================
   HEADER / NAVIGATION
   ================================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: transparent;
  transition: background var(--t-mid), border-color var(--t-mid), backdrop-filter var(--t-mid);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(250,250,248,0.92);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom-color: var(--c-border);
}
[data-theme="dark"] .site-header.scrolled {
  background: rgba(13,13,20,0.92);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: var(--space-md);
}

/* Logo */
.site-logo {
  display: flex; align-items: center; gap: var(--space-xs);
  text-decoration: none; flex-shrink: 0;
}
.site-logo__text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--c-text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.site-logo__text .logo-flag { color: var(--c-red); }
.site-logo__text .logo-swag { color: var(--c-blue); }
.site-logo img { height: 40px; width: auto; }

/* Main Navigation */
.main-nav { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; }
.main-nav > a, .main-nav > .mega-menu-trigger {
  font-size: 0.875rem; font-weight: 500; color: var(--c-text2);
  padding: 8px 14px; border-radius: var(--r-full);
  transition: color var(--t-fast), background var(--t-fast);
  white-space: nowrap; cursor: pointer; background: none; border: none;
  font-family: var(--font-body); text-decoration: none;
  display: flex; align-items: center; gap: 4px;
}
.main-nav > a:hover, .main-nav > .mega-menu-trigger:hover,
.main-nav > .mega-menu-trigger:hover > button { color: var(--c-green); background: var(--c-green-muted); }
.main-nav > a.active { color: var(--c-green); }

/* Mega menu trigger button — must match <a> link styling exactly */
.mega-menu-trigger > button {
  color: var(--c-text2);
  font-size: 0.875rem; font-weight: 500;
  padding: 8px 14px; border-radius: var(--r-full);
  transition: color var(--t-fast), background var(--t-fast);
  white-space: nowrap; cursor: pointer;
  background: none; border: none; outline: none;
  font-family: var(--font-body);
  display: flex; align-items: center; gap: 4px;
  line-height: 1;
}
.mega-menu-trigger:hover > button { color: var(--c-green); background: var(--c-green-muted); }

/* Mega Menu Dropdown */
.mega-menu-trigger { position: relative; }
.mega-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  width: min(90vw, 960px);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-xl);
  opacity: 0; visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity var(--t-mid), visibility var(--t-mid), transform var(--t-mid);
  z-index: 100;
}
.mega-menu-trigger:hover .mega-menu,
.mega-menu-trigger:focus-within .mega-menu,
.mega-menu-trigger.open .mega-menu {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.mega-menu__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg);
}
.mega-menu__col h6 {
  color: var(--c-text3); font-family: var(--font-mono);
  font-size: 0.65rem; letter-spacing: 0.16em;
  margin-bottom: var(--space-sm); text-transform: uppercase;
}
.mega-menu__col a {
  display: flex; align-items: center; gap: var(--space-xs);
  padding: 8px var(--space-sm); border-radius: var(--r-md);
  color: var(--c-text2); font-size: 0.875rem;
  transition: all var(--t-fast);
}
.mega-menu__col a:hover { background: var(--c-bg2); color: var(--c-text); }
.mega-menu__col a .cat-emoji { font-size: 1.1rem; flex-shrink: 0; }

/* Header Right Actions */
.header-actions { display: flex; align-items: center; gap: var(--space-xs); flex-shrink: 0; }

/* Search Toggle */
.header-search-toggle {
  width: 40px; height: 40px; border-radius: var(--r-full);
  background: none; border: 1px solid var(--c-border);
  color: var(--c-text2); display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
}
.header-search-toggle:hover { border-color: var(--c-primary); color: var(--c-primary); }

/* Dark Mode Toggle */
.dark-mode-toggle {
  width: 40px; height: 40px; border-radius: var(--r-full);
  background: none; border: 1px solid var(--c-border);
  color: var(--c-text2); display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast); font-size: 1.1rem;
}
.dark-mode-toggle:hover { border-color: var(--c-gold); color: var(--c-gold); }
/* Show sun in light mode, moon in dark mode — driven by CSS, no FOUC */
.dark-mode-toggle .icon-moon { display: none; }
[data-theme="dark"] .dark-mode-toggle .icon-sun { display: none; }
[data-theme="dark"] .dark-mode-toggle .icon-moon { display: inline-flex; }

/* Mini Cart */
.header-cart {
  position: relative; width: 40px; height: 40px;
  border-radius: var(--r-full); background: none;
  border: 1px solid var(--c-border);
  color: var(--c-text2); display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast); text-decoration: none;
}
.header-cart:hover { border-color: var(--c-primary); color: var(--c-primary); }
.header-cart__count {
  position: absolute; top: -4px; right: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--c-red); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* Language Switcher */
.lang-switcher {
  font-size: 0.78rem; font-weight: 600; font-family: var(--font-mono);
  padding: 6px 10px; border-radius: var(--r-full);
  background: var(--c-bg2); border: 1px solid var(--c-border);
  color: var(--c-text2); cursor: pointer; transition: all var(--t-fast);
  letter-spacing: 0.05em; text-transform: uppercase;
}
.lang-switcher:hover { border-color: var(--c-primary); color: var(--c-primary); }

/* Hamburger */
.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 8px;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--c-text); border-radius: 2px;
  transition: all var(--t-fast) var(--ease);
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  display: none; position: fixed; inset: 0;
  background: var(--c-bg); z-index: 999;
  flex-direction: column; padding: var(--space-3xl) var(--space-xl);
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu__close {
  position: absolute; top: var(--space-md); right: var(--space-md);
  background: none; border: none; color: var(--c-text2);
  font-size: 1.5rem; padding: var(--space-xs); cursor: pointer;
}
.mobile-menu a {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  color: var(--c-text2); padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--c-border); transition: color var(--t-fast);
}
.mobile-menu a:hover { color: var(--c-primary); }
.mobile-menu__actions {
  display: flex; gap: var(--space-sm); margin-top: var(--space-xl); flex-wrap: wrap;
}

@media (max-width: 1020px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .lang-switcher { display: none; }
}
@media (max-width: 640px) {
  .header-search-toggle { display: none; }
}

/* ================================================================
   SEARCH OVERLAY
   ================================================================ */
.search-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--c-overlay);
  backdrop-filter: blur(12px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 15vh;
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-mid), visibility var(--t-mid);
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-overlay__inner {
  width: min(90vw, 640px);
  background: var(--c-surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--c-border);
  overflow: hidden;
}
.search-overlay__input-wrap {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--c-border);
}
.search-overlay__input-wrap svg { color: var(--c-text3); flex-shrink: 0; }
.search-overlay__input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 1.1rem; font-family: var(--font-body);
  color: var(--c-text); caret-color: var(--c-primary);
}
.search-overlay__input::placeholder { color: var(--c-text3); }
.search-overlay__close {
  background: var(--c-bg2); border: none; border-radius: var(--r-sm);
  padding: 4px 8px; font-size: 0.7rem; font-family: var(--font-mono);
  color: var(--c-text3); cursor: pointer;
}
.search-results {
  max-height: 50vh; overflow-y: auto; padding: var(--space-sm);
}
.search-result-item {
  display: flex; align-items: center; gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--r-md); cursor: pointer;
  transition: background var(--t-fast);
  text-decoration: none; color: var(--c-text);
}
.search-result-item:hover { background: var(--c-bg2); }
.search-result-item__img {
  width: 48px; height: 48px; border-radius: var(--r-md);
  object-fit: cover; background: var(--c-bg2); flex-shrink: 0;
}
.search-result-item__title { font-weight: 600; font-size: 0.9rem; }
.search-result-item__price { font-family: var(--font-mono); font-size: 0.8rem; color: var(--c-primary); }
.search-result-item__cat { font-size: 0.75rem; color: var(--c-text3); }
.search-loading { text-align: center; padding: var(--space-xl); color: var(--c-text3); font-size: 0.875rem; }
.search-no-results { text-align: center; padding: var(--space-xl); color: var(--c-text3); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--r-full);
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: all var(--t-fast) var(--ease);
  text-decoration: none; letter-spacing: 0.01em;
  white-space: nowrap; line-height: 1;
}
.btn svg, .btn .icon { width: 16px; height: 16px; flex-shrink: 0; }

/* Icon base sizing — ensures SVGs render at correct dimensions everywhere */
.icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex-shrink: 0; }
.icon svg { width: 100%; height: 100%; display: block; }

.btn--primary { background: var(--c-red); color: var(--c-white); }
.btn--primary:hover { background: var(--c-red-dark); color: var(--c-white); box-shadow: var(--shadow-glow-red); transform: translateY(-1px); }

.btn--secondary { background: var(--c-blue); color: var(--c-white); }
.btn--secondary:hover { background: var(--c-blue-dark); color: var(--c-white); box-shadow: var(--shadow-glow-blue); transform: translateY(-1px); }

.btn--gold { background: var(--c-gold); color: #1A1A2E; }
.btn--gold:hover { background: var(--c-gold-dark); box-shadow: var(--shadow-glow-gold); transform: translateY(-1px); }

.btn--outline { background: transparent; color: var(--c-text); border: 1.5px solid var(--c-border-strong); }
.btn--outline:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-red-muted); }

.btn--ghost { background: transparent; color: var(--c-text2); }
.btn--ghost:hover { color: var(--c-primary); background: var(--c-red-muted); }

.btn--lg { padding: 14px 32px; font-size: 1rem; }
.btn--sm { padding: 7px 16px; font-size: 0.8rem; }
.btn--full { width: 100%; justify-content: center; }

@media (max-width: 480px) { .btn--lg { padding: 12px 24px; font-size: 0.9rem; } }

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--space-lg);
  transition: border-color var(--t-mid), box-shadow var(--t-mid), transform var(--t-mid);
}
.card:hover {
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card--flat { border: none; box-shadow: var(--shadow-sm); }
.card--flat:hover { box-shadow: var(--shadow-lg); }
.card--heritage {
  border-color: var(--c-red-muted);
  background: linear-gradient(135deg, rgba(216,6,33,0.03) 0%, var(--c-surface) 100%);
}
.card--blue {
  border-color: var(--c-blue-muted);
  background: linear-gradient(135deg, rgba(1,33,105,0.04) 0%, var(--c-surface) 100%);
}
.card--gold {
  border-color: var(--c-gold-muted);
  background: linear-gradient(135deg, rgba(207,171,43,0.04) 0%, var(--c-surface) 100%);
}

/* ================================================================
   BADGES
   ================================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--r-full);
  font-family: var(--font-mono); font-size: 0.68rem;
  font-weight: 600; letter-spacing: 0.04em;
}
.badge--red { background: var(--c-red-muted); color: var(--c-red); border: 1px solid rgba(216,6,33,0.20); }
.badge--blue { background: var(--c-blue-muted); color: var(--c-blue-light); border: 1px solid rgba(1,33,105,0.20); }
.badge--gold { background: var(--c-gold-muted); color: var(--c-gold-dark); border: 1px solid rgba(207,171,43,0.25); }
.badge--green { background: var(--c-green-muted); color: var(--c-green); border: 1px solid rgba(45,106,63,0.20); }
.badge--sale { background: var(--c-red); color: var(--c-white); border: none; font-weight: 700; }
.badge--new { background: var(--c-green); color: var(--c-white); border: none; font-weight: 700; }

/* ================================================================
   SECTION HEADERS
   ================================================================ */
.section-header { margin-bottom: var(--space-3xl); }
.section-header .overline { margin-bottom: var(--space-xs); }
.section-header p { margin-top: var(--space-md); font-size: 1.05rem; max-width: 640px; }
.section-header--center { text-align: center; max-width: 700px; margin-inline: auto; margin-bottom: var(--space-3xl); }
.section-header--center p { margin-inline: auto; }

/* ================================================================
   PRODUCT CARDS (WooCommerce)
   ================================================================ */
.product-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid);
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-card__badges {
  position: absolute; top: var(--space-sm); left: var(--space-sm);
  display: flex; gap: 4px; z-index: 2;
}
.product-card__wishlist {
  position: absolute; top: var(--space-sm); right: var(--space-sm);
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--c-surface); border: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2; transition: all var(--t-fast);
  color: var(--c-text3);
}
.product-card__wishlist:hover, .product-card__wishlist.active {
  color: var(--c-red); border-color: var(--c-red);
  background: var(--c-red-muted);
}
.product-card__image {
  aspect-ratio: 1; overflow: hidden; background: var(--c-bg2);
  position: relative;
}
.product-card__image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.product-card:hover .product-card__image img { transform: scale(1.06); }
.product-card__quick-view {
  position: absolute; bottom: var(--space-sm); left: 50%;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  transition: all var(--t-mid) var(--ease);
}
.product-card:hover .product-card__quick-view { opacity: 1; transform: translateX(-50%) translateY(0); }
.product-card__body { padding: var(--space-md); }
.product-card__category {
  font-size: 0.7rem; font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--c-text3); margin-bottom: 4px;
}
.product-card__title {
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  color: var(--c-text); margin-bottom: var(--space-xs);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card__title a { color: inherit; text-decoration: none; }
.product-card__title a:hover { color: var(--c-primary); }
.product-card__price {
  font-family: var(--font-mono); font-weight: 700; color: var(--c-text);
  font-size: 1rem; display: flex; align-items: center; gap: var(--space-xs);
}
.product-card__price del {
  font-weight: 400; color: var(--c-text3); font-size: 0.85rem;
  text-decoration: line-through;
}
.product-card__price ins { text-decoration: none; color: var(--c-red); }
.product-card__rating {
  display: flex; align-items: center; gap: 4px;
  margin-top: var(--space-xs); color: var(--c-gold);
  font-size: 0.8rem;
}
.product-card__rating span { color: var(--c-text3); font-size: 0.75rem; }
.product-card__actions {
  display: flex; gap: var(--space-xs); margin-top: var(--space-sm);
}

/* ================================================================
   HERO SECTION
   ================================================================ */
.hero {
  position: relative; min-height: 85vh;
  display: flex; align-items: center;
  overflow: hidden; padding-top: var(--header-h);
  background: var(--c-bg);
}
.hero__bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--c-bg) 0%, var(--c-bg2) 50%, var(--c-bg) 100%);
}
.hero__pattern {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, var(--c-red-muted) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, var(--c-blue-muted) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, var(--c-gold-muted) 0%, transparent 40%);
  opacity: 0.6;
}
.hero__content { position: relative; z-index: 1; max-width: 700px; padding-block: clamp(3rem, 8vh, 6rem); }
.hero__tagline {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}
.hero__desc {
  font-size: clamp(1rem, 2vw, 1.15rem); color: var(--c-text2);
  max-width: 540px; margin-bottom: var(--space-xl); line-height: 1.75;
}
.hero__actions {
  display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap;
}
@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  background: var(--c-blue-dark);
  color: var(--c-white);
  padding-block: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 3vw, 2rem);
}
[data-theme="dark"] .site-footer { background: #080810; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { font-size: 0.875rem; color: rgba(255,255,255,0.6); max-width: 280px; line-height: 1.65; }
.footer-col h6 {
  font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.35); margin-bottom: var(--space-md);
}
.footer-col a {
  display: block; padding: 5px 0; font-size: 0.875rem;
  color: rgba(255,255,255,0.6); transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--c-gold); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0; padding: 0; }
.footer-bottom {
  padding-top: var(--space-lg); border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--space-md);
  font-size: 0.78rem; color: rgba(255,255,255,0.35);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--c-gold); }
.social-links { display: flex; gap: var(--space-xs); }
.social-links a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5); transition: all var(--t-fast);
}
.social-links a:hover { border-color: var(--c-gold); color: var(--c-gold); background: rgba(207,171,43,0.10); }

/* ================================================================
   FORMS — Ninja Forms compatible + fallback
   ================================================================ */
.nf-form-cont, .nf-form-wrap { color: var(--c-text); }
label, .nf-field-label label {
  font-size: 0.855rem; font-weight: 500; color: var(--c-text2);
  margin-bottom: 6px; display: block;
}
input[type="text"], input[type="email"], input[type="tel"],
input[type="number"], input[type="url"], input[type="password"],
input[type="search"], textarea, select,
.nf-element {
  width: 100%; background: var(--c-surface);
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--r-md); color: var(--c-text);
  font-family: var(--font-body); font-size: 0.95rem;
  padding: 12px 16px; transition: border-color var(--t-fast), box-shadow var(--t-fast);
  -webkit-appearance: none; appearance: none;
}
input:focus, textarea:focus, select:focus, .nf-element:focus {
  outline: none; border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-red-muted);
}
textarea { resize: vertical; min-height: 130px; }
select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237A7A8A' d='M1.41.59L6 5.17 10.59.59 12 2l-6 6-6-6z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
button[type="submit"], .nf-field-submit input[type="button"] {
  background: var(--c-red); color: var(--c-white);
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 13px 28px; border: none; border-radius: var(--r-full);
  cursor: pointer; transition: all var(--t-fast); width: 100%;
}
button[type="submit"]:hover { background: var(--c-red-dark); box-shadow: var(--shadow-glow-red); }

/* ================================================================
   FAQ ACCORDION
   ================================================================ */
.faq-item { border-bottom: 1px solid var(--c-border); }
.faq-question {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: var(--space-lg) 0; cursor: pointer; font-weight: 600;
  font-size: 1rem; color: var(--c-text); background: none; border: none;
  width: 100%; text-align: left; gap: var(--space-md); transition: color var(--t-fast);
  line-height: 1.5; font-family: var(--font-body);
}
.faq-question:hover { color: var(--c-primary); }
.faq-icon {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--c-border); display: flex; align-items: center;
  justify-content: center; font-size: 1.1rem; transition: all var(--t-fast);
  color: var(--c-text3); margin-top: 2px;
}
.faq-item.open .faq-icon { border-color: var(--c-primary); color: var(--c-primary); transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height var(--t-slow) var(--ease); }
.faq-answer-inner { padding: 0 0 var(--space-lg); color: var(--c-text2); line-height: 1.8; font-size: 0.95rem; }
.faq-item.open .faq-answer { max-height: 600px; }

/* ================================================================
   BLOG / POSTS
   ================================================================ */
.post-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform var(--t-mid), box-shadow var(--t-mid);
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card__thumb { height: 200px; overflow: hidden; background: var(--c-bg2); }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.post-card:hover .post-card__thumb img { transform: scale(1.05); }
.post-card__body { padding: var(--space-lg); }
.post-card__meta {
  display: flex; align-items: center; gap: var(--space-xs);
  font-size: 0.75rem; color: var(--c-text3); margin-bottom: var(--space-xs);
  font-family: var(--font-mono); flex-wrap: wrap;
}
.post-card__title { font-size: 1.1rem; margin-bottom: var(--space-xs); }
.post-card__title a { color: var(--c-text); text-decoration: none; }
.post-card__title a:hover { color: var(--c-primary); }

/* ================================================================
   WOOCOMMERCE OVERRIDES
   ================================================================ */
.woocommerce-page .site-main { padding-top: calc(var(--header-h) + var(--space-xl)); }

/* Shop / Archive Grid */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-lg); list-style: none;
  margin: 0 !important; padding: 0 !important;
}
.woocommerce ul.products li.product {
  margin: 0 !important; padding: 0 !important; width: auto !important; float: none !important;
}

/* Shop toolbar */
.shop-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--space-md);
  padding-bottom: var(--space-lg); margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--c-border);
}
.shop-toolbar__count { font-size: 0.875rem; color: var(--c-text3); }
.shop-toolbar__sort select {
  padding: 8px 32px 8px 12px; border-radius: var(--r-full);
  font-size: 0.8rem; background-color: var(--c-surface);
}
.shop-toolbar__view { display: flex; gap: 4px; }
.shop-toolbar__view button {
  width: 36px; height: 36px; border-radius: var(--r-md);
  background: var(--c-surface); border: 1px solid var(--c-border);
  color: var(--c-text3); display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast); cursor: pointer;
}
.shop-toolbar__view button.active, .shop-toolbar__view button:hover {
  border-color: var(--c-primary); color: var(--c-primary);
}

/* Single Product */
.single-product-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl); align-items: start;
}
@media (max-width: 900px) { .single-product-layout { grid-template-columns: 1fr; } }
.product-gallery { position: sticky; top: calc(var(--header-h) + var(--space-lg)); }
.product-gallery__main {
  border-radius: var(--r-xl); overflow: hidden;
  background: var(--c-bg2); aspect-ratio: 1; margin-bottom: var(--space-sm);
}
.product-gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.product-gallery__thumbs { display: flex; gap: var(--space-xs); overflow-x: auto; }
.product-gallery__thumb {
  width: 72px; height: 72px; border-radius: var(--r-md);
  border: 2px solid var(--c-border); overflow: hidden; cursor: pointer;
  flex-shrink: 0; transition: border-color var(--t-fast);
}
.product-gallery__thumb.active, .product-gallery__thumb:hover { border-color: var(--c-primary); }
.product-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-info .overline { margin-bottom: var(--space-xs); }
.product-info__title { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: var(--space-sm); }
.product-info__price {
  font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700;
  color: var(--c-text); margin-bottom: var(--space-lg);
}
.product-info__price del { color: var(--c-text3); font-size: 1.1rem; margin-right: var(--space-xs); }
.product-info__price ins { text-decoration: none; color: var(--c-red); }
.product-info__desc { margin-bottom: var(--space-xl); font-size: 0.95rem; }

/* Quantity selector */
.quantity-selector {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--c-border-strong); border-radius: var(--r-full);
  overflow: hidden;
}
.quantity-selector button {
  width: 40px; height: 40px; background: var(--c-bg2); border: none;
  font-size: 1.1rem; color: var(--c-text); display: flex; align-items: center;
  justify-content: center; transition: background var(--t-fast);
}
.quantity-selector button:hover { background: var(--c-bg3); }
.quantity-selector input {
  width: 48px; text-align: center; border: none; background: none;
  font-family: var(--font-mono); font-size: 0.9rem; font-weight: 600;
  color: var(--c-text); padding: 0;
}
.quantity-selector input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Variation swatches */
.variation-swatches { display: flex; gap: var(--space-xs); flex-wrap: wrap; margin-bottom: var(--space-lg); }
.swatch {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--c-border); cursor: pointer;
  transition: all var(--t-fast); position: relative;
}
.swatch:hover, .swatch.active { border-color: var(--c-primary); box-shadow: 0 0 0 2px var(--c-red-muted); }
.swatch--size {
  width: auto; height: auto; border-radius: var(--r-md);
  padding: 6px 14px; font-size: 0.8rem; font-weight: 600;
  font-family: var(--font-mono);
}
.swatch--size:hover, .swatch--size.active { background: var(--c-red-muted); }

/* Cart */
.woocommerce-cart-form table { width: 100%; border-collapse: collapse; }
.woocommerce-cart-form th {
  font-family: var(--font-mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--c-text3); padding: var(--space-sm) var(--space-md);
  border-bottom: 2px solid var(--c-border);
}
.woocommerce-cart-form td {
  padding: var(--space-md); border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
}
.cart-item__image { width: 72px; height: 72px; border-radius: var(--r-md); object-fit: cover; }

/* Checkout */
.checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: var(--space-3xl); }
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } }
.checkout-form .form-row { margin-bottom: var(--space-md); }
.checkout-form label { font-weight: 500; }
.order-summary-sticky { position: sticky; top: calc(var(--header-h) + var(--space-lg)); }
.order-summary {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-xl); padding: var(--space-xl);
}
.order-summary__title { font-size: 1.1rem; margin-bottom: var(--space-lg); }
.order-summary__item {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-sm) 0; border-bottom: 1px solid var(--c-border);
}
.order-summary__item img { width: 48px; height: 48px; border-radius: var(--r-sm); object-fit: cover; }
.order-total {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: var(--space-md); margin-top: var(--space-md);
  font-size: 1.15rem; font-weight: 700;
}
.order-total .amount { font-family: var(--font-mono); color: var(--c-red); }

/* My Account */
.woocommerce-MyAccount-navigation { margin-bottom: var(--space-lg); }
.woocommerce-MyAccount-navigation ul { display: flex; gap: 2px; flex-wrap: wrap; }
.woocommerce-MyAccount-navigation ul li a {
  display: block; padding: 10px 18px; border-radius: var(--r-full);
  font-size: 0.875rem; font-weight: 500; color: var(--c-text2);
  transition: all var(--t-fast); border: 1px solid var(--c-border);
}
.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a:hover {
  background: var(--c-red-muted); color: var(--c-primary); border-color: rgba(216,6,33,0.20);
}

/* Star ratings */
.star-rating { color: var(--c-gold); font-size: 0.9rem; letter-spacing: 2px; }

/* Pagination */
.woocommerce-pagination, .pagination {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
  margin-top: var(--space-3xl);
}
.woocommerce-pagination .page-numbers, .pagination .page-numbers {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md); background: var(--c-surface);
  border: 1px solid var(--c-border); color: var(--c-text2);
  font-size: 0.875rem; font-weight: 500; transition: all var(--t-fast);
}
.woocommerce-pagination .page-numbers:hover,
.woocommerce-pagination .page-numbers.current,
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  border-color: var(--c-primary); color: var(--c-primary); background: var(--c-red-muted);
}

/* ================================================================
   FILTER SIDEBAR
   ================================================================ */
.shop-filters {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: var(--space-lg);
}
.filter-group { margin-bottom: var(--space-lg); }
.filter-group:last-child { margin-bottom: 0; }
.filter-group__title {
  font-family: var(--font-mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--c-text3); margin-bottom: var(--space-sm);
}
.filter-checkbox {
  display: flex; align-items: center; gap: var(--space-xs);
  padding: 5px 0; font-size: 0.875rem; color: var(--c-text2);
  cursor: pointer;
}
.filter-checkbox input[type="checkbox"] {
  width: 18px; height: 18px; border-radius: var(--r-sm);
  accent-color: var(--c-red);
}
.price-range {
  display: flex; align-items: center; gap: var(--space-xs);
}
.price-range input[type="range"] {
  flex: 1; accent-color: var(--c-red); height: 4px;
}
.active-filters { display: flex; gap: var(--space-xs); flex-wrap: wrap; margin-bottom: var(--space-lg); }
.active-filter {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--r-full);
  background: var(--c-red-muted); color: var(--c-red);
  font-size: 0.78rem; font-weight: 500;
}
.active-filter button { background: none; border: none; color: inherit; cursor: pointer; font-size: 0.9rem; }

/* ================================================================
   LOYALTY / REWARDS WIDGET
   ================================================================ */
.loyalty-widget {
  background: linear-gradient(135deg, var(--c-blue-dark) 0%, var(--c-blue) 100%);
  border-radius: var(--r-xl); padding: var(--space-xl); color: var(--c-white);
  position: relative; overflow: hidden;
}
.loyalty-widget::before {
  content: ''; position: absolute; top: -50%; right: -30%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 60% 40%, rgba(207,171,43,0.08) 0%, transparent 50%);
}
.loyalty-points { font-family: var(--font-display); font-size: 2.5rem; font-weight: 900; }
.loyalty-tier { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--c-gold); }
.loyalty-bar { height: 6px; background: rgba(255,255,255,0.15); border-radius: var(--r-full); margin-top: var(--space-md); overflow: hidden; }
.loyalty-bar__fill { height: 100%; background: var(--c-gold); border-radius: var(--r-full); transition: width 1s var(--ease-out); }

/* ================================================================
   FLAG DESIGNER
   ================================================================ */
.designer-layout {
  display: grid; grid-template-columns: 1fr 340px; gap: var(--space-xl); align-items: start;
}
@media (max-width: 900px) { .designer-layout { grid-template-columns: 1fr; } }

/* ================================================================
   ANNOUNCEMENT BAR
   ================================================================ */
.announcement-bar { transition: transform var(--t-mid) var(--ease); }
.announcement-bar .icon { width: 14px; height: 14px; }

/* ================================================================
   NEWSLETTER
   ================================================================ */
.newsletter-section input[type="email"]::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-section input[type="email"]:focus { border-color: var(--c-gold); box-shadow: 0 0 0 3px rgba(207,171,43,0.2); }
.newsletter-form { display: flex; gap: var(--space-xs); }
@media (max-width: 480px) { .newsletter-form { flex-direction: column; } }

/* ================================================================
   SHOP SIDEBAR
   ================================================================ */
.shop-sidebar .widget { margin-bottom: var(--space-lg); }
.shop-sidebar .widget:last-child { margin-bottom: 0; }

/* Shop page layout: sidebar + products grid */
.shop-layout {
  display: grid; grid-template-columns: 260px 1fr; gap: var(--space-xl);
}
@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; }
  .shop-filters { position: static !important; }
}

/* ================================================================
   WIDGETS
   ================================================================ */
.widget { margin-bottom: var(--space-lg); }
.widget-title {
  font-family: var(--font-mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--c-text3); margin-bottom: var(--space-sm);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin-bottom: var(--space-xs); }
.widget li a { font-size: 0.875rem; color: var(--c-text2); transition: color var(--t-fast); }
.widget li a:hover { color: var(--c-primary); }
.footer-widget { margin-bottom: var(--space-lg); }

/* ================================================================
   COMMENTS
   ================================================================ */
.comments-area { border-top: 1px solid var(--c-border); padding-top: var(--space-xl); }
.comment-list { margin: 0; padding: 0; }
.comment-list li { margin-bottom: var(--space-lg); padding-bottom: var(--space-lg); border-bottom: 1px solid var(--c-border); }
.comment-list li:last-child { border-bottom: none; }
.comment-list .comment-author { font-weight: 600; color: var(--c-text); }
.comment-list .comment-meta { font-size: 0.8rem; color: var(--c-text3); margin-bottom: var(--space-xs); }
.comment-form label { display: block; margin-bottom: 4px; }
.comment-form .form-submit { margin-top: var(--space-md); }

/* ================================================================
   ANIMATIONS
   ================================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
.stagger > *:nth-child(1) { transition-delay: 0.05s; }
.stagger > *:nth-child(2) { transition-delay: 0.10s; }
.stagger > *:nth-child(3) { transition-delay: 0.15s; }
.stagger > *:nth-child(4) { transition-delay: 0.20s; }
.stagger > *:nth-child(5) { transition-delay: 0.25s; }
.stagger > *:nth-child(6) { transition-delay: 0.30s; }

@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-in-right { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.animate-fade-up { animation: fade-up 0.7s var(--ease) both; }
.animate-fade-in { animation: fade-in 0.5s var(--ease) both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--c-bg2) 25%, var(--c-bg3) 50%, var(--c-bg2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-md);
}

/* ================================================================
   UTILITIES
   ================================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--c-primary) !important; }
.text-muted { color: var(--c-text3); }
.text-success { color: var(--c-success); }
.text-small { font-size: 0.875rem; }

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.w-full { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--c-bg2); }
::-webkit-scrollbar-thumb { background: var(--c-border-strong); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--c-text3); }

/* WP Core */
.wp-block-image img { border-radius: var(--r-md); }
.aligncenter { text-align: center; margin: var(--space-lg) auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Print */
@media print {
  .site-header, .site-footer, .search-overlay, .mobile-menu, .dark-mode-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* ================================================================
   v1.0.1 FIXES
   ================================================================ */

/* ── Newsletter email input sizing ── */
.newsletter-form input[type="email"] {
  min-width: 0; /* Allow flex shrink */
  flex: 1 1 260px;
  padding: 14px 20px;
  font-size: 0.95rem;
}
.newsletter-form .btn { flex-shrink: 0; }

/* ── Blog sidebar widget overflow fix ── */
.widget { overflow: hidden; word-wrap: break-word; overflow-wrap: break-word; }
.widget h2, .widget h3, .widget h4, .widget h5 {
  font-size: 1rem !important;
  line-height: 1.3;
  margin-bottom: var(--space-sm);
}
.widget ul li a { word-break: break-word; }
.widget_search input[type="search"],
.widget_search .search-field {
  width: 100% !important;
  min-width: 0;
  padding: 10px 14px;
  font-size: 0.9rem;
}
.widget_search .search-form {
  display: flex;
  gap: var(--space-xs);
}
.widget_search .search-submit {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Search overlay input sizing ── */
.search-overlay__input {
  width: 100% !important;
  min-width: 0;
  padding: 12px 0;
}

/* ── Mega menu dark mode ── */
[data-theme="dark"] .mega-menu {
  background: var(--c-surface);
  border-color: var(--c-border);
}
[data-theme="dark"] .mega-menu__col a:hover {
  background: var(--c-surface2);
}

/* ── Header nav — Shop dropdown button dark mode fix ── */
[data-theme="dark"] .mega-menu-trigger > button {
  color: var(--c-text2);
}
[data-theme="dark"] .mega-menu-trigger:hover > button {
  color: var(--c-green-light);
  background: var(--c-green-muted);
}

/* ── WooCommerce Cart Customization ── */
.woocommerce-cart .woocommerce {
  padding-top: var(--space-xl);
}
.woocommerce table.shop_table {
  border: 1px solid var(--c-border) !important;
  border-radius: var(--r-lg);
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--c-surface);
}
.woocommerce table.shop_table th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-text3);
  background: var(--c-bg2);
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border);
}
.woocommerce table.shop_table td {
  padding: 16px;
  border-top: 1px solid var(--c-border);
  vertical-align: middle;
  color: var(--c-text);
  background: var(--c-surface);
  transition: background var(--t-fast);
}
.woocommerce table.shop_table tr:hover td {
  background: var(--c-surface-hover);
}
.woocommerce table.shop_table .product-thumbnail img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
}
.woocommerce table.shop_table .product-name a {
  color: var(--c-text);
  font-weight: 600;
  transition: color var(--t-fast);
}
.woocommerce table.shop_table .product-name a:hover {
  color: var(--c-green);
}
.woocommerce table.shop_table .product-price,
.woocommerce table.shop_table .product-subtotal {
  font-family: var(--font-mono);
  font-weight: 600;
}
.woocommerce table.shop_table .product-remove a {
  color: var(--c-text3) !important;
  font-size: 1.25rem;
  transition: color var(--t-fast);
}
.woocommerce table.shop_table .product-remove a:hover {
  color: var(--c-danger) !important;
}
.woocommerce table.shop_table .quantity .qty {
  width: 60px;
  text-align: center;
  padding: 8px;
  border-radius: var(--r-md);
}
.woocommerce .cart_totals {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--space-lg);
}
.woocommerce .cart_totals h2 {
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}
.woocommerce .cart_totals .order-total .amount {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--c-red);
}
.woocommerce .wc-proceed-to-checkout .checkout-button,
.woocommerce a.checkout-button {
  background: var(--c-red) !important;
  color: var(--c-white) !important;
  border-radius: var(--r-full) !important;
  font-weight: 600;
  padding: 14px 28px !important;
  transition: all var(--t-fast) !important;
  text-align: center;
  display: block;
  border: none;
}
.woocommerce .wc-proceed-to-checkout .checkout-button:hover {
  background: var(--c-red-dark) !important;
  box-shadow: var(--shadow-glow-red);
  transform: translateY(-1px);
}
.woocommerce .coupon input[type="text"] {
  border-radius: var(--r-md);
  padding: 10px 14px;
}
.woocommerce .coupon button,
.woocommerce button[name="update_cart"] {
  background: var(--c-surface) !important;
  color: var(--c-text) !important;
  border: 1.5px solid var(--c-border-strong) !important;
  border-radius: var(--r-full) !important;
  padding: 10px 20px !important;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--t-fast);
  cursor: pointer;
}
.woocommerce .coupon button:hover,
.woocommerce button[name="update_cart"]:hover {
  border-color: var(--c-green) !important;
  color: var(--c-green) !important;
  background: var(--c-green-muted) !important;
}
.woocommerce .cart-empty {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--c-text2);
}
.woocommerce .return-to-shop a {
  background: var(--c-red);
  color: var(--c-white);
  border-radius: var(--r-full);
  padding: 12px 24px;
  font-weight: 600;
  transition: all var(--t-fast);
}
.woocommerce .return-to-shop a:hover {
  background: var(--c-red-dark);
  box-shadow: var(--shadow-glow-red);
}

/* ── WooCommerce My Account — Account Details Dark Mode ── */
.woocommerce-MyAccount-navigation ul {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 var(--space-xl) 0;
  padding: 0;
}
.woocommerce-MyAccount-navigation ul li {
  margin: 0;
  padding: 0;
}
.woocommerce-MyAccount-navigation ul li a {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text2);
  border: 1px solid var(--c-border);
  transition: all var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
}
.woocommerce-MyAccount-navigation ul li.is-active a {
  background: var(--c-green-muted);
  color: var(--c-green);
  border-color: rgba(45,106,63,0.25);
}
.woocommerce-MyAccount-navigation ul li a:hover {
  border-color: var(--c-green);
  color: var(--c-green);
  background: var(--c-green-muted);
}

/* Account content area */
.woocommerce-MyAccount-content {
  color: var(--c-text);
}
.woocommerce-MyAccount-content fieldset {
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.woocommerce-MyAccount-content fieldset legend {
  color: var(--c-text);
  font-weight: 600;
  padding: 0 var(--space-xs);
}
.woocommerce-MyAccount-content .woocommerce-Button,
.woocommerce-MyAccount-content button[type="submit"] {
  background: var(--c-green) !important;
  color: var(--c-white) !important;
  border-radius: var(--r-full) !important;
  padding: 12px 28px !important;
  font-weight: 600;
  border: none;
  transition: all var(--t-fast);
}
.woocommerce-MyAccount-content .woocommerce-Button:hover,
.woocommerce-MyAccount-content button[type="submit"]:hover {
  background: var(--c-green-dark) !important;
  transform: translateY(-1px);
}
.woocommerce-MyAccount-content em {
  color: var(--c-text3);
  font-size: 0.85rem;
}
/* Dark mode account form fields */
[data-theme="dark"] .woocommerce-MyAccount-content input[type="text"],
[data-theme="dark"] .woocommerce-MyAccount-content input[type="email"],
[data-theme="dark"] .woocommerce-MyAccount-content input[type="password"],
[data-theme="dark"] .woocommerce-MyAccount-content select {
  background: var(--c-surface2);
  border-color: var(--c-border-strong);
  color: var(--c-text);
}
[data-theme="dark"] .woocommerce-MyAccount-content input:focus {
  border-color: var(--c-green);
  box-shadow: 0 0 0 3px var(--c-green-muted);
}

/* ── Green tinge for Orders, Downloads, Payment Methods ── */
.woocommerce-orders-table,
.woocommerce table.account-orders-table {
  border: 1px solid rgba(45,106,63,0.15) !important;
  border-radius: var(--r-lg);
  overflow: hidden;
}
.woocommerce-orders-table th,
.woocommerce table.account-orders-table th {
  background: var(--c-green-muted) !important;
  color: var(--c-green) !important;
}
.woocommerce-message,
.woocommerce-info {
  border-top-color: var(--c-green) !important;
  background: var(--c-green-muted);
  color: var(--c-text);
  border-radius: var(--r-md);
  padding: var(--space-md) var(--space-lg);
}
.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--c-green) !important;
}
.woocommerce-message a.button,
.woocommerce-info a.button {
  background: var(--c-surface) !important;
  color: var(--c-text) !important;
  border: 1px solid var(--c-border) !important;
  border-radius: var(--r-full) !important;
  padding: 8px 18px !important;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--t-fast);
}
.woocommerce-message a.button:hover {
  border-color: var(--c-green) !important;
  color: var(--c-green) !important;
  background: var(--c-green-muted) !important;
}
/* Downloads & Payment methods */
.woocommerce-MyAccount-downloads,
.woocommerce-MyAccount-payment-methods {
  background: linear-gradient(135deg, rgba(45,106,63,0.03) 0%, var(--c-surface) 100%);
  border: 1px solid rgba(45,106,63,0.12);
  border-radius: var(--r-lg);
  padding: var(--space-lg);
}
[data-theme="dark"] .woocommerce-MyAccount-downloads,
[data-theme="dark"] .woocommerce-MyAccount-payment-methods {
  background: linear-gradient(135deg, rgba(45,106,63,0.06) 0%, var(--c-surface) 100%);
}

/* ── Enhanced Hover Effects ── */
/* Card lift on hover */
.card {
  transition: border-color var(--t-mid), box-shadow var(--t-mid), transform var(--t-mid) var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(45,106,63,0.20);
}
/* Button press effect */
.btn:active {
  transform: translateY(1px) scale(0.98);
}
/* Product card image zoom */
.product-card__image img {
  transition: transform 0.5s var(--ease), filter 0.5s;
}
.product-card:hover .product-card__image img {
  transform: scale(1.06);
  filter: brightness(1.03);
}
/* Social link glow */
.social-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(207,171,43,0.20);
}
/* Footer column link slide */
.footer-col a {
  position: relative;
  transition: color var(--t-fast), padding-left var(--t-fast);
}
.footer-col a:hover {
  padding-left: 6px;
  color: var(--c-gold);
}
/* Badge pulse on hover */
.badge:hover {
  transform: scale(1.05);
  transition: transform var(--t-fast) var(--ease-spring);
}
/* Nav link underline effect */
.main-nav > a::after, .main-nav > .mega-menu-trigger > button::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--c-green);
  border-radius: 1px;
  transition: width var(--t-mid) var(--ease), left var(--t-mid) var(--ease);
}
.main-nav > a { position: relative; }
.main-nav > .mega-menu-trigger > button { position: relative; }
.main-nav > a:hover::after, .main-nav > a.active::after,
.main-nav > .mega-menu-trigger:hover > button::after {
  width: 60%;
  left: 20%;
}
/* Trust bar icon hover */
.trust-icon-wrap {
  transition: transform var(--t-fast) var(--ease);
}
.trust-icon-wrap:hover {
  transform: translateY(-2px);
}
/* FAQ item hover */
.faq-question:hover .faq-icon {
  border-color: var(--c-green);
  color: var(--c-green);
}
/* Search result hover glow */
.search-result-item:hover {
  background: var(--c-green-muted);
  transform: translateX(4px);
  transition: all var(--t-fast) var(--ease);
}
/* Header cart bounce on count change */
@keyframes cart-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}
.header-cart__count.updated {
  animation: cart-bounce 0.4s var(--ease-spring);
}

/* ── WooCommerce general button overrides ── */
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--c-surface);
  color: var(--c-text);
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--r-full);
  padding: 10px 22px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--t-fast) var(--ease);
  cursor: pointer;
}
.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  border-color: var(--c-green);
  color: var(--c-green);
  background: var(--c-green-muted);
  transform: translateY(-1px);
}
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
  background: var(--c-red);
  color: var(--c-white);
  border: none;
}
.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
  background: var(--c-red-dark);
  box-shadow: var(--shadow-glow-red);
}
