/*
Theme Name: Natural Living Home
Theme URI: https://intertech.energesis.tech
Description: Tema hijo de Storefront para Natural Living Home — productos artesanales del Mediterráneo. Proyecto de InterTech Cooperación.
Author: InterTech Cooperación
Author URI: https://intertech.energesis.tech
Template: storefront
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: natural-living-home
*/

/* ===== VARIABLES DE DISEÑO ===== */
:root {
  /* Paleta principal */
  --nlh-earth: #3F3027;
  --nlh-chocolate: #695044;
  --nlh-terracotta: #AE5037;
  --nlh-cream: #F3EFE7;
  --nlh-navy: #244964;
  --nlh-olive: #625E3B;
  --nlh-honey: #C4943A;
  --nlh-linen: #EDE8DF;

  /* Semánticos */
  --nlh-text: var(--nlh-earth);
  --nlh-bg: var(--nlh-cream);
  --nlh-cta-primary: var(--nlh-terracotta);
  --nlh-cta-cart: var(--nlh-navy);
  --nlh-header-bg: var(--nlh-cream);
  --nlh-footer-bg: var(--nlh-chocolate);
  --nlh-topbar-bg: var(--nlh-chocolate);
  --nlh-border: #DDD5C8;

  /* Tipografías */
  --nlh-font-heading: 'Playfair Display', Georgia, serif;
  --nlh-font-body: 'Source Sans 3', system-ui, sans-serif;
}

/* ===== RESET BASE ===== */
body {
  background-color: var(--nlh-bg) !important;
  color: var(--nlh-text) !important;
  font-family: var(--nlh-font-body) !important;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.woocommerce div.product .product_title,
.site-title a {
  font-family: var(--nlh-font-heading) !important;
  color: var(--nlh-text) !important;
}

a { color: var(--nlh-terracotta); }
a:hover { color: var(--nlh-earth); }

/* ===== BARRA SUPERIOR SOLIDARIA ===== */
.nlh-topbar {
  background: var(--nlh-topbar-bg);
  color: var(--nlh-cream);
  text-align: center;
  padding: 8px 16px;
  font-family: var(--nlh-font-body);
  font-size: 13px;
  letter-spacing: 0.03em;
}
.nlh-topbar strong { font-weight: 600; }

/* ===== HEADER ===== */
.site-header {
  background: var(--nlh-header-bg) !important;
  border-bottom: 1px solid var(--nlh-border) !important;
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(8px);
}

.site-title a,
.site-description {
  color: var(--nlh-text) !important;
  font-family: var(--nlh-font-heading) !important;
}

.site-description {
  font-size: 11px !important;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.7;
}

/* ===== NAVEGACIÓN ===== */
.main-navigation ul li a {
  font-family: var(--nlh-font-body) !important;
  color: var(--nlh-text) !important;
  font-size: 14px;
  padding: 8px 14px !important;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
  background: var(--nlh-terracotta) !important;
  color: var(--nlh-cream) !important;
}

/* ===== BOTONES ===== */
button,
.button,
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  font-family: var(--nlh-font-body) !important;
  font-weight: 600 !important;
  border-radius: 4px !important;
  transition: opacity 0.2s !important;
  letter-spacing: 0.02em;
}

/* Botón "Añadir al carrito" — Navy */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.add_to_cart_button {
  background: var(--nlh-navy) !important;
  color: var(--nlh-cream) !important;
  border: none !important;
  padding: 10px 20px !important;
}
.woocommerce ul.products li.product .button:hover {
  opacity: 0.9;
}

/* Botón CTA principal (checkout, single product) — Terracotta */
.woocommerce div.product form.cart .button,
.woocommerce .checkout-button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
  background: var(--nlh-terracotta) !important;
  color: var(--nlh-cream) !important;
  border: none !important;
}
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
  opacity: 0.9;
  background: var(--nlh-terracotta) !important;
}

