/*
 * What the prototype did not have: rules for the core blocks the editable patterns are
 * built from, for WordPress and WooCommerce markup (pagination, notices, cart and
 * checkout), and for the category tiles the old site's structure brought in.
 */

/* Core blocks inside the prototype's sections ------------------------------------ */

/* WordPress gives figures a bottom margin; inside the slide the photo is placed by grid. */
.slide__visual > .wp-block-image {
  position: relative;
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  width: 100%;
  margin: 0;
}

.slide__visual--masked > .wp-block-image {
  height: 100%;
}

.slide__cta.wp-block-buttons {
  gap: var(--space-sm);
}

.link-arrow a {
  text-decoration: none;
}

/* The details block adds no marker styles of its own; the FAQ draws its own plus. */
.faq__item summary {
  outline-offset: 4px;
}

/* adaro/category-tiles ----------------------------------------------------------- */

.cat-tiles {
  padding-bottom: var(--space-lg);
}

.cat-tiles__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.cat-tiles__list a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 6px 0 14px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s var(--ease);
}

.cat-tiles__list a:hover {
  border-color: var(--c-ink);
}

.cat-tiles__years {
  font-weight: 500;
  color: var(--c-muted);
}

.cat-tiles__count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--c-surface);
  font-size: var(--fs-xs);
  color: var(--c-ink-soft);
}

/* Pagination of the shop grid ---------------------------------------------------- */

.pagination {
  margin-top: var(--space-xl);
}

.pagination .page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagination a.page-numbers,
.pagination span.page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
}

.pagination a.page-numbers:hover {
  border-color: var(--c-ink);
}

.pagination .current {
  border-color: var(--c-ink);
  background: var(--c-ink);
  color: #fff;
}

/* Ordinary pages: cart, checkout, account, privacy -------------------------------- */

.page-content {
  padding-bottom: var(--space-2xl);
}

/* Post content has no section rhythm of its own; plain spacing between its blocks. */
.page-content .wp-block-post-content > * + * {
  margin-top: var(--space-md);
}

.store-notices:empty {
  display: none;
}

.store-notices .wc-block-components-notice-banner,
.store-notices .woocommerce-message,
.store-notices .woocommerce-info,
.store-notices .woocommerce-error {
  margin-block: var(--space-md) 0;
}

/* WooCommerce's cart and checkout blocks in the site's type and controls. */
.wc-block-cart,
.wc-block-checkout {
  font-size: var(--fs-md);
}

.wc-block-components-text-input input,
.wc-block-components-textarea,
.wc-blocks-components-select .wc-blocks-components-select__select,
.wc-block-components-combobox .wc-block-components-combobox-control input {
  border-radius: var(--radius-sm);
}

.wc-block-components-button:not(.is-link) {
  min-height: 48px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* adaro/shop: applying filters ---------------------------------------------------- */

/* Without JavaScript the Apply button is the only way to submit, so it shows by default;
   shop.js hides it until a keyboard change needs it. In the phone drawer "Show products"
   applies instead. */
.filters__apply {
  justify-self: start;
}

.filters form[data-enhanced]:not(.is-dirty) .filters__apply {
  display: none;
}

@media (max-width: 900px) {
  .filters__apply {
    display: none;
  }
}
