/**
 * Theme Name:  Blocksy Child — ENJOY y a Picar
 * Template:    blocksy
 * Description: Child theme for ENJOY y a Picar. Design system + WooCommerce overrides.
 * Version:     1.0.0
 */

/* ═══════════════════════════════════════════════════
   DESIGN TOKENS
════════════════════════════════════════════════════ */
:root {
  --e-green:        #0F806B;
  --e-green-dark:   #0a6054;
  --e-green-light:  #e6f4f1;
  --e-yellow:       #F6D369;
  --e-yellow-dark:  #E6AF00;
  --e-dark:         #1a1a1a;
  --e-text:         #333333;
  --e-muted:        #777777;
  --e-border:       #e8e4de;
  --e-cream:        #faf8f4;
  --e-white:        #ffffff;
  --e-radius:       10px;
  --e-radius-lg:    16px;
  --e-shadow:       0 4px 20px rgba(15,128,107,.10);
  --e-shadow-hover: 0 8px 32px rgba(15,128,107,.18);
  --e-font:         'Lato', 'Helvetica Neue', sans-serif;
}

/* ═══════════════════════════════════════════════════
   GLOBAL BASE
════════════════════════════════════════════════════ */
body {
  background: var(--e-white);
  color: var(--e-text);
}

/* Primary buttons — green */
.wp-block-button__link,
.button,
button[type="submit"],
input[type="submit"],
.ct-button {
  background: var(--e-green) !important;
  color: var(--e-white) !important;
  border: none !important;
  border-radius: var(--e-radius) !important;
  font-weight: 700 !important;
  transition: background .2s, transform .15s, box-shadow .2s !important;
}
.wp-block-button__link:hover,
.button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  background: var(--e-green-dark) !important;
  transform: translateY(-1px) !important;
  box-shadow: var(--e-shadow) !important;
}

/* ═══════════════════════════════════════════════════
   WOOCOMMERCE — SHOP ARCHIVE (TIENDA)
════════════════════════════════════════════════════ */

/* Page background */
.woocommerce-page .site-main,
body.woocommerce .site-main {
  background: var(--e-cream);
}

/* Archive header */
.woocommerce-products-header {
  text-align: center;
  padding: 40px 0 24px;
}
.woocommerce-products-header__title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  color: var(--e-dark);
  letter-spacing: -.5px;
}

/* Result count & ordering bar */
.woocommerce-result-count {
  color: var(--e-muted);
  font-size: 14px;
}
.woocommerce-ordering select {
  border: 1.5px solid var(--e-border);
  border-radius: var(--e-radius);
  padding: 8px 14px;
  font-size: 14px;
  color: var(--e-text);
  background: var(--e-white);
}

/* Product grid */
ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
  gap: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

/* Product card */
ul.products li.product {
  background: var(--e-white) !important;
  border: 1.5px solid var(--e-border) !important;
  border-radius: var(--e-radius-lg) !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: transform .2s, box-shadow .2s, border-color .2s !important;
  display: flex !important;
  flex-direction: column !important;
}
ul.products li.product:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--e-shadow-hover) !important;
  border-color: var(--e-green) !important;
}

/* Product image */
ul.products li.product a img,
ul.products li.product .woocommerce-loop-product__thumbnail img {
  width: 100% !important;
  aspect-ratio: 1/1 !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
  transition: transform .3s !important;
}
ul.products li.product:hover img {
  transform: scale(1.04) !important;
}

/* Product card body */
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product h2 {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--e-dark) !important;
  padding: 14px 16px 4px !important;
  margin: 0 !important;
  line-height: 1.35 !important;
}

/* Price */
ul.products li.product .price {
  padding: 0 16px 8px !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  color: var(--e-green) !important;
}
ul.products li.product .price del {
  color: var(--e-muted) !important;
  font-weight: 400 !important;
  font-size: 14px !important;
}
ul.products li.product .price ins {
  text-decoration: none !important;
  color: var(--e-green) !important;
}

/* Add to cart button on card */
ul.products li.product .add_to_cart_button,
ul.products li.product .button {
  display: block !important;
  margin: auto 16px 16px !important;
  padding: 10px 16px !important;
  font-size: 13px !important;
  text-align: center !important;
  background: var(--e-green) !important;
  color: var(--e-white) !important;
  border-radius: var(--e-radius) !important;
  text-decoration: none !important;
}
ul.products li.product .button:hover {
  background: var(--e-green-dark) !important;
}

/* Sale badge */
ul.products li.product .onsale,
.onsale {
  background: var(--e-yellow) !important;
  color: var(--e-dark) !important;
  border-radius: 20px !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  padding: 4px 10px !important;
}

