/* ============================================================
   Leñas Solórzano — theme main stylesheet
   Ported from src/app/globals.css (Next.js source of truth)
   ============================================================ */

:root {
  /* Palette */
  --color-navy: #3D2010;
  --color-navy-dark: #1A0C05;
  --color-navy-light: #5C3018;
  --color-teal: #C4561A;
  --color-teal-dark: #A8461A;
  --color-teal-light: #E07B39;
  --color-coral: #FF7058;
  --color-coral-dark: #E85E47;
  --color-bg: #ffffff;
  --color-text: #2C1A0E;
  --color-text-muted: #7A6A5A;
  --color-border: #D4C4B0;
  --color-green: #25A96B;
  --color-yellow: #F59E0B;
  --color-red: #EF4444;
  --apple-gray: #FAF3EB;
  --apple-surface: #FAF3EB;

  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;

  --shadow-card: 0 2px 12px rgba(44, 26, 14, 0.08);
  --shadow-header: 0 1px 4px rgba(44, 26, 14, 0.06);
  --shadow-dropdown: 0 8px 24px rgba(44, 26, 14, 0.12);
  --shadow-modal: 0 20px 60px rgba(44, 26, 14, 0.18);

  --radius-card: 12px;
  --radius-btn: 8px;
  --radius-badge: 20px;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }

/* Screen reader only */
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; width: 1px; word-wrap: normal !important;
}

/* ── Container ── */
.container-main {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 768px) {
  .container-main { padding: 0 16px; }
}

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-border); }
::-webkit-scrollbar-thumb { background: var(--color-teal); border-radius: 3px; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 { color: var(--color-text); margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.4rem); font-weight: 700; line-height: 1.15; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }

/* ── Header — clone exact du prod lenas-solorzano.com ── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.10), 0 2px 4px -2px rgba(0,0,0,0.10);
}

/* Cream top bar */
.header-top-row {
  background: #FAF3EB;
  border-bottom: 1px solid #E5E7EB;
}
.header-main-row {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  height: 80px;
}

/* Logo */
.header-logo-wrap { display: flex; align-items: center; height: 100%; flex-shrink: 0; position: relative; left: 0; }
@media (min-width: 768px) {
  .header-logo-wrap.logo-home-shift { left: -80px; }
}
.header-logo { display: flex; align-items: center; flex-shrink: 0; }
.header-logo img { object-fit: contain; transition: opacity 0.2s; }
.header-logo:hover img { opacity: 0.85; }

/* Categorías button */
.btn-categorias {
  display: none;
  align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  color: #2C1A0E; font-size: 14px; font-weight: 600;
  cursor: pointer; flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}
.btn-categorias:hover { background: rgba(255,255,255,0.8); transform: translateY(-1px); }
@media (min-width: 768px) { .btn-categorias { display: inline-flex; } }

