/* Comptoir du Robinet — shared premium product cards and catalogue pagination. */

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(30px, 3vw, 42px) clamp(18px, 2vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products::before,
body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products::after {
  display: none;
  content: none;
}

/* Product cards -------------------------------------------------------- */
body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product {
  position: relative;
  display: flex;
  float: none;
  width: auto;
  min-width: 0;
  min-height: 100%;
  margin: 0;
  padding: 0 0 18px;
  flex-direction: column;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid #e8e1d7;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: border-color .18s ease;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .woocommerce-loop-product__link {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product a img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  margin: 0 0 18px;
  padding: clamp(14px, 1.6vw, 20px);
  border: 0;
  border-radius: 5px;
  object-fit: contain;
  background: #f5f1e8;
  box-shadow: none;
  transition: background-color .2s ease, transform .24s ease;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .onsale {
  top: 10px;
  right: 10px;
  left: auto;
  z-index: 3;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 5px 7px;
  border: 0;
  border-radius: 3px;
  color: #fff;
  background: #10283d;
  box-shadow: none;
  font-size: 8.5px;
  font-weight: 780;
  line-height: 1.2;
  letter-spacing: .07em;
  text-transform: uppercase;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .woocommerce-loop-product__title {
  display: -webkit-box;
  min-height: 2.9em;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: #142b3e;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -.014em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color .18s ease;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .star-rating {
  width: 5.4em;
  margin: 9px 0 0;
  color: #9a742d;
  font-size: 10px;
  letter-spacing: 1px;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .price {
  display: flex;
  min-height: 28px;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 8px;
  margin: 13px 0 0;
  padding: 0;
  color: #10283d;
  font-size: 17px;
  font-weight: 790;
  line-height: 1.3;
  letter-spacing: -.01em;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .price del {
  color: #7d878e;
  font-size: 10.5px;
  font-weight: 520;
  opacity: 1;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .price ins {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .cdrt-product-availability {
  margin: 8px 0 0;
  color: #3f6850;
  font-size: 9.5px;
  font-weight: 680;
  line-height: 1.3;
}

/* Keep the conversion action, but treat it like a premium editorial link
 * rather than another large rounded container. */
body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .cdrt-category-product-cta,
body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .button {
  display: inline-flex;
  width: auto;
  min-width: 0;
  min-height: 38px;
  align-self: flex-start;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 13px 0 0;
  padding: 5px 0 3px;
  border: 0;
  border-bottom: 1px solid #b7a272;
  border-radius: 0;
  color: #10283d;
  background: transparent;
  box-shadow: none;
  font-size: 10.5px;
  font-weight: 760;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  transition: color .18s ease, border-color .18s ease, transform .18s ease;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .cdrt-category-product-cta span {
  color: #9a742d;
  font-size: 13px;
  line-height: 1;
  transition: transform .18s ease;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .woocommerce-loop-product__link:focus-visible,
body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .cdrt-category-product-cta:focus-visible,
body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .button:focus-visible,
body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) nav.woocommerce-pagination a:focus-visible {
  outline: 3px solid rgba(198, 161, 91, .42);
  outline-offset: 4px;
}

@media (hover: hover) {
  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product:hover {
    border-bottom-color: #cdbc9d;
  }

  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product:hover a img {
    background: #f0ebe1;
    transform: translateY(-2px);
  }

  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product:hover .woocommerce-loop-product__title {
    color: #224761;
  }

  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .cdrt-category-product-cta:hover,
  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .button:hover {
    color: #765523;
    border-bottom-color: #765523;
    background: transparent;
    box-shadow: none;
    transform: none;
  }

  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .cdrt-category-product-cta:hover span {
    transform: translateX(3px);
  }
}

/* Pagination ----------------------------------------------------------- */
body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) nav.woocommerce-pagination {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: clamp(42px, 6vw, 64px) 0 0;
  text-align: center;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) nav.woocommerce-pagination ul.page-numbers,
body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) nav.woocommerce-pagination ul {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  list-style: none;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) nav.woocommerce-pagination ul li {
  float: none;
  margin: 0;
  border: 0;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) nav.woocommerce-pagination ul li a,
body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) nav.woocommerce-pagination ul li span {
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid #ddd5c8;
  border-radius: 5px;
  color: #18354b;
  background: transparent;
  font-size: 12px;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) nav.woocommerce-pagination ul li span.current {
  color: #fff;
  border-color: #10283d;
  background: #10283d;
}

body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) nav.woocommerce-pagination ul li a.next,
body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) nav.woocommerce-pagination ul li a.prev {
  border-color: #cfc3ae;
  color: #10283d;
  background: #f8f5ee;
}

@media (hover: hover) {
  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) nav.woocommerce-pagination ul li a:hover {
    color: #10283d;
    border-color: #bfae8d;
    background: #f4eee2;
  }
}

@media (max-width: 1120px) {
  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
  }

  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product {
    padding-bottom: 14px;
  }

  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product a img {
    margin-bottom: 13px;
    padding: 9px;
    border-radius: 4px;
  }

  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .woocommerce-loop-product__title {
    min-height: 2.9em;
    font-size: 12.5px;
  }

  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .price {
    margin-top: 10px;
    font-size: 14.5px;
  }

  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .cdrt-product-availability {
    margin-top: 7px;
    font-size: 9px;
  }

  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .cdrt-category-product-cta,
  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .button {
    min-height: 40px;
    margin-top: 10px;
    font-size: 10px;
  }

  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) nav.woocommerce-pagination {
    margin-top: 36px;
  }

  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) nav.woocommerce-pagination ul {
    gap: 5px;
  }

  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) nav.woocommerce-pagination ul li a,
  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) nav.woocommerce-pagination ul li span {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }
}

@media (max-width: 380px) {
  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product a img {
    aspect-ratio: 4 / 3;
    padding: 16px;
  }

  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px;
  }

  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .price {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product,
  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product a img,
  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .woocommerce-loop-product__title,
  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .cdrt-category-product-cta,
  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) ul.products li.product .cdrt-category-product-cta span,
  body.cdrt-theme:is(.cdrt-catalog.cdrt-product-category-premium, .home) nav.woocommerce-pagination ul li a {
    transition: none;
  }
}