/* ═══════════════════════════════════════════════════
   WOOCOMMERCE — SINGLE PRODUCT PAGE
════════════════════════════════════════════════════ */
.single-product .product_title {
  font-size: clamp(22px, 3.5vw, 36px) !important;
  font-weight: 800 !important;
  color: var(--e-dark) !important;
  letter-spacing: -.5px !important;
}
.single-product .price {
  font-size: 26px !important;
  font-weight: 800 !important;
  color: var(--e-green) !important;
}
.single-product .woocommerce-product-details__short-description {
  font-size: 15px;
  line-height: 1.75;
  color: var(--e-muted);
}
.single-product .single_add_to_cart_button {
  background: var(--e-green) !important;
  color: var(--e-white) !important;
  padding: 14px 32px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  border-radius: var(--e-radius) !important;
  border: none !important;
  letter-spacing: .02em !important;
}
.single-product .single_add_to_cart_button:hover {
  background: var(--e-green-dark) !important;
}

/* Quantity input */
.woocommerce .quantity .qty {
  border: 1.5px solid var(--e-border) !important;
  border-radius: var(--e-radius) !important;
  padding: 10px 12px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--e-dark) !important;
  width: 72px !important;
}

/* Tabs */
.woocommerce-tabs .tabs li a {
  color: var(--e-muted) !important;
  font-weight: 600 !important;
}
.woocommerce-tabs .tabs li.active a {
  color: var(--e-green) !important;
  border-bottom: 2px solid var(--e-green) !important;
}

/* Related products */
.related.products > h2,
.upsells.products > h2 {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: var(--e-dark) !important;
  margin-bottom: 24px !important;
}

/* ═══════════════════════════════════════════════════
   WOOCOMMERCE — CART
════════════════════════════════════════════════════ */
.woocommerce-cart .woocommerce {
  background: var(--e-white);
  border-radius: var(--e-radius-lg);
}

/* Cart table */
.woocommerce-cart-form table.shop_table {
  border: none !important;
  border-collapse: separate !important;
  border-spacing: 0 8px !important;
}
.woocommerce-cart-form table.shop_table thead th {
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  color: var(--e-muted) !important;
  border: none !important;
  padding-bottom: 8px !important;
}
.woocommerce-cart-form table.shop_table tbody tr {
  background: var(--e-white) !important;
  border-radius: var(--e-radius) !important;
}
.woocommerce-cart-form table.shop_table tbody td {
  border-top: 1px solid var(--e-border) !important;
  padding: 16px 12px !important;
  vertical-align: middle !important;
}
.woocommerce-cart-form .product-name a {
  font-weight: 700 !important;
  color: var(--e-dark) !important;
  text-decoration: none !important;
}
.woocommerce-cart-form .product-name a:hover {
  color: var(--e-green) !important;
}
.woocommerce-cart-form .product-price,
.woocommerce-cart-form .product-subtotal {
  font-weight: 700 !important;
  color: var(--e-green) !important;
}

/* Cart totals box */
.cart_totals {
  background: var(--e-cream) !important;
  border: 1.5px solid var(--e-border) !important;
  border-radius: var(--e-radius-lg) !important;
  padding: 28px !important;
}
.cart_totals h2 {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: var(--e-dark) !important;
  margin-bottom: 20px !important;
}
.cart_totals .order-total .amount {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: var(--e-green) !important;
}
.wc-proceed-to-checkout .checkout-button {
  background: var(--e-green) !important;
  border-radius: var(--e-radius) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  padding: 15px 24px !important;
  letter-spacing: .02em !important;
  width: 100% !important;
  text-align: center !important;
  display: block !important;
}
.wc-proceed-to-checkout .checkout-button:hover {
  background: var(--e-green-dark) !important;
}

/* ═══════════════════════════════════════════════════
   WOOCOMMERCE — CHECKOUT
════════════════════════════════════════════════════ */
.woocommerce-checkout #customer_details h3,
.woocommerce-checkout #order_review_heading {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: var(--e-dark) !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  border-bottom: 2px solid var(--e-border) !important;
  padding-bottom: 12px !important;
  margin-bottom: 20px !important;
}

/* Form fields */
.woocommerce-checkout .woocommerce-input-wrapper input,
.woocommerce-checkout .woocommerce-input-wrapper textarea,
.woocommerce-checkout .woocommerce-input-wrapper select,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  border: 1.5px solid var(--e-border) !important;
  border-radius: var(--e-radius) !important;
  padding: 12px 14px !important;
  font-size: 15px !important;
  color: var(--e-text) !important;
  background: var(--e-white) !important;
  transition: border-color .2s !important;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  border-color: var(--e-green) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(15,128,107,.1) !important;
}