/* ===== PRODUCT CARDS ===== */
.woocommerce ul.products li.product {
  background: var(--nlh-cream);
  border: 1px solid var(--nlh-border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s;
  padding: 0 !important;
}
.woocommerce ul.products li.product:hover {
  box-shadow: 0 8px 24px rgba(63, 48, 39, 0.12);
}

.woocommerce ul.products li.product a img {
  	border-radius: 0 !important;
  	margin: 0 !important;
  	transition: transform 0.5s;
}
.woocommerce ul.products li.product:hover a img {
  transform: scale(1.05);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  	font-family: var(--nlh-font-heading) !important;
  	font-size: 16px !important;
  	font-weight: 600;
  	color: var(--nlh-text);
  	padding: 12px 16px 4px !important;
}

.woocommerce ul.products li.product .price {
  	font-family: var(--nlh-font-heading) !important;
  	font-weight: 700;
  	color: var(--nlh-earth);
  	font-size: 16px !important;
  	padding: 0 16px !important;
}

/* Origen del producto */
.product-origin {
	font-family: var(--nlh-font-body);
	font-size: 12px;
	color: var(--nlh-olive);
	font-weight: 600;
	padding: 4px 16px;
	display: flex;
	align-items: center;
  	gap: 4px;
}

/* Historia del producto */
.product-story {
	font-family: var(--nlh-font-body);
	font-size: 12px;
	color: var(--nlh-chocolate);
	font-style: italic;
	padding: 4px 16px 12px;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Badge "Pack" */
.nlh-badge-pack {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--nlh-honey);
  color: var(--nlh-earth);
  font-family: var(--nlh-font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 20px;
  z-index: 2;
}

/* Pack contents */
.pack-contents {
  font-family: var(--nlh-font-body);
  font-size: 12px;
  color: var(--nlh-chocolate);
  padding: 0 16px 4px;
}
.pack-contents strong {
  font-weight: 600;
}

/* ===== SINGLE PRODUCT ===== */
.woocommerce div.product .product_title {
  font-size: 28px !important;
  margin-bottom: 8px !important;
}

.woocommerce div.product p.price {
  font-family: var(--nlh-font-heading) !important;
  font-size: 22px !important;
  color: var(--nlh-earth) !important;
}

.woocommerce div.product .woocommerce-product-details__short-description {
  font-family: var(--nlh-font-body);
  color: var(--nlh-chocolate);
  line-height: 1.7;
}

/* ===== HERO SECTION ===== */
.nlh-hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.nlh-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nlh-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(63,48,39,0.85) 0%, rgba(63,48,39,0.5) 50%, transparent 100%);
}
.nlh-hero__content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 0 32px;
  color: var(--nlh-linen);
}
.nlh-hero__label {
  font-family: var(--nlh-font-body);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  opacity: 0.8;
  margin-bottom: 16px;
}
.nlh-hero__title {
  font-family: var(--nlh-font-heading) !important;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  color: var(--nlh-linen) !important;
  line-height: 1.1;
  margin-bottom: 16px;
}
.nlh-hero__desc {
  font-family: var(--nlh-font-body);
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 24px;
  max-width: 480px;
}
.nlh-hero__cta {
  display: inline-block;
  background: var(--nlh-terracotta);
  color: var(--nlh-cream);
  padding: 12px 28px;
  border-radius: 4px;
  font-family: var(--nlh-font-body);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  margin-right: 12px;
  transition: opacity 0.2s;
}
.nlh-hero__cta:hover { opacity: 0.9; color: var(--nlh-cream); }
.nlh-hero__cta--secondary {
  background: transparent;
  border: 1px solid rgba(243,239,231,0.5);
  color: var(--nlh-linen);
}
.nlh-hero__cta--secondary:hover {
  background: rgba(243,239,231,0.1);
  color: var(--nlh-linen);
}

