/*
Theme Name: Twenty Twenty-Five Child (Mexelec)
Theme URI: https://mexelec.com/
Description: Tema hijo personalizado para la tienda Mexelec con diseno premium e integracion con Syscom.
Author: Antigravity
Template: twentytwentyfive
Version: 1.0.0
*/

/* ==========================================================================
   Mexelec Design System Constants
   ========================================================================== */
:root {
  /* Colors */
  --mexelec-primary: #e84858;
  --mexelec-secondary: #70c060;
  --mexelec-bg-main: #ffffff;
  --mexelec-bg-highlight: #f8fafc;
  --mexelec-bg-dark: #0f172a;
  --mexelec-border: #e2e8f0;
  --mexelec-blue-electric-subtle: #f0f7ff;
  --mexelec-blue-electric: #0070f3;
  
  /* Typography families */
  --mexelec-font-headings: 'Chakra Petch', sans-serif;
  --mexelec-font-headings-alt: 'Chathura', sans-serif;
  --mexelec-font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Apply main white background */
body, .wp-site-blocks {
  background-color: var(--mexelec-bg-main) !important;
  color: #334155;
  font-family: var(--mexelec-font-body);
}

/* Custom Highlight Blocks */
.mexelec-highlight-block {
  background-color: var(--mexelec-bg-highlight) !important;
  border-radius: 12px;
  padding: 2.5rem;
  border: 1px solid var(--mexelec-border);
}

/* Headers Styling */
h1, h2, h3, h4, h5, h6, 
.wp-block-post-title, 
.wp-block-site-title {
  font-family: var(--mexelec-font-headings) !important;
  font-weight: 700;
  color: var(--mexelec-bg-dark);
}

/* Chathura Typography class for alt headings */
.font-chathura {
  font-family: var(--mexelec-font-headings-alt) !important;
  font-weight: 700;
  font-size: 2.5rem;
  letter-spacing: 0.05em;
}

/* WooCommerce Buttons & Accents styling */
.woocommerce a.button.alt, 
.woocommerce button.button.alt, 
.woocommerce input.button.alt, 
.woocommerce #respond input#submit.alt {
  background-color: var(--mexelec-primary) !important;
  border: 1px solid var(--mexelec-primary) !important;
  color: #ffffff !important;
  font-family: var(--mexelec-font-headings) !important;
  border-radius: 6px !important;
  transition: all 0.3s ease !important;
  font-weight: 700 !important;
  padding: 0.75rem 1.25rem !important;
  text-decoration: none !important;
  display: inline-block !important;
  text-align: center !important;
}

.woocommerce a.button.alt:hover, 
.woocommerce button.button.alt:hover, 
.woocommerce input.button.alt:hover, 
.woocommerce #respond input#submit.alt:hover,
ul.products li.product .button:hover {
  background-color: #d13040 !important;
  border-color: #d13040 !important;
  box-shadow: 0 4px 12px rgba(232, 72, 88, 0.25) !important;
}

/* WooCommerce price display colors */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price, 
.woocommerce div.product span.price,
ul.products li.product .price {
  color: var(--mexelec-primary) !important;
  font-family: var(--mexelec-font-headings) !important;
  font-weight: 700 !important;
}

/* WooCommerce stock indicators */
.woocommerce .stock.in-stock {
  color: var(--mexelec-secondary) !important;
  font-weight: 600;
}

/* 1. Hide homepage title */
body.home h1.wp-block-post-title,
body.home .wp-block-post-title,
body.home header h1 {
  display: none !important;
}

/* 2. Replace Site Title Text with Logo Image */
.wp-block-site-title a {
  display: none !important;
}
.wp-block-site-title {
  display: block !important;
  width: 180px !important;
  height: 55px !important;
  background-image: url('https://mexelec.com/wp-content/uploads/2026/06/mexelec-logo.png') !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: left center !important;
  margin: 0 !important;
}

/* 3. Header White Space reduction */
header.wp-block-template-part,
.wp-block-template-part header {
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}
header.wp-block-template-part .wp-block-group,
.wp-block-template-part header .wp-block-group {
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
header.wp-block-template-part div[style*="padding-top"],
header.wp-block-template-part div[style*="padding-bottom"] {
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}

/* 4. Product Card Custom Outline Styling (for shop and homepage) */
ul.products li.product {
  border: 1px solid var(--mexelec-border) !important;
  border-radius: 10px !important;
  padding: 1.5rem !important;
  background-color: #ffffff !important;
  transition: all 0.3s ease-in-out !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 480px !important; /* Fixed min-height to help with alignment */
}

/* Make sure the main link covers most card height and pushes button down */
ul.products li.product .woocommerce-LoopProduct-link {
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
  text-decoration: none !important;
  color: inherit !important;
  margin-bottom: 1rem !important;
}

/* Product title styling */
ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--mexelec-font-headings) !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: var(--mexelec-bg-dark) !important;
  margin-bottom: 0.5rem !important;
  line-height: 1.2 !important;
}

/* Align price right above the button */
ul.products li.product .price {
  margin-top: auto !important;
  margin-bottom: 0.5rem !important;
}

/* Align button at the bottom of the card at the exact same level and fix overflow */
ul.products li.product .button {
  background-color: var(--mexelec-primary) !important;
  border: 1px solid var(--mexelec-primary) !important;
  color: #ffffff !important;
  font-family: var(--mexelec-font-headings) !important;
  border-radius: 6px !important;
  transition: all 0.3s ease !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  margin: auto 0 0 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  display: block !important;
  font-size: 0.82rem !important; /* Reduced font size by about 2pt */
  padding: 0.6rem 0.5rem !important; /* Balanced padding to prevent text wrapping */
  text-align: center !important;
}

/* Hover style: Subtle electric blue */
ul.products li.product:hover {
  border-color: var(--mexelec-blue-electric) !important;
  background-color: var(--mexelec-blue-electric-subtle) !important;
  box-shadow: 0 10px 20px rgba(0, 112, 243, 0.08) !important;
  transform: translateY(-4px) !important;
}
