
/*
Theme Name: All Terrain Action 2026
Theme URI: https://example.com/themes/all-terrain-action
Author: Chris Baker
Author URI: https://example.com
Description: WooCommerce-ready theme with fullscreen hero and panels. Clean header, Inter font, and Customizer controls.
Version: 2.0.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: all-terrain-action
Tags: e-commerce, woocommerce, customizer, full-screen, responsive
*/

:root {
  --bg: #0b0f14;
  --text: #e5e7eb;
  --muted: #9aa0a6;
  --accent: #0ea5e9;
  --accent-contrast: #ffffff;
  --border: #1f2937;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container { width: min(1200px, 92vw); margin: 0 auto; padding: 1.25rem; }

/* Header */
.site-header {
  position: fixed; top: 0; width: 100%;
  z-index: 1000;
  background: transparent; border: 0;
}
body.admin-bar .site-header { top: 32px; }
@media (max-width:782px){ body.admin-bar .site-header { top: 46px; } }

.site-header .inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: .5rem 1.25rem;
}
.branding { display: flex; align-items: center; gap: .75rem; }
.site-title { margin: 0; font-weight: 800; }
.site-title a { color: #fff; text-decoration: none; }
.primary-nav, .secondary-nav { display: flex; gap: .75rem; }
.primary-nav li, .secondary-nav li { list-style: none; }
.primary-nav a, .secondary-nav a {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
  padding: .5rem .6rem;
  color: #fff;
  opacity: .95;
}
.primary-nav a:hover, .secondary-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.site-header.scrolled {
  background: rgba(11,15,20,.85);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-header.scrolled .primary-nav a, .site-header.scrolled .secondary-nav a, .site-header.scrolled .site-title a { color: var(--text); }

/* Main */
.site-main { padding-top: 64px; } /* header space; admin bar handled above */

/* Full-viewport sections */
.ata-screen { min-height: 100dvh; position: relative; margin: 0; }
.ata-bg, .ata-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ata-bg img { object-fit: cover; object-position: center; display: block; }
.ata-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.10) 0%, rgba(0,0,0,.55) 70%, rgba(0,0,0,.70) 100%); }
.ata-inner { position: relative; z-index: 1; width: min(1100px, 92vw); margin: 0 auto; padding: clamp(2rem, 6vw, 6rem) 1.25rem; display: grid; grid-template-rows: auto auto 1fr auto; align-content: start; min-height: 100dvh; }

