/*
Theme Name: Ópticas Losada
Theme URI: https://opticaslosada.cl/
Author: Grupo Losada
Description: Tema premium para la nueva tienda WordPress/WooCommerce de Ópticas Losada.
Version: 0.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: opticas-losada
*/

:root {
  --losada-ink: #142033;
  --losada-ink-2: #24334b;
  --losada-cream: #f7f3ec;
  --losada-paper: #fffdfa;
  --losada-sand: #e8ded1;
  --losada-copper: #a95e43;
  --losada-blue: #446d83;
  --losada-line: rgba(20, 32, 51, .14);
  --losada-shadow: 0 24px 70px rgba(20, 32, 51, .12);
  --losada-radius: 1.5rem;
  --losada-serif: Georgia, "Times New Roman", serif;
  --losada-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--losada-ink);
  background: var(--losada-paper);
  font-family: var(--losada-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .site-header { top: 32px; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.topbar {
  padding: .55rem 1rem;
  color: #fff;
  background: var(--losada-ink);
  font-size: .82rem;
  letter-spacing: .03em;
  text-align: center;
}
.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--losada-line);
  background: rgba(255, 253, 250, .94);
  backdrop-filter: blur(16px);
}
.header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
}
.site-branding .custom-logo { max-height: 46px; width: auto; }
.brand-wordmark {
  display: inline-flex;
  flex-direction: column;
  font-family: var(--losada-serif);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: .88;
  letter-spacing: .07em;
}
.brand-wordmark small {
  margin-top: .38rem;
  font-family: var(--losada-sans);
  font-size: .55rem;
  font-weight: 600;
  letter-spacing: .24em;
}
.primary-menu, .header-actions, .footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.primary-menu { justify-content: center; font-size: .92rem; font-weight: 600; }
.primary-menu a, .header-actions a { position: relative; padding-block: .4rem; }
.primary-menu a::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
}
.primary-menu a:hover::after { transform: scaleX(1); transform-origin: left; }
.cart-link { display: inline-flex; align-items: center; gap: .45rem; }
.cart-count {
  min-width: 1.35rem;
  height: 1.35rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--losada-copper);
  font-size: .72rem;
}
.menu-toggle { display: none; border: 0; color: inherit; background: transparent; }

.hero {
  position: relative;
  min-height: 720px;
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 77% 27%, rgba(68, 109, 131, .18), transparent 28%),
    linear-gradient(120deg, #f8f1e7 0%, #fffdfa 56%, #e8eef0 100%);
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(20, 32, 51, .13);
  border-radius: 50%;
}
.hero::before { width: 520px; height: 520px; top: -160px; right: -110px; }
.hero::after { width: 360px; height: 360px; right: 120px; bottom: -210px; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 4rem; align-items: center; }
.eyebrow {
  margin: 0 0 1rem;
  color: var(--losada-copper);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}
h1, h2, h3 { margin-top: 0; line-height: 1.08; }
h1, h2 { font-family: var(--losada-serif); font-weight: 500; }
h1 { max-width: 760px; margin-bottom: 1.35rem; font-size: clamp(3.4rem, 7vw, 6.8rem); letter-spacing: -.055em; }
h2 { margin-bottom: 1rem; font-size: clamp(2.25rem, 4vw, 4.1rem); letter-spacing: -.04em; }
h3 { margin-bottom: .65rem; font-size: 1.2rem; }
.hero-copy > p:not(.eyebrow) { max-width: 600px; margin: 0 0 2rem; color: var(--losada-ink-2); font-size: 1.12rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; }
.button, button.button, input.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .8rem 1.35rem;
  border: 1px solid var(--losada-ink);
  border-radius: 999px;
  color: #fff;
  background: var(--losada-ink);
  font-weight: 750;
  line-height: 1;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.button:hover { transform: translateY(-2px); background: var(--losada-ink-2); }
