/* theme.css — adapta la tienda al estilo de la web principal.
   Enlázalo el ÚLTIMO en el <head>, después de responsive.css. */
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,900");

/* 1. Paleta de la web principal (también redefine los colores de identity.css) */
:root {
  --paper: #ffffff;
  --white: #ffffff;
  --ink: #39454b;
  --muted: #6c777d;
  --coral: #de7b19;        /* acento naranja (botones, detalles) */
  --coral-light: #e68a2e;  /* naranja más claro, al pasar el ratón */
  --coral-text: #b45b08;   /* naranja más oscuro, para texto pequeño legible */
  --line: #e5e6e7;
  --photo: #f5f6f7;
  --teal: #39454b;         /* pie y bandas oscuras */
  --accent-hover: #de7b19; /* color de enlaces al pasar el ratón */

  /* Variables de identity.css */
  --identity-red: #de7b19;
  --identity-blue: #39454b;
  --identity-white: #ffffff;
}

/* 2. Tipografía */
body {
  font-family: "Source Sans Pro", sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0.025em;
}
button,
input,
textarea,
select {
  font-family: inherit;
}
h1,
h2,
h3 {
  font-weight: 300;
}
h1 {
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.dialog-head h2,
.section-head h2 {
  font-weight: 300;
  letter-spacing: 0;
}

/* Source Sans es más pequeña que Arial: subo los textos pequeños */
.eyebrow { font-size: 12px; }
.breadcrumb,
.price-row > span:last-child { font-size: 13px; }
summary,
.text-button,
details p,
.bag-item p,
.bag-item button { font-size: 14px; }
.bag-item h3 { font-size: 16px; }

/* Tarjetas de producto */
.product-card .card-info h3 { font-size: 16px; font-weight: 400; }
.product-card .card-info > span { font-size: 16px; font-weight: 600; }

/* Móvil: tarjetas en 2 columnas, texto algo menor (responsive.css usa 13px y 14px) */
@media (max-width: 650px) {
  .product-card .card-info h3 { font-size: 15px; }
  .product-card .card-info > span { font-size: 15px; }
}

/* 3. Cabecera: medidas calcadas de #header en el main.css de tu web.
   --web-em es el tamaño de texto base de tu web (17pt / 15pt / 14pt según la pantalla). */
header {
  --web-em: 17pt;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 0;
  box-shadow: 0 0 0.15em 0 rgba(0, 0, 0, 0.1);
}
@media (max-width: 1920px) {
  header { --web-em: 15pt; }
}
@media (max-width: 1000px) {
  header { --web-em: 14pt; }
}

.header-inner {
  height: calc(var(--web-em) * 3);   /* 3em, como #header */
  margin: 0 var(--web-em);           /* el título queda a 1em del borde */
}

/* Título: igual que "Eduardo Suazo" en tu web, sin el puntito final.
   Uso .header-inner > .wordmark para ganar a la regla de responsive.css. */
.header-inner > .wordmark {
  font-family: "Source Sans Pro", sans-serif;
  font-size: calc(var(--web-em) * 1.25);
  font-weight: 300;
  letter-spacing: normal;
  line-height: 1;
  text-transform: none;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark::after {
  content: none;
  display: none;
}

/* Móvil (como en tu web a 736px): cabecera de 2.5em y título de 1em centrado */
@media (max-width: 736px) {
  .header-inner {
    position: relative;
    height: calc(var(--web-em) * 2.5);
  }
  .header-inner > .wordmark {
    font-size: var(--web-em);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
  }
}

/* Menú superior (Shop, Website, Contact): el peso no cambia nunca, tampoco al pasar el ratón */
header nav {
  font-size: 16px;
  font-weight: 300;
}
header nav a,
header nav button {
  font-weight: 300 !important;
}
header nav a:hover,
header nav button:hover {
  text-decoration: none;
  color: var(--accent-hover);
  font-weight: 300 !important;
}

/* Franja de categorías: naranja de tu web con texto blanco */
.identity-departments {
  background: var(--coral); /* #de7b19 */
  color: #ffffff;
  border-bottom: 0;
  min-height: 52px;
  gap: 32px;
}
.identity-departments a {
  min-height: 52px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.identity-departments a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 6px;
}
.identity-departments a:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: -3px;
}
/* Móvil: texto y huecos menores para que las 3 categorías quepan sin desplazar */
@media (max-width: 650px) {
  .identity-departments { gap: 22px; }
  .identity-departments a { font-size: 12px; letter-spacing: 0.04em; }
}

/* 4. Botones en forma de píldora, con el texto siempre en mayúsculas */
.primary {
  border-radius: 999px;
  font-weight: 600;
  padding-left: 28px;
  padding-right: 28px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.primary:hover { background: var(--coral-light); }
.primary:active { background: #c46a12; }
.primary:disabled { opacity: 0.6; }
.text-button:hover { color: var(--accent-hover); }

/* Enlaces dentro de textos: como en tu web (negrita, sin subrayado, color del texto).
   Tu web pide peso 600, pero solo carga 300 y 900, así que se ve con el 900. */
main p a {
  color: inherit;
  text-decoration: none;
  font-weight: 900;
  transition: color 0.2s ease-in-out;
}
main p a:hover {
  color: #f1b131;
}

/* 5. Campos de formulario */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="url"],
input[type="password"],
textarea {
  border: 2px solid var(--line);
  border-radius: 0.5em;
  padding: 0.65em 0.75em;
  background: none;
  color: inherit;
  transition: border-color 0.2s ease-in-out;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: #9ac8e9;
}

/* 6. Pie oscuro, como el de la web */
footer {
  background: var(--teal);
  border-top: 0;
  color: rgba(185, 186, 187, 0.5);
}
footer .footer-bottom {
  border-top-color: rgba(185, 186, 187, 0.2);
  color: inherit;
  font-size: 13px;
}
footer a:hover { color: #ffffff; }

/* 7. Ventanas emergentes y selección de texto */
dialog::backdrop { background: rgba(57, 69, 75, 0.7); }
::selection {
  background: rgba(222, 123, 25, 0.7);
  color: #ffffff;
}
::-moz-selection {
  background: rgba(222, 123, 25, 0.7);
  color: #ffffff;
}

/* --- Ajustes tras revisar home.css --- */

/* Menú: el botón "Shop" con el mismo tamaño que los enlaces */
header nav button { font-size: 16px; }

/* Imágenes de producto: fondo gris claro */
.card-image { background: var(--photo); }

/* Ficha de producto: descripción más legible */
.live-product .product-info > p {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
}

/* Buscador y cantidad: mismo estilo que el resto de campos */
#search-input,
.product-quantity input,
input[type="number"] {
  border: 2px solid var(--line);
  border-radius: 0.5em;
  background: none;
  color: inherit;
}
#search-input:focus,
.product-quantity input:focus,
input[type="number"]:focus {
  border-color: #9ac8e9;
}

/* --- Ajustes tras revisar shop.css y product.css --- */

/* Catálogo: título */
.shop-intro h1 {
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 300;
  letter-spacing: -0.01em;
}

/* Filtros */
.shop-sidebar summary,
.shop-sidebar legend,
.shop-sidebar label { font-size: 15px; }
/* [IDIOMA] base.css agranda a 20px cualquier <span> dentro de un <summary>;
   el título "Filter products" ahora va en un <span> para poder traducirlo */
.shop-sidebar summary span {
  font-size: inherit;
  transition: none;
}
.shop-sidebar input { accent-color: var(--coral); }
.shop-reset { font-size: 14px; }
.shop-reset:hover { color: var(--accent-hover); }
.shop-sidebar select,
.shop-toolbar select {
  border: 2px solid var(--line);
  border-radius: 0.5em;
  background: #ffffff;
  font-size: 15px;
}
.shop-sidebar select:focus,
.shop-toolbar select:focus { border-color: #9ac8e9; }

/* Barra de resultados, filtros activos, paginación y "sin resultados" */
.shop-toolbar h2 {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 0;
}
.shop-toolbar p { font-size: 14px; }
.shop-toolbar label { font-size: 15px; }
.active-filters button { font-size: 14px; }
.shop-pagination button {
  border-radius: 50%;
  font-size: 15px;
}
.shop-empty h3 { font-weight: 300; }
.shop-empty p { font-size: 16px; }

/* Ficha de producto */
.live-product h1 { font-size: clamp(36px, 4vw, 52px); }
.product-image-caption,
#gallery-status { font-size: 13px; }
.product-buy label { font-size: 15px; }
.live-product .product-quantity input { border-radius: 0.5em; }
.gallery-thumbnails [aria-pressed="true"] { border-color: var(--coral); }
.product-enlarge:hover > span {
  background: var(--coral);
  color: #ffffff;
}

/* --- Ajustes tras revisar commerce.css (cesta, checkout y confirmación) --- */

/* Títulos */
.commerce-page h1 {
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 300;
  letter-spacing: -0.01em;
}
.commerce-crumb { font-size: 14px; }
.commerce-empty h2,
.confirmation-copy h2 {
  font-weight: 300;
  letter-spacing: 0;
}
.commerce-empty p,
.confirmation-copy p {
  font-size: 17px;
  font-weight: 300;
}

/* cesta */
.cart-line h2 { font-size: 20px; font-weight: 400; }
.cart-line span { font-size: 14px; }
.cart-line > strong { font-size: 16px; font-weight: 600; }
.cart-controls { font-size: 14px; }
.cart-controls button:hover { color: var(--accent-hover); }
.commerce-back { font-size: 14px; }
.commerce-back:hover { color: var(--accent-hover); }
@media (max-width: 650px) {
  .cart-line h2 { font-size: 18px; }
}

/* Resumen del pedido */
.order-summary h2 {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 0;
}
.summary-item strong { font-size: 15px; font-weight: 600; }
.summary-item small { font-size: 13px; }
.summary-item > span { font-size: 15px; }
.cost-lines { font-size: 15px; }
.summary-total { font-size: 20px; }
.order-summary > p { font-size: 14px; }

/* Checkout */
.checkout-section h2 {
  font-size: 22px;
  font-weight: 300;
  line-height: 1.4;
}
.checkout-fields label { font-size: 15px; }
.checkout-choice { font-size: 15px; }
.checkout-choice input { accent-color: var(--coral); }
#commerce-status { font-size: 14px; }
#checkout-error {
  font-size: 14px;
  color: #a62516;
}

/* Confirmación del pedido */
.confirmation-mark {
  background: var(--coral);
  color: #ffffff;
}

/* --- Formulario de contacto y campos de formulario --- */

/* Selects y áreas de texto de los formularios, como el resto de campos */
.checkout-fields select,
.checkout-fields textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 2px solid var(--line);
  border-radius: 0.5em;
  padding: 12px;
  background: none;
  color: inherit;
  font: inherit;
}
.checkout-fields select { min-height: 48px; }
.checkout-fields textarea { min-height: 150px; resize: vertical; }
.checkout-fields select:focus,
.checkout-fields textarea:focus { border-color: #9ac8e9; }
.checkout-fields textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Contacto */
#contact-form { max-width: 720px; }
#contact-form > .primary { width: 100%; margin-top: 15px; }
#contact-status,
#contact-error { margin-top: 16px; font-size: 15px; }
#contact-status:empty,
#contact-error:empty { margin: 0; }
#contact-error { color: #a62516; }

/* Móvil estrecho: con "Eduardo Suazo shop" el título centrado toca los iconos.
   Lo coloco a la izquierda, junto al botón del menú, y lo reduzco un poco.
   [IDIOMA] El texto en español ("Eduardo Suazo tienda") es algo más largo,
   así que el límite sube de 400px a 420px. */
@media (max-width: 420px) {
  .header-inner > .wordmark {
    position: static;
    transform: none;
    margin-right: auto;
    font-size: clamp(14px, 4.4vw, 16px);
  }
}

/* Página de información (envíos, devoluciones, privacidad) */
.policy-page { max-width: 760px; }
.policy-page h2 {
  font-size: 26px;
  font-weight: 300;
  margin: 48px 0 14px;
  scroll-margin-top: 24px;
}
.policy-page p,
.policy-page li {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
}
.policy-page ul { padding-left: 1.2em; margin: 0 0 1em; }
.policy-page li { margin-bottom: 8px; }
.policy-page b { font-weight: 600; }
.policy-page .policy-updated { font-size: 14px; color: var(--muted); }

/* Enlaces dentro de las casillas de consentimiento */
.checkout-choice a { font-weight: 900; }
.checkout-choice a:hover { color: #f1b131; }

/* Casilla de consentimiento: casilla a la izquierda y texto en un bloque */
.checkout-choice { align-items: flex-start; }
.checkout-choice > input { margin-top: 0.3em; }
.checkout-choice > span { line-height: 1.5; }

/* --- [IDIOMA] Selector de idioma (ES | EN) --- */
.lang-switch {
  display: flex;
  align-items: center;
}
.lang-switch button {
  min-width: 36px;
  min-height: 44px;
  padding: 0 6px;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.lang-switch button + button {
  border-left: 1px solid var(--line);
}
.lang-switch button:hover {
  color: var(--ink);
}
.lang-switch button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* En la cabecera se ve en todos los tamaños menos en móvil estrecho;
   en el menú desplegable, solo en móvil estrecho */
#shop-menu .lang-switch {
  display: none;
  margin-top: 22px;
}
@media (max-width: 650px) {
  .header-actions .lang-switch { display: none; }
  #shop-menu .lang-switch { display: flex; }
  #shop-menu .lang-switch button { font-size: 16px; }
}

/* [IDIOMA] Página de información: se muestra el bloque del idioma activo */
html[lang="es"] [data-policy="en"],
html[lang="en"] [data-policy="es"] { display: none; }
.policy-page section { scroll-margin-top: 24px; }

/* Enlaces dentro de las listas de esa página, como los demás enlaces de texto */
.policy-page li a {
  color: inherit;
  text-decoration: none;
  font-weight: 900;
  transition: color 0.2s ease-in-out;
}
.policy-page li a:hover { color: #f1b131; }

/* --- Obras vendidas o no disponibles --- */

.card-image { position: relative; }

/* Velo sobre la imagen de la tarjeta; deja pasar el clic a la ficha de la obra */
.card-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}
.card-status span {
  padding: 8px 18px;
  background: #ffffff;
  color: var(--ink);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Aviso en la ficha de la obra, en lugar del botón de compra */
.product-status {
  margin: 24px 0;
  padding: 20px 24px;
  border: 2px solid var(--line);
  border-radius: 0.5em;
}
.product-status strong {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.product-status p {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 300;
}
.product-status a { font-weight: 900; }
.product-status a:hover { color: var(--accent-hover); }

/* Pie de la tienda: misma altura que el de la web.
   --web-em es el tamaño de texto base de tu web (17pt / 15pt / 14pt según la pantalla),
   y el pie de la web mide 5em en ordenador (1,5em de margen arriba y abajo + los iconos). */
body > footer {
  --web-em: 17pt;
  margin-bottom: 0;
  padding: 0;
}
@media (max-width: 1920px) {
  body > footer { --web-em: 15pt; }
}
@media (max-width: 1000px) {
  body > footer { --web-em: 14pt; }
}

body > footer .footer-bottom {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  width: 100%;
  max-width: none;
  min-height: calc(var(--web-em) * 5);
  margin: 0;
  padding: calc(var(--web-em) * 1.5);
  border-top: 0;
  line-height: 1.6;
}

/* Páginas con formulario o texto (contacto, cesta, pedido, información): aire antes del pie */
.commerce-page {
  padding-bottom: 64px;
}
@media (max-width: 650px) {
  .commerce-page {
    padding-bottom: 40px;
  }
}

/* Pie: misma tipografía que el de la web (Source Sans Pro ligera, 0,9em del texto base) */
body > footer .footer-bottom {
  font-size: calc(var(--web-em) * 0.9);
  font-weight: 300;
  letter-spacing: 0.025em;
}

/* El pie siempre queda al final de la ventana, aunque la página sea corta */
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body > footer {
  margin-top: auto;
}

/* Ficha de obra: aire entre "Other artwork" y el pie */
#related {
  padding-bottom: 64px;
}
@media (max-width: 650px) {
  #related {
    padding-bottom: 40px;
  }
}

/* Tarjetas: cuando el precio baja bajo el título (tablet y móvil), que quede pegado a él */
@media (max-width: 900px) {
  .product-card .card-info {
    gap: 0px;
  }
  .product-card .card-info h3 {
    margin: 0;
    line-height: 1.25;
  }
  .product-card .card-info > span {
    line-height: 1.25;
  }
}

/* Zoom de la ficha: la imagen ocupa toda la ventana */
#product-zoom {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--paper);
}
#product-zoom .dialog-head {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
}
/* El título sigue ahí para los lectores de pantalla, pero no se ve */
#product-zoom .dialog-head h2 {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
#product-zoom [data-close] {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
  font-size: 20px;
}
#zoom-image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  object-fit: contain;
  cursor: zoom-out;
}

