/*
 Theme Name: Propello Child
 Template: propello
 Version: 1.0
*/

/* =========================
   Propello shop design tokens
   ========================= */
:root{
  --propello-brand: #0a6a57;    /* primary brand color — change if needed */
  --propello-accent: #f6a900;   /* accent */
  --propello-text: #222222;
  --propello-muted: #6b6b6b;
  --propello-radius: 8px;
  --propello-gap: 18px;
  --propello-product-shadow: 0 8px 18px rgba(17,17,17,0.06);
  --propello-card-bg: #ffffff;
  --propello-font-head: 'Poppins', sans-serif;
  --propello-font-body: 'Roboto', sans-serif;
}

/* =========================
   Basic product card & grid
   ========================= */

/* Defensive default grid (will be overridden by tighter rules below) */
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--propello-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Product card base */
.propello-product-card {
  background: var(--propello-card-bg);
  border-radius: var(--propello-radius);
  padding: 14px;
  box-shadow: var(--propello-product-shadow);
  display:flex;
  flex-direction:column;
  align-items:stretch;
  transition: transform .15s ease, box-shadow .15s ease;
}

.propello-product-card:hover {
  transform: translateY(-6px);
}

/* Image wrapper (center & crop-like) */
.propello-product-card .prop-image {
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  padding:10px;
  background: transparent;
  border-radius: 6px;
  min-height: 180px;
}

/* Make images contain and centered */
.propello-product-card .prop-image img {
  width:100%;
  max-height: 220px;
  object-fit: contain;
  display:block;
}

/* Title & meta */
.propello-product-card .prop-title {
  font-family: var(--propello-font-head);
  font-size: 15px;
  line-height:1.2;
  margin: 10px 0 6px;
  color: var(--propello-text);
  text-transform: none;
}

.propello-product-card .prop-sub {
  color: var(--propello-muted);
  font-size: 13px;
  margin-bottom: 8px;
}

/* Price and CTA container */
.propello-product-card .prop-meta {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:auto;
}

.propello-product-card .prop-price {
  font-weight:700;
  font-size:16px;
  color: var(--propello-brand);
}

/* Add to cart button styling (inherit Woo output but style it) */
.propello-product-card .button {
  border-radius: 6px;
  padding: 9px 12px;
  background: var(--propello-brand);
  color: #fff;
  text-decoration:none;
  font-weight:600;
  font-size:14px;
  display:inline-block;
}

/* =========================
   Tighter shop layout & fixes
   ========================= */

/* force a centered site container and limit extreme whitespace */
.site-main, #primary, .content-area {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding-top: 10px !important;
  box-sizing: border-box !important;
}

/* make sure header doesn't cover content */
.site-header, header.site-header {
  position: relative !important;
  z-index: 9999 !important;
}

/* reduce oversized logo pushing content (tweak if needed) */
.site-header .logo img,
.site-header .site-logo img,
.header-logo img {
  max-height: 72px !important;
  width: auto !important;
  display:block;
}

/* enforce the archive grid to use multiple columns on desktop */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 24px !important;
  margin: 18px auto 48px !important;
  width: calc(100% - 36px) !important;
  list-style: none !important;
  align-items: start !important;
}

/* product card appearance for archive */
.woocommerce ul.products li.product {
  background: #fff !important;
  border-radius: 10px !important;
  padding: 14px !important;
  box-shadow: 0 6px 18px rgba(17,17,17,0.06) !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:space-between !important;
  min-height: 340px !important;
}

/* ensure images size & centered */
.woocommerce ul.products li.product img,
.woocommerce ul.products li.product .attachment-woocommerce_thumbnail {
  max-height: 240px !important;
  width: 100% !important;
  object-fit: contain !important;
  margin: 0 0 12px !important;
}

/* price & add-to-cart */
.woocommerce ul.products li.product .price {
  color: var(--propello-brand, #0a6a57) !important;
  font-weight:700 !important;
  margin-top:8px !important;
}
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce .propello-product-card .button {
  margin-top:12px !important;
  align-self:flex-start !important;
  display:inline-block !important;
  opacity:1 !important;
  visibility:visible !important;
  pointer-events:auto !important;
}

/* Hide any theme page-content duplicates that conflict with archive display */
.page .entry-content,
.page .post-content {
  display: none !important;
}

/* reduce top spacing so header doesn't push content too far */
#primary, .site-content, main.site-main {
  padding-top: 8px !important;
  margin-top: 0 !important;
}

/* ensure price shows if theme hides it */
.woocommerce ul.products li.product .price { display:inline-block !important; }

/* Force hide legacy "read more" inside product cards if present */
.woocommerce ul.products li.product .more-link,
.woocommerce ul.products li.product .entry-summary { display:none !important; }

/* Center the main shop header elements if necessary */
.woocommerce-products-header { margin-bottom: 8px !important; }

/* =========================
   Responsive tweaks
   ========================= */
@media (max-width: 680px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    width: calc(100% - 20px) !important;
  }
  .site-header .logo img { max-height: 58px !important; }
  .woocommerce ul.products li.product { min-height: auto !important; }
  .woocommerce ul.products li.product img { max-height: 200px !important; }
  .propello-product-card .prop-image { min-height: 130px; }
}

/* Extra small screens */
@media (max-width: 420px) {
  .woocommerce ul.products { grid-template-columns: 1fr !important; gap: 12px !important; }
  .propello-product-card .prop-title { font-size: 14px; }
}

/* =========================
   Polishing helpers (optional)
   ========================= */

/* subtle hover for product cards */
.woocommerce ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(17,17,17,0.08) !important;
}

/* ensure focus outlines for accessibility */
.woocommerce ul.products li.product a:focus,
.woocommerce ul.products li.product button:focus {
  outline: 3px solid rgba(10,106,87,0.12) !important;
  outline-offset: 2px !important;
}