/* Search bar (centered absolute on desktop) */
.header-search-wrap { display: none; }
@media (min-width: 768px) {
  .header-search-wrap {
    display: block;
    position: absolute; left: 50%; transform: translateX(-50%);
    width: 425px; max-width: 40vw;
  }
}
.header-search {
  position: relative;
  display: flex; align-items: center;
}
.header-search input[type=search] {
  flex: 1;
  padding: 10px 12px 10px 16px;
  border: 1px solid #F0E6D3;
  border-radius: 8px 0 0 8px;
  background: white;
  color: #2C1A0E; font-size: 14px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.header-search input[type=search]::placeholder { color: #8B6040; }
.header-search input[type=search]:focus {
  border-color: #C4561A;
  box-shadow: 0 0 0 3px rgba(196,86,26,0.20);
}
.header-search-btn {
  padding: 10px 16px;
  background: #C4561A; color: white;
  border: none; border-radius: 0 8px 8px 0;
  font-size: 14px; font-weight: 500;
  cursor: pointer; transition: background 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.header-search-btn:hover { background: #A8461A; }

/* Right actions */
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-action-link {
  display: none;
  align-items: center; gap: 6px;
  padding: 8px 12px; color: #2A1E14; font-size: 14px;
  transition: color 0.2s;
}
.header-action-link:hover { color: #C4561A; }
.header-action-label { display: none; }
@media (min-width: 640px) { .header-action-link { display: inline-flex; } }
@media (min-width: 1024px) { .header-action-label { display: inline; } }

.header-action-icon {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  color: #3D2010; background: none; border: none;
  cursor: pointer; position: relative;
  transition: background 0.2s;
}
.header-action-icon:hover { background: rgba(61,32,16,0.08); }
.mobile-only { display: flex; }
@media (min-width: 768px) { .mobile-only { display: none; } }
@media (min-width: 640px) { .header-action-icon.mobile-only:first-of-type { display: none; } }

.cart-badge {
  position: absolute; top: -2px; right: -2px;
  background: #C4561A; color: white;
  font-size: 10px; font-weight: 700; border-radius: 999px;
  min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

/* Navy secondary nav */
.site-nav {
  display: none;
  background: #2A1E14;
}
@media (min-width: 768px) { .site-nav { display: block; } }
.site-nav-list {
  display: flex; align-items: center;
  list-style: none; padding: 0; margin: 0;
  height: 40px;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav-list::-webkit-scrollbar { display: none; }
.site-nav-list li { flex-shrink: 0; }
.site-nav-list li.nav-item-right { margin-left: auto; }
.site-nav-list a {
  display: block;
  padding: 8px 31px;
  font-size: 15px; font-weight: 500;
  color: rgba(255,255,255,0.80);
  white-space: nowrap;
  transition: color 0.2s;
}
.site-nav-list a:hover { color: white; }
.site-nav-list .current-menu-item a { color: white; font-weight: 600; }

/* Mobile nav (open) */
@media (max-width: 767px) {
  .site-nav.is-open { display: block; }
  .site-nav-list { flex-direction: column; height: auto; align-items: stretch; padding: 8px 0; }
  .site-nav-list li.nav-item-right { margin-left: 0; }
  .site-nav-list a { padding: 12px 20px; }
}

/* ── Hero ── */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--color-navy-dark) 0%, var(--color-navy) 55%, #7A2E10 100%);
  color: white;
  padding: 80px 0 120px;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 64px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.04));
  pointer-events: none;
}
.hero-inner { max-width: 720px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(196,86,26,0.15);
  border: 1px solid rgba(196,86,26,0.35);
  border-radius: 999px; padding: 6px 16px;
  color: var(--color-teal); font-size: 12px; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--color-teal);
}
.hero h1 { color: white; margin-bottom: 20px; white-space: pre-line; }
.hero-subtitle { color: rgba(255,255,255,0.7); font-size: 20px; margin-bottom: 40px; max-width: 560px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Glass buttons ── */
.btn-glass, .btn-glass-primary {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 20px;
  border-radius: 999px; font-weight: 600; font-size: 14px;
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
  overflow: hidden;
  cursor: pointer;
}
.btn-glass {
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}
.btn-glass:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px); }
.btn-glass:active { transform: scale(0.97); }

.btn-glass-primary {
  background: linear-gradient(145deg, rgba(196,86,26,0.85), rgba(168,70,26,0.95));
  border-color: rgba(255,255,255,0.30);
  box-shadow:
    0 4px 16px rgba(196,86,26,0.40),
    0 8px 28px rgba(196,86,26,0.20),
    inset 0 1px 0 rgba(255,255,255,0.45),
    inset 0 -1px 0 rgba(0,0,0,0.12);
}
.btn-glass-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.25) 0%, transparent 55%);
  pointer-events: none; border-radius: inherit;
}
.btn-glass-primary:hover {
  background: linear-gradient(145deg, rgba(196,86,26,0.95), rgba(168,70,26,1));
  transform: translateY(-1px);
  box-shadow:
    0 6px 24px rgba(196,86,26,0.55),
    0 12px 36px rgba(196,86,26,0.25),
    inset 0 1px 0 rgba(255,255,255,0.50),
    inset 0 -1px 0 rgba(0,0,0,0.12);
}
.btn-glass-primary:active { transform: scale(0.97); }

