/* =========================================================
   UBUNTU LTD — Shop page
   Loaded after style.css; product cards reuse .product
========================================================= */

.u-shop-page { background: var(--paper); }

/* ---------- Hero ---------- */
.u-shop-hero {
  position: relative;
  min-height: clamp(300px, 36vw, 520px);
  background: var(--husk-2) url("../images/shopper.png") center / cover no-repeat;
  overflow: hidden;
}
.u-shop-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(19, 35, 26, 0) 0%, rgba(19, 35, 26, .06) 55%, rgba(19, 35, 26, .32) 100%);
}

/* ---------- Layout ---------- */
.u-shop { padding: clamp(56px, 6vw, 80px) 0 clamp(90px, 10vw, 140px); }
.u-shop-grid {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: clamp(40px, 4.5vw, 58px);
  align-items: start;
}

/* ---------- Filters ---------- */
.u-filters { position: sticky; top: 96px; }
.u-fgroup { padding-bottom: 28px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.u-fgroup h4 {
  margin: 0 0 20px;
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
}
.u-fopt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  color: var(--ink-60);
  font-size: .95rem;
  cursor: pointer;
  transition: color .25s;
}
.u-fopt:hover { color: var(--ink); }
.u-fopt input {
  appearance: none;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid rgba(19, 35, 26, .28);
  border-radius: 4px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.u-fopt input::after {
  content: "";
  width: 5px;
  height: 9px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .2s var(--ease);
}
.u-fopt input:checked { background: var(--leaf); border-color: var(--leaf); }
.u-fopt input:checked::after { transform: rotate(45deg) scale(1); }
.u-fopt input:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.u-fopt span { flex: 1; }
.u-fopt em { font-style: normal; font-size: .75rem; color: rgba(22, 32, 26, .45); }

.u-fcount { margin: 0; color: var(--ink-60); font-size: .95rem; }
#priceLabel { margin-bottom: 18px; }
#maxPrice {
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--leaf) var(--fill, 100%), rgba(19, 35, 26, .14) var(--fill, 100%));
  cursor: pointer;
}
#maxPrice::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--leaf);
  border: 0;
  box-shadow: 0 0 0 4px rgba(94, 124, 65, .18);
}
#maxPrice::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--leaf);
  border: 0;
  box-shadow: 0 0 0 4px rgba(94, 124, 65, .18);
}

.u-filter-actions { display: grid; justify-items: start; gap: 16px; }
.u-apply {
  width: 100%;
  padding: 15px 26px;
  border: 0;
  border-radius: 100px;
  background: var(--bark);
  color: var(--husk);
  font: 600 1rem var(--sans);
  text-align: left;
  cursor: pointer;
  transition: background .3s, color .3s;
}
.u-apply:hover { background: var(--amber); color: var(--bark); }
.u-clearbtn, .u-empty button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--clay);
  font: 500 .9rem var(--sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- Toolbar ---------- */
.u-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 18px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.u-toolbar-left { display: flex; align-items: center; gap: 14px; }
.u-filter-toggle {
  display: none;
  padding: 10px 20px;
  border: 0;
  border-radius: 100px;
  background: var(--bark);
  color: var(--husk);
  font: 600 .85rem var(--sans);
  cursor: pointer;
}
.u-sortwrap { display: flex; align-items: center; gap: 12px; }
.u-sortwrap label { color: var(--ink-60); font-size: .95rem; }
.u-sortwrap select {
  appearance: none;
  min-width: 184px;
  padding: 11px 44px 11px 16px;
  border: 1.5px solid var(--line);
  border-radius: 100px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%2313231A' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") right 16px center no-repeat;
  color: var(--ink);
  font: 500 .95rem var(--sans);
  cursor: pointer;
}
.u-sortwrap select:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------- Product cards ---------- */
.u-shop-products { gap: clamp(18px, 2.2vw, 28px); }
.u-shop-product { border-radius: var(--r); overflow: hidden; }
.u-shop-product[hidden] { display: none !important; }
.u-shop-product h3 { line-height: 1.3; }
.u-shop-product h3 a { text-decoration: none; transition: color .25s; }
.u-shop-product h3 a:hover { color: var(--clay); }
.u-shop-product .product-art { position: relative; display: grid; }
/* Compact cards: shorter image area, whole package visible, two-line description */
.u-shop-product .product-art { aspect-ratio: 5 / 4; background: #fff; border-bottom: 1px solid var(--line); }
.u-shop-product .product-art img,
.u-shop-product .product-art.is-photo img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 10px; object-fit: contain; }
.u-shop-product .product-body { padding: 18px 20px 20px; }
.u-shop-product h3 { margin-bottom: .5rem; font-size: 1rem; }
.u-shop-product .product-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  flex: none;
  max-height: 3.2em;
  overflow: hidden;
  margin-bottom: 1rem;
  font-size: .95rem;
  line-height: 1.6;
}
.u-shop-product .product-price { margin-top: auto; margin-bottom: 1rem; }
.u-shop-product .product-btn { padding: .75rem 1.1rem; font-size: .8rem; }
.u-size-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--bark);
  color: var(--husk);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.u-shop-product h3 .u-size { color: var(--leaf); font-weight: 600; white-space: nowrap; }
