/* Pomelo Commerce — homepage, shop, product. Tokens inherit from child theme. */

body.pomelo-commerce,
body.pomelo-chrome {
  --pomelo-ink: #1a1212;
  --pomelo-muted: #6b5757;
  --pomelo-paper: #f7f2ec;
  --pomelo-cream: #fffaf6;
  --pomelo-wine: #7a1616;
  --pomelo-wine-deep: #4f0e10;
  --pomelo-line: rgba(26, 18, 18, 0.12);
  --pomelo-shadow: 0 12px 32px rgba(79, 14, 16, 0.06);
  --pomelo-radius: 22px;
  --pomelo-container: 1320px;
  --pomelo-pad: clamp(16px, 3vw, 32px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.pomelo-shop-tabs,
.pomelo-catnav {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  margin: 0 0 28px;
  padding: 4px 0 8px;
}

.pomelo-shop-tab,
.pomelo-catnav__item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--pomelo-muted);
  font: 600 14px/1.2 Outfit, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.pomelo-shop-tab.is-active,
.pomelo-catnav__item.is-active,
.pomelo-shop-tab:hover,
.pomelo-catnav__item:hover,
.pomelo-shop-tab:focus-visible,
.pomelo-catnav__item:focus-visible {
  color: var(--pomelo-wine);
  border-bottom-color: var(--pomelo-wine);
  outline: none;
}

.pomelo-shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.pomelo-shop-card,
body.pomelo-chrome.woocommerce ul.products li.product {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--pomelo-line);
  border-radius: var(--pomelo-radius);
  overflow: hidden;
  box-shadow: var(--pomelo-shadow);
}

.pomelo-shop-card[hidden] {
  display: none;
}

.pomelo-shop-card__media,
body.pomelo-chrome .product-image {
  position: relative;
  aspect-ratio: 1;
  background: var(--pomelo-cream);
}

.pomelo-shop-card__media img,
body.pomelo-chrome .product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.pomelo-shop-card__body,
body.pomelo-chrome .caption {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 18px 20px;
  text-align: center;
}

.pomelo-shop-card h3 a,
body.pomelo-chrome .product-block-title a,
body.pomelo-chrome .name a {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--pomelo-ink);
  text-decoration: none;
  white-space: normal;
}

.pomelo-add,
body.pomelo-chrome .add-cart a,
body.pomelo-chrome .product-block a.button,
body.single-product .single_add_to_cart_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--pomelo-wine);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font: 700 13px/1 Outfit, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.pomelo-add:hover,
body.pomelo-chrome .product-block a.button:hover,
body.single-product .single_add_to_cart_button:hover {
  background: var(--pomelo-wine-deep);
  color: #fff;
}

.pomelo-catalog-intro {
  max-width: 720px;
  margin: 8px 0 24px;
}

.pomelo-catalog-intro__kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pomelo-wine);
}

.pomelo-catalog-intro__title {
  margin: 0 0 10px;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.pomelo-catalog-intro__lede {
  margin: 0;
  color: var(--pomelo-muted);
}

body.woocommerce-shop .archive-shop,
body.woocommerce-shop #apus-main-content {
  max-width: var(--pomelo-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--pomelo-pad);
  padding-right: var(--pomelo-pad);
}

body.woocommerce-shop .shop-sidebar-left-wrapper,
body.woocommerce-shop .shop-sidebar-right-wrapper {
  display: none;
}

body.woocommerce-shop ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  float: none;
}

body.woocommerce-shop ul.products li.product .product-block {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--pomelo-line);
  border-radius: var(--pomelo-radius);
  overflow: hidden;
  box-shadow: var(--pomelo-shadow);
}

body.woocommerce-shop .product-block .groups-button,
body.woocommerce-shop .product-block .add-cart {
  margin-top: auto;
  padding: 0 16px 18px;
}

body.woocommerce-shop .woocommerce-pagination {
  display: flex;
  justify-content: center;
  margin: 32px 0;
}

body.single-product div.product,
body.single-product .details-product {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--pomelo-pad);
}

body.single-product .pomelo-related ul.products,
body.single-product .related.pomelo-related ul.products,
body.single-product .related ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
}

body.single-product .related .slick-arrow {
  display: none;
}

body.single-product .woocommerce-product-gallery img,
body.single-product .wp-post-image {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

body.single-product .quantity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  overflow: visible;
}

body.single-product .quantity .qty {
  width: 56px;
  min-height: 44px;
  color: var(--pomelo-ink);
  text-align: center;
}

.pomelo-shop-empty,
[data-pomelo-empty] {
  text-align: center;
  color: var(--pomelo-muted);
  padding: 32px 12px;
}

.pomelo-float-cart {
  position: fixed;
  right: 16px;
  bottom: 22px;
  z-index: 10050;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--pomelo-wine);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(122, 22, 22, 0.38);
  text-decoration: none;
}

.pomelo-float-cart svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.pomelo-float-cart__count {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--pomelo-ink);
  color: #fff;
  font: 700 11px/22px Outfit, sans-serif;
  text-align: center;
}

.pomelo-float-cart.is-empty .pomelo-float-cart__count,
.pomelo-float-cart__count:empty {
  display: none;
}

body.woocommerce-cart .pomelo-float-cart,
body.woocommerce-checkout .pomelo-float-cart {
  display: none;
}

.pomelo-cart-toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%) translateY(8px);
  z-index: 10051;
  background: var(--pomelo-ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font: 600 13px Outfit, sans-serif;
  opacity: 0;
  pointer-events: none;
}

.pomelo-cart-toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.2s, transform 0.2s;
}

body.woocommerce-shop .wrapper-fillter,
body.woocommerce-shop .goal-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin: 0 0 28px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--pomelo-line);
  border-radius: 16px;
}

body.woocommerce-shop .woocommerce-result-count {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pomelo-muted);
}

@media (max-width: 1100px) {
  .pomelo-shop-grid,
  body.woocommerce-shop ul.products,
  body.single-product .related ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .pomelo-shop-grid,
  body.woocommerce-shop ul.products,
  body.single-product .related ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body.single-product .image-mains.thumbnails-left {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-left: 0;
  }

  body.single-product .goal-woocommerce-product-gallery,
  body.single-product .goal-woocommerce-product-gallery .slick-list {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  body.single-product .goal-woocommerce-product-gallery img {
    width: 100%;
    height: auto;
  }

  body.single-product .wrapper-thumbs,
  body.single-product .goal-woocommerce-product-gallery-thumbs {
    display: flex;
    flex-direction: row;
    width: 100%;
    margin-top: 10px;
    gap: 8px;
  }
}

@media (max-width: 360px) {
  .pomelo-shop-card h3 a {
    font-size: 0.95rem;
  }
}
