/* Pege product grid frames: category-led ivory gallery cards */
.woocommerce .wp-block-woocommerce-product-collection,
.woocommerce .wc-block-product-template {
  --pege-grid-gap: clamp(14px, 1.8vw, 26px);
  gap: var(--pege-grid-gap) !important;
}

.woocommerce .wc-block-product-template > .wc-block-product,
.woocommerce ul.wc-block-product-template > li.wc-block-product {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 14px 18px !important;
  overflow: hidden;
  border: 1px solid rgba(112, 82, 54, 0.22) !important;
  border-radius: 22px !important;
  background: #f8f4ec !important;
  box-shadow: 0 10px 26px rgba(65, 45, 29, 0.09), inset 0 0 0 1px rgba(255,255,255,.68) !important;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.woocommerce .wc-block-product-template > .wc-block-product:hover,
.woocommerce ul.wc-block-product-template > li.wc-block-product:hover {
  transform: translateY(-3px);
  border-color: rgba(112, 82, 54, 0.42) !important;
  box-shadow: 0 16px 32px rgba(65, 45, 29, 0.14), inset 0 0 0 1px rgba(255,255,255,.82) !important;
}

.woocommerce .wc-block-product .wc-block-components-product-image {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 0 0 14px !important;
  padding: 9px !important;
  border: 1px solid rgba(112, 82, 54, 0.16) !important;
  border-radius: 15px !important;
  background: #fffdf9 !important;
  box-shadow: inset 0 0 0 5px #f4eee5, inset 0 0 0 6px rgba(112, 82, 54, .13) !important;
}

.woocommerce .wc-block-product .wc-block-components-product-image img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px !important;
}

.woocommerce .wc-block-product .wp-block-post-title {
  min-height: 2.75em;
  margin: 0 2px 8px !important;
  color: #2d211a !important;
  font-size: clamp(14px, 1.15vw, 17px) !important;
  line-height: 1.38 !important;
  font-weight: 650 !important;
}

.woocommerce .wc-block-product .wp-block-post-title a {
  color: inherit !important;
  text-decoration: none !important;
}

.woocommerce .wc-block-product .wc-block-components-product-price {
  margin: auto 2px 12px !important;
  color: #2b7d4d !important;
  font-size: clamp(16px, 1.35vw, 21px) !important;
  font-weight: 750 !important;
}

.woocommerce .wc-block-product .wp-block-button,
.woocommerce .wc-block-product .wc-block-components-product-button {
  margin: 0 2px !important;
}

.woocommerce .wc-block-product .wp-block-button__link,
.woocommerce .wc-block-product .wc-block-components-product-button__button {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(112, 82, 54, .35) !important;
  border-radius: 11px !important;
  background: #4b3022 !important;
  color: #fffaf2 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  letter-spacing: .01em;
  transition: background .2s ease, transform .2s ease;
}

.woocommerce .wc-block-product .wp-block-button__link:hover,
.woocommerce .wc-block-product .wc-block-components-product-button__button:hover {
  background: #6a422d !important;
  transform: translateY(-1px);
}

/* Category-led frame accents, kept subtle so the product remains primary. */
body.tax-product_cat.term-boyalar .wc-block-product { border-color: rgba(173, 132, 88, .38) !important; }
body.tax-product_cat.term-fircalar .wc-block-product { border-color: rgba(113, 75, 47, .46) !important; background: #f6efe5 !important; }
body.tax-product_cat.term-rolyef-doku-malzemeleri .wc-block-product { border-color: rgba(70, 72, 72, .32) !important; background: #f5f3ef !important; }
body.tax-product_cat.term-vernik-koruyucu-urunler .wc-block-product { border-color: rgba(84, 103, 108, .32) !important; background: #f2f6f5 !important; }
body.tax-product_cat.term-yardimci-malzemeler .wc-block-product { border-color: rgba(158, 126, 83, .38) !important; background: #f8f1e5 !important; }

@media (max-width: 781px) {
  .woocommerce .wc-block-product-template > .wc-block-product,
  .woocommerce ul.wc-block-product-template > li.wc-block-product {
    padding: 10px 10px 13px !important;
    border-radius: 17px !important;
  }
  .woocommerce .wc-block-product .wc-block-components-product-image {
    margin-bottom: 10px !important;
    padding: 6px !important;
    border-radius: 12px !important;
  }
  .woocommerce .wc-block-product .wp-block-post-title {
    min-height: 3.2em;
    font-size: 13px !important;
  }
  .woocommerce .wc-block-product .wc-block-components-product-price {
    font-size: 16px !important;
  }
  .woocommerce .wc-block-product .wp-block-button__link,
  .woocommerce .wc-block-product .wc-block-components-product-button__button {
    min-height: 38px;
    padding: 8px 10px !important;
    font-size: 12px !important;
  }
}