/* Introducción de la tienda: bienvenida y desplegable de envíos */
.shop-intro > p {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 18px;
}
.intro-shipping {
  max-width: 300px;
}
.intro-shipping summary {
  min-height: 44px;
  font-size: 13px;
}
/* base.css agranda a 20px cualquier <span> dentro de un <summary>; el texto de la línea no */
.intro-shipping .summary-label {
  font-size: inherit;
  transition: none;
}
/* Sin la línea de abajo: ya la pone la propia introducción */
.intro-shipping details:last-child {
  border-bottom: 0;
}
.intro-shipping details p {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 16px;
}
@media (max-width: 650px) {
  .shop-intro {
    padding: 12px 0 8px;
  }
  .shop-intro h1 {
    font-size: 32px;
    margin: 8px 0 10px;
  }
  .shop-intro > p {
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 8px;
  }
  .intro-shipping summary {
    font-size: 13px;
  }
  .intro-shipping details p {
    font-size: 13px;
  }
}

/* "Ordenar por": siempre a la derecha, en una línea, pegado al desplegable y con el mismo tamaño que él.
   Para cambiar el tamaño de las dos cosas a la vez, toca solo --sort-size. */
.shop-toolbar {
  flex-wrap: wrap;
  row-gap: 12px;
}
.shop-toolbar .sort-box {
  --sort-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  max-width: 100%;
}
.shop-toolbar .sort-box label {
  display: block;
  margin: 0;
  font-size: var(--sort-size);
  line-height: 1.2;
  letter-spacing: normal;
  white-space: nowrap;
}
.shop-toolbar .sort-box select {
  display: block;
  width: auto;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  font-size: var(--sort-size);
  line-height: 1.2;
  letter-spacing: normal;
}
@media (max-width: 650px) {
  .shop-toolbar .sort-box {
    --sort-size: 13px;
  }
}

/* "Ordenar por" en móvil: la etiqueta encima del desplegable, y los dos bloques en la misma línea */
@media (max-width: 650px) {
  .shop-toolbar {
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 12px;
  }
  .shop-toolbar > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }
  .shop-toolbar .sort-box {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin-left: 0;
  }
  .shop-toolbar .sort-box select {
    max-width: 150px;
  }
}

/* Pie en móvil: texto y espacios más pequeños, centrado como el de la web */
@media (max-width: 650px) {
  body > footer .footer-bottom {
    min-height: 0;
    padding: 20px 16px;
    gap: 6px 16px;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
  }
}