/*
Theme Name: Casa Nopal WooCommerce
Author: Zero Division Systems
Description: Storefront demo messicano per chattest con WooCommerce e Chatwoot.
Version: 1.0.0
Requires at least: 6.0
*/

:root {
  --ink: #221713;
  --muted: #70584d;
  --paper: #fff8ef;
  --surface: #ffffff;
  --line: rgba(34, 23, 19, 0.14);
  --tomato: #d63f26;
  --agave: #1f7a5b;
  --corn: #f3b33d;
  --blue: #0e5f73;
  --shadow: 0 18px 48px rgba(74, 45, 32, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(255, 248, 239, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: var(--agave);
  border-radius: 7px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.eyebrow,
.muted {
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 0.94rem;
}

.site-nav a {
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button,
.single_add_to_cart_button,
.added_to_cart {
  border: 0;
  border-radius: 6px;
  padding: 11px 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary,
.single_add_to_cart_button,
.added_to_cart {
  color: #fff;
  background: var(--tomato);
}

.button.secondary {
  color: #fff;
  background: var(--blue);
}

.button.ghost {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}

.button.full-width {
  width: 100%;
}

.is-hidden {
  display: none !important;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.user-chip span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 999px;
  font-size: 0.78rem;
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(28px, 5vw, 70px) clamp(18px, 4vw, 56px) 34px;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 10px 0 18px;
  font-size: clamp(3rem, 6.4vw, 6.8rem);
  line-height: 0.92;
}

.intro {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
}

.hero-actions,
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.trust-row span {
  border-bottom: 2px solid var(--corn);
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-media {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  display: block;
  object-fit: cover;
}

.floating-order {
  position: absolute;
  right: 18px;
  bottom: 18px;
  max-width: 280px;
  padding: 14px;
  color: #fff;
  background: rgba(34, 23, 19, 0.82);
  border-radius: 8px;
}

.floating-order span,
.floating-order small {
  display: block;
}

.section,
.login-panel,
.account-section,
.support-section {
  padding: 58px clamp(18px, 4vw, 56px);
}

.login-panel,
.account-section,
.support-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(20px, 4vw, 46px);
  align-items: start;
  background: #fff;
  border-top: 1px solid var(--line);
}

.login-card,
.orders-card,
.support-card {
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.86rem;
  font-weight: 800;
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.technical-field {
  display: none;
}

.harness-hidden {
  display: none;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-head h2,
.login-panel h2,
.account-section h2,
.support-section h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.9rem);
  line-height: 1;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
}

.product-card__body {
  padding: 18px;
}

.product-card h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.price {
  display: block;
  margin: 12px 0;
  color: var(--agave);
  font-weight: 900;
}

.order-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.order-row:last-child {
  border-bottom: 0;
}

.order-row span,
.order-row small {
  display: block;
  color: var(--muted);
}

.order-row strong {
  display: block;
  margin: 3px 0;
}

.site-footer {
  padding: 32px clamp(18px, 4vw, 56px);
  background: var(--ink);
  color: #fff;
}

@media (max-width: 880px) {
  .site-header,
  .site-nav,
  .header-actions {
    align-items: flex-start;
  }

  .site-header {
    position: static;
    flex-direction: column;
  }

  .hero,
  .login-panel,
  .account-section,
  .support-section,
  .products-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-media,
  .hero-media img {
    min-height: 360px;
  }
}