/* Order summary box */
.woocommerce-checkout-review-order table.shop_table {
  border: none !important;
}
.woocommerce-checkout-review-order table.shop_table td,
.woocommerce-checkout-review-order table.shop_table th {
  border-top: 1px solid var(--e-border) !important;
  padding: 10px 0 !important;
}
.woocommerce-checkout-review-order .order-total .amount {
  font-weight: 800 !important;
  color: var(--e-green) !important;
  font-size: 20px !important;
}

/* Place order button */
#place_order {
  background: var(--e-green) !important;
  border-radius: var(--e-radius) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  padding: 16px 24px !important;
  width: 100% !important;
  letter-spacing: .02em !important;
  border: none !important;
}
#place_order:hover {
  background: var(--e-green-dark) !important;
}

/* ═══════════════════════════════════════════════════
   WOOCOMMERCE — MY ACCOUNT
════════════════════════════════════════════════════ */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none !important;
  padding: 0 !important;
}
.woocommerce-account .woocommerce-MyAccount-navigation li a {
  display: block !important;
  padding: 10px 16px !important;
  border-radius: var(--e-radius) !important;
  color: var(--e-text) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: background .15s, color .15s !important;
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
  background: var(--e-green-light) !important;
  color: var(--e-green) !important;
}

/* ═══════════════════════════════════════════════════
   WOOCOMMERCE — NOTICES & MISC
════════════════════════════════════════════════════ */
.woocommerce-message,
.woocommerce-info {
  border-top-color: var(--e-green) !important;
  background: var(--e-green-light) !important;
}
.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--e-green) !important;
}
.woocommerce-error {
  border-top-color: #c0392b !important;
}

/* ═══════════════════════════════════════════════════
   HEADER
════════════════════════════════════════════════════ */
/* Nav links */
.ct-header .menu-item a {
  font-weight: 600;
  transition: color .18s;
}
.ct-header .menu-item a:hover,
.ct-header .current-menu-item > a {
  color: var(--e-green) !important;
}

/* Cart icon badge */
.ct-header-cart .cart-count {
  background: var(--e-yellow) !important;
  color: var(--e-dark) !important;
  font-weight: 700 !important;
}

/* ═══════════════════════════════════════════════════
   BREADCRUMBS
════════════════════════════════════════════════════ */
.woocommerce .woocommerce-breadcrumb {
  font-size: 13px !important;
  color: var(--e-muted) !important;
  padding: 12px 0 !important;
}
.woocommerce .woocommerce-breadcrumb a {
  color: var(--e-green) !important;
  text-decoration: none !important;
}

/* ═══════════════════════════════════════════════════
   PAGINATION
════════════════════════════════════════════════════ */
.woocommerce-pagination .page-numbers li .page-numbers {
  border: 1.5px solid var(--e-border) !important;
  border-radius: var(--e-radius) !important;
  color: var(--e-text) !important;
  font-weight: 600 !important;
  padding: 8px 14px !important;
  text-decoration: none !important;
  transition: all .15s !important;
}
.woocommerce-pagination .page-numbers li .page-numbers.current,
.woocommerce-pagination .page-numbers li .page-numbers:hover {
  background: var(--e-green) !important;
  border-color: var(--e-green) !important;
  color: var(--e-white) !important;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }
  ul.products li.product .woocommerce-loop-product__title,
  ul.products li.product h2 {
    font-size: 13px !important;
    padding: 10px 12px 2px !important;
  }
  ul.products li.product .price {
    padding: 0 12px 6px !important;
    font-size: 15px !important;
  }
  ul.products li.product .button {
    margin: auto 12px 12px !important;
    font-size: 12px !important;
    padding: 8px 10px !important;
  }
  .cart_totals {
    padding: 20px !important;
  }
}
@media (max-width: 480px) {
  ul.products {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
}

/* ═══════════════════════════════════════════════════
   WOOCOMMERCE — PRODUCT PAGE: BLOCKSY-SPECIFIC
════════════════════════════════════════════════════ */

/* Quantity +/− buttons (Blocksy) */
.ct-increase,
.ct-decrease {
  background: var(--e-green-light) !important;
  color: var(--e-green) !important;
  border: 1.5px solid var(--e-border) !important;
  border-radius: var(--e-radius) !important;
  font-weight: 700 !important;
  transition: background .15s, color .15s !important;
}
.ct-increase:hover,
.ct-decrease:hover {
  background: var(--e-green) !important;
  color: var(--e-white) !important;
  border-color: var(--e-green) !important;
}

/* Product meta (categories, tags) */
.product_meta {
  font-size: 13px !important;
  color: var(--e-muted) !important;
}
.product_meta span {
  display: block !important;
  margin-bottom: 4px !important;
}
.product_meta a {
  color: var(--e-green) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}
.product_meta a:hover {
  text-decoration: underline !important;
}

/* Quantity + add-to-cart row */
.ct-cart-actions {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}
.ct-cart-actions .quantity {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: var(--e-white) !important;
  border: 1.5px solid var(--e-border) !important;
  border-radius: var(--e-radius) !important;
  padding: 4px !important;
}
.ct-cart-actions .single_add_to_cart_button {
  flex: 1 !important;
  min-width: 180px !important;
}
@media (max-width: 480px) {
  .ct-cart-actions {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .ct-cart-actions .single_add_to_cart_button {
    min-width: unset !important;
    width: 100% !important;
  }
}

/* Dividers between product sections */
.ct-product-divider {
  border-color: var(--e-border) !important;
  margin: 20px 0 !important;
}

/* Tabs panel */
.woocommerce-Tabs-panel h2 {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: var(--e-dark) !important;
  margin-bottom: 16px !important;
}
.woocommerce-Reviews-title {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: var(--e-dark) !important;
}

/* Stock availability */
.stock {
  font-size: 13px !important;
  font-weight: 600 !important;
}
.stock.in-stock {
  color: var(--e-green) !important;
}
.stock.out-of-stock {
  color: #c0392b !important;
}

/* ═══════════════════════════════════════════════════
   ELEMENTOR LOOP BUILDER (CORPORATIVOS CAROUSEL)
════════════════════════════════════════════════════ */

/* Loop item card wrapper */
.e-loop-item > .e-con {
  background: var(--e-white) !important;
  border-radius: var(--e-radius-lg) !important;
  overflow: hidden !important;
  box-shadow: var(--e-shadow) !important;
  transition: transform .2s, box-shadow .2s !important;
}
.e-loop-item > .e-con:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--e-shadow-hover) !important;
}

