/* Veeta 6.8.27 — page chrome and account layout. All ticket rules are scoped. */
:root {
  --veeta-page-title-gap: 64px;
}
html { scroll-padding-top: var(--veeta-anchor-offset, 24px); }

/* A sticky header remains in normal flow: do not add its height a second time
   to <main>. WordPress itself reserves the admin toolbar's document space. */
@media (min-width: 1200px) {
  body.veeta-theme > .site-header { position: relative !important; top: auto; }
  body.veeta-theme.veeta-desktop-sticky-header > .site-header {
    position: sticky !important;
    top: var(--veeta-admin-bar-offset, 0px);
  }
  body.veeta-theme.admin-bar.veeta-desktop-sticky-header > .site-header {
    top: var(--veeta-admin-bar-offset, 32px);
  }
  html { scroll-padding-top: var(--veeta-anchor-offset, 260px); }
}

/* Shared first-title spacing; no route-specific header-height guesses. */
body.veeta-theme .site-main > :is(.page-hero, .reference-page-hero, .veeta-commerce-hero),
body.veeta-theme .site-main > article:first-child > :is(.reference-article-hero, .veeta-editorial-hero, .veeta-guide-single__hero),
body.veeta-theme .site-main > .woocommerce > .woocommerce-products-header {
  padding-top: var(--veeta-page-title-gap) !important;
}
body.veeta-theme .site-main > :is(.page-hero, .reference-page-hero, .veeta-commerce-hero) {
  margin-top: 0 !important;
}
body.veeta-theme .site-main > .veeta-page-breadcrumb,
body.veeta-theme .veeta-single-product > .veeta-product-breadcrumb {
  margin-top: var(--veeta-page-title-gap) !important;
}
body.veeta-theme .site-main :is(h1, h2, h3, h4, h5, h6)[id],
body.veeta-theme .site-main :is(section, article)[id] {
  scroll-margin-top: 12px;
}

