/* East Wisdoms redesign — typography fallback + polish */

body.elementor-template-canvas,
body.page-template-elementor_canvas,
body.elementor-page {
  background-color: #F7F3ED;
}

/* Site-wide paper background for Astra / Elementor inner pages */
body,
body.ast-separate-container,
body.ast-plain-container,
.site,
#page,
#content,
.site-content,
.ast-container,
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single,
.ast-separate-container .comment-respond,
.woocommerce-page #content,
.woocommerce #content,
.woocommerce-page .site-content,
.single-product .site-content {
  background-color: #F7F3ED !important;
  background-image: none;
}

.ew-header,
.ew-hero,
.ew-books,
.ew-essays,
.ew-footer,
.ew-about,
.ew-contact,
.ew-archive,
.ew-single {
  background-color: #F7F3ED;
}

.ew-header a,
.ew-footer a,
.ew-hero a,
.ew-essays a,
.ew-books a,
.ew-about a,
.ew-contact a,
.ew-archive a,
.ew-single a {
  text-decoration: none;
}

/* Quiet typography on inner pages / Theme Builder docs */
.ew-about .elementor-heading-title,
.ew-contact .elementor-heading-title,
.ew-archive .elementor-heading-title,
.ew-single .elementor-heading-title,
.elementor-location-archive .elementor-heading-title,
.elementor-location-single .elementor-heading-title {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  color: #141513;
}

.ew-about .elementor-widget-text-editor,
.ew-contact .elementor-widget-text-editor,
.ew-archive .elementor-widget-text-editor,
.ew-single .elementor-widget-theme-post-content,
.elementor-location-single .elementor-widget-theme-post-content,
.elementor-location-archive .elementor-post__excerpt {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  color: #4A322C;
}

/* Hide leftover Astra sidebars on archives / blog / single posts (not Woo shop) */
body.archive:not(.woocommerce) .widget-area,
body.blog .widget-area,
body.single-post .widget-area,
body.search:not(.woocommerce) .widget-area,
.elementor-location-archive .widget-area,
.elementor-location-single .widget-area {
  display: none !important;
}
body.archive:not(.woocommerce) #primary,
body.blog #primary,
body.single-post #primary,
body.search:not(.woocommerce) #primary,
.elementor-location-archive #primary,
.elementor-location-single #primary {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  float: none !important;
}

/* Archive cards: calm list, paper separators */
.ew-archive-posts .elementor-post,
.elementor-location-archive .elementor-post {
  background: transparent;
  border-bottom: 1px solid #C9C3BA;
  padding: 28px 0 32px;
  box-shadow: none;
}
.ew-archive-posts .elementor-post:last-child,
.elementor-location-archive .elementor-post:last-child {
  border-bottom: 0;
}
.ew-archive-posts .elementor-post__title,
.elementor-location-archive .elementor-post__title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
}
.ew-archive-posts .elementor-post__meta-data,
.elementor-location-archive .elementor-post__meta-data {
  color: #4E5E56;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 14px;
}
.ew-archive-posts .elementor-post__read-more,
.elementor-location-archive .elementor-post__read-more {
  color: #3E5248;
  font-family: "Source Serif 4", Georgia, serif;
}

/* Single post content measure */
.ew-post-content,
.ew-single .elementor-widget-theme-post-content {
  max-width: 760px;
}
.ew-post-content p,
.ew-single .elementor-widget-theme-post-content p {
  margin-bottom: 1.15em;
}
.ew-post-meta {
  color: #4E5E56;
}
.ew-post-nav a {
  color: #4A322C;
}

/* Contact / Elementor Pro form */
.ew-contact-form .elementor-field-group {
  margin-bottom: 4px;
}
.ew-contact-form .elementor-field-label,
.elementor-widget-form .elementor-field-label {
  font-family: "Source Serif 4", Georgia, serif;
  color: #4A322C;
}
.ew-contact-form .elementor-field,
.elementor-widget-form .elementor-field {
  background: #FFFDF9;
  border: 1px solid #C9C3BA;
  color: #4A322C;
  font-family: "Source Serif 4", Georgia, serif;
  border-radius: 3px;
}
.ew-contact-form .elementor-button,
.elementor-widget-form .elementor-button {
  background-color: #C02C2C;
  color: #F7F3ED;
  border: 0;
  font-family: "Source Serif 4", Georgia, serif;
  border-radius: 5px;
}
.ew-contact-form .elementor-button:hover,
.elementor-widget-form .elementor-button:hover {
  background-color: #9A2222;
  color: #F7F3ED;
}

/* WPForms polish (subscribe / any leftover forms) */
.wpforms-container .wpforms-field-label,
.wpforms-container input,
.wpforms-container textarea,
.wpforms-container select {
  font-family: "Source Serif 4", Georgia, serif;
  color: #4A322C;
}
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container textarea {
  background: #FFFDF9;
  border: 1px solid #C9C3BA;
  border-radius: 3px;
}
.wpforms-container button[type="submit"],
.wpforms-submit {
  background-color: #C02C2C !important;
  border-color: #C02C2C !important;
  color: #F7F3ED !important;
  font-family: "Source Serif 4", Georgia, serif;
  border-radius: 5px;
}

/* WooCommerce shop: paper + quiet chrome, don't rebuild catalog */
.woocommerce-page .woocommerce-products-header__title,
.woocommerce .woocommerce-products-header__title,
.woocommerce div.product .product_title {
  font-family: "Playfair Display", Georgia, serif;
  color: #141513;
}
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  background: transparent;
}
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  background-color: #426756;
  color: #F7F3ED;
  border-radius: 5px;
  font-family: "Source Serif 4", Georgia, serif;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background-color: #2F4E40;
  color: #F7F3ED;
}