.u-on-request { color: var(--clay); font-style: italic; }
.u-empty { padding: 40px 0; color: var(--ink-60); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .u-shop-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .u-shop-grid { grid-template-columns: minmax(0, 1fr); }
  .u-filter-toggle { display: inline-block; }
  .u-filters { position: static; display: none; order: 0; padding: 26px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
  .u-filters.open { display: block; }
}
@media (max-width: 560px) {
  .u-shop-products { grid-template-columns: 1fr; }
  .u-toolbar { flex-wrap: wrap; row-gap: 14px; }
  .u-sortwrap { flex: 1 1 100%; }
  .u-sortwrap select { flex: 1; min-width: 0; }
}

/* Shop filters + product count: clear and readable */
.u-fgroup h4 { color: #16201A; font-size: .85rem; }
.u-fopt { font-family: "Lato", "Helvetica Neue", Arial, sans-serif; font-size: 17px; color: #222; }
.u-fopt em { font-size: .9rem; font-weight: 700; color: #D9711C; }
.u-fopt input { border-color: rgba(22, 32, 26, .45); }
.u-fcount { font-family: "Lato", "Helvetica Neue", Arial, sans-serif; font-size: 17px; font-weight: 700; color: #222; }

/* Shop banner heading */
.u-shop-hero { display: flex; align-items: flex-start; }
.shop2-hero-inner { position: relative; z-index: 2; width: 100%; padding-top: calc(66px + clamp(28px, 4vw, 56px)); }
.shop2-hero-copy { max-width: 560px; }
.shop2-kicker { display: inline-block; margin: 0 0 14px; padding: 6px 14px; border-radius: 999px; background: #D9711C; color: #fff; font-family: "Lato", Arial, sans-serif; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.shop2-hero-copy h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 4.6vw, 4.2rem); line-height: 1.02; letter-spacing: -.03em; color: #16201A; }
.shop2-hero-copy h1 em { display: block; color: #D9711C; font-style: italic; }
.shop2-sub { margin: 14px 0 22px !important; max-width: 40ch; font-family: "Lato", Arial, sans-serif !important; font-size: 18px !important; color: #222 !important; }
@media (max-width: 760px) {
  .shop2-hero-inner { text-align: center; }
  .shop2-hero-copy { margin-inline: auto; padding: 18px 16px; border-radius: 18px; background: rgba(247, 246, 240, .86); backdrop-filter: blur(6px); }
}
/* Desktop/tablet: heading centred on top, products sit below it */
.u-shop-hero { background-color: #E4E7DF; background-position: center bottom; background-size: auto 62%; }
.shop2-hero-inner { text-align: center; }
.shop2-hero-copy { margin-inline: auto; max-width: 760px; }
.shop2-hero-copy h1 em { display: inline; }
.shop2-sub { margin-inline: auto !important; }
@media (max-width: 760px) {
  .u-shop-hero { background-size: auto 46%; }
  .shop2-hero-copy { background: transparent; backdrop-filter: none; padding: 0 4px; }
  .shop2-hero-copy h1 em { display: block; }
}
/* Blend the photo: full width at the bottom, matching colour above */
.u-shop-hero { background-color: #EBEDE4; background-size: 100% auto; background-position: center bottom; }
.u-shop-hero-overlay { display: none; }
@media (max-width: 760px) { .u-shop-hero { background-size: 180% auto; } }
.u-shop-hero { background-size: auto 60%; }
@media (max-width: 760px) { .u-shop-hero { background-size: 165% auto; } }
@media (max-width: 760px) { .u-shop-hero { background-size: 118% auto; } }
.shop2-hero-copy h1 { margin-bottom: 22px; }
/* Mobile: no empty gap — banner is just heading + products */
@media (max-width: 760px) {
  body .u-shop-hero { min-height: 0 !important; display: block; background-size: 116vw auto; background-position: 46% bottom; padding-bottom: calc(116vw * .5625 * .72 + 8px); }
  .shop2-hero-inner { padding-top: calc(66px + 30px); }
}
@media (max-width: 760px) { body .u-shop-hero { background-size: 100vw auto; background-position: center bottom; padding-bottom: calc(100vw * .5625 * .72 + 22px); } }


/* =========================================================
   Shop cards — marketplace style (wishlist + add to cart)
========================================================= */
main .u-shop-products { gap: 14px !important; }
main .u-shop-product { position: relative; display: flex; flex-direction: column; border-radius: 8px; background: #fff; border: 1px solid #ECEAE3; box-shadow: none; transition: box-shadow .25s, transform .25s; }
main .u-shop-product:hover { transform: none; box-shadow: 0 6px 22px rgba(19, 35, 26, .14); }
.jm-media { position: relative; }
main .u-shop-product .product-art { aspect-ratio: 1 / 1; margin: 0; border: 0; border-radius: 8px 8px 0 0; background: #fff; }
main .u-shop-product .product-art img, main .u-shop-product .product-art.is-photo img { padding: 14px; transition: transform .5s var(--ease); }
main .u-shop-product:hover .product-art img { transform: scale(1.04); }
.jm-wish { position: absolute; top: 8px; right: 8px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(19, 35, 26, .16); cursor: pointer; transition: transform .2s; }
.jm-wish svg { width: 18px; height: 18px; fill: none; stroke: #D9711C; stroke-width: 1.8; stroke-linejoin: round; transition: fill .2s; }
.jm-wish:hover { transform: scale(1.08); }
.jm-wish[aria-pressed="true"] svg { fill: #D9711C; }
.jm-wish.pop { animation: jmPop .35s ease; }
@keyframes jmPop { 50% { transform: scale(1.25); } }
.jm-flag { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 4px; background: #FCE9DA; color: #B85E14; font: 700 .72rem "Lato", Arial, sans-serif; }
main .u-shop-product .product-body { display: flex; flex-direction: column; flex: 1; padding: 10px 12px 12px; }
main .u-shop-product h3 { margin: 0 0 6px; min-height: 2.7em; font-family: "Lato", Arial, sans-serif !important; font-weight: 400; font-size: .95rem !important; line-height: 1.35; color: #282828; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
main .u-shop-product h3 a { color: inherit; }
main .u-shop-product h3 .u-size { color: #282828; font-weight: 700; }
main .u-shop-product .product-price { margin: 0 0 10px; font: 700 1.15rem/1.2 "Lato", Arial, sans-serif; color: #16201A; }
main .u-shop-product .product-price .u-on-request { font: italic 600 .95rem/1.2 "Lato", Arial, sans-serif; color: #75787b; }
.jm-cart { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: auto; padding: 10px 12px; border: 0; border-radius: 4px; background: #D9711C; color: #fff; font: 700 .82rem "Lato", Arial, sans-serif; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; cursor: pointer; box-shadow: 0 4px 10px -6px rgba(217, 113, 28, .9); transition: background .2s; }
.jm-cart svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.jm-cart:hover { background: #B85E14; color: #fff; }
.jm-cart.added { background: #5E7C41; }
.jm-cart--quote { background: #fff; color: #D9711C; border: 1.5px solid #D9711C; box-shadow: none; }
.jm-cart--quote:hover { background: #FFF4EA; color: #B85E14; }
.jm-cart:disabled { background: #E6E3DA; color: #8a8f88; box-shadow: none; cursor: not-allowed; }
@media (min-width: 1101px) { main .u-shop-products { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (max-width: 600px) {
  main .u-shop-products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
  main .u-shop-product h3 { font-size: .88rem !important; }
  main .u-shop-product .product-price { font-size: 1rem; }
  .jm-cart { padding: 9px 8px; font-size: .74rem; }
  .jm-cart svg { width: 16px; height: 16px; }
}
