/* ==========================================================================
   AMERICA'S MARKETING GROUP — THEME EXTENSIONS
   Components added on top of the ported prototype stylesheet (main.css):
   WordPress core classes, FAQ, newsletter, blog, 404, and shared UI.
   Commerce lives in woocommerce.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Accessibility helpers
   -------------------------------------------------------------------------- */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #fff;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: var(--color-primary);
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  height: auto;
  left: 1rem;
  line-height: normal;
  padding: 1rem 1.5rem;
  text-decoration: none;
  top: 1rem;
  width: auto;
  z-index: 100000;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

/* Every interactive element gets a visible, consistent focus ring. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Honeypot field — hidden from people, reachable by bots. */
.amg-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   2. Shared layout
   -------------------------------------------------------------------------- */
.site-main {
  min-height: 40vh;
}

.container-narrow {
  max-width: 860px;
}

.page-hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.page-hero-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.page-hero-desc {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 680px;
  margin: 0 auto;
}

.page-hero-search {
  max-width: 520px;
  margin: 1.5rem auto 0;
}

.content-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  padding-bottom: 5rem;
}

body.has-sidebar .content-with-sidebar {
  grid-template-columns: minmax(0, 1fr) 300px;
}

/* --------------------------------------------------------------------------
   3. Buttons — additional states beyond the base
   -------------------------------------------------------------------------- */
.btn:disabled,
.btn.is-loading,
.btn[aria-disabled='true'] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: var(--shadow-sm) !important;
}

.btn-ghost {
  background-color: transparent;
  border-color: transparent;
  color: var(--color-primary);
  box-shadow: none;
}

.btn-ghost:hover {
  background-color: var(--color-bg-alt);
  color: var(--color-accent);
}

.btn-lg {
  font-size: 1.1rem;
  padding: 1rem 2.25rem;
}

/* Loading spinner inside a button. */
.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  margin-left: 0.6rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: amg-spin 0.7s linear infinite;
}

.btn.is-loading .btn-spinner {
  display: inline-block;
}

@keyframes amg-spin {
  to {
    transform: rotate(360deg);
  }
}

.amg-text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--color-accent);
}

.amg-text-link svg {
  transition: transform var(--transition-normal);
}

.amg-text-link:hover svg {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   4. Header additions — cart button, mobile nav
   -------------------------------------------------------------------------- */
.main-nav {
  display: flex;
  align-items: center;
}

/* The nav markup uses <a class="nav-link"><span class="nav-link-text">. */
.nav-link-text {
  pointer-events: none;
}

/* WordPress menu items carry .menu-item classes; inherit the nav-link look. */
.nav-menu li a {
  font-weight: 600;
  font-size: 0.975rem;
  color: var(--color-primary);
  padding: 0.5rem 0;
  position: relative;
  display: inline-block;
}

.nav-menu li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width var(--transition-normal);
}

.nav-menu li a:hover {
  color: var(--color-accent);
}

.nav-menu li a:hover::after,
.nav-menu li.current-menu-item > a::after {
  width: 100%;
}

.nav-menu li.current-menu-item > a {
  color: var(--color-accent);
}

.amg-cart-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  color: var(--color-primary);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.amg-cart-toggle:hover {
  background-color: var(--color-bg-alt);
  color: var(--color-accent);
}

.amg-cart-count {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
}

.amg-cart-count.is-empty {
  display: none;
}

/* --------------------------------------------------------------------------
   5. Scroll reveal
   -------------------------------------------------------------------------- */
.amg-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--amg-delay, 0ms);
}

.amg-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* No JS, or reduced motion: content must always be visible. */
.no-js .amg-reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .amg-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   6. Icon wrappers
   Base stylesheet sizes .checkmark-icon / .info-icon as the SVG itself; the
   theme wraps them in a span, so support both shapes.
   -------------------------------------------------------------------------- */
span.checkmark-icon,
span.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

span.checkmark-icon svg,
span.info-icon svg {
  width: 100%;
  height: 100%;
}

