/* Subtle, responsive motion; the browser keeps control of natural scrolling. */
:root {
  --motion-quick: 150ms;
  --motion-smooth: 240ms;
  --motion-ease: cubic-bezier(.2,.75,.25,1);
}
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
button, a, label.wall-upload, select {
  -webkit-tap-highlight-color: transparent;
}
button, a, select, label.wall-upload { touch-action: manipulation; }
button { cursor: pointer; }

header {
  border-bottom-color: rgba(126, 81, 42, .16);
}
.search-row {
  border-radius: 8px 8px 0 0;
  transition: border-color var(--motion-quick) ease, background-color var(--motion-quick) ease;
}
.search-row:focus-within { background: rgba(255,255,255,.19); }
.product-card {
  border-radius: 7px;
  overflow: hidden;
  transition: border-color var(--motion-smooth) var(--motion-ease),
              box-shadow var(--motion-smooth) var(--motion-ease),
              transform var(--motion-quick) var(--motion-ease);
}
.product-card .photo { overflow: hidden; }
.product-card .photo img {
  transition: transform 400ms var(--motion-ease);
}

.enquire, .product-share, .favourite-heart, .favourites-trigger,
.menu-toggle, .menu-close, .about-close, .product-close, .viewer-close,
.favourites-close, .wall-close, .back-to-top, .filter-actions button,
.wall-upload, .favourites-enquire {
  transition: transform var(--motion-quick) var(--motion-ease),
              background-color var(--motion-quick) ease,
              color var(--motion-quick) ease,
              border-color var(--motion-quick) ease,
              box-shadow var(--motion-quick) ease;
}
.enquire, .wall-upload, .filter-actions button, .favourites-enquire {
  box-shadow: 0 2px 4px rgba(67,39,20,.08);
}
.product-card:active,
.enquire:active, .product-share:active, .favourite-heart:active,
.favourites-trigger:active, .menu-toggle:active, .menu-close:active,
.about-close:active, .product-close:active, .viewer-close:active,
.favourites-close:active, .wall-close:active, .back-to-top:active,
.filter-actions button:active, .wall-upload:active, .favourites-enquire:active {
  transform: scale(.98);
}
.favourite-heart:active, .favourites-trigger:active, .menu-toggle:active,
.menu-close:active, .about-close:active, .product-close:active,
.viewer-close:active, .favourites-close:active, .wall-close:active,
.back-to-top:active, .product-share:active { transform: scale(.93); }

.product-dialog, .about-dialog, .favourites-dialog, .wall-dialog {
  border-radius: 16px;
  box-shadow: 0 22px 70px rgba(35,20,10,.28), 0 4px 16px rgba(35,20,10,.1);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
/* Give the close control and its focus ring a dedicated row above content. */
.product-dialog .product-close,
.about-dialog .about-close {
  float: none;
  display: block;
  margin: 0 0 18px auto;
}
.product-dialog .product-content { clear: none; }
.about-dialog h2 { clear: none; }
/* The expanded-image viewer also reserves space for its close control. */
.viewer[open] { padding: 82px 12px 16px; }
.viewer img { max-width: 100%; max-height: 100%; }
.viewer-close { top: 18px; right: 18px; }
.menu-panel { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.menu-panel .care-open { border-top: 1px solid #f1b04c66; }
.filters-panel select { min-height: 44px; }
.favourite-product img { border-radius: 4px; }
.wall-product { transition: none; }

@media (hover:hover) and (pointer:fine) {
  .product-card:hover {
    border-color: rgba(110,70,33,.4);
    box-shadow: 0 12px 32px rgba(76,48,28,.1);
  }
  .product-card:hover .photo img { transform: scale(1.015); }
  .favourite-heart:hover, .menu-close:hover, .about-close:hover,
  .product-close:hover, .favourites-close:hover, .wall-close:hover {
    background-color: #4c301c;
    color: #f9ddb1;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .product-dialog[open], .about-dialog[open], .favourites-dialog[open],
  .wall-dialog[open], .viewer[open], .menu-shade:not([hidden]),
  .menu-shade:not([hidden]) .menu-panel { animation: none; }
  .product-card, .product-card .photo img, .enquire, .product-share,
  .favourite-heart, .favourites-trigger, .menu-toggle, .menu-close,
  .about-close, .product-close, .viewer-close, .favourites-close,
  .wall-close, .back-to-top, .filter-actions button, .wall-upload,
  .favourites-enquire, .search-row { transition: none; }
  .product-card:active, .enquire:active, .product-share:active,
  .favourite-heart:active, .favourites-trigger:active, .menu-toggle:active,
  .menu-close:active, .about-close:active, .product-close:active,
  .viewer-close:active, .favourites-close:active, .wall-close:active,
  .back-to-top:active, .filter-actions button:active, .wall-upload:active,
  .favourites-enquire:active, .product-card:hover .photo img { transform: none; }
}
