/* The catalogue is photographed as square compositions, including the brand mark. */
.esnaf-products {
  --esnaf-card-actions-row: 40px;
  --esnaf-card-guide-row: 27px;
  gap: clamp(12px, 1.6vw, 20px);
}
.esnaf-product {
  --esnaf-product-corner: 18px;
  min-width: 0;
  border: 1px solid var(--esnaf-line);
  border-radius: var(--esnaf-product-corner);
  background: #fff;
}
.esnaf-product .esnaf-product-image {
  --esnaf-photo-corner: calc(var(--esnaf-product-corner) - 1px);
  margin: 0;
  overflow: hidden;
  border-radius: var(--esnaf-photo-corner) var(--esnaf-photo-corner) 0 0;
  background: var(--esnaf-paper);
}
.esnaf-product .esnaf-product-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  transform: none;
}
.esnaf-product-body {
  container: esnaf-product-card / inline-size;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr;
  align-content: end;
  align-items: end;
  gap: 5px;
  padding: 10px 13px 12px;
}
.esnaf-product-title {
  align-self: start;
  margin: 0;
}
.esnaf-product-title h3 {
  margin: 0;
  color: var(--esnaf-ink);
  font: 630 clamp(15px, 1.45vw, 19px)/1.25 var(--esnaf-font);
  letter-spacing: -.028em;
  overflow-wrap: break-word;
}
.esnaf-product-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: start;
  justify-content: space-between;
  gap: 0 3px;
  min-width: 0;
}
.esnaf-products:has(.esnaf-portion-trigger) .esnaf-product-actions {
  min-height: calc(var(--esnaf-card-actions-row) + var(--esnaf-card-guide-row));
}
.esnaf-store .esnaf-product-actions :is(.esnaf-preview-trigger, .esnaf-portion-trigger) {
  gap: 4px;
  padding-inline: 0;
  color: #126639;
  font: 700 clamp(11px, 3vw, 13px)/1.1 var(--esnaf-font);
}
.esnaf-product-actions :is(.esnaf-preview-trigger, .esnaf-portion-trigger) > :is(i, svg) {
  width: 1.2em;
  flex: 0 0 1.2em;
  text-align: center;
}
.esnaf-store .esnaf-product-actions .esnaf-feedback-summary {
  gap: 2px;
  margin: 0;
}
.esnaf-store .esnaf-product-actions .esnaf-feedback-summary > button {
  gap: 3px;
  min-width: 29px;
  padding-inline: 2px;
}
.esnaf-store .esnaf-product-actions .esnaf-feedback-summary i {
  font-size: 15px;
}
.esnaf-store .esnaf-product-actions .esnaf-preview-trigger,
.esnaf-store .esnaf-product-actions .esnaf-feedback-summary > button {
  min-height: var(--esnaf-card-actions-row);
  padding-block-start: 4px;
}
.esnaf-product-purchase {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-content: space-between;
  gap: 0 6px;
  min-width: 0;
  padding: 2px 5px 2px 8px;
  border: 1px solid #a8c3ad;
  border-radius: 11px;
  background: #f4f8f2;
}
.esnaf-product-total {
  container-type: inline-size;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
  padding-top: 3px;
}
.esnaf-product-total span {
  color: #486451;
  font: 650 10px/1.15 var(--esnaf-font);
}
.esnaf-product-total strong {
  color: #116235;
  font: 750 16px/1.15 var(--esnaf-font);
  font-size: min(17px, calc((100cqi - var(--esnaf-price-label-space, 36px)) / var(--esnaf-price-fit, 6)));
  font-variant-numeric: tabular-nums;
  letter-spacing: -.035em;
  white-space: nowrap;
}
.esnaf-product-purchase .esnaf-stepper {
  min-width: 0;
  border: 0;
  background: transparent;
}
@container esnaf-product-card (min-width: 181px) {
  .esnaf-product-purchase:has(.esnaf-product-total):has(.esnaf-stepper) {
    grid-template-columns: minmax(0, 1fr) minmax(103px, 1.15fr);
  }

  .esnaf-product-purchase:has(.esnaf-stepper) .esnaf-product-total {
    --esnaf-price-label-space: 0px;
    display: grid;
    align-content: center;
    justify-content: stretch;
    gap: 2px;
    min-height: 42px;
    padding-top: 0;
  }
}
.esnaf-stepper,
.esnaf-detail .esnaf-portion-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--esnaf-line);
  border-radius: 10px;
  background: var(--esnaf-paper);
}
.esnaf-stepper button,
.esnaf-detail .esnaf-portion-controls button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 38px;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--esnaf-dark);
  font: 500 19px/1 var(--esnaf-font);
}
.esnaf-stepper output,
.esnaf-detail .esnaf-portion-controls :is(input, span) {
  color: var(--esnaf-ink);
  font-family: var(--esnaf-font);
  font-variant-numeric: tabular-nums;
}
.esnaf-stepper output { font-weight: 610; line-height: 1.1; white-space: nowrap; }
.esnaf-product-purchase .esnaf-stepper {
  --esnaf-step-button: 30px;
  display: grid;
  grid-template-columns: var(--esnaf-step-button) minmax(0, 1fr) var(--esnaf-step-button);
}
.esnaf-product-purchase .esnaf-stepper button {
  position: relative;
  isolation: isolate;
  min-width: var(--esnaf-step-button);
  min-height: 44px;
  border-radius: 8px;
  color: #195535;
  font-weight: 650;
}
.esnaf-product-purchase .esnaf-stepper button::before {
  position: absolute;
  z-index: -1;
  inset: 7px 0;
  border: 1px solid #87aa8e;
  border-radius: 7px;
  background: #fff;
  content: "";
}
.esnaf-store .esnaf-product-purchase .esnaf-stepper button:not(:disabled):hover { background: transparent; }
.esnaf-product-purchase .esnaf-stepper button:enabled:hover::before { background: #deede0; }
.esnaf-product-purchase .esnaf-stepper button[data-quantity-change="1"]:enabled { color: #fff; }
.esnaf-product-purchase .esnaf-stepper button[data-quantity-change="1"]:enabled::before {
  border-color: var(--esnaf-action);
  background: var(--esnaf-action);
}
.esnaf-product-purchase .esnaf-stepper button[data-quantity-change="1"]:enabled:hover::before { background: var(--esnaf-action-hover); }
.esnaf-product-purchase .esnaf-stepper button:focus-visible {
  outline: 2px solid var(--esnaf-dark);
  outline-offset: -2px;
}
.esnaf-product-purchase .esnaf-stepper output { text-align: center; }
.esnaf-stepper button:disabled,
.esnaf-detail .esnaf-portion-controls button:disabled { color: var(--esnaf-muted); opacity: .5; }
.esnaf-product .esnaf-add,
.esnaf-detail #button-cart {
  min-height: 44px;
  margin: 0;
  border-radius: 10px;
  font-family: var(--esnaf-font);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.esnaf-product .esnaf-add { padding: 6px 8px; }
.esnaf-product .esnaf-add i { font-size: 13px; }
.esnaf-product .esnaf-product-message { grid-column: 1 / -1; margin: 0; }
.esnaf-detail .thumbnails .thumbnail {
  margin: 0;
  overflow: hidden;
  background: var(--esnaf-paper);
}
.esnaf-detail .thumbnails > li:first-child img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
}
.esnaf-detail .thumbnails .image-additional img { aspect-ratio: 1; object-fit: contain; }
.esnaf-store .esnaf-search-result img,
.esnaf-cart-line img,
.esnaf-summary-item img,
#checkout-cart .table img.img-thumbnail,
#product-search .product-thumb .image img {
  object-fit: contain;
  object-position: center;
  background: var(--esnaf-paper);
}
.esnaf-cart-line img,
#checkout-cart .table img.img-thumbnail {
  width: 64px;
  height: 64px;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 10px;
}
#product-search .product-thumb .image img { width: 100%; height: auto; aspect-ratio: 1; }
.esnaf-store :is(.esnaf-detail .thumbnails .thumbnail, .product-thumb .image img, .esnaf-search-result img,
  .esnaf-cart-line img, .esnaf-order-info-product__image:has(img), #checkout-cart img.img-thumbnail,
  #checkout-checkout .esnaf-summary-item img, #product-search .product-thumb .image img) {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
@media (min-width: 768px) {
  #product-search .product-list .product-thumb .image { width: 160px; }
}
@media (min-width: 1200px) {
  .esnaf-products { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 767px) {
  .esnaf-products { gap: 10px; }
  .esnaf-product { --esnaf-product-corner: 14px; }
  .esnaf-product-body { padding: 8px 9px 9px; gap: 4px; }
  .esnaf-product .esnaf-add { font-size: 13px; gap: 6px; }
  .esnaf-detail .thumbnails > li:first-child .thumbnail { width: fit-content; max-width: 100%; margin-inline: auto; }
  .esnaf-detail .thumbnails > li:first-child img { width: clamp(180px, 36svh, 320px); max-width: 100%; }
}
@media (max-width: 359px) {
  .esnaf-product-body { padding: 9px; }
  .esnaf-stepper button { min-width: 33px; }
  .esnaf-product-purchase .esnaf-stepper { --esnaf-step-button: 27px; }
}

.esnaf-cart-flight {
  position: fixed;
  z-index: 1100;
  width: 54px;
  height: 54px;
  object-fit: cover;
  border: 2px solid #fff;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgb(19 60 30 / 24%);
  pointer-events: none;
}

.esnaf-cart-confirmation {
  display: inline-block;
  line-height: 1.15;
  white-space: normal;
  vertical-align: middle;
}

.esnaf-store .esnaf-add[data-cart-locked] {
  opacity: 1;
  color: #fff !important;
  background: var(--esnaf-dark);
}

.product-thumb .button-group > .esnaf-cart-confirmed {
  padding-inline: 2px;
  font-size: 11px;
}

.esnaf-product .esnaf-add[hidden], .esnaf-product .esnaf-add i[hidden] { display: none !important; }
.esnaf-product.is-sold-out :is(.esnaf-preview-trigger, .esnaf-portion-trigger) { color: #4c5650; }
.esnaf-product.is-sold-out .esnaf-product-purchase {
  border-color: #cdd2ce;
  background: #f0f2ef;
}
.esnaf-product.is-sold-out :is(.esnaf-product-total span, .esnaf-product-total strong, .esnaf-stepper output) { color: #4c5650; }
.esnaf-product.is-sold-out .esnaf-stepper button:disabled { color: #5d6860; opacity: 1; }
.esnaf-product.is-sold-out .esnaf-stepper button:disabled::before { border-color: #c4cbc5; background: #dfe4de; }
.esnaf-store .esnaf-product.is-sold-out .esnaf-add:disabled { color: #445048; background: #e2e6e1; border-color: #e2e6e1; opacity: 1; }

.esnaf-store .esnaf-product-actions .esnaf-feedback-summary > button {
  justify-content: flex-start;
  gap: 3px;
  min-width: 0;
  padding-inline: 1px;
}
.esnaf-product-actions .esnaf-feedback-summary :is([data-feedback-likes], [data-feedback-comment-count]) {
  display: inline-block;
  min-width: 2ch;
  text-align: start;
  font-size: 11px;
  white-space: nowrap;
}
.esnaf-product-actions .esnaf-feedback-summary i { width: 15px; text-align: center; }
@container esnaf-product-card (max-width: 129px) {
  .esnaf-product-actions { column-gap: 0; }
  .esnaf-store .esnaf-product-actions .esnaf-feedback-summary > button { gap: 2px; padding-inline: 0; }
  .esnaf-store .esnaf-product-actions :is(.esnaf-preview-trigger, .esnaf-portion-trigger) { gap: 2px; font-size: 11px; }
  .esnaf-store .esnaf-product-actions .esnaf-feedback-summary { gap: 0; }
  .esnaf-store .esnaf-product-actions .esnaf-feedback-summary i { width: 11px; font-size: 11px; }
  .esnaf-product-actions .esnaf-feedback-summary :is([data-feedback-likes], [data-feedback-comment-count]) { font-size: 10px; }
}

.esnaf-store .esnaf-portion-trigger {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex: 0 0 100%;
  min-width: 0;
  min-height: var(--esnaf-card-guide-row);
  padding-block: 1px 3px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}
.esnaf-store .esnaf-portion-trigger:hover { background: #eaf4eb; }
.esnaf-store .esnaf-portion-trigger:focus-visible { outline: 2px solid var(--esnaf-action); outline-offset: 1px; }
.esnaf-store .esnaf-portion-dialog {
  inset: 0;
  margin: auto;
  width: min(calc(100% - 28px), 445px);
  height: fit-content;
  max-height: calc(100dvh - 28px);
  border-radius: 22px;
}
.esnaf-portion-dialog::backdrop { background: #12261b85; backdrop-filter: blur(3px); }
.esnaf-portion-body { overflow: auto; padding: 17px 20px 22px; }
.esnaf-portion-body h3 { margin: 0 0 12px; font-size: 17px; font-weight: 680; }
.esnaf-portion-body [data-portion-note-text] { color: var(--esnaf-muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.esnaf-portion-body [data-portion-calculator]:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.esnaf-portion-body label { margin: 0; }
.esnaf-portion-body select { min-height: 44px; padding: 6px 10px; border: 1px solid var(--esnaf-line); border-radius: 9px; background: #fff; font-size: 16px; }
.esnaf-portion-result { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 10px; background: #eaf6ec; color: #174b2b; }
.esnaf-portion-result output { padding: 0; color: inherit; font-size: 20px; font-weight: 740; white-space: nowrap; }
.esnaf-portion-explanation { grid-column: 1/-1; margin: 0; color: var(--esnaf-muted); font-size: 13px; }

.esnaf-catalog-brand {
  display: grid;
  justify-items: center;
  margin: 0;
  padding: 12px 0 6px;
}
.esnaf-catalog-brand img {
  display: block;
  width: clamp(58px, 15vw, 76px);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}
.esnaf-quick-search-empty + .esnaf-category { padding-top: 6px; }

.esnaf-category {
  --section-paper: #edf3e2;
  --section-ink: #263b28;
  --section-wash: #c9ddaa;
  --section-accent: #638044;
  --section-gap: 2px;
  --section-ground: #ffe250;
}
.esnaf-category .esnaf-products {
  position: relative;
  isolation: isolate;
}
.esnaf-category .esnaf-products::before {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--section-gap)) 0 auto;
  z-index: -1;
  height: clamp(112px, 13vw, 180px);
  background: var(--section-ground);
  mask-image: linear-gradient(to bottom, #000, transparent);
  pointer-events: none;
}
.esnaf-category .esnaf-section-banner {
  --section-art: clamp(236px, 27vw, 415px);
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 74px;
  overflow: hidden;
  padding: 8px clamp(18px, 3vw, 40px);
  margin-bottom: var(--section-gap);
  --section-radius: clamp(15px, 2vw, 25px);
  border-radius: var(--section-radius) var(--section-radius) 0 0;
  background: var(--section-ground);
  color: #075132;
  --section-accent: #075132;
}
.esnaf-section-banner-decoration {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: none;

}
.esnaf-category[data-category-tone="cream"] { --section-paper: #fff4de; --section-wash: #efd39c; --section-ink: #4a3216; --section-accent: #94601e; }
.esnaf-category[data-category-tone="clay"] { --section-paper: #f8e2d9; --section-wash: #e3a99a; --section-ink: #642e26; --section-accent: #974236; }
.esnaf-category[data-category-tone="olive"] { --section-paper: #eff1d4; --section-wash: #ccd68d; --section-ink: #354018; --section-accent: #657621; }
.esnaf-category[data-category-tone="herb"] { --section-paper: #e6f3e9; --section-wash: #add6c1; --section-ink: #1e4637; --section-accent: #438c68; }
.esnaf-category[data-category-tone="honey"] { --section-paper: #fbedca; --section-wash: #ebbf66; --section-ink: #593808; --section-accent: #aa651b; }
.esnaf-category[data-category-tone="plum"] { --section-paper: #f6e9f2; --section-wash: #dfb2ce; --section-ink: #552743; --section-accent: #965282; }
.esnaf-category[data-category-tone="grain"] { --section-paper: #f6ece0; --section-wash: #dfc19d; --section-ink: #503822; --section-accent: #956327; }
.esnaf-category[data-category-tone="leaf"] { --section-paper: #edf6de; --section-wash: #bfda9e; --section-ink: #2c4321; --section-accent: #608847; }
.esnaf-category[data-category-tone="mist"] { --section-paper: #e6f1f7; --section-wash: #b4d4e3; --section-ink: #1b4558; --section-accent: #5b8e9b; }
.esnaf-section-banner-copy { position: relative; z-index: 1; max-width: 58%; }
.esnaf-category .esnaf-section-banner h2 {
  color: inherit;
  font-size: clamp(22px, 2.8vw, 33px);
  font-weight: 740;
  line-height: 1.04;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.esnaf-category .esnaf-section-banner span {
  display: block;
  margin-top: 3px;
  color: inherit;
  opacity: .81;
  font-size: 13px;
}
.esnaf-section-banner-art {
  position: absolute;
  inset: 0 clamp(14px, 4vw, 60px) 0 auto;
  width: min(var(--section-art), 42%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 0;
  pointer-events: none;
  transform: scale(var(--section-entry-scale, 1));
  transform-origin: 30% center;
}
.esnaf-section-banner-art img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 54px;
  max-height: 100%;
  object-fit: contain;
  filter: none;
  transform-origin: 52% 64%;
}
@media (max-width: 767px) {
  .esnaf-category .esnaf-section-banner {
    --section-art: 44%;
    min-height: 58px;
    padding: 7px 13px;
  }
  .esnaf-category .esnaf-section-banner h2 { font-size: clamp(19px, 5.4vw, 25px); }
  .esnaf-category .esnaf-section-banner span { margin-top: 2px; font-size: 11px; }
  .esnaf-section-banner-copy { max-width: 64%; }
  .esnaf-section-banner-art img { height: 44px; }
  .esnaf-section-banner-art { inset-inline-end: 8px; width: 34%; padding-block: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .esnaf-category .esnaf-section-banner { --section-entry-scale: 1 !important; }
}

.esnaf-portion-availability { grid-column: 1/-1; margin: 0; color: #7c3832; font-size: 13px; }
.esnaf-store .esnaf-portion-apply {
  grid-column: 1/-1;
  min-height: 46px;
  padding: 8px 14px;
  border: 0;
  border-radius: 11px;
  background: var(--esnaf-action);
  color: #fff;
  font: 680 14px/1.2 var(--esnaf-font);
}
.esnaf-store .esnaf-portion-apply:not(:disabled):hover { background: var(--esnaf-action-hover); }
.esnaf-store .esnaf-portion-apply:disabled { background: #e4e8e3; color: #4c5950; }
.esnaf-store .esnaf-portion-apply:focus-visible { outline: 2px solid var(--esnaf-action); outline-offset: 2px; }

.esnaf-product .esnaf-add[data-add-product], #button-cart { touch-action:manipulation; }
:is(.esnaf-product .esnaf-add, #button-cart)[data-cart-pending] { cursor:progress; }
:is(.esnaf-product .esnaf-add, #button-cart)[data-cart-pending] span::before {
  content:""; display:inline-block; width:12px; height:12px; margin-inline-end:6px;
  border:2px solid currentColor; border-inline-end-color:transparent; border-radius:50%;
  vertical-align:-1px; animation:esnaf-cart-pending-spin .65s linear infinite;
}
@keyframes esnaf-cart-pending-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  :is(.esnaf-product .esnaf-add, #button-cart)[data-cart-pending] span::before { animation:none; }
}