.service-icon-box svg,
.why-icon svg {
  width: 26px;
  height: 26px;
}

/* --------------------------------------------------------------------------
   7. Hero additions
   -------------------------------------------------------------------------- */
.card-header-status {
  font-size: 0.75rem;
  opacity: 0.85;
}

.metric-number.metric-accent {
  color: var(--color-accent);
}

.metric-number.metric-primary {
  color: var(--color-primary);
}

.hero-image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   8. FAQ accordion
   -------------------------------------------------------------------------- */
.faq-section {
  padding: var(--spacing-xxl) 0;
  background-color: var(--color-bg-light);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background-color: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.faq-item[open] {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
  cursor: pointer;
  list-style: none;
  transition: color var(--transition-fast);
}

/* Hide the native disclosure triangle in every engine. */
.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::marker {
  content: '';
}

.faq-question:hover {
  color: var(--color-accent);
}

.faq-chevron {
  flex-shrink: 0;
  display: inline-flex;
  color: var(--color-accent);
  transition: transform var(--transition-normal);
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem 1.35rem;
  color: var(--color-text-body);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   9. Newsletter
   -------------------------------------------------------------------------- */
.newsletter-section {
  padding: var(--spacing-xl) 0;
}

.newsletter-card {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-xl);
}

.newsletter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.newsletter-title {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #fff;
}

.newsletter-text {
  color: #cbd5e1;
  max-width: 520px;
  margin: 0 auto 2rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 520px;
  margin: 0 auto;
}

.newsletter-form .form-input {
  flex: 1;
  margin: 0;
}

/* --------------------------------------------------------------------------
   10. Blog
   -------------------------------------------------------------------------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.post-card-thumb {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background-color: var(--color-bg-alt);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.05);
}

.post-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.75rem;
}

.post-card-cat {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-accent);
  background-color: var(--color-accent-light);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.9rem;
}

.post-card-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.post-card-title a:hover {
  color: var(--color-accent);
}

.post-card-excerpt {
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 1.1rem;
  border-top: 1px solid var(--color-border);
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-light);
  font-weight: 600;
}

.meta-sep {
  opacity: 0.5;
}

/* Single post */
.single-post,
.single-page {
  padding-bottom: 2rem;
}

.entry-header {
  padding: 2.5rem 0 1.75rem;
}

.entry-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.entry-thumbnail {
  margin-bottom: 2.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.entry-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-text-body);
}

.entry-content > * + * {
  margin-top: 1.5rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.3;
  margin-top: 2.5rem;
}

.entry-content h2 {
  font-size: 1.85rem;
  font-weight: 800;
}

.entry-content h3 {
  font-size: 1.45rem;
  font-weight: 700;
}

.entry-content h4 {
  font-size: 1.2rem;
  font-weight: 700;
}

.entry-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entry-content a:hover {
  color: var(--color-accent-hover);
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.4rem;
}

.entry-content li + li {
  margin-top: 0.5rem;
}

.entry-content blockquote {
  border-left: 4px solid var(--color-accent);
  background-color: var(--color-bg-light);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--color-primary);
}

.entry-content img,
.entry-content figure {
  border-radius: var(--radius-md);
  max-width: 100%;
  height: auto;
}

.entry-content code {
  background-color: var(--color-bg-alt);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

.entry-content pre {
  background-color: var(--color-text-main);
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
}

.entry-tags a {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background-color: var(--color-bg-alt);
  color: var(--color-text-muted);
}

.entry-tags a:hover {
  background-color: var(--color-accent-light);
  color: var(--color-accent);
}

/* Post navigation */
.post-navigation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 3rem 0;
}

.post-navigation a {
  display: block;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-bg-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.post-navigation a:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

.nav-sub {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-accent);
  margin-bottom: 0.35rem;
}

.nav-title {
  font-weight: 700;
  color: var(--color-primary);
}

/* Pagination */
.pagination,
.woocommerce-pagination {
  display: flex;
  justify-content: center;
  margin-top: 3.5rem;
}