/* Solid orange add-to-cart (matches Next.js homepage) */
.btn-cart {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; padding: 12px 20px; margin-top: 8px;
  border-radius: 999px; border: none; cursor: pointer;
  background: var(--color-teal); color: white;
  font-weight: 600; font-size: clamp(10px, 2.6vw, 14px);
  transition: background 0.15s;
}
.btn-cart:hover { background: var(--color-teal-dark); }
.btn-cart:disabled { background: var(--color-border); color: var(--color-text-muted); cursor: not-allowed; opacity: 0.6; }
.btn-cart--added { background: var(--color-green) !important; }

/* ── Reassurance strip ── */
.reassurance-strip {
  background: var(--apple-gray);
  border-bottom: 1px solid rgba(212,196,176,0.4);
  padding: 8px 0;
}
.reassurance-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.reassurance-item {
  display: flex; align-items: center; gap: 14px;
  padding: 20px;
}
.reassurance-item svg { width: 24px; height: 24px; color: var(--color-teal); flex-shrink: 0; }
.reassurance-title { font-weight: 600; font-size: 14px; color: var(--color-text); }
.reassurance-desc { font-size: 12px; color: var(--color-text-muted); }
@media (max-width: 640px) {
  .reassurance-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Section base ── */
.section { padding: 80px 0; }
.section--alt { background: var(--apple-gray); }
.section-header {
  display: flex; flex-direction: column; sm-flex-direction: row;
  justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 48px;
}
@media (min-width: 640px) {
  .section-header { flex-direction: row; }
}
.section-eyebrow {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--color-teal);
  margin-bottom: 12px;
}
.section-title { color: var(--color-text); margin: 0; }
.section-subtitle { color: var(--color-text-muted); font-size: 15px; margin-top: 12px; max-width: 32rem; }

.section-view-all {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  background: white; border: 1px solid var(--color-border);
  color: var(--color-text); font-weight: 600; font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
}
.section-view-all:hover { border-color: var(--color-teal); color: var(--color-teal); }

/* ── Product grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(5, 1fr); } }

/* Carousel row */
.product-carousel {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (min-width: 640px) { .product-carousel { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .product-carousel { grid-template-columns: repeat(4, 1fr); } }

/* ── Product card ── */
.product-card {
  background: white; border-radius: 16px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  display: flex; flex-direction: column;
  transition: box-shadow 0.3s, transform 0.3s;
  position: relative;
}
.product-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.10); transform: translateY(-3px); }
.product-card__badges {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: flex; flex-direction: column; gap: 6px;
}
.badge {
  display: inline-block; padding: 3px 10px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  border-radius: 999px;
}
.badge--promo { background: var(--color-coral); color: white; }
.badge--new { background: var(--color-teal); color: white; }
.badge--eco { background: var(--color-green); color: white; }
.badge--soon { background: var(--color-navy); color: white; }

.product-card__image {
  position: relative;
  padding-top: 79%;
  background: var(--apple-gray);
  overflow: hidden;
}
.product-card__image img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: contain; padding: 20px;
  transition: transform 0.5s;
}
.product-card:hover .product-card__image img { transform: scale(1.06); }

.product-card__content {
  padding: 20px; display: flex; flex-direction: column; flex: 1; gap: 8px;
}
.product-card__brand {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--color-text-muted); font-weight: 700; line-height: 1;
}
.product-card__name {
  font-size: 15px; font-weight: 600; color: var(--color-text);
  line-height: 1.35; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.product-card__name:hover { color: var(--color-teal); }
.product-card__price-row {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin-top: auto;
}
.product-card__price {
  font-size: 20px; font-weight: 700; color: var(--color-text);
}
.product-card__price--promo { color: var(--color-coral-dark); }
.product-card__price-old {
  font-size: 13px; text-decoration: line-through;
  color: var(--color-text-muted);
}
.product-card__stock {
  font-size: 12px; font-weight: 500;
}
.product-card__stock--in { color: var(--color-green); }
.product-card__stock--out { color: var(--color-red); }

/* ── Category tile ── */
.category-tile {
  background: white; border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(212,196,176,0.4);
  transition: box-shadow 0.3s, transform 0.3s;
  position: relative;
}
.category-tile:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.10); }

