:root {
  --epc-ink: #18231e;
  --epc-ink-soft: #66716a;
  --epc-forest-900: #0f2f23;
  --epc-forest-800: #144232;
  --epc-gold: #d3ab65;
  --epc-gold-deep: #bf9654;
  --epc-paper: #efe9dc;
  --epc-white: #ffffff;
}

html,
body {
  background: var(--epc-paper);
  color: var(--epc-ink);
  font-family: "Outfit", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.wpb_wrapper h1,
.wpb_wrapper h2,
.wpb_wrapper h3 {
  font-family: "DM Serif Display", serif;
  color: var(--epc-ink);
  letter-spacing: -0.02em;
}

a {
  color: var(--epc-forest-800);
}

a:hover {
  color: var(--epc-gold-deep);
}

.btn,
button:not(.epc-home-acf__cat-btn):not(.pswp__button):not(.epc-header-search),
input[type="submit"],
.single_add_to_cart_button,
.woocommerce a.button,
.woocommerce button.button {
  border-radius: 4px !important;
  border: 0;
  background: var(--epc-gold) !important;
  color: var(--epc-ink) !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.btn:hover,
button:not(.epc-home-acf__cat-btn):not(.pswp__button):not(.epc-header-search):hover,
input[type="submit"]:hover,
.single_add_to_cart_button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
  background: var(--epc-gold-deep) !important;
}

/* Main shell: make header/footer match EPC aesthetic site-wide */
.header.epc-header {
  background: rgba(15, 47, 35, 0.9);
  backdrop-filter: blur(7px);
  box-shadow: none !important;
  border-bottom: 0 !important;
}

/* main.min.css sets .header.epc-header.scrolled to white — keep forest green when scrolled */
.header.epc-header.scrolled {
  background: rgba(15, 47, 35, 0.97);
  backdrop-filter: blur(7px);
  box-shadow: none !important;
  border-bottom: 0 !important;
}

.header.epc-header .header-main {
  padding: 0;
}

.header.epc-header .epc-header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.header.epc-header .epc-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
}

.header.epc-header .epc-brand__everyday {
  font-family: "DM Serif Display", serif;
  font-size: 28px;
  line-height: 1;
  color: #fff;
}

.header.epc-header .epc-brand__petcages {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--epc-gold);
}

/* Desktop-only: do not apply to mobile — off-canvas nav in main.min.css uses position:fixed */
@media (min-width: 969px) {
  .header.epc-header .nav a,
  .header.epc-header .nav-link-with-arrow {
    color: rgba(255, 255, 255, 0.9);
    font-family: "Outfit", sans-serif;
    font-size: 13px;
    font-weight: 500;
  }

  .header.epc-header .epc-nav {
    position: relative;
    inset: auto;
    display: flex !important;
    align-items: center;
    gap: 22px;
    margin-left: auto;
    backdrop-filter: none;
    background: transparent;
    border-bottom: none;
  }

  .header.epc-header .nav a::after {
    background: var(--epc-gold);
  }

  .header.epc-header .nav a:hover,
  .header.epc-header .nav-link-with-arrow:hover {
    color: var(--epc-gold);
  }
}

.header.epc-header .nav .nav-item-with-mega svg {
  display: none;
}

/* Drawer / touch: readable links on white panel (when open); hidden off-screen when closed */
@media (max-width: 968px) {
  .header.epc-header .nav a,
  .header.epc-header .nav-link-with-arrow {
    color: var(--epc-ink);
    font-family: "Outfit", sans-serif;
    font-size: 15px;
    font-weight: 500;
  }

  .header.epc-header .nav a::after {
    display: none;
  }

  .header.epc-header .nav a:hover,
  .header.epc-header .nav-link-with-arrow:hover {
    color: var(--epc-forest-800);
  }

  .header.epc-header .header-content {
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
  }

  .header.epc-header .epc-brand {
    flex: 1;
    min-width: 0;
    margin-right: auto;
  }

  .header.epc-header .header-actions {
    flex-shrink: 0;
    margin-left: 0;
    margin-inline-start: 0;
  }
}

.header.epc-header .cart-icon {
  background: transparent;
  color: #fff;
}

.header.epc-header .epc-cart-button {
  background: var(--epc-gold);
  color: var(--epc-ink);
  border-radius: 4px;
  min-width: 82px;
  height: 34px;
  padding: 0 10px;
  gap: 6px;
}

.header.epc-header .epc-cart-button span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.header.epc-header .cart-count {
  background: var(--epc-forest-800);
  color: #fff;
}

.header.epc-header .epc-header-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: transparent !important;
  color: var(--epc-white);
  cursor: pointer;
  transition: background 0.2s ease;
}

.header.epc-header .epc-header-search:hover {
  background: rgba(255, 255, 255, 0.12) !important;
}

.header.epc-header .epc-header-search .fa {
  font-size: 20px;
  line-height: 1;
}

.header.epc-header .menu-toggle {
  color: var(--epc-white);
  margin-left: 8px;
}

.header.epc-header .header-actions {
  margin-left: 16px;
  margin-right: 0;
  margin-inline-start: 16px;
  margin-inline-end: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 968px) {
  .header.epc-header .epc-brand__everyday {
    font-size: 22px;
  }

  .header.epc-header .epc-header-inner {
    min-height: 56px;
    gap: 12px;
  }

  /* Mobile nav is a slide-in drawer (main.min.css); do not force display:none here */
}

