/*
Theme Name: REVI Custom
Theme URI: https://revimachinery.com
Author: REVI Machinery
Description: Tema propio para REVI Machinery, sin dependencia de Elementor. Replica el diseno visual del sitio original con HTML/CSS/PHP nativo.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: revi-custom
*/

:root {
  --revi-accent: #F5AB31;
  --revi-accent-dark: #d9922a;
  --revi-dark: #3A3A3A;
  --revi-text: #4B4F58;
  --revi-text-light: #7A7A7A;
  --revi-bg: #F5F5F5;
  --revi-white: #FFFFFF;
  --revi-border: #E2E2E2;
  --font-heading: 'Montserrat', Arial, sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;
  --container-width: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--revi-text);
  background: var(--revi-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--revi-dark);
  line-height: 1.25;
  margin: 0 0 16px;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 16px; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 14px 32px;
  border: 2px solid var(--revi-accent);
  background: var(--revi-accent);
  color: var(--revi-white);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: var(--revi-accent-dark); border-color: var(--revi-accent-dark); color: var(--revi-white); }
.btn-outline { background: transparent; color: var(--revi-white); border-color: var(--revi-white); }
.btn-outline:hover { background: var(--revi-white); color: var(--revi-dark); }
.btn-dark { background: var(--revi-dark); border-color: var(--revi-dark); }
.btn-dark:hover { background: #222; border-color: #222; }
.btn-secondary { background: transparent; color: var(--revi-dark); border-color: var(--revi-dark); }
.btn-secondary:hover { background: var(--revi-dark); color: var(--revi-white); }

/* ---------- Site header ---------- */
.site-header {
  background: transparent;
  position: static;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 24px;
}
.site-logo img { max-height: 64px; width: auto; }
.main-nav ul { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  text-transform: uppercase;
  color: var(--revi-dark);
  letter-spacing: .02em;
}
.main-nav a:hover { color: var(--revi-accent); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-cart { position: relative; font-size: 1.3rem; }
.header-cart .count {
  position: absolute; top: -8px; right: -10px;
  background: var(--revi-accent); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.menu-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; }

@media (max-width: 880px) {
  .main-nav { position: fixed; top: 0; right: -100%; height: 100vh; width: 280px; background: var(--revi-white); box-shadow: -4px 0 20px rgba(0,0,0,.15); transition: right .25s ease; padding: 90px 24px 24px; }
  .main-nav.is-open { right: 0; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 20px; }
  .menu-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  color: #fff;
  background-color: var(--revi-dark);
  background-size: cover;
  background-position: center;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,20,20,.82) 0%, rgba(20,20,20,.5) 60%, rgba(20,20,20,.25) 100%); }