/* ── Footer ── */
.site-footer {
  background: var(--color-navy-dark); color: rgba(255,255,255,0.75);
  padding: 60px 0 20px; margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-widget-title { color: white; font-size: 14px; font-weight: 700; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.1em; }
.footer-widget ul { list-style: none; padding: 0; margin: 0; }
.footer-widget li { margin-bottom: 8px; }
.footer-widget a { color: rgba(255,255,255,0.7); font-size: 14px; }
.footer-widget a:hover { color: white; }

.footer-bottom {
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-direction: column; gap: 12px;
  align-items: center; text-align: center;
  font-size: 12px; color: rgba(255,255,255,0.55);
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ── Legal page ── */
.page-legal {
  max-width: 800px; margin: 60px auto; padding: 0 24px;
  font-size: 16px; line-height: 1.7;
}
.page-legal h1 { margin-bottom: 32px; }
.page-legal h2 { margin-top: 40px; }

/* ── WooCommerce overrides ── */
.woocommerce-breadcrumb {
  padding: 20px 0; font-size: 13px; color: var(--color-text-muted);
}
.woocommerce-breadcrumb a { color: var(--color-teal); }
.crumb-sep { margin: 0 8px; opacity: 0.5; }

.woocommerce ul.products, .woocommerce-page ul.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 0; list-style: none;
}
@media (min-width: 640px) { .woocommerce ul.products, .woocommerce-page ul.products { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .woocommerce ul.products, .woocommerce-page ul.products { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .woocommerce ul.products, .woocommerce-page ul.products { grid-template-columns: repeat(5, 1fr); } }
.woocommerce ul.products li.product { width: 100% !important; float: none !important; margin: 0 !important; }

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 15px; font-weight: 600; color: var(--color-text); padding: 8px 0;
}
.woocommerce ul.products li.product .price {
  color: var(--color-text); font-size: 20px; font-weight: 700;
}
.woocommerce ul.products li.product .price del { color: var(--color-text-muted); font-size: 13px; }
.woocommerce ul.products li.product .price ins { text-decoration: none; color: var(--color-coral-dark); }
.woocommerce ul.products li.product a.button, .woocommerce a.button.alt {
  background: var(--color-teal); color: white; border-radius: 999px; padding: 10px 20px;
  font-weight: 600; text-transform: none;
}
.woocommerce ul.products li.product a.button:hover, .woocommerce a.button.alt:hover {
  background: var(--color-teal-dark); color: white;
}

/* Single product */
.woocommerce div.product .product_title {
  font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; color: var(--color-text);
  margin-bottom: 16px;
}
.woocommerce div.product p.price, .woocommerce div.product span.price {
  color: var(--color-text); font-size: 28px; font-weight: 700;
}
.woocommerce div.product form.cart .quantity {
  margin-right: 12px;
}
.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
  background: var(--color-teal); color: white;
  border-radius: 999px; padding: 12px 24px; font-weight: 600;
}
.woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover {
  background: var(--color-teal-dark); color: white;
}

/* Cart / checkout / account */
.woocommerce-cart .cart-collaterals, .woocommerce-checkout form .form-row {
  font-size: 14px;
}
.woocommerce table.shop_table {
  border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden;
}
.woocommerce table.shop_table th { background: var(--apple-gray); color: var(--color-text); font-weight: 600; }

/* Messages */
.woocommerce-message, .woocommerce-info {
  border-top-color: var(--color-teal);
}
.woocommerce-message::before, .woocommerce-info::before {
  color: var(--color-teal);
}