/* Hero */
.ata-title { color: #fff; font-size: clamp(2.4rem, 6vw, 4.2rem); margin: 0; font-weight: 900; text-align: center; text-shadow: 0 2px 12px rgba(0,0,0,.55), 0 6px 24px rgba(0,0,0,.35); letter-spacing: .01em; }
.ata-subtitle { color: #e5e7eb; text-align: center; max-width: 70ch; margin: .75rem auto 1.5rem; font-size: clamp(1rem, 2.2vw, 1.25rem); text-shadow: 0 2px 10px rgba(0,0,0,.45); }

/* Tiles */
.ata-tiles {
  margin-top: clamp(1.25rem, 2vh, 2rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 1rem;
  align-self: end;
}
@media (max-width: 900px) { .ata-tiles { grid-template-columns: 1fr; } }

.tile-card {
  background: rgba(0,0,0,.62);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 1rem;
  padding: 1.25rem;
  color: #fff;
  box-shadow: 0 20px 40px rgba(0,0,0,.35), 0 4px 12px rgba(0,0,0,.25);
  backdrop-filter: blur(4px);
}
.tile-title { margin: 0 0 .35rem; font-size: 1.25rem; font-weight: 900; letter-spacing: .02em; }
.tile-text { margin: 0 0 .5rem; color: #e3e5e8; }
.tile-note { margin: 0 0 .75rem; font-weight: 800; }
.tile-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .85rem; border-radius: .6rem; background: var(--accent); color: var(--accent-contrast); text-decoration: none; border: 1px solid rgba(255,255,255,.18); font-weight: 800; }
.btn-outline { background: transparent; border: 1px solid rgba(255,255,255,.45); color: #fff; }
.btn-compact { padding: .5rem .8rem; }

/* Panels */
.ata-panel .ata-panel-title { color: #fff; font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0 0 .5rem; font-weight: 900; text-shadow: 0 2px 8px rgba(0,0,0,.35); }
.ata-panel .ata-panel-text { color: #e5e7eb; max-width: 70ch; text-shadow: 0 2px 6px rgba(0,0,0,.25); }

/* Utilities */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}


/* ===== Panel alignment controls (Customizer) ===== */
.ata-panel { display: grid; }
.ata-panel .ata-inner { width: min(1100px, 92vw); }
.ata-panel.pos-left  .ata-inner { justify-self: start; text-align: left; }
.ata-panel.pos-right .ata-inner { justify-self: end;   text-align: right; }
.ata-panel.valign-top    .ata-inner { align-self: start;  }
.ata-panel.valign-middle .ata-inner { align-self: center; }
.ata-panel.valign-bottom .ata-inner { align-self: end;    }


/* === v1.4.3: Panel alignment fixes === */
/* Make the panel content box shrink to fit so align-self works */
.ata-panel .ata-inner {
  min-height: auto !important;
  height: auto !important;
  display: block; /* use block layout in panels; hero keeps grid */
  width: min(1100px, 92vw);
  padding: clamp(2rem, 6vw, 6rem) 1.25rem;
}

/* Ensure the panel itself is a full-height grid so we can place the .ata-inner */
.ata-panel {
  min-height: 100dvh;
  display: grid;
  align-content: stretch;
}

/* Apply the chosen alignment */
.ata-panel.pos-left  .ata-inner { justify-self: start; text-align: left; }
.ata-panel.pos-right .ata-inner { justify-self: end;   text-align: right; }
.ata-panel.valign-top    .ata-inner { align-self: start; }
.ata-panel.valign-middle .ata-inner { align-self: center; }
.ata-panel.valign-bottom .ata-inner { align-self: end; }


/* === v1.4.4: submenu handling (desktop hover/focus, mobile tap/accordion) === */
.primary-nav .menu > li { position: relative; }
.primary-nav .menu > li .sub-menu{
  display: none !important;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: rgba(11,15,20,.97);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: .75rem;
  padding: .5rem;
  min-width: 260px;
  max-height: 70vh;
  overflow: auto;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
  z-index: 2500;
}
@media (hover:hover){
  .primary-nav .menu > li:hover > .sub-menu,
  .primary-nav .menu > li:focus-within > .sub-menu{
    display: block !important;
  }
}
@media (max-width: 900px){
  .primary-nav .menu > li { position: static; }
  .primary-nav .menu > li .sub-menu{
    position: static;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0 .25rem .25rem;
    max-height: none;
    overflow: visible;
  }
  .primary-nav .menu > li.open > .sub-menu{ display: block !important; }
  .primary-nav .menu > li > a{
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.1rem 1.5rem;
  }
  .primary-nav .menu .menu-item-has-children > a::after{
    content: "▸"; margin-left: .5rem; transition: transform .2s;
  }
  .primary-nav .menu > li.open > a::after{ transform: rotate(90deg); }
}


/* Note: This build removes front-page.php so WP falls back to home/page templates. */


/* === v2.0.1: submenu handling (desktop hover/focus, mobile accordion) === */
.primary-nav .menu > li { position: relative; }
.primary-nav .menu > li .sub-menu{
  display: none !important;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: rgba(11,15,20,.97);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: .75rem;
  padding: .5rem;
  min-width: 260px;
  max-height: 70vh;
  overflow: auto;
  max-width: 80vw;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
  z-index: 2500;
}
@media (hover:hover){
  .primary-nav .menu > li:hover > .sub-menu,
  .primary-nav .menu > li:focus-within > .sub-menu{
    display: block !important;
  }
}
.primary-nav .sub-menu > li { list-style: none; }
.primary-nav .sub-menu a{
  display: block;
  padding: .6rem .9rem;
  color: #fff;
  text-decoration: none;
  border-radius: .4rem;
  white-space: nowrap;
}
.primary-nav .sub-menu a:hover{ background: rgba(255,255,255,.08); }
.primary-nav .menu .menu-item-has-children > a::after{
  content: "▾";
  margin-left: .35rem;
  font-size: .8rem;
  opacity: .8;
}

@media (max-width: 900px){
  .primary-nav .menu > li { position: static; }
  .primary-nav .menu > li .sub-menu{
    position: static;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0 .25rem .25rem;
    max-height: none;
    overflow: visible;
  }
  .primary-nav .menu > li.open > .sub-menu{ display: block !important; }
  .primary-nav .menu > li > a{
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.1rem 1.5rem;
  }
  .primary-nav .menu .menu-item-has-children > a::after{
    content: "▸"; margin-left: .5rem; transition: transform .2s;
  }
  .primary-nav .menu > li.open > a::after{ transform: rotate(90deg); }
}



/* === v2.0.2: high-specificity submenu hide/show (desktop hover/focus, mobile accordion) === */
.site-header .primary-nav li { position: relative; }
.site-header .primary-nav ul.sub-menu{
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  background: rgba(11,15,20,.97);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: .75rem;
  padding: .5rem;
  min-width: 260px;
  max-height: 70vh;
  overflow: auto;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
  z-index: 3000;
}
@media (hover:hover){
  .site-header .primary-nav li:hover   > ul.sub-menu,
  .site-header .primary-nav li:focus-within > ul.sub-menu{
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}
@media (max-width: 900px){
  .site-header .primary-nav ul.sub-menu{
    position: static;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0 .25rem .25rem;
    max-height: none;
    overflow: visible;
  }
  .site-header .primary-nav li.open > ul.sub-menu{
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  .site-header .primary-nav .menu > li > a{
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.1rem 1.5rem;
  }
  .site-header .primary-nav .menu .menu-item-has-children > a::after{
    content: "▸"; margin-left: .5rem; transition: transform .2s;
  }
  .site-header .primary-nav .menu > li.open > a::after{ transform: rotate(90deg); }
}
.site-header{ z-index: 3500; }

