/*
Theme Name: Vesta (Astra Child)
Template: astra
Description: Product-page layout updates (accordion specs, enquiry CTA, no price/cart) for vestaint.com.
Version: 1.0.7
*/

/* ---------- Header: sticky, modern spacing ---------- */

#masthead {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
  transition: box-shadow 0.25s ease;
}
#masthead.vesta-scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}
.ast-above-header-wrap {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.ast-above-header-bar {
  padding-top: 0.5em !important;
  padding-bottom: 0.5em !important;
}
.main-header-menu .menu-item > a {
  text-transform: uppercase;
  font-size: 0.8em;
  font-weight: 600;
  letter-spacing: 0.08em;
  position: relative;
}
.main-header-menu .menu-item > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transition: right 0.25s ease;
}
.main-header-menu .menu-item:hover > a::after,
.main-header-menu .current-menu-item > a::after {
  right: 0;
}
.ast-primary-header-bar {
  padding-top: 0.6em !important;
  padding-bottom: 0.6em !important;
}

/* ---------- Product summary ---------- */

.single-product .summary.entry-summary .woocommerce-product-details__short-description {
  font-family: monospace;
  letter-spacing: 0.04em;
  opacity: 0.7;
  margin-bottom: 1.2em;
}

.vesta-enquire {
  margin: 1.4em 0 1.8em;
}
.vesta-enquire a {
  display: inline-block;
  padding: 0.75em 1.6em;
  border: 1px solid currentColor;
  text-decoration: none;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.85em;
}
.vesta-enquire a:hover {
  opacity: 0.75;
}

/* ---------- Accordion (Delivery & payments / Downloads) ---------- */

.vesta-accordion {
  margin-top: 1.5em;
  max-width: 640px;
}
.vesta-accordion-item {
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.vesta-accordion-item:last-child {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
.vesta-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1em 0.2em;
  font-size: 0.8em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}
.vesta-accordion-toggle::after {
  content: "+";
  font-size: 1.2em;
  line-height: 1;
  transition: transform 0.2s ease;
}
.vesta-accordion-item.vesta-open .vesta-accordion-toggle::after {
  transform: rotate(45deg);
}
.vesta-accordion-panel {
  display: none;
  padding: 0 0.2em 1.4em;
}
.vesta-accordion-item.vesta-open .vesta-accordion-panel {
  display: block;
}

/* ---------- Products hub page (/products/): category-container grid ----------
   This page's markup (.category-container > .category-block > img + h3) was
   never actually given grid CSS, so it rendered as one giant full-width
   stacked column. No content/template change needed — just styling it. */

.category-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
}
@media (max-width: 900px) {
  .category-container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .category-container { grid-template-columns: 1fr; }
}
.category-block {
  display: block;
  position: relative;
  background: #f7f5f1;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}
.category-block img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.category-block:hover img {
  transform: scale(1.04);
}
.category-block h3 {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 1.2em;
  font-size: 1em;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
}

/* ---------- Shop / category grid: full-bleed, no sidebar ---------- */

body.woocommerce-page #secondary,
body.woocommerce-page .widget-area {
  display: none !important;
}
body.woocommerce-page #primary {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
}
/* Astra boxes shop/category content into a centered max-width container;
   Omnires' grid runs near full browser width with no boxed gutter, so we
   override that container specifically on these archive pages. */
body.woocommerce-page.ast-woo-shop-archive .ast-container,
body.tax-product_cat .ast-container,
body.single-product .ast-container {
  max-width: 100% !important;
  padding-left: 2.5vw !important;
  padding-right: 2.5vw !important;
}
/* Astra's grid-based ast-container reserves extra outer gutter space even
   with no sidebar; #primary itself still needs widening to actually use it. */
body.single-product #primary {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
}

.vesta-subcat-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2em;
  padding: 1em 0;
  margin-bottom: 1.5em;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
.vesta-subcat-bar .vesta-subcat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6em;
}
.vesta-subcat-bar a {
  font-size: 0.85em;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}
.vesta-subcat-bar a:hover {
  opacity: 0.6;
}
.vesta-filters-btn {
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* Flexbox, not grid: a grid with a fixed column count reserves that many
   tracks even when there are fewer items (e.g. 3 related products in a
   "5-column" layout), leaving visible dead space. Flex items just stop
   after the real content instead. */
/* No background/gap on the parent: with fewer items than fit per row (the
   normal case — 3 related products in a "5-wide" layout), a parent-level
   background shows through as a big blank-looking block in the unused
   space. Borders on each tile give the same thin grid-line look without
   that problem, regardless of how many items there are. */
.woocommerce ul.products,
.woocommerce-page ul.products {
  display: flex !important;
  flex-wrap: wrap;
  margin: 0 !important;
  width: 100%;
}
ul.products li.product {
  flex: 0 1 calc(20% - 1px);
  max-width: calc(20% - 1px);
  margin: 0 !important;
  padding: 1.2em 1em 1.6em !important;
  background: #f7f5f1 !important;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: left !important;
  box-sizing: border-box;
}
@media (max-width: 1200px) {
  ul.products li.product { flex-basis: calc(33.333% - 1px); max-width: calc(33.333% - 1px); }
}
@media (max-width: 700px) {
  ul.products li.product { flex-basis: calc(50% - 1px); max-width: calc(50% - 1px); }
}
ul.products li.product a img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  max-height: 160px;
  width: auto !important;
  margin: 0 auto;
  background: #f7f5f1;
}
ul.products li.product .woocommerce-loop-product__title {
  font-size: 0.8em;
  letter-spacing: 0.01em;
  margin-top: 0.7em;
  line-height: 1.3;
}