/* ===== MISSION SECTION ===== */
.nlh-mission {
  background: linear-gradient(180deg, var(--nlh-linen) 0%, var(--nlh-cream) 100%);
  padding: 80px 32px;
  text-align: center;
}
.nlh-mission__label {
  font-family: var(--nlh-font-body);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--nlh-olive);
  margin-bottom: 8px;
}
.nlh-mission__title {
  font-family: var(--nlh-font-heading) !important;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: var(--nlh-text) !important;
  margin-bottom: 16px;
}
.nlh-mission__desc {
  font-family: var(--nlh-font-body);
  max-width: 640px;
  margin: 0 auto 48px;
  color: var(--nlh-chocolate);
  line-height: 1.7;
}
.nlh-mission__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}
.nlh-mission__card {
  text-align: center;
}
.nlh-mission__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(36,73,100,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
}
.nlh-mission__card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.nlh-mission__card p {
  font-family: var(--nlh-font-body);
  font-size: 14px;
  color: var(--nlh-chocolate);
  line-height: 1.6;
}

/* ===== FOOTER ===== */
.site-footer,
.storefront-footer-bar {
  background: var(--nlh-footer-bg) !important;
  color: rgba(243,239,231,0.8) !important;
}
.site-footer h1, .site-footer h2, .site-footer h3,
.site-footer h4, .site-footer h5, .site-footer h6 {
  color: var(--nlh-cream) !important;
  font-family: var(--nlh-font-heading) !important;
}
.site-footer a {
  color: rgba(243,239,231,0.8) !important;
}
.site-footer a:hover {
  color: var(--nlh-cream) !important;
}
.site-footer .widget {
  font-family: var(--nlh-font-body);
  font-size: 14px;
}
.storefront-footer-bar {
  border-top: 1px solid rgba(243,239,231,0.15) !important;
  font-family: var(--nlh-font-body);
  font-size: 12px;
}

/* ===== MINI-CART WIDGET ===== */
.site-header-cart .cart-contents {
  color: var(--nlh-text) !important;
}
.site-header-cart .cart-contents .count {
  background: var(--nlh-terracotta) !important;
  color: var(--nlh-cream) !important;
}

/* ===== WOOCOMMERCE NOTICES ===== */
.woocommerce-message {
  border-top-color: var(--nlh-olive) !important;
}
.woocommerce-message::before {
  color: var(--nlh-olive) !important;
}

/* ===== BREADCRUMBS ===== */
.woocommerce .woocommerce-breadcrumb {
  font-family: var(--nlh-font-body);
  font-size: 13px;
  color: var(--nlh-chocolate);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nlh-hero { height: 60vh; min-height: 400px; }
  .nlh-hero__content { padding: 0 20px; }
  .nlh-mission { padding: 48px 20px; }
}

/* ===== CART DRAWER ===== */
.nlh-cart-drawer {
  position: fixed;
  right: -100%;
  top: 0;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: var(--nlh-cream);
  z-index: 10000;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}
.nlh-cart-drawer.is-open { right: 0; }
.nlh-cart-drawer__overlay {
  position: fixed;
  inset: 0;
  background: rgba(63,48,39,0.3);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.nlh-cart-drawer__overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.nlh-cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--nlh-border);
}
.nlh-cart-drawer__header h2 {
  font-size: 18px;
  margin: 0;
}
.nlh-cart-drawer__close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--nlh-chocolate);
}
.nlh-cart-drawer__items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.nlh-cart-drawer__footer {
  border-top: 1px solid var(--nlh-border);
  padding: 16px;
}
.nlh-cart-drawer__total {
  display: flex;
  justify-content: space-between;
  font-family: var(--nlh-font-body);
  font-size: 18px;
  margin-bottom: 12px;
}
.nlh-cart-drawer__total span:last-child {
  font-family: var(--nlh-font-heading);
  font-weight: 700;
}
.nlh-cart-drawer__checkout {
  display: block;
  width: 100%;
  background: var(--nlh-terracotta) !important;
  color: var(--nlh-cream) !important;
  border: none;
  padding: 14px;
  border-radius: 4px;
  font-family: var(--nlh-font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.nlh-cart-drawer__checkout:hover { opacity: 0.9; }
