/* =====================================================================
   35-pp-shop-redesign.css
   Fix + redesign PODPAWS /shop/ product grid.

   Problems solved:
   1. archive-product.php never outputs the sidebar, but .pp-shop-layout
      is still grid-template-columns:240px 1fr. The previous fix only
      spanned .pp-shop-products-area across columns, leaving ul.products
      constrained to ~760px. We now collapse the layout to a single
      full-width column when no sidebar is present.
   2. Product cards were too narrow (~241px) causing titles to wrap and
      buttons to overflow into adjacent cards.
   3. FAQ items use class .pp-faq-item in HTML, but the theme CSS only
      styled .pp-fq-item, so cards had no background/border/shadow.
   ===================================================================== */

/* -------------------------------------------------------------------
   1. LAYOUT: single full-width column when sidebar is absent
   ------------------------------------------------------------------- */
.pp-shop-layout {
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}

.pp-shop-products-area {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

/* -------------------------------------------------------------------
   2. PRODUCT GRID: full width, better track sizing
   ------------------------------------------------------------------- */
.pp-shop-products-area ul.products,
.pp-shop-layout ul.products {
  width: 100% !important;
  max-width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 22px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* -------------------------------------------------------------------
   3. PRODUCT CARD REDESIGN
   ------------------------------------------------------------------- */
.pp-shop-layout ul.products li.product {
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  width: auto !important;
  float: none !important;
  min-width: 0 !important;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease) !important;
}

.pp-shop-layout ul.products li.product:hover {
  transform: translateY(-5px) !important;
  box-shadow: var(--shadow) !important;
}

/* Image: consistent square aspect ratio */
.pp-shop-layout ul.products li.product .astra-shop-thumbnail-wrap {
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  background: linear-gradient(135deg, #F6ECE2, #EAD9CC) !important;
}

.pp-shop-layout ul.products li.product .attachment-woocommerce_thumbnail,
.pp-shop-layout ul.products li.product img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Summary wrap: fill remaining height */
.pp-shop-layout ul.products li.product .astra-shop-summary-wrap {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  padding: 14px 16px 16px !important;
}

/* Category label */
.pp-shop-layout ul.products li.product .ast-woo-product-category {
  font-size: .68rem !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  color: var(--gold) !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
}

/* Title: clamp to 2 lines so cards stay aligned */
.pp-shop-layout ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--serif) !important;
  font-size: .95rem !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
  color: var(--charcoal) !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  min-height: 2.55em !important;
}

/* Price */
.pp-shop-layout ul.products li.product .price {
  color: var(--clay-dark) !important;
  font-weight: 700 !important;
  font-size: .95rem !important;
  margin: 0 0 12px !important;
  display: block !important;
}

/* Button: contained within card, primary clay style */
.pp-shop-layout ul.products li.product .button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: flex-start !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  background: var(--clay) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 50px !important;
  padding: 10px 22px !important;
  font-family: var(--sans) !important;
  font-size: .82rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  margin: auto 0 0 0 !important;
  transition: background .25s var(--ease), transform .25s var(--ease) !important;
}

.pp-shop-layout ul.products li.product .button:hover {
  background: var(--clay-dark) !important;
  transform: translateY(-2px) !important;
}

/* -------------------------------------------------------------------
   4. FAQ ITEM CLASS FIX
   HTML uses .pp-faq-item, but 11-section-11.css only styled .pp-fq-item.
   ------------------------------------------------------------------- */
.pp-faq-item {
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  transition: box-shadow .25s var(--ease) !important;
}

.pp-faq-item:hover,
.pp-faq-item[open] {
  box-shadow: var(--shadow-sm) !important;
}

.pp-faq-item[open] .pp-faq-toggle {
  transform: rotate(45deg) !important;
  color: var(--clay) !important;
}

/* -------------------------------------------------------------------
   5. RESPONSIVE
   ------------------------------------------------------------------- */
@media (max-width: 991px) {
  .pp-shop-products-area ul.products,
  .pp-shop-layout ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }
}

@media (max-width: 560px) {
  .pp-shop-products-area ul.products,
  .pp-shop-layout ul.products {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .pp-shop-layout ul.products li.product .woocommerce-loop-product__title {
    font-size: .92rem !important;
  }
}