.pagination .nav-links,
.woocommerce-pagination ul {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  border: 0;
}

.woocommerce-pagination li {
  border: 0;
}

.pagination .page-numbers,
.woocommerce-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-white);
  font-weight: 700;
  color: var(--color-primary);
  transition: all var(--transition-fast);
}

.pagination .page-numbers:hover,
.woocommerce-pagination .page-numbers:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.pagination .page-numbers.current,
.woocommerce-pagination .page-numbers.current {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* --------------------------------------------------------------------------
   11. Sidebar & widgets
   -------------------------------------------------------------------------- */
.widget-area {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.widget {
  background-color: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-accent);
}

.widget ul {
  list-style: none;
}

.widget li + li {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--color-border);
}

.widget a:hover {
  color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   12. Search form
   -------------------------------------------------------------------------- */
.amg-search-form {
  display: flex;
  gap: 0.6rem;
}

.amg-search-form .form-input {
  flex: 1;
  margin: 0;
}

/* --------------------------------------------------------------------------
   13. Breadcrumbs
   -------------------------------------------------------------------------- */
.amg-breadcrumbs {
  margin-bottom: 1.25rem;
}

.amg-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.page-hero .amg-breadcrumbs ol {
  justify-content: center;
}

.amg-breadcrumbs li + li::before {
  content: '/';
  margin-right: 0.5rem;
  color: var(--color-text-light);
}

.amg-breadcrumbs a {
  font-weight: 600;
  color: var(--color-text-muted);
}

.amg-breadcrumbs a:hover {
  color: var(--color-accent);
}

.amg-breadcrumbs [aria-current='page'] {
  font-weight: 700;
  color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   14. Forms — validation states
   -------------------------------------------------------------------------- */
.required {
  color: var(--color-accent);
}

.form-error {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: #dc2626;
}

.form-error.is-visible {
  display: block;
}

.form-input.has-error,
.form-textarea.has-error {
  border-color: #dc2626;
  background-color: #fef2f2;
}

.form-response {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  display: none;
}

.form-response.is-success {
  display: block;
  background-color: #f0fdf4;
  border: 1px solid #86efac;
  color: #15803d;
}

.form-response.is-error {
  display: block;
  background-color: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
}

/* --------------------------------------------------------------------------
   15. 404
   -------------------------------------------------------------------------- */
.error-404 {
  text-align: center;
  padding: 5rem 0 6rem;
  max-width: 620px;
  margin: 0 auto;
}

.error-404-code {
  font-family: var(--font-heading);
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 800;
  line-height: 1;
  color: var(--color-accent);
  opacity: 0.18;
  letter-spacing: -0.04em;
}

.error-404-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: -1rem 0 1rem;
}

.error-404-text {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.error-404-search {
  max-width: 460px;
  margin: 0 auto 2rem;
}

.error-404-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.error-404-help {
  margin-top: 2rem;
  color: var(--color-text-muted);
}

.error-404-help a {
  font-weight: 700;
  color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   16. No results
   -------------------------------------------------------------------------- */
.no-results {
  text-align: center;
  padding: 4rem 1rem;
  background-color: var(--color-bg-light);
  border-radius: var(--radius-lg);
}

.no-results-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.no-results p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.no-results .amg-search-form {
  max-width: 420px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   17. Comments
   -------------------------------------------------------------------------- */
.comments-area {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
}

.comments-title,
.comment-reply-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 1.75rem;
}

.comment-list {
  list-style: none;
  margin-bottom: 3rem;
}

.comment-list ol {
  list-style: none;
  padding-left: 2rem;
}

.comment-body {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-bg-white);
  margin-bottom: 1rem;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.comment-author img {
  border-radius: 50%;
}

.comment-metadata {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-bottom: 0.85rem;
}

.comment-form .form-input,
.comment-form textarea,
.comment-form input[type='text'],
.comment-form input[type='email'],
.comment-form input[type='url'] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-bg-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.comment-form textarea:focus,
.comment-form input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--amg-accent-rgb, 217, 58, 43), 0.12);
}