/* Nav: vermilion underline on the current item */
.ew-header .elementor-nav-menu .current-menu-item > a,
.ew-header .elementor-nav-menu .current_page_item > a,
.ew-header .elementor-item-active,
.ew-nav .elementor-nav-menu--main .elementor-item.elementor-item-active {
  /* pointer color is also set in the widget */
}

/* Search icon stays a compact glyph */
.ew-search-icon img,
.ew-search-icon .elementor-image img {
  width: 18px;
  height: 18px;
}

/* Hero landscape should bleed and fade (image already has a paper fade) */
.ew-hero {
  overflow: hidden;
}
.ew-hero-art .elementor-widget-image,
.ew-hero-img img,
.ew-hero-art img {
  width: 100%;
  height: auto;
  max-width: none;
}

/* Book covers keep their drop shadow (PNG alpha) */
.ew-book-cover img {
  background: transparent;
}

/* Quote bar: bamboo sits on the left, quote stays centered on the full bar */
.ew-quote {
  position: relative;
  overflow: hidden;
  background-color: #E6E8E0;
}
.ew-quote-inner {
  position: relative;
}
.ew-bamboo,
.ew-quote .ew-bamboo {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 300px !important;
  max-width: 32%;
  z-index: 0;
  pointer-events: auto;
  margin: 0 !important;
}
.ew-bamboo img,
.ew-bamboo .elementor-widget-container,
.ew-bamboo .elementor-image {
  height: 100%;
}
.ew-bamboo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}
.ew-quote-copy {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Footer brand divider, matching the mockup */
.ew-footer-brand {
  position: relative;
}
@media (min-width: 768px) {
  .ew-footer-brand::after {
    content: "";
    position: absolute;
    right: 8px;
    top: 4px;
    height: 72px;
    width: 1px;
    background: #C9C3BA;
  }
}

/* Language + legal links inherit the warm ink color */
.ew-header-tools a,
.ew-footer-meta a,
.ew-footer a {
  color: inherit;
}

@media (max-width: 767px) {
  .ew-bamboo,
  .ew-quote .ew-bamboo {
    width: 160px !important;
    max-width: 45%;
    opacity: 0.9;
  }
  .ew-hero-copy {
    max-width: 100%;
  }
}

/* Nav item spacing: Elementor did not emit --e-nav-menu-horizontal-menu-item-margin */
.ew-header .elementor-nav-menu--layout-horizontal {
  --e-nav-menu-horizontal-menu-item-margin: 14px;
}
.ew-header .elementor-nav-menu--main.elementor-nav-menu--layout-horizontal .elementor-nav-menu {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
}
.ew-header .elementor-nav-menu--layout-horizontal .elementor-nav-menu > li:not(:first-child) > a {
  margin-inline-start: 14px;
}
.ew-header .elementor-nav-menu--layout-horizontal .elementor-nav-menu > li:not(:last-child) > a {
  margin-inline-end: 14px;
}


/* When the redesign header/footer are in use, hide leftover Astra/theme chrome */
body.ew-has-custom-chrome #ast-desktop-header,
body.ew-has-custom-chrome #ast-mobile-header,
body.ew-has-custom-chrome .ast-main-header-wrap,
body.ew-has-custom-chrome #colophon,
body.ew-has-custom-chrome .ast-header-break-point #ast-mobile-header {
  display: none !important;
}


body.ew-has-custom-chrome footer.site-footer,
body.ew-has-custom-chrome .site-above-footer-wrap,
body.ew-has-custom-chrome .site-primary-footer-wrap,
body.ew-has-custom-chrome .site-below-footer-wrap,
body.ew-has-custom-chrome .ast-footer-copyright,
body.ew-has-custom-chrome .ast-footer-social-wrap {
  display: none !important;
}

.ew-theme-document.ew-inner {
  background-color: #F7F3ED;
  color: #4A322C;
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 96px;
  font-family: "Source Serif 4", "Source Serif Pro", Georgia, serif;
}
.ew-archive-title,
.ew-single-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: 42px;
  line-height: 1.2;
  color: #4A322C;
  margin: 0 0 16px;
}
.ew-archive-header {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #C9C3BA;
}
.ew-archive-desc,
.ew-single-meta,
.ew-archive-item-meta {
  font-size: 15px;
  color: #4E5E56;
  margin: 0 0 16px;
}
.ew-archive-item {
  padding: 28px 0;
  border-bottom: 1px solid #E0DAD1;
}
.ew-archive-item-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.3;
  margin: 0 0 8px;
}
.ew-archive-item-title a,
.ew-read-more,
.ew-post-nav a,
.ew-single-cats a {
  color: #4A322C;
  text-decoration: none;
}
.ew-archive-item-title a:hover,
.ew-read-more:hover,
.ew-post-nav a:hover,
.ew-single-cats a:hover {
  color: #C02C2C;
}
.ew-archive-item-excerpt {
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 12px;
}
.ew-read-more {
  font-size: 16px;
}
.ew-single-content {
  font-size: 18px;
  line-height: 1.8;
}
.ew-single-content p {
  margin: 0 0 1.1em;
}
.ew-single-content img {
  max-width: 100%;
  height: auto;
}
.ew-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #C9C3BA;
  font-size: 16px;
}
.ew-post-nav-prev,
.ew-post-nav-next {
  flex: 1;
}
.ew-post-nav-next {
  text-align: right;
}
.ew-theme-document .nav-links,
.ew-theme-document .pagination {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 48px;
  font-family: "Source Serif 4", Georgia, serif;
}
.ew-theme-document .nav-links a,
.ew-theme-document .page-numbers {
  color: #4A322C;
  text-decoration: none;
}