/* Required page titles must not inherit invisible legacy heading styles. */
body.veeta-theme .site-main > :is(.page-hero, .reference-page-hero, .veeta-commerce-hero) h1:not(.screen-reader-text) {
  visibility: visible;
  opacity: 1;
  color: var(--veeta-ink, #0f0c0c);
}
/* Search stays a plain label, not a heading in the document outline. */
.veeta-search-form__heading { display: block; }

/* Source order is summary/H1, then gallery/benefits/H2. Preserve the original
   desktop columns and the existing mobile gallery → summary → benefits order. */
@media (min-width: 600px) {
  .veeta-product-top > .veeta-product-left-column { grid-column: 1; grid-row: 1; }
  .veeta-product-top > .veeta-product-right-column { grid-column: 2; grid-row: 1; }
}

/* One layout owner for the logged-in account; remove float-era clearfix nodes
   before making a wrapper a grid. Otherwise ::before occupies the first cell. */
body.veeta-account-logged-in .veeta-account-shell > .veeta-commerce-content > .woocommerce {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 32px;
  width: 100%;
  min-width: 0;
}
body.veeta-account-logged-in .veeta-account-shell > .veeta-commerce-content > .woocommerce::before,
body.veeta-account-logged-in .veeta-account-shell > .veeta-commerce-content > .woocommerce::after,
body.veeta-account-page :is(.woocommerce-Addresses, .woocommerce-columns--addresses)::before,
body.veeta-account-page :is(.woocommerce-Addresses, .woocommerce-columns--addresses)::after,
body.veeta-account-page .woocommerce-Address-title::before,
body.veeta-account-page .woocommerce-Address-title::after {
  content: none !important;
  display: none !important;
}
body.veeta-account-logged-in .veeta-account-shell .woocommerce-MyAccount-navigation {
  grid-column: 1;
  float: none !important;
  width: 100% !important;
  min-width: 0;
  padding: 0 !important;
  margin: 0 !important;
}
body.veeta-account-logged-in .veeta-account-shell .woocommerce-MyAccount-content {
  grid-column: 2;
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 0 0 32px !important;
  border-left: 1px solid #eee !important;
  box-sizing: border-box;
  font-size: 15px;
  line-height: 1.6;
}
body.veeta-account-logged-in .veeta-account-shell > .veeta-commerce-content > .woocommerce > :is(.woocommerce-notices-wrapper, .woocommerce-message, .woocommerce-error, .woocommerce-info) {
  grid-column: 1 / -1;
}
body.veeta-account-logged-in .veeta-account-shell .woocommerce-notices-wrapper:empty { display: none; }
body.veeta-account-page :is(.woocommerce-Addresses, .woocommerce-columns--addresses) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px !important;
  width: 100% !important;
  min-width: 0;
  margin: 24px 0 0 !important;
}
body.veeta-account-page :is(.woocommerce-Addresses > .woocommerce-Address, .woocommerce-columns--addresses > .woocommerce-column) {
  float: none !important;
  clear: none !important;
  width: auto !important;
  min-width: 0;
  max-width: 100%;
  margin: 0 !important;
  padding: 24px !important;
  box-sizing: border-box;
}
body.veeta-account-page .woocommerce-Address-title {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
}
body.veeta-account-page .woocommerce-Address-title :is(h2, h3) {
  float: none !important;
  width: 100%;
  margin: 0 !important;
  font-size: 20px !important;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
body.veeta-account-page .woocommerce-Address-title .edit {
  float: none !important;
  display: inline-block;
  max-width: 100%;
  margin: 0;
  white-space: normal !important;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.5;
}
body.veeta-account-page :is(.woocommerce-Address, .woocommerce-column--billing-address, .woocommerce-column--shipping-address) address {
  float: none;
  width: 100%;
  max-width: 100%;
  margin: 0;
  font-size: 15px;
  font-style: normal;
  line-height: 1.7;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

/* The support plugin retains forms, permissions, attachments and actions.
   Only the account canvas, field sizing and spacing are controlled here. */
body.veeta-support-page .veeta-commerce-shell { padding-bottom: 80px !important; }
body.veeta-support-page .veeta-account-shell { min-height: 0; }
body.veeta-support-page .woocommerce-MyAccount-content > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
body.veeta-support-page .woocommerce-MyAccount-content form {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
body.veeta-support-page .woocommerce-MyAccount-content :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]), textarea, select) {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: 15px !important;
  line-height: 1.5;
}
body.veeta-support-page .woocommerce-MyAccount-content input[type="file"] {
  height: auto;
  min-height: 44px;
  padding: 8px 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.veeta-support-page .woocommerce-MyAccount-content textarea { height: auto !important; min-height: 160px !important; resize: vertical; }
body.veeta-support-page .woocommerce-MyAccount-content :is(h2, h3) {
  line-height: 1.35;
  overflow-wrap: anywhere;
}
body.veeta-support-page .woocommerce-MyAccount-content :is(button[type="submit"], input[type="submit"]) {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
  font-family: inherit;
  background: var(--veeta-plum, #401d2b) !important;
  color: #fff !important;
}
body.veeta-support-page .site-footer { margin-top: 0; }

@media (min-width: 600px) and (max-width: 1199px) {
  :root { --veeta-page-title-gap: 48px; }
}
@media (max-width: 1023px) {
  body.veeta-account-logged-in .veeta-account-shell > .veeta-commerce-content > .woocommerce {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 24px;
  }
  body.veeta-account-logged-in .veeta-account-shell .woocommerce-MyAccount-content { padding-left: 24px !important; }
  body.veeta-account-page :is(.woocommerce-Addresses, .woocommerce-columns--addresses) { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 767px) {
  body.veeta-account-logged-in .veeta-account-shell > .veeta-commerce-content > .woocommerce {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  body.veeta-account-logged-in .veeta-account-shell :is(.woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content) {
    grid-column: 1;
    padding: 0 !important;
    border-left: 0 !important;
  }
  body.veeta-account-page .woocommerce-MyAccount-navigation { overflow: visible; }
  body.veeta-account-page .woocommerce-MyAccount-navigation ul {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px !important;
  }
  body.veeta-account-page .woocommerce-MyAccount-navigation li { margin: 0; }
  body.veeta-account-page .woocommerce-MyAccount-navigation li a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 12px !important;
    border: 1px solid #e0d5d9 !important;
    border-radius: 999px;
    font-size: 13px !important;
    line-height: 1.3;
  }
  body.veeta-account-page .woocommerce-MyAccount-navigation li.is-active a { background: #fff4eb !important; color: var(--veeta-ink) !important; }
  body.veeta-account-page :is(.woocommerce-Addresses, .woocommerce-columns--addresses) { gap: 18px !important; }
  body.veeta-account-page :is(.woocommerce-Addresses > .woocommerce-Address, .woocommerce-columns--addresses > .woocommerce-column) { padding: 20px !important; }
  body.veeta-account-page .woocommerce-Address-title :is(h2, h3) { font-size: 19px !important; }
  body.veeta-support-page .veeta-commerce-shell { padding-bottom: 48px !important; }
  body.veeta-support-page .woocommerce-MyAccount-content :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select) { font-size: 16px !important; }
}
@media (max-width: 599px) {
  /* The legacy mobile account canvas reserved 74px for a formerly hidden
     header. The actual header is now in flow; use the shared title gap only. */
  body.veeta-account-logged-in .veeta-account-canvas { padding-top: 0 !important; }
  :root { --veeta-page-title-gap: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
