.home-product-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(9px, 1.2vw, 18px);
}
#main-content:focus { outline: none; }
.has-overlay { overflow: hidden; }
.has-overlay body { padding-inline-end: var(--page-scrollbar-width, 0px); }
.shop-overlay {
  --overlay-limit: min(86dvh, 1020px);
  width: min(100% - 32px, 760px);
  max-width: none;
  max-height: var(--overlay-limit);
  padding: 0;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 24px 90px rgb(29 34 25 / .28);
  overscroll-behavior: contain;
  animation: overlay-in 330ms cubic-bezier(.2,.75,.25,1) both;
}
.shop-overlay::backdrop { background: rgb(31 37 27 / .49); animation: backdrop-in 270ms ease-out both; }
.overlay-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: calc(var(--overlay-limit) - 2px);
  overflow: hidden;
  border-radius: inherit;
}
.overlay-heading {
  z-index: 4;
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(16px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
  background: rgb(255 253 248 / .97);
}
.overlay-heading h2 { margin: 3px 0 0; font-size: clamp(21px, 3.1vw, 36px); letter-spacing: -.045em; line-height: 1.06; }
.overlay-heading p { margin: 6px 0 0; color: var(--muted); }
.overlay-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  margin: -4px -5px -4px auto;
  border: 0;
  border-radius: 8px;
  color: var(--forest);
  background: var(--paper);
}
.overlay-close:hover { background: var(--sand); }
.overlay-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: clamp(16px, 2.65vw, 29px);
}
.shop-overlay--product { width: min(100% - 38px, 1110px); }
.shop-overlay--product .overlay-heading {
  position: absolute;
  inset: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
}
.shop-overlay--product .overlay-close {
  position: absolute;
  inset: 10px 13px auto auto;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 2px 9px rgb(29 34 25 / .1);
  pointer-events: auto;
}
.shop-overlay--product .product-crumbs { padding-inline-end: 55px; }
.shop-overlay--product .overlay-heading h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.shop-overlay--cart {
  --overlay-limit: 100dvh;
  width: min(100%, 510px);
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  border-radius: 18px 0 0 18px;
  animation-name: drawer-in;
  animation-duration: 390ms;
}
.shop-overlay--cart .overlay-panel { height: 100%; }
.shop-overlay--cart .overlay-body { flex: 1; }
.shop-overlay--account { width: min(100% - 32px, 510px); }
.shop-overlay--compare { width: min(100% - 32px, 1140px); }
.shop-overlay.is-closing { pointer-events: none; animation: overlay-out 210ms ease-in both; }
.shop-overlay--cart.is-closing { animation-name: drawer-out; }
.shop-overlay.is-closing::backdrop { animation: backdrop-out 220ms linear both; }
.overlay-empty, .shop-loading {
  margin: 0;
  min-height: 96px;
  padding: 16px;
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}
.overlay-empty p { margin: 0; }
.wishlist-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.shop-toast {
  z-index: 100;
  position: fixed;
  inset: auto max(17px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
  max-width: min(100% - 34px, 370px);
  min-height: 52px;
  padding: 10px 13px;
  border: 1px solid #476451;
  border-radius: 10px;
  color: var(--surface);
  background: var(--forest);
  box-shadow: 0 10px 36px rgb(29 34 25 / .22);
  animation: toast-in 250ms cubic-bezier(.2,.75,.25,1) both;
}
.shop-toast > svg { flex: none; transform-origin: center; }
.shop-toast[data-error="true"] { background: #773f27; border-color: #773f27; }
.shop-toast button { border: none; padding: 6px; color: inherit; background: transparent; text-decoration: underline; font-weight: 740; }
.cart-flight {
  z-index: 120;
  position: fixed;
  margin: 0;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 8px 22px rgb(31 40 23 / .23);
  pointer-events: none;
}
.compare-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 9px; color: var(--muted); }
.compare-tools label { display: inline-flex; align-items: center; gap: 7px; padding: 8px 0; min-height: 44px; cursor: pointer; }
.compare-tools input { width: 18px; height: 18px; accent-color: var(--forest); }
.compare-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 11px; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.35; }
.compare-table th, .compare-table td { min-width: 145px; text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.compare-table thead th { position: relative; background: var(--paper); }
.compare-table th:first-child { min-width: 117px; max-width: 170px; }
.compare-table tbody tr:nth-child(even) { background: #f7f3e9; }
.compare-table tbody tr:last-child td, .compare-table tbody tr:last-child th { border-bottom: none; }
.compare-table td strong { color: var(--price); }
.compare-product { display: grid; gap: 8px; justify-items: start; padding: 6px 0; width: 100%; border: 0; color: var(--forest); background: none; text-align: left; font-weight: 690; }
.compare-product img { object-fit: contain; background: white; border-radius: 8px; }
.compare-delete { position: absolute; inset: 4px 4px auto auto; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--forest); }
.info-copy { line-height: 1.55; }
.info-copy > :first-child { margin-top: 0; }
.info-copy > a, .info-list a { color: var(--forest); font-weight: 660; text-underline-offset: 3px; }
.info-list { padding-inline-start: 16px; display: grid; gap: 9px; }
@keyframes overlay-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes overlay-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(9px) scale(.985); } }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes drawer-out { from { transform: none; } to { transform: translateX(100%); } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@media (max-width: 1100px) {
  .home-product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .home-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wishlist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .shop-overlay, .shop-overlay--product { --overlay-limit: 92dvh; width: calc(100% - 18px); border-radius: 15px; }
  .shop-overlay--cart { --overlay-limit: 100dvh; width: 100%; max-height: none; border-radius: 0; }
  .shop-overlay--product .overlay-close { inset: 6px 8px auto auto; }
  .overlay-heading { padding: 13px 15px; }
  .overlay-body { padding: 14px; }
  .compare-table th, .compare-table td { min-width: 120px; padding: 9px; }
  .compare-table th:first-child { min-width: 94px; }
}
@media (prefers-reduced-motion: reduce) {
  .shop-overlay, .shop-overlay::backdrop, .shop-toast { animation: none; }
}

