/* Page hero, catalog tools, product grid and the product popup. */

/* Page hero */
.page-hero { padding-block: clamp(40px, 6vw, 96px) clamp(56px, 8vw, 120px); }
.page-hero-inner { display: grid; grid-template-columns: 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.page-hero.has-media .page-hero-inner { grid-template-columns: 1.1fr .9fr; }
.page-hero h1 { max-width: 18ch; margin: 0; }
.page-hero .lead { margin-top: 24px; opacity: .92; }
.page-hero-media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 14px var(--tone-soft); }
.breadcrumb { margin-bottom: 28px; font-size: .92rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-inline-start: 6px; opacity: .5; }
.breadcrumb a { text-decoration: none; opacity: .8; }
.breadcrumb a:hover { opacity: 1; text-decoration: underline; }
.breadcrumb [aria-current] { font-weight: 700; }

/* Catalog tools */
.catalog-tools { display: flex; flex-direction: column; gap: 20px; margin-bottom: 18px; }
.search-field { position: relative; display: block; max-width: 520px; }
.search-field .icon { position: absolute; top: 50%; inset-inline-start: 20px; transform: translateY(-50%); color: var(--ink-soft); pointer-events: none; }
.search-field input {
  width: 100%; min-height: 58px; padding: 12px 24px; padding-inline-start: 56px;
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-size: 1.05rem;
}
.search-field input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 4px rgba(57, 117, 71, .15); }
.chips { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.result-count { margin: 0 0 32px; font-size: .95rem; color: var(--ink-soft); }
.catalog-empty { padding: 32px; border-radius: var(--radius); background: var(--cream); font-size: 1.1rem; }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: clamp(32px, 4vw, 52px) clamp(18px, 2.4vw, 32px); }
.product-grid.is-shelf { grid-template-columns: repeat(4, 1fr); }
.product-open {
  display: flex; flex-direction: column; width: 100%; padding: 0;
  border: 0; background: none; color: inherit; text-align: start; cursor: pointer;
}
.product-media {
  display: block; overflow: hidden; width: 100%; aspect-ratio: 4 / 3; margin-bottom: 18px;
  border-radius: var(--radius); background: var(--cream);
}
.category-band .product-media, .tone-sun .product-media { background: var(--tone-soft); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.product-media.is-empty { display: grid; place-items: center; }
.product-media.is-empty img { width: 40%; height: auto; object-fit: contain; opacity: .6; }
.product-open:hover .product-media img { transform: scale(1.06); }
.product-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.12rem, 1.5vw, 1.35rem); line-height: 1.45; }
.product-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: .92rem; font-weight: 600; opacity: .7; transition: opacity .2s ease; }
.product-more .icon { width: 16px; height: 16px; }
.product-open:hover .product-more { opacity: 1; }
a.product-more { color: inherit; text-decoration: none; }
a.product-more:hover, a.product-more:focus-visible { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* Product popup */
.product-dialog {
  width: min(960px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0;
  border: 0; border-radius: var(--radius-lg); background: var(--paper); color: var(--ink);
  box-shadow: 0 40px 100px rgba(40, 30, 20, .35);
}
.product-dialog::backdrop { background: rgba(40, 30, 20, .55); backdrop-filter: blur(4px); }
.product-dialog[open] { animation: dialog-in .3s cubic-bezier(.2, .7, .2, 1); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.dialog-layout { display: grid; grid-template-columns: 1fr 1fr; }
.dialog-media { background: var(--cream); }
.dialog-image { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.dialog-copy { padding: clamp(28px, 4vw, 56px); align-self: center; }
.dialog-name { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 16px; }
.dialog-description { font-size: 1.05rem; line-height: 1.9; color: var(--ink-soft); }
.dialog-page { margin-top: 18px; }
.dialog-note { font-size: .92rem; font-weight: 600; color: var(--deep); margin-bottom: 26px; }
.dialog-close {
  position: absolute; top: 16px; inset-inline-end: 16px; z-index: 2;
  display: grid; place-items: center; width: 48px; height: 48px;
  border: 0; border-radius: 50%; background: var(--paper); cursor: pointer; box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}

@media (max-width: 1000px) {
  .page-hero.has-media .page-hero-inner { grid-template-columns: 1fr; }
  .page-hero-media { max-width: 360px; }
  .product-grid.is-shelf { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 14px; }
  .product-media { border-radius: 20px; margin-bottom: 12px; }
  .product-name { font-size: 1.02rem; }
  .dialog-layout { grid-template-columns: 1fr; }
  .dialog-image { min-height: 0; aspect-ratio: 4 / 3; }
  .page-hero-media { max-width: 260px; }
}

/* Product page */
.fact-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.fact-list > div { padding: 28px 0; border-bottom: 1px solid var(--line); }
.fact-list dt { margin-bottom: 8px; font-size: .9rem; font-weight: 600; color: var(--ink-soft); }
.fact-list dd { margin: 0; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.fact-list a { color: var(--deep); }
.page-product .page-hero h1 { max-width: 20ch; }
