/* =====================================================
   ZWG GLOBAL STYLES
   Brand base rules used across public ZWG pages and components.
   ===================================================== */

:root {
  --zwg-bg: #834a27;
  --zwg-box: #b5ad9d;
  --zwg-heading: #492811;
  --zwg-heading-hover: #492811;
  --zwg-light: #f4efe6;
  --zwg-dark: #2b2b2b;

  --zwg-heading-font: "Farmhand", serif;
  --zwg-body-font: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

/* Global page base */
body {
  background-color: var(--zwg-bg) !important;
  color: var(--zwg-dark);
  font-family: var(--zwg-body-font) !important;
}

/* Anything that is not a heading should default to Palatino */
body,
body p,
body li,
body a,
body span,
body div,
body button,
body input,
body textarea,
body select,
body table,
body td,
body th,
body label,
body legend,
body figcaption,
body blockquote,
body .entry-content,
body .site-content,
body .wp-block-button__link,
body .menu,
body .menu-item,
body .widget,
body .sidebar {
  font-family: var(--zwg-body-font) !important;
}

/* Headings use Farmhand */
body h1,
body h1 *,
body h2,
body h2 *,
body h3,
body h3 *,
body h4,
body h4 *,
body h5,
body h5 *,
body h6,
body h6 *,
body .page-title,
body .page-title *,
body .entry-title,
body .entry-title *,
body .wp-block-heading,
body .wp-block-heading *,
body .site-title,
body .site-title * {
  font-family: var(--zwg-heading-font) !important;
  color: var(--zwg-heading);
}

/* Standard heading/link hover brown */
body h1 a:hover,
body h2 a:hover,
body h3 a:hover,
body h4 a:hover,
body h5 a:hover,
body h6 a:hover,
body .entry-title a:hover,
body .page-title a:hover {
  color: var(--zwg-heading-hover) !important;
}

/* =====================================================
   ZWG SHARED BOX / CARD BASE
   Keeps page content areas consistent across the site.
   ===================================================== */

body .entry-content,
body .site-main,
body .content-area,
body .wp-block-group,
body .wp-block-column,
body .zwg-card,
body .zwg-box,
body .zwg-panel,
body .zwg-browser,
body .zwg-health-card,
body .zwg-truth-card {
  color: var(--zwg-dark);
}

/* Main branded content boxes */
body .zwg-card,
body .zwg-box,
body .zwg-panel,
body .zwg-browser,
body .zwg-health-card,
body .zwg-truth-card {
  background-color: var(--zwg-box);
  color: var(--zwg-dark);
}

/* Text inside branded boxes */
body .zwg-card p,
body .zwg-box p,
body .zwg-panel p,
body .zwg-browser p,
body .zwg-health-card p,
body .zwg-truth-card p,
body .zwg-card li,
body .zwg-box li,
body .zwg-panel li,
body .zwg-browser li,
body .zwg-health-card li,
body .zwg-truth-card li {
  color: var(--zwg-dark);
}

/* Links inside branded boxes */
body .zwg-card a,
body .zwg-box a,
body .zwg-panel a,
body .zwg-browser a,
body .zwg-health-card a,
body .zwg-truth-card a {
  color: var(--zwg-heading);
}

body .zwg-card a:hover,
body .zwg-box a:hover,
body .zwg-panel a:hover,
body .zwg-browser a:hover,
body .zwg-health-card a:hover,
body .zwg-truth-card a:hover {
  color: var(--zwg-heading-hover);
}

/* =====================================================
   ZWG SHARED DIVIDERS
   Use these instead of inline HR styling.
   ===================================================== */

body .zwg-divider {
  padding: 20px 0;
}

body .zwg-divider hr,
body hr.zwg-hr {
  border: 0;
  border-top: 2px solid var(--zwg-heading);
  margin: 0;
  opacity: 1;
}

/* Standard horizontal rules inside ZWG content */
body .entry-content hr,
body .zwg-card hr,
body .zwg-box hr,
body .zwg-panel hr,
body .zwg-browser hr,
body .zwg-health-card hr,
body .zwg-truth-card hr {
  border: 0;
  border-top: 2px solid var(--zwg-heading);
  margin: 24px 0;
  opacity: 1;
}

/* =====================================================
   ZWG SHARED BUTTONS
   Global button defaults for readable branded buttons.
   ===================================================== */

body button,
body input[type="button"],
body input[type="submit"],
body input[type="reset"],
body .button,
body .wp-block-button__link,
body a.button,
body .zwg-button,
body .zwg-btn {
  background-color: var(--zwg-heading-hover) !important;
  color: var(--zwg-light) !important;
  border: 2px solid var(--zwg-heading-hover) !important;
  border-radius: 8px;
  font-family: var(--zwg-body-font) !important;
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 18px;
  text-decoration: none !important;
  line-height: 1.2;
  cursor: pointer;
  display: inline-block;
  text-align: center;
}

body button:hover,
body input[type="button"]:hover,
body input[type="submit"]:hover,
body input[type="reset"]:hover,
body .button:hover,
body .wp-block-button__link:hover,
body a.button:hover,
body .zwg-button:hover,
body .zwg-btn:hover {
  background-color: var(--zwg-heading-hover) !important;
  color: var(--zwg-light) !important;
  border-color: var(--zwg-heading-hover) !important;
  text-decoration: none !important;
}

body button:focus,
body input[type="button"]:focus,
body input[type="submit"]:focus,
body input[type="reset"]:focus,
body .button:focus,
body .wp-block-button__link:focus,
body a.button:focus,
body .zwg-button:focus,
body .zwg-btn:focus {
  outline: 3px solid var(--zwg-light);
  outline-offset: 2px;
}

/* Preserve inline heading text without Gutenberg's default mark highlight. */
.wp-block-heading mark,
mark.has-inline-color.has-black-color {
  background-color: transparent !important;
  color: inherit !important;
}


/* 4. DOG BREED TRUTHS STYLING */

/* Breed Truth page title / H1 */
.single-dog_breed_truth h1.entry-title,
.single-dog_breed_truth .entry-title {
  font-family: 'Farmhand', cursive !important;
  font-size: 72px !important;
  line-height: 1 !important;
  text-align: center !important;
  margin: 0 0 18px !important;
  font-weight: 700 !important;
}

/* Force Breed Truth page title size */
body.single-dog_breed_truth h1,
body.single-dog_breed_truth .site-main h1,
body.single-dog_breed_truth article h1,
body.single-dog_breed_truth header h1,
body.single-dog_breed_truth .page-title,
body.single-dog_breed_truth .entry-title,
body.single-dog_breed_truth .post-title {
  font-family: 'Farmhand', cursive !important;
  font-size: 72px !important;
  line-height: 1 !important;
  letter-spacing: 0.04em !important;
  text-align: center !important;
  margin: 0 0 18px !important;
  font-weight: 700 !important;
}

@media (max-width: 768px) {
  .single-dog_breed_truth h1.entry-title,
  .single-dog_breed_truth .entry-title,
  body.single-dog_breed_truth h1,
  body.single-dog_breed_truth .site-main h1,
  body.single-dog_breed_truth article h1,
  body.single-dog_breed_truth header h1,
  body.single-dog_breed_truth .page-title,
  body.single-dog_breed_truth .entry-title,
  body.single-dog_breed_truth .post-title {
    font-size: 46px !important;
    line-height: 1.05 !important;
    letter-spacing: 0.03em !important;
    margin: 0 0 14px !important;
  }
}

.single-dog_breed_truth nav.further-reading,
.single-dog_breed_truth nav.further-reading .previous,
.single-dog_breed_truth nav.further-reading .next {
  display: none !important;
}

.single-dog_breed_truth .zwg-aka {
  color: #492811;
  font-weight: 700;
}

.single-dog_breed_truth h2,
.single-dog_breed_truth h3,
.single-dog_breed_truth h4 {
  font-family: 'Farmhand', cursive !important;
  font-weight: 700;
}

.single-dog_breed_truth .entry-content a {
  color: #834a27;
}

.single-dog_breed_truth .entry-content a:hover {
  color: #492811;
}

.single-dog_breed_truth .zwg-health-watch strong {
  font-style: italic;
}

/* Breed Snapshot color image - full divider width, natural ratio */
.single-dog_breed_truth .zwg-color-image-wrap {
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  text-align: left !important;
  overflow: visible !important;
}

.single-dog_breed_truth .zwg-color-image {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Breed Snapshot chart image - compact chart */
.single-dog_breed_truth .zwg-chart-image-wrap {
  width: 100%;
  text-align: left;
  margin: 0 0 18px;
}

.single-dog_breed_truth .zwg-chart-image {
  width: 100% !important;
  max-width: 420px !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 !important;
}

/* Mobile Breed Truth image adjustments */
@media (max-width: 768px) {
  .single-dog_breed_truth .zwg-color-image-wrap {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 1;
    height: auto;
    max-height: none;
    margin: 0 0 18px;
  }

  .single-dog_breed_truth .zwg-color-image {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
  }

  .single-dog_breed_truth .zwg-chart-image {
    width: 100% !important;
    max-width: 420px !important;
    height: auto !important;
  }
}

/* Mobile Breed Truth reading size */
@media (max-width: 768px) {
  .single-dog_breed_truth .entry-content {
    font-size: 20px !important;
    line-height: 1.55 !important;
  }

  .single-dog_breed_truth .entry-content p,
  .single-dog_breed_truth .entry-content li {
    font-size: 20px !important;
    line-height: 1.55 !important;
  }

  .single-dog_breed_truth .entry-content > p:first-of-type {
    font-size: 28px !important;
    line-height: 1.25 !important;
    margin: 0 0 14px !important;
  }
}

/* 5. DOG BREED TRUTHS BROWSER BOX */

.zwg-truths {
  width: 100%;
  max-width: 100%;
  margin: 1.25rem 0 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 2px solid #492811;
  border-radius: 12px;
  background: transparent;
  color: #2b2b2b;
}

.zwg-truths h2 {
  margin: 0 0 0.65rem;
  color: #492811 !important;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  line-height: 1.28;
  letter-spacing: 0.025em;
}

.zwg-truths p,
.zwg-truths label {
  color: #2b2b2b;
}

.zwg-t-help {
  margin: 0 0 0.8rem;
  color: #2b2b2b;
  font-size: 0.95rem;
}

.zwg-t-row {
  position: relative;
  margin: 0 0 0.9rem;
}

.zwg-t-row:last-child {
  margin-bottom: 0;
}

.zwg-t-input,
.zwg-t-select {
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.75rem;
  border: 1px solid #834a27;
  border-radius: 7px;
  background: #ffffff;
  color: #2b2b2b;
  font: inherit;
  outline: none;
}

.zwg-t-input::placeholder {
  color: #2b2b2b;
  opacity: 1;
}

.zwg-t-select:focus,
.zwg-t-input:focus {
  border-color: #834a27;
  outline: 2px solid #492811;
  outline-offset: 2px;
}

.zwg-t-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #492811;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(43, 43, 43, 0.14);
}

.zwg-t-results:empty {
  display: none;
}

.zwg-t-result-item {
  display: block;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid rgba(73, 40, 17, 0.2);
  background: #ffffff;
  color: #2b2b2b;
  font-size: 1rem;
  cursor: pointer;
}

.zwg-t-result-item:last-child {
  border-bottom: 0;
}

.zwg-t-result-item:hover,
.zwg-t-result-item:focus {
  background: #f4efe6;
}

/* 6. HEALTH GLOSSARY BROWSER BOX */

.zwg-health {
  max-width: 860px;
  margin: 1rem auto;
  padding: 1rem;
  border: 1px solid #834a27;
  border-radius: 10px;
  background: #834a27;
  color: #2b2b2b;
}

.zwg-health h2,
.zwg-health p,
.zwg-health label {
  color: #2b2b2b;
  margin: 0.25rem 0;
}

.zwg-h-row {
  margin: 0.5rem 0;
}

.zwg-h-input,
.zwg-h-select {
  width: 100%;
  max-width: 640px;
  padding: 0.55rem 0.65rem;
  border: 1px solid #834a27;
  border-radius: 8px;
  background: #b5ad9d;
  color: #2b2b2b;
  outline: none;
}

.zwg-h-input::placeholder {
  color: #2b2b2b;
}

.zwg-h-select:focus,
.zwg-h-input:focus {
  border-color: #834a27;
}

.zwg-h-help {
  font-size: 0.9rem;
  color: #2b2b2b;
  opacity: 0.9;
}

.zwg-h-results {
  margin-top: 0.35rem;
}

.zwg-h-result-item {
  display: block;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  background: #b5ad9d;
  color: #2b2b2b;
  font-size: 0.95rem;
  margin-bottom: 2px;
  cursor: pointer;
}

.zwg-h-result-item:hover {
  background: #d0c7b5;
}

/* 7. HEALTH GLOSSARY SINGLE LAYOUT */

.single-zwg_health .entry-content {
  max-width: 860px;
  margin: 1.5rem auto;
  padding: 2rem;
  background: #b5ad9d;
  border: 1px solid #834a27;
}

body.single-zwg_health .entry-meta,
body.single-zwg_health .post-meta,
body.single-zwg_health .posted-on,
body.single-zwg_health .byline,
body.single-zwg_health .entry-footer {
  display: none !important;
}

/* Hide date/meta line on Dog Breed Truth single pages */
body.single-dog_breed_truth time,
body.single-dog_breed_truth .posted-on,
body.single-dog_breed_truth .entry-meta {
  display: none;
}

/* WooCommerce format notes and delayed redirect message. */
.zwg-product-format-note {
  display: none;
  margin-top: 10px;
  font-style: italic;
}

.zwg-product-format-note.is-visible {
  display: block;
}

#zwg-redirect-msg {
  margin-top: 8px;
  color: #000000;
  font-family: Palatino, "Palatino Linotype", "Book Antiqua", serif;
  font-size: 14px;
  font-weight: 400;
}

/* =====================================================
   SITE-WIDE DESKTOP CONTENT WIDTH CORRECTION
   Author's wide-screen rule reserves an oversized right gutter. This final,
   later-loaded rule gives the main column equal gutters and lets the sand
   article canvas use the remaining width consistently on every standard page.
   ===================================================== */
@media (min-width: 71.875em) {
  body.zwg-global-layout .max-width > .main,
  body.zwg-global-layout .main {
    width: 77.77% !important;
    padding-top: 3em !important;
    padding-right: 4.25% !important;
    padding-bottom: 3em !important;
    padding-left: 4.25% !important;
  }

  body.zwg-global-layout .main > .loop-container,
  body.zwg-global-layout .main .loop-container,
  body.zwg-global-layout .main .entry,
  body.zwg-global-layout .main .entry article {
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }
}