.comment-form p {
  margin-bottom: 1.15rem;
}

.comment-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

/* --------------------------------------------------------------------------
   18. Toast
   -------------------------------------------------------------------------- */
.amg-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 140%);
  z-index: 2000;
  max-width: calc(100vw - 2rem);
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-md);
  background-color: var(--color-primary);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.amg-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.amg-toast.is-error {
  background-color: #b91c1c;
}

/* --------------------------------------------------------------------------
   19. Admin-only notices
   -------------------------------------------------------------------------- */
.amg-admin-notice {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.75rem;
  border: 2px dashed var(--color-border-hover);
  border-radius: var(--radius-lg);
  background-color: var(--color-bg-light);
  color: var(--color-text-muted);
  text-align: center;
}

.amg-admin-notice strong {
  color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   20. Footer additions
   -------------------------------------------------------------------------- */
.footer-leadership {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.footer-contact-line {
  margin-bottom: 0.5rem;
  color: #cbd5e1;
}

.footer-phone {
  margin-bottom: 0.5rem;
}

.footer-phone a {
  color: var(--color-accent);
  font-weight: 700;
}

.footer-hours {
  margin-bottom: 1rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

.footer-logo-link {
  display: inline-block;
  margin-bottom: 1.25rem;
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}

.footer-legal-links a {
  color: #64748b;
}

.footer-legal-links a:hover {
  color: var(--color-accent);
}

.footer-col .footer-links {
  list-style: none;
}

/* --------------------------------------------------------------------------
   21. Sticky buy bar
   -------------------------------------------------------------------------- */
.amg-sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.1);
  transform: translateY(110%);
  transition: transform var(--transition-normal);
}

.amg-sticky-bar.is-visible {
  transform: translateY(0);
}

.amg-sticky-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.amg-sticky-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.amg-sticky-name {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.amg-sticky-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-accent);
}

.amg-sticky-price del {
  opacity: 0.55;
  font-weight: 600;
  margin-right: 0.35rem;
}

/* --------------------------------------------------------------------------
   22. Trust badges
   -------------------------------------------------------------------------- */
.amg-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  margin-top: 1.5rem;
}

.amg-trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.amg-trust-badge svg {
  color: var(--color-accent);
  flex-shrink: 0;
}

.shop-trust {
  justify-content: center;
  padding: 2.5rem 0 4rem;
  border-top: 1px solid var(--color-border);
  margin-top: 3.5rem;
}

/* --------------------------------------------------------------------------
   23. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  body.has-sidebar .content-with-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-hero-title,
  .entry-title {
    font-size: 2.1rem;
  }
}

@media (max-width: 768px) {
  /* Mobile navigation drawer. */
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 1.5rem 2rem;
    background-color: var(--color-bg-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), transform var(--transition-normal),
      visibility var(--transition-normal);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu li {
    border-bottom: 1px solid var(--color-border);
  }

  .nav-menu li a {
    display: block;
    padding: 0.95rem 0;
    font-size: 1.05rem;
  }

  .nav-menu li a::after {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .header-cta-desktop {
    display: none;
  }

  /* Hamburger → X */
  .mobile-toggle[aria-expanded='true'] .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .mobile-toggle[aria-expanded='true'] .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .mobile-toggle[aria-expanded='true'] .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .page-hero {
    padding: 2.5rem 0 1.75rem;
  }

  .page-hero-title,
  .entry-title {
    font-size: 1.75rem;
  }

  .newsletter-card {
    padding: 2.25rem 1.5rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .amg-sticky-inner {
    gap: 1rem;
  }

  .amg-sticky-bar .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }

  .comment-list ol {
    padding-left: 1rem;
  }

  /* Sticky bar must not cover the footer content on mobile. */
  body.amg-has-sticky-bar {
    padding-bottom: 72px;
  }
}

@media (max-width: 480px) {
  .error-404-actions {
    flex-direction: column;
  }

  .error-404-actions .btn {
    width: 100%;
  }

  .amg-search-form {
    flex-direction: column;
  }
}