.hero-inner { position: relative; z-index: 1; max-width: 620px; }
.hero p.hero-eyebrow { color: var(--revi-accent); font-family: var(--font-heading); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 0.95rem; margin-bottom: 10px; }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero p { color: #e6e6e6; font-size: 1.05rem; max-width: 520px; }
.hero-ctas { display: flex; gap: 16px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- Stats bar ---------- */
.stats-bar { background: var(--revi-white); }
.stats-bar .container { display: flex; flex-wrap: wrap; justify-content: center; padding: 0; }
.stat { text-align: left; flex: 1 1 260px; padding: 40px; border-right: 1px solid #E1E1E1; border-bottom: 1px solid #E1E1E1; }
.stat:last-child { border-right: none; }
.stat .num { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 800; color: var(--revi-dark); line-height: 1; margin-bottom: 6px; }
.stat .label { font-size: 0.95rem; color: var(--revi-text); }

/* ---------- Accent (orange) band ---------- */
.section-accent { background: var(--revi-accent); color: #000; }
.section-accent .section-title { max-width: 720px; }
.section-accent h2 { color: #000; font-weight: 200; }
.section-accent p { color: #1a1a1a; }
.section-accent .eyebrow { color: #1a1a1a; }
.accent-features { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 32px; }
.accent-features .feature { text-align: left; flex: 1 1 260px; }
.accent-features .feature .icon { font-size: 2rem; margin-bottom: 10px; }
.accent-features .feature p { margin-bottom: 0; color: #1a1a1a; font-weight: 600; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--revi-white); }
.section-title { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-title .eyebrow { color: var(--revi-accent); font-family: var(--font-heading); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 0.85rem; }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 40px 32px; }
.cat-card { text-align: left; }
.cat-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; margin-bottom: 18px; transition: transform .2s ease; }
.cat-card:hover img { transform: scale(1.03); }
.cat-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.cat-card h3 a { color: var(--revi-dark); }
.cat-card:hover h3 a { color: var(--revi-accent); }
.cat-card p { font-size: 0.92rem; color: var(--revi-text-light); margin-bottom: 0; }

/* ---------- Trust / features ---------- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; margin-top: 40px; }
.feature { text-align: center; }
.feature .icon { font-size: 2.2rem; color: var(--revi-accent); margin-bottom: 12px; }

/* ---------- Testimonials ---------- */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.testimonial { background: var(--revi-white); border: 1px solid var(--revi-border); padding: 24px; }
.testimonial p { font-style: italic; color: var(--revi-text); font-size: 0.94rem; }
.testimonial .author { font-family: var(--font-heading); font-weight: 700; color: var(--revi-dark); font-size: 0.9rem; margin-top: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--revi-dark); color: #cfcfcf; padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-grid h4 { color: #fff; font-family: var(--font-heading); font-size: 1rem; text-transform: uppercase; margin-bottom: 18px; }
.footer-grid ul li { margin-bottom: 10px; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--revi-accent); }
.footer-logo img { max-height: 42px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 20px 0; font-size: 0.82rem; color: #9a9a9a; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Generic page content ---------- */
.page-content { padding: 56px 0; }
.page-hero { background: var(--revi-dark); color: #fff; padding: 56px 0; text-align: center; }
.page-hero h1 { color: #fff; margin-bottom: 0; }

/* ---------- Quote / contact block on expensive products ---------- */
.revi-quote-block { margin-top: 24px; padding: 20px; background: var(--revi-white); border: 1px dashed var(--revi-accent); }
.revi-quote-block p { margin-bottom: 12px; font-size: 0.92rem; }
.revi-quote-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.revi-quote-actions .btn { padding: 12px 22px; font-size: 0.85rem; }

/* ---------- WooCommerce tweaks ---------- */
ul.products { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
ul.products li.product { background: var(--revi-white); border: 1px solid var(--revi-border); padding: 22px; text-align: center; list-style: none; }
ul.products li.product img { margin-bottom: 14px; }
ul.products li.product .price { color: var(--revi-dark); font-weight: 700; font-size: 1.1rem; display: block; margin-bottom: 14px; }
ul.products li.product .price del { color: var(--revi-text-light); font-weight: 400; opacity: .7; }
ul.products li.product .price ins { text-decoration: none; color: var(--revi-accent); }
ul.products li.product .revi-more-info { display: inline-block; margin-top: 4px; }
ul.products li.product .woocommerce-loop-product__title { font-size: 1.05rem; margin-bottom: 4px; }

.woocommerce div.product .price { color: var(--revi-dark); font-size: 1.9rem; font-weight: 800; }
.woocommerce div.product .price ins { text-decoration: none; color: var(--revi-accent); }
.revi-vat-note { color: var(--revi-text-light); font-size: 0.85rem; margin-top: -10px; margin-bottom: 20px; }

.woocommerce a.button, .woocommerce button.button, .woocommerce #respond input#submit, .woocommerce input.button {
  font-family: var(--font-heading); text-transform: uppercase; font-size: 0.85rem; letter-spacing: .03em; background: var(--revi-accent); color: #fff; border-radius: 0; padding: 14px 30px; border: none;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover { background: var(--revi-accent-dark); color: #fff; }

.revi-contact-now {
  margin: 24px 0; padding: 20px 24px; background: var(--revi-dark); color: #fff; max-width: 340px;
}
.revi-contact-now__title { font-family: var(--font-heading); font-weight: 700; text-transform: uppercase; color: var(--revi-accent); margin-bottom: 8px; font-size: 0.95rem; }
.revi-contact-now__phone { display: block; font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.revi-contact-now__phone:hover { color: var(--revi-accent); }
.revi-contact-now__person { color: #cfcfcf; font-size: 0.85rem; margin-bottom: 0; }

.woocommerce-info.revi-high-ticket-notice { border-top-color: var(--revi-accent); background: #FFF8EC; padding: 14px 20px; }
