/* Souvenir shop archive, matched to live (measured at 1440px). Kadence's own WooCommerce styles stay in charge of the loop; this reshapes
   the frame, heading, sorting box, product cards and pagination to the old theme's. */

/* Frame: a plain 1170px container (1140px of content). */
body.post-type-archive-product .entry-hero .hero-container,
body.post-type-archive-product .content-container.site-container { width: 100%; max-width: 1170px; margin: 0 auto; padding-left: 15px; padding-right: 15px; }
body.post-type-archive-product .entry-hero-container-inner { padding: 0 !important; min-height: 0 !important; background: none !important; }
body.post-type-archive-product .entry-hero .hero-section-overlay { display: none; }
body.post-type-archive-product section.entry-hero { padding-bottom: 10px !important; }
body.post-type-archive-product .entry-hero .entry-header { display: block; width: 100%; max-width: none; min-height: 0; margin: 0; padding: 0; text-align: left; }
body.post-type-archive-product h1.page-title {
  margin: 10px 0; font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif !important; font-size: 36px; line-height: 54px; font-weight: 400; letter-spacing: 1px; text-transform: none; text-align: left; color: var(--jth-ink);
}
body.post-type-archive-product #primary.content-area { margin: 0; padding: 0; }
body.post-type-archive-product #main.site-main { width: 100%; max-width: none; margin: 0; padding: 0; }

/* Top row: only the sorting box, on the right (no result count, no grid/list toggle). */
body.post-type-archive-product .kadence-shop-top-row { display: block; box-sizing: border-box; height: 76px; margin: 0 !important; padding: 0 !important; text-align: right; }
body.post-type-archive-product .kadence-woo-results-count, body.post-type-archive-product .kadence-woo-toggle { display: none; }
body.post-type-archive-product .kadence-woo-ordering { display: block; width: auto; margin: 0; padding: 0; }
body.post-type-archive-product form.woocommerce-ordering { display: inline-block; width: 162px; margin: 0; padding: 0; }
body.post-type-archive-product form.woocommerce-ordering select.orderby {
  -webkit-appearance: none; appearance: none; box-sizing: border-box; display: block; width: 162px; height: 48px; margin: 0; padding: 11px 45px 7px 18px;
  font-family: "Windsor", Georgia, serif; font-size: 14px; line-height: 28px; font-weight: 400; letter-spacing: 1px; color: #9D9488;
  background: #EDE5DF url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0h10L5 6z' fill='%23808080'/></svg>") no-repeat right 15px center;
  border: 1px solid #D3C2B5; border-radius: 0; box-shadow: none; cursor: pointer;
}

/* Cards: three across, 351px squares with 43.5px between, uppercase condensed titles. */
body.post-type-archive-product ul.products { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; column-gap: 43.5px !important; row-gap: 69px !important; margin: 0; padding: 0; list-style: none; }
body.post-type-archive-product ul.products li.product { width: auto; margin: 0; padding: 0 0 4px !important; background: none; box-shadow: none; border: 0; }
body.post-type-archive-product ul.products li.product .product-details, body.post-type-archive-product ul.products li.product .entry-content-wrap { padding: 0 !important; background: none; text-align: left; }
body.post-type-archive-product ul.products li.product .post-thumbnail, body.post-type-archive-product ul.products li.product .woocommerce-loop-image-link { display: block; margin-bottom: 6px !important; }
body.post-type-archive-product ul.products li.product img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title {
  margin: 0; padding: 9px 0; font-family: "Windsor", Georgia, serif; font-size: 18px; line-height: 21.6px; font-weight: 700; font-style: italic; letter-spacing: 1.5px; text-transform: uppercase; color: #4F5E79;
}
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title a { color: inherit; }
body.post-type-archive-product ul.products li.product .price { display: block; margin: 0 0 8px; font-size: 16px; line-height: 24px; font-weight: 400; letter-spacing: 1px; color: var(--jth-ink); }
body.post-type-archive-product ul.products li.product .price .amount { color: inherit; }
body.post-type-archive-product ul.products li.product .product-action-wrap, body.post-type-archive-product ul.products li.product a.button { display: none; }

/* Pagination: plain numbers (current in ink, others in link blue) and an "Older" button at the right edge. */
body.post-type-archive-product nav.woocommerce-pagination { position: relative; margin: 0; padding: 20px 0; text-align: center; }
body.post-type-archive-product nav.woocommerce-pagination ul.page-numbers { display: inline-block; margin: 0; padding: 0; border: 0; }
body.post-type-archive-product nav.woocommerce-pagination ul.page-numbers li { display: inline-block; float: none; margin: 0; border: 0; padding: 0; }
body.post-type-archive-product nav.woocommerce-pagination .page-numbers:not(ul) {
  display: inline-block; min-width: 0; height: auto; margin: 0 10px; padding: 17px 0; background: none; border: 0; border-radius: 0; box-shadow: none;
  font-size: 18px; line-height: 32.4px; font-weight: 400; letter-spacing: 1px; color: #4E5D7A; text-align: center;
}
body.post-type-archive-product nav.woocommerce-pagination .page-numbers.current { color: var(--jth-ink); background: none !important; border: 0 !important; box-shadow: none !important; }
body.post-type-archive-product nav.woocommerce-pagination .page-numbers.next {
  position: absolute; right: 0; top: 20px; margin: 0; padding: 10px 20px 3px; height: auto; font-size: 14px; line-height: 35px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #9D9488; border: 1px solid #D3C2B5;
}

/* ---- Responsive behaviour measured on live ---- */
/* Container widths follow the old builder: 1170 / 970 / 750, full width with 15px gutters on phones. */
@media (min-width: 992px) and (max-width: 1199px) {
  body.post-type-archive-product .entry-hero .hero-container, body.post-type-archive-product .content-container.site-container { max-width: 970px; }
  body.post-type-archive-product ul.products { column-gap: 36px !important; }
}
@media (min-width: 768px) and (max-width: 991px) {
  body.post-type-archive-product .entry-hero .hero-container, body.post-type-archive-product .content-container.site-container { max-width: 750px; }
  /* three 170px cards, left aligned */
  body.post-type-archive-product ul.products { grid-template-columns: repeat(3, 170px) !important; column-gap: 27px !important; justify-content: start; }
}
@media (max-width: 767px) {
  body.post-type-archive-product h1.page-title { font-size: 25px; line-height: 38px; }
  /* two cards, one at each edge */
  body.post-type-archive-product ul.products { grid-template-columns: repeat(2, 170px) !important; column-gap: 0 !important; justify-content: space-between; }
  body.post-type-archive-product .kadence-shop-top-row { height: 68px; }
}
@media (max-width: 479px) {
  body.post-type-archive-product ul.products { grid-template-columns: repeat(2, 48%) !important; }
  body.post-type-archive-product form.woocommerce-ordering { display: none; }
  body.post-type-archive-product .kadence-shop-top-row { height: 16px; }
}
