:root {
  --ink: #30362c;
  --muted: #717665;
  --paper: #f6f5ef;
  --surface: #fffefb;
  --line: #dedfd4;
  --accent: #a96408;
  --accent-dark: #8d5408;
  --green: #60664f;
  --shadow: 0 18px 44px rgba(44, 37, 29, 0.09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }

button { color: inherit; }

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--green);
}

.hero::before,
.hero::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.hero::before { width: 420px; height: 420px; right: -120px; top: -230px; }
.hero::after { width: 280px; height: 280px; right: 90px; bottom: -230px; }

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(290px, 520px) minmax(260px, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: clamp(28px, 5vw, 70px);
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16px 0;
}

.eyebrow,
.section-kicker,
.collection-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  color: #ffd18a;
}

h1 {
  grid-column: 2;
  grid-row: 2;
  margin: 5px 0 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.88;
}

h1 span { color: #efa72f; }

.intro {
  grid-column: 2;
  grid-row: 3;
  align-self: start;
  max-width: 590px;
  margin: 0;
  color: #e7e8df;
  font-size: clamp(0.88rem, 1.5vw, 1rem);
  line-height: 1.45;
}

.search-wrap {
  grid-column: 1;
  grid-row: 1 / 4;
  width: 100%;
  max-width: 520px;
  margin-top: 0;
}

.search-wrap label {
  display: block;
  margin-bottom: 5px;
  color: #e7e8df;
  font-size: 0.74rem;
  font-weight: 700;
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 44px;
  padding: 0 7px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.search-box > span { margin-right: 9px; color: #efa72f; font-size: 1.35rem; line-height: 1; }

.search-box input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font-size: 0.9rem;
}

.search-box input::placeholder { color: rgba(255, 255, 255, 0.6); }

#clear-search {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: transparent;
  cursor: pointer;
  font-size: 1.3rem;
}

#clear-search:hover { background: rgba(255, 255, 255, 0.1); }

.catalogue {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 70px;
}

.catalogue-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-kicker { color: var(--accent); }

.catalogue-head h2 {
  margin: 5px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

#result-count { margin: 0 0 7px; color: var(--muted); font-weight: 700; }

.filters {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  margin: 30px 0 27px;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
}

.filter {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 254, 251, 0.7);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 750;
}

.filter span { margin-left: 4px; color: var(--muted); }
.filter:hover { border-color: #b9bdaa; }
.filter.is-active { border-color: var(--green); color: #fff; background: var(--green); }
.filter.is-active span { color: #e7eadf; }

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

.product {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 3px 0 rgba(60, 48, 35, 0.025);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.product:hover {
  transform: translateY(-4px);
  border-color: #c5cab8;
  box-shadow: var(--shadow);
}

.product[hidden] { display: none; }

.product-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding: 14px;
  border: 0;
  border-bottom: 1px solid #e9ebdf;
  background: #fff;
  cursor: zoom-in;
}

.product-image::after {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  content: "+";
  border-radius: 50%;
  color: #fff;
  background: rgba(96, 102, 79, 0.9);
  opacity: 0;
  transform: translateY(4px);
  transition: 160ms ease;
}

.product:hover .product-image::after,
.product-image:focus-visible::after { opacity: 1; transform: translateY(0); }

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 220ms ease;
}

.product:hover .product-image img { transform: scale(1.035); }

.product-info { min-height: 105px; padding: 15px 16px 17px; }
.collection-label { color: var(--accent); font-size: 0.62rem; }
.product-info h3 { margin: 6px 0 0; font-size: 0.98rem; letter-spacing: -0.01em; }
.variant { display: block; margin-top: 5px; color: var(--muted); font-size: 0.78rem; }

.empty-state {
  padding: 70px 20px;
  text-align: center;
  border: 1px dashed #c5cab8;
  border-radius: 18px;
  background: rgba(255, 254, 251, 0.55);
}

.empty-state p { color: var(--muted); }
.empty-state button {
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  cursor: pointer;
  font-weight: 750;
}

footer {
  padding: 28px 20px;
  color: #e7eadf;
  text-align: center;
  background: #3e4635;
  font-size: 0.84rem;
}

.lightbox {
  width: min(850px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(12, 18, 15, 0.35);
}

.lightbox::backdrop { background: rgba(15, 24, 20, 0.72); backdrop-filter: blur(4px); }

.lightbox-close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(28, 36, 31, 0.78);
  cursor: pointer;
  font-size: 1.55rem;
}

.lightbox-content img {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #fff;
}

.lightbox-content > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 22px 21px;
  border-top: 1px solid var(--line);
}

#lightbox-variant { color: #3e4635; font-weight: 600; }

@media (max-width: 1050px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .hero-inner { display: block; padding: 15px 0 16px; }
  .search-wrap { margin-top: 12px; }
  .catalogue { padding-top: 42px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
}

@media (max-width: 570px) {
  .hero-inner, .catalogue { width: min(100% - 28px, 1280px); }
  .catalogue-head { align-items: start; flex-direction: column; gap: 7px; }
  #result-count { margin: 0; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product { border-radius: 14px; }
  .product-image { padding: 9px; }
  .product-info { min-height: 96px; padding: 13px 12px 15px; }
  .product-info h3 { overflow-wrap: anywhere; font-size: 0.88rem; }
  .variant { font-size: 0.7rem; }
  .lightbox-content > div { align-items: start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Catálogo y accesibilidad. */
[hidden] { display: none !important; }
.search-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: -8px 0 24px; color: var(--muted); font-size: 0.82rem; }
.search-toolbar p { margin: 0; }
.variant { margin-bottom: 0; color: #3e4635; font-weight: 600; }
.lightbox-content > div { flex-wrap: wrap; align-items: center; }
.product-info h3 { overflow-wrap: anywhere; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box:focus-within { outline: 2px solid #efa72f; outline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.search-box input:focus-visible { outline: 0; }
body:has(.lightbox[open]) { overflow: hidden; }
.skip-link { position: absolute; left: 16px; top: -100px; padding: 12px; background: var(--surface); color: var(--ink); z-index: 5; }
.skip-link:focus { top: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 570px) {
  .lightbox-content > div { align-items: start; }
}
/* Presentación de Yiyuan y buscador junto al catálogo. */
.hero-inner {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  grid-template-rows: auto;
  padding: 28px 0;
}
.hero-title { min-width: 0; }
.hero-title h1 { margin: 12px 0 14px; line-height: 1; }
.hero-title .intro { max-width: 420px; }
.maker-intro { padding-left: 28px; border-left: 1px solid rgba(255,255,255,.24); }
.maker-intro h2 { margin: 0 0 10px; color: #ffd18a; font-size: 1.05rem; font-weight: 700; }
.maker-intro p { margin: 0; color: #f2f3eb; font-size: .86rem; line-height: 1.65; }
.maker-intro p + p { margin-top: 9px; }
.catalogue { padding-top: 36px; }
.catalogue-search { display: flex; align-items: center; gap: 24px; margin-top: 22px; }
.catalogue-search .search-wrap { max-width: 660px; margin: 0; }
.catalogue-search label { color: var(--green); margin-bottom: 7px; }
.catalogue-search .search-box { min-height: 48px; background: var(--surface); border-color: #b9bfab; backdrop-filter: none; }
.catalogue-search .search-box input { color: var(--ink); min-height: 44px; }
.catalogue-search .search-box input::placeholder { color: var(--muted); }
.catalogue-search .search-box > span { color: var(--accent); }
.catalogue-search #clear-search { color: var(--green); }
.catalogue-search #clear-search:hover { background: #e7eadf; }
.catalogue-search #search-hint { margin: 22px 0 0; font-size: .8rem; color: var(--muted); }
.filters { margin-top: 20px; margin-bottom: 20px; }
@media (max-width: 780px) {
  .hero-inner { display: grid; grid-template-columns: 1fr; gap: 22px; padding: 23px 0; }
  .hero-title .intro { max-width: none; }
  .maker-intro { padding: 18px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.24); }
  .catalogue-search { display: block; }
  .catalogue-search .search-wrap { max-width: none; }
  .catalogue-search #search-hint { margin-top: 8px; }
}
/* Información sobre pedidos y fotografías. */
.order-notice {
  margin: 0 0 32px;
  padding: 20px 24px;
  border: 1px solid #d9ddcd;
  border-left: 4px solid #efa72f;
  border-radius: 10px;
  background: #eef0e5;
  color: #3e4635;
}
.order-notice h2 { margin: 0 0 8px; font-size: 1rem; font-weight: 750; }
.order-notice p { margin: 0; font-size: .86rem; line-height: 1.7; }
.order-notice .photo-notice { margin-top: 8px; color: #565e49; }
.order-notice a { color: #704607; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.order-notice a:hover { color: #3e4635; }
@media (max-width: 570px) {
  .order-notice { padding: 17px 16px; margin-bottom: 26px; }
}
.product-info .shop-link { display: inline-block; margin-top: .7rem; color: #5a6049; font-size: .875rem; font-weight: 600; text-underline-offset: .2em; }
.product-info .shop-link:hover { color: #a95326; }
.product-info .shop-link:focus-visible { outline: 2px solid #a95326; outline-offset: 4px; }
.availability-trigger { padding: 0; border: 0; background: none; text-align: left; text-decoration: underline; cursor: pointer; }
.availability-dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 30px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.availability-dialog::backdrop { background: rgba(30, 38, 28, .38); }
.availability-dialog .section-kicker { padding-right: 38px; }
.availability-dialog h2 { margin: 14px 32px 16px 0; font-family: Georgia, 'Times New Roman', serif; font-size: 1.8rem; font-weight: 500; }
.availability-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #eef0e5; cursor: pointer; font-size: 1.5rem; }
.availability-reference { padding: 10px 14px; border-radius: 8px; background: #eef0e5; font-weight: 650; overflow-wrap: anywhere; }
#availability-description { font-size: .95rem; line-height: 1.7; }
.availability-contacts { display: grid; gap: 10px; margin-top: 22px; }
.availability-contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--green); text-decoration: none; overflow-wrap: anywhere; }
.availability-contact span { min-width: 0; text-decoration: underline; text-underline-offset: 3px; }
.availability-contact:hover { background: #eef0e5; border-color: #b9bfab; }
.availability-hint { margin-bottom: 0; color: var(--muted); font-size: .8rem; line-height: 1.6; }
body:has(.availability-dialog[open]) { overflow: hidden; }
@media (max-width: 570px) { .availability-dialog { padding: 24px 20px; } }

.availability-shop { background: #eef0e5; border-color: #b9bfab; font-weight: 700; }