@media (max-width: 768px) {
  .header.epc-header .epc-header-inner {
    min-height: 52px;
    gap: 10px;
  }

  .header.epc-header .epc-brand__everyday {
    font-size: 20px;
  }

  .header.epc-header .epc-brand__petcages {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .header.epc-header .epc-cart-button {
    min-width: 0;
    height: 32px;
    padding: 0 8px;
    gap: 4px;
  }

  .header.epc-header .epc-cart-button span {
    font-size: 10px;
  }

  .header.epc-header .menu-toggle {
    width: 28px;
    height: 28px;
    padding: 0;
    margin-left: 4px;
  }

  .header.epc-header .epc-header-search {
    width: 28px;
    height: 28px;
  }

  .header.epc-header .epc-header-search .fa {
    font-size: 18px;
  }

  .header.epc-header .menu-toggle svg {
    width: 18px;
    height: 18px;
  }

  .header.epc-header .header-actions {
    gap: 6px;
    margin-left: 8px;
    margin-inline-start: 8px;
  }
}

@media (max-width: 480px) {
  .header.epc-header .epc-header-inner {
    min-height: 48px;
    gap: 8px;
  }

  .header.epc-header .epc-brand {
    gap: 4px;
  }

  .header.epc-header .epc-brand__everyday {
    font-size: 18px;
  }

  .header.epc-header .epc-brand__petcages {
    font-size: 9px;
    letter-spacing: 0.06em;
  }

  .header.epc-header .epc-cart-button {
    height: 30px;
    padding: 0 6px;
  }
}

.footer.epc-footer {
  background: oklch(0.12 0.03 148);
  color: rgba(255, 255, 255, 0.74);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer.epc-footer .footer-main {
  padding: 56px 0;
}

.footer.epc-footer .footer-section h3 {
  color: #fff;
  font-family: "DM Serif Display", serif;
}

.footer.epc-footer .footer-section a {
  color: rgba(255, 255, 255, 0.7);
}

.footer.epc-footer .footer-section a:hover {
  color: var(--epc-gold);
}

.footer.epc-footer .footer-bottom {
  background: rgba(0, 0, 0, 0.2);
}

/* Page content surfaces */
#primary.site-main > .container {
  width: min(1320px, calc(100% - 44px));
}

#primary.site-main article,
#primary.site-main .entry-content > * {
  border-radius: 8px;
}

#primary.site-main .title h1 {
  font-size: clamp(32.4px, 4.5vw, 55.8px);
}

.woocommerce ul.products li.product,
.woocommerce div.product,
.product__tile,
.product-feed-outer .product {
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

input,
select,
textarea {
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #fff;
}

/* Override legacy global blue table header */
table thead,
.woocommerce table.shop_table thead,
.woocommerce-page table.shop_table thead {
  background: #163a2d !important;
  color: #fff !important;
}

table thead th,
.woocommerce table.shop_table thead th,
.woocommerce-page table.shop_table thead th {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Slide-out EPC side cart */
.cart-popup {
  position: fixed;
  inset: 0;
  z-index: 11000;
  pointer-events: none;
}

.cart-popup .cart-popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cart-popup .cart-popup-content {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(430px, 100%);
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.cart-popup.active {
  pointer-events: auto;
}

.cart-popup.active .cart-popup-overlay {
  opacity: 1;
}

.cart-popup.active .cart-popup-content {
  transform: translateX(0);
}

.cart-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.09);
}

.cart-popup-header h3 {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-size: 28px;
  color: var(--epc-ink);
}

.cart-popup-close {
  border: 0;
  background: transparent !important;
  color: var(--epc-ink) !important;
  font-size: 30px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.cart-popup-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

#cart-items {
  flex: 1;
  overflow: auto;
  padding: 14px 20px;
}

.cart-item {
  display: grid;
  grid-template-columns: 66px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cart-item-image {
  width: 66px;
  height: 66px;
  border-radius: 6px;
  overflow: hidden;
  background: #f2f5f2;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--epc-ink);
}

.cart-item-price {
  color: var(--epc-forest-800);
  font-weight: 700;
}

.cart-item-quantity {
  font-size: 12px;
  color: var(--epc-ink-soft);
}

.cart-item-remove {
  border: 0;
  background: transparent !important;
  color: var(--epc-ink-soft) !important;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.cart-popup-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.09);
  padding: 16px 20px 20px;
  background: #fff;
}

.cart-subtotal {

  color: var(--epc-ink);
}

.cart-subtotal #cart-subtotal {
  font-weight: 700;
}

.cart-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cart-actions .btn,
.cart-actions a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.cart-actions .btn-secondary {
  background: transparent !important;
  color: var(--epc-ink) !important;
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
}

.cart-actions .btn-primary {
  background: var(--epc-gold) !important;
  color: var(--epc-ink) !important;
}

.cart-empty {
  padding: 36px 12px;
  text-align: center;
}

.cart-empty p {
  color: var(--epc-ink-soft);
}

/* Product category archive — ACF / legacy FAQs */
.product-cat-faq {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.product-cat-faq__inner {
  max-width: 720px;
}

.product-cat-faq__title {
  margin: 0 0 20px;
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--epc-ink);
}

.product-cat-faq__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-cat-faq__item {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.product-cat-faq__summary {
  cursor: pointer;
  padding: 14px 18px;
  font-family: "Outfit", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--epc-ink);
  list-style: none;
}

.product-cat-faq__summary::-webkit-details-marker {
  display: none;
}

.product-cat-faq__answer {
  padding: 0 18px 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--epc-ink-soft);
}

.product-cat-faq__answer p:last-child {
  margin-bottom: 0;
}