.button.secondary { color: var(--losada-ink); background: transparent; }
.button.secondary:hover { color: #fff; background: var(--losada-ink); }
.hero-visual { min-height: 500px; display: grid; place-items: center; }
.frame-art {
  position: relative;
  width: min(520px, 100%);
  aspect-ratio: 1.1;
  display: grid;
  place-items: center;
  border-radius: 49% 51% 48% 52% / 52% 42% 58% 48%;
  background: linear-gradient(145deg, #d5bbb0, #f0e4da 55%, #c1d2d8);
  box-shadow: var(--losada-shadow);
  transform: rotate(-3deg);
}
.frame-art::before {
  content: "";
  width: 82%;
  height: 39%;
  background:
    radial-gradient(ellipse at 27% 50%, transparent 0 29%, var(--losada-ink) 30% 35%, transparent 36%),
    radial-gradient(ellipse at 73% 50%, transparent 0 29%, var(--losada-ink) 30% 35%, transparent 36%),
    linear-gradient(var(--losada-ink), var(--losada-ink)) center 48% / 18% 4% no-repeat;
  filter: drop-shadow(0 16px 12px rgba(20, 32, 51, .2));
  transform: rotate(3deg);
}
.frame-art span {
  position: absolute;
  right: 8%;
  bottom: 9%;
  max-width: 170px;
  padding: .85rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 253, 250, .88);
  box-shadow: 0 12px 30px rgba(20, 32, 51, .1);
  font-size: .78rem;
  font-weight: 700;
  transform: rotate(3deg);
}

.section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section.alt { background: var(--losada-cream); }
.section-heading { max-width: 700px; margin-bottom: 2.5rem; }
.action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.action-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  border: 1px solid var(--losada-line);
  border-radius: var(--losada-radius);
  background: var(--losada-paper);
  transition: transform .25s ease, box-shadow .25s ease;
}
.action-card:hover { transform: translateY(-5px); box-shadow: 0 18px 45px rgba(20, 32, 51, .1); }
.action-card .number { margin-bottom: auto; color: var(--losada-copper); font-family: var(--losada-serif); font-size: 2rem; }
.action-card p { margin: 0; color: #5b6472; font-size: .91rem; }
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 7vw, 7rem); align-items: center; }
.lens-visual {
  min-height: 520px;
  padding: 2rem;
  display: grid;
  align-content: end;
  border-radius: var(--losada-radius);
  color: #fff;
  background:
    linear-gradient(180deg, transparent 35%, rgba(20, 32, 51, .92) 100%),
    radial-gradient(circle at 50% 15%, #88afbe 0 18%, #456f83 52%, #1f3144 100%);
  box-shadow: var(--losada-shadow);
}
.lens-visual strong { max-width: 430px; font-family: var(--losada-serif); font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.06; }
.feature-list { display: grid; gap: 1rem; margin: 2rem 0; padding: 0; list-style: none; }
.feature-list li { display: grid; grid-template-columns: 2rem 1fr; gap: .75rem; align-items: start; }
.feature-list li::before { content: "✓"; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--losada-blue); font-size: .78rem; }
.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--losada-line); }
.trust-item { padding: 2.2rem; text-align: center; }
.trust-item + .trust-item { border-left: 1px solid var(--losada-line); }
.trust-item strong { display: block; margin-bottom: .3rem; font-family: var(--losada-serif); font-size: 1.25rem; }
.cta-panel {
  padding: clamp(2.5rem, 7vw, 6rem);
  border-radius: var(--losada-radius);
  color: #fff;
  background: var(--losada-ink);
  text-align: center;
}
.cta-panel h2 { max-width: 780px; margin-inline: auto; }
.cta-panel p { max-width: 620px; margin: 0 auto 2rem; color: rgba(255,255,255,.75); }
.cta-panel .button { color: var(--losada-ink); border-color: #fff; background: #fff; }

.site-main { min-height: 55vh; }
.content-area { padding: 4rem 0; }
.entry-content { max-width: 820px; }
.entry-content > * { max-width: 100%; }
.page-header { padding: 4rem 0 2rem; }

.woocommerce .products { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product { width: auto !important; margin: 0 !important; }
.woocommerce ul.products li.product a img { aspect-ratio: 4 / 3; object-fit: contain; padding: 1rem; border-radius: 1rem; background: #f7f5f1; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 1rem; }
.woocommerce ul.products li.product .price { color: var(--losada-ink); font-weight: 800; }
.woocommerce div.product { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); gap: clamp(2rem, 6vw, 6rem); }
.woocommerce div.product div.images, .woocommerce div.product div.summary { width: auto; float: none; }
.woocommerce div.product div.images img { border-radius: var(--losada-radius); background: #f7f5f1; }
.woocommerce div.product .product_title { font-family: var(--losada-serif); font-size: clamp(2.5rem, 4vw, 4.4rem); }
.woocommerce div.product p.price { color: var(--losada-ink); font-size: 1.25rem; }
.woocommerce-message, .woocommerce-info { border-top-color: var(--losada-copper); background: var(--losada-cream); }

.site-footer { padding: 4rem 0 2rem; color: rgba(255,255,255,.78); background: #0f1828; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 3rem; }
.footer-brand { color: #fff; }
.footer-grid h3 { color: #fff; font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; }
.footer-links { flex-direction: column; align-items: flex-start; gap: .55rem; }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid rgba(255,255,255,.14); font-size: .8rem; }

@media (max-width: 980px) {
  .header-inner { grid-template-columns: 1fr auto auto; }
  .menu-toggle { display: inline-flex; }
  .main-navigation { display: none; position: absolute; inset: 100% 0 auto; padding: 1rem 20px 1.5rem; border-bottom: 1px solid var(--losada-line); background: var(--losada-paper); }
  .main-navigation.is-open { display: block; }
  .primary-menu { align-items: flex-start; flex-direction: column; }
  .header-actions .account-link { display: none; }
  .hero { min-height: auto; padding: 5rem 0; }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-visual { min-height: 390px; }
  .frame-art { width: min(470px, 92%); }
  .action-grid { grid-template-columns: repeat(2, 1fr); }
  .woocommerce .products { grid-template-columns: repeat(2, 1fr); }
  .woocommerce div.product { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body.admin-bar .site-header { top: 0; }
  .container { width: min(100% - 28px, 1180px); }
  .topbar { font-size: .72rem; }
  .header-inner { min-height: 66px; gap: .8rem; }
  .brand-wordmark { font-size: 1rem; }
  .brand-wordmark small { font-size: .45rem; }
  .hero { padding: 3.5rem 0; }
  .hero-grid { gap: 2.5rem; }
  h1 { font-size: clamp(3rem, 16vw, 4.6rem); }
  .hero-visual { min-height: 300px; }
  .action-grid, .woocommerce .products, .footer-grid { grid-template-columns: 1fr; }
  .action-card { min-height: 210px; }
  .trust-strip { grid-template-columns: 1fr; }
  .trust-item + .trust-item { border-left: 0; border-top: 1px solid var(--losada-line); }
  .footer-bottom { flex-direction: column; }
}
