/* ==========================================================================
   Teemaailm Child Theme — Main Stylesheet
   Sprint 02: header, footer, mobile-tab-bar, drawer, search-overlay.
   ========================================================================== */

/* CSS variable fallbacks (if theme.json hasn't loaded yet) */
:root {
  --tm-bg:           #FFFFFF;
  --tm-bg-alt:       #F5F4F0;
  --tm-border:       #E8E6E0;
  --tm-text:         #1A1A1A;
  --tm-text-body:    #2C2C2C;
  --tm-text-muted:   #6B6B6B;
  --tm-text-light:   #9A9890;
  --tm-accent:       #9C3621;
  --tm-accent-dark:  #7A2A1A;
  --tm-success:      #3B6D11;
  --tm-success-alt:  #2F6B3D;

  --tm-font-serif: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --tm-font-sans:  'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* WP global-styles not injecting theme.json vars — define them explicitly */
  --wp--preset--color--bg:          var(--tm-bg);
  --wp--preset--color--bg-alt:      var(--tm-bg-alt);
  --wp--preset--color--border:      var(--tm-border);
  --wp--preset--color--text:        var(--tm-text);
  --wp--preset--color--text-body:   var(--tm-text-body);
  --wp--preset--color--text-muted:  var(--tm-text-muted);
  --wp--preset--color--text-light:  var(--tm-text-light);
  --wp--preset--color--accent:      var(--tm-accent);
  --wp--preset--color--accent-dark: var(--tm-accent-dark);
  --wp--preset--color--success:     var(--tm-success);
  --wp--preset--color--success-alt: var(--tm-success-alt);

  --wp--preset--font-family--cormorant: var(--tm-font-serif);
  --wp--preset--font-family--inter:     var(--tm-font-sans);

  /* Sprint 09 — fluid horizontal content padding */
  --tm-content-px: clamp(14px, 4vw, 80px);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background: var(--wp--preset--color--bg, var(--tm-bg));
  color: var(--wp--preset--color--text-body, var(--tm-text-body));
  font-family: var(--wp--preset--font-family--inter, var(--tm-font-sans));
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--wp--preset--color--accent, var(--tm-accent)); }

/* Remove mouse-click outline, keep keyboard focus outline */
a:focus:not(:focus-visible) {
    outline: none;
}

a:focus-visible {
    outline: 2px solid var(--wp--preset--color--accent, #9C3621);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Sprint 03+ modules (added when ready) */
/* @import url('product-card.css'); */
/* @import url('archive.css'); */
/* @import url('single-product.css'); */
/* @import url('cart.css'); */
/* @import url('checkout.css'); */

/* === Footer legal links (legal disclaimer row, bottom of footer) === */
.tm-footer-legal-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-size: 12px;
  color: var(--wp--preset--color--text-muted);
}
.tm-footer-legal-links li {
  display: inline-block;
}
.tm-footer-legal-links li::after {
  content: '·';
  margin: 0 10px;
  color: var(--wp--preset--color--border);
}
.tm-footer-legal-links li:last-child::after {
  content: '';
  margin: 0;
}
.tm-footer-legal-links a {
  color: var(--wp--preset--color--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  letter-spacing: 0.02em;
}
.tm-footer-legal-links a:hover {
  color: var(--wp--preset--color--accent);
  border-color: var(--wp--preset--color--accent);
}
@media (max-width: 768px) {
  .tm-footer-legal-links {
    font-size: 11px;
  }
  .tm-footer-legal-links li::after {
    margin: 0 6px;
  }
}