/* Product image in loop item */
.e-loop-item .elementor-widget-theme-post-featured-image img {
  width: 100% !important;
  aspect-ratio: 1/1 !important;
  object-fit: cover !important;
  display: block !important;
}

/* Product title in loop item */
.e-loop-item .elementor-widget-woocommerce-product-title .elementor-heading-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--e-dark) !important;
  padding: 12px 16px 4px !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}

/* Price in loop item */
.e-loop-item .woocommerce-Price-amount {
  color: var(--e-green) !important;
  font-weight: 800 !important;
  font-size: 17px !important;
  padding: 0 16px 8px !important;
  display: block !important;
}

/* Add-to-cart in loop item */
.e-loop-add-to-cart-form-container .button,
.elementor-add-to-cart .button,
.elementor-add-to-cart a.button {
  background: var(--e-green) !important;
  color: var(--e-white) !important;
  border-radius: var(--e-radius) !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  padding: 10px 20px !important;
  display: block !important;
  text-align: center !important;
  margin: 8px 16px 16px !important;
  text-decoration: none !important;
  transition: background .2s !important;
}
.e-loop-add-to-cart-form-container .button:hover,
.elementor-add-to-cart .button:hover {
  background: var(--e-green-dark) !important;
}

/* ═══════════════════════════════════════════════════
   SINGLE PRODUCT — CUSTOM ELEMENTS (PHP hooks)
════════════════════════════════════════════════════ */

/* Trust badges row */
.enjoy-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 12px 0 16px;
  padding: 12px 16px;
  background: var(--e-cream);
  border-radius: var(--e-radius);
  border: 1px solid var(--e-border);
}
.enjoy-trust-badges span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--e-text);
}
.enjoy-trust-badges svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Delivery info strip */
.enjoy-delivery-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1.5px solid var(--e-border);
  border-radius: var(--e-radius);
  overflow: hidden;
  margin: 16px 0;
}
.enjoy-delivery-strip > div {
  flex: 1 1 180px;
  padding: 10px 14px;
  border-right: 1px solid var(--e-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.enjoy-delivery-strip > div:last-child {
  border-right: none;
}
.enjoy-delivery-strip strong {
  font-size: 13px;
  color: var(--e-dark);
  font-weight: 700;
}
.enjoy-delivery-strip span {
  font-size: 12px;
  color: var(--e-muted);
}

/* WhatsApp CTA button on product page */
.enjoy-wa-product {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px !important;
  margin: 12px 0 0 !important;
  background: #25D366 !important;
  color: var(--e-white) !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  border-radius: var(--e-radius) !important;
  text-decoration: none !important;
  transition: background .2s, transform .15s !important;
  border: none !important;
}
.enjoy-wa-product:hover {
  background: #1EAE55 !important;
  transform: translateY(-1px) !important;
  color: var(--e-white) !important;
}
.enjoy-wa-product svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: white;
}

@media (max-width: 768px) {
  .enjoy-trust-badges {
    gap: 8px 12px;
    padding: 10px 12px;
  }
  .enjoy-trust-badges span {
    font-size: 12px;
  }
  .enjoy-delivery-strip > div {
    flex: 1 1 130px;
    padding: 8px 10px;
  }
}
