/*
Theme Name:   Maruti Collection — Blocksy Child
Theme URI:    https://shop.marutisolutionsindia.com
Description:  Child theme for Blocksy. Runs WooCommerce as a price-free catalogue: the
              cart becomes "My Selection" and checkout is replaced by a WhatsApp enquiry.
Author:       Maruti Collection
Version:      1.0.0
Template:     blocksy
Requires PHP: 7.4
Text Domain:  maruti-child
*/

/* ------------------------------------------------------------------
   Phase 1 is catalogue-only. Blocksy handles layout; everything here
   supports the selection flow, the size chart, and hiding prices.
   ------------------------------------------------------------------ */

:root {
  --maruti-wa: #25d366;
  --maruti-wa-ink: #0b3d23;
  --maruti-rule: #e4e4e7;
  --maruti-muted: #5b5b66;
}

/* ---- WhatsApp enquiry block on the selection page ---- */
.maruti-enquiry {
  margin-block: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--maruti-rule);
  border-radius: 8px;
}
.maruti-enquiry__title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}
.maruti-enquiry__note {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--maruti-muted);
}
.maruti-enquiry__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.maruti-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding-inline: 1.25rem;
  background: var(--maruti-wa);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 200ms ease-out;
}
.maruti-wa-btn:hover,
.maruti-wa-btn:focus { background: #1eb457; color: #fff; }
.maruti-wa-btn:focus-visible {
  outline: 2px solid var(--maruti-wa-ink);
  outline-offset: 3px;
}
.maruti-wa-btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }

.maruti-copy-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 1rem;
  background: transparent;
  border: 1px solid var(--maruti-rule);
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.maruti-copy-btn:hover { border-color: var(--maruti-muted); }

/* ---- Size chart ---- */
.maruti-sizechart { margin-block: 1.5rem; overflow-x: auto; }
.maruti-sizechart table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.maruti-sizechart caption {
  text-align: left;
  padding-block-end: 0.5rem;
  font-weight: 600;
}
.maruti-sizechart th,
.maruti-sizechart td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--maruti-rule);
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.maruti-sizechart thead th {
  border-bottom-width: 2px;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--maruti-muted);
}
.maruti-sizechart__note {
  margin-block-start: 0.5rem;
  font-size: 0.8125rem;
  color: var(--maruti-muted);
}

/* ---- Price suppression ----------------------------------------------
   The PHP filters do the real work. These rules are the safety net for
   any markup a theme or block renders outside those filters.
   `.ct-price` is Blocksy's own price wrapper; the rest are WooCommerce
   core and block-editor classes.
   ------------------------------------------------------------------ */
.ct-price,
.woocommerce-Price-amount,
.woocommerce div.product p.price,
.woocommerce div.product span.price,
ul.products li.product .price,
.wc-block-components-product-price,
.wp-block-woocommerce-product-price { display: none !important; }

/* ---- Selection page: no totals, so tidy the layout ---- */
.woocommerce-cart .cart-collaterals { display: none; }
.woocommerce-cart table.cart td.product-price,
.woocommerce-cart table.cart td.product-subtotal,
.woocommerce-cart table.cart th.product-price,
.woocommerce-cart table.cart th.product-subtotal { display: none; }

@media (max-width: 40rem) {
  .maruti-enquiry__actions { flex-direction: column; align-items: stretch; }
  .maruti-wa-btn, .maruti-copy-btn { justify-content: center; }
}
