/*  Rose Couture — shop archive + product card
    CSS-only transform over Flatsome's default loop markup.           */

/* ---- Archive page chrome ------------------------------------------ */

.woocommerce.archive #main,
.woocommerce-page.archive #main {
  background: var(--wml-bg);
}

.archive .shop-container,
.archive .page-title-inner {
  background: transparent !important;
}

/* Archive header */
.shop-page-title.page-title .category-page-title,
.shop-page-title.page-title h1 {
  font-family: var(--wml-font-display) !important;
  font-weight: 300 !important;
  font-style: italic;
  color: var(--wml-ink) !important;
  font-size: clamp(2rem, 4vw, 3.25rem) !important;
  letter-spacing: 0.005em;
  margin: 0 0 0.5rem;
}
.shop-page-title .category-description {
  font-family: var(--wml-font-body);
  color: var(--wml-ink-soft);
  max-width: 44rem;
  margin: 0.75rem auto;
  line-height: 1.7;
}
.shop-page-title {
  border-bottom: var(--wml-hairline-rule);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  background: var(--wml-bg) !important;
}

/* Breadcrumbs — minimal */
.breadcrumbs,
.woocommerce-breadcrumb,
.shop-page-title .is-small {
  font-family: var(--wml-font-heading) !important;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem !important;
  color: var(--wml-muted) !important;
}
.breadcrumbs a,
.woocommerce-breadcrumb a {
  color: var(--wml-ink-soft) !important;
  background-image: none !important;
}
.breadcrumbs a:hover,
.woocommerce-breadcrumb a:hover { color: var(--wml-accent) !important; }

/* ---- Shop toolbar (result count + sort) --------------------------- */

.woocommerce-result-count {
  font-family: var(--wml-font-heading);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--wml-muted);
}
.woocommerce-ordering select,
form.woocommerce-ordering select {
  font-family: var(--wml-font-heading);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--wml-ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--wml-hairline);
  border-radius: 0;
  padding: 0.5rem 1.5rem 0.5rem 0;
}

/* ---- Product card (Flatsome .product-small box) ------------------- */

.products .product-small .box {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.products .product-small .box-image {
  background: var(--wml-bg-deep);
  border: var(--wml-hairline-rule);
  transition: border-color var(--wml-dur-base) var(--wml-ease);
}
.products .product-small:hover .box-image {
  border-color: var(--wml-ink);
}
.products .product-small .box-image img {
  transition: opacity var(--wml-dur-slow) var(--wml-ease),
              transform var(--wml-dur-slow) var(--wml-ease);
}
.products .product-small:hover .box-image .show-on-hover {
  opacity: 1 !important;
}

/* Image aspect — editorial 4/5 */
.products .product-small .image-cover,
.products .product-small .box-image,
.products .product-small .box-image > div:first-child {
  aspect-ratio: 4/5 !important;
  padding-top: 0 !important;
}
.products .product-small .box-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  mix-blend-mode: multiply;
}

/* Hover image swap (Flatsome ships dual image on hover) */
.products .product-small .box-image .image-hover {
  opacity: 0;
  transition: opacity var(--wml-dur-slow) var(--wml-ease),
              transform var(--wml-dur-slow) var(--wml-ease);
}
.products .product-small:hover .box-image .image-hover {
  opacity: 1;
  transform: scale(1.02);
}

/* Text block under image */
.products .product-small .box-text {
  text-align: center;
  padding: 1rem 0.5rem 0.5rem;
}
.products .product-small .product-title,
.products .product-small .woocommerce-loop-product__title,
.products .product-small .box-text .name,
.products .product-small .title-wrapper a {
  font-family: var(--wml-font-display) !important;
  font-style: italic !important;
  font-weight: 400 !important;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem) !important;
  line-height: 1.22 !important;
  letter-spacing: 0.01em;
  color: var(--wml-ink) !important;
  text-transform: none !important;
  margin: 0 0 0.35rem !important;
  background-image: none !important;
}
.products .product-small:hover .product-title a {
  color: var(--wml-accent) !important;
}

/* Brand eyebrow above title — pulled from category via hook, or via
   a span we inject. Style is ready even if markup isn't. */
.products .product-small .box-text .category,
.products .product-small .box-text .category-wrapper,
.products .product-small .product-category {
  font-family: var(--wml-font-heading) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.22em !important;
  font-size: 0.7rem !important;
  color: var(--wml-accent) !important;
  margin-bottom: 0.25rem;
  background-image: none !important;
}

/* Price block */
.products .product-small .price,
.products .product-small .price-wrapper .price {
  font-family: var(--wml-font-body) !important;
  font-size: 0.92rem !important;
  color: var(--wml-ink-soft) !important;
  letter-spacing: 0.04em;
  margin: 0.35rem 0 0;
}
.products .product-small .price del {
  color: var(--wml-muted);
  text-decoration: line-through;
  margin-right: 0.5rem;
}
.products .product-small .price ins {
  color: var(--wml-accent);
  text-decoration: none;
  font-weight: 500;
}

/* Atelier Select ribbon (was Sale) */
.onsale,
.onsale.wml-atelier-select {
  font-family: var(--wml-font-heading) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.18em !important;
  font-size: 0.62rem !important;
  background: transparent !important;
  color: var(--wml-accent) !important;
  border: 1px solid var(--wml-accent) !important;
  border-radius: 0 !important;
  padding: 3px 10px !important;
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
  width: auto !important;
  height: auto !important;
  line-height: 1 !important;
  min-width: 0 !important;
  font-weight: 500 !important;
}

/* ---- Add-to-cart on loop (if Flatsome enables it) ----------------- */

.products .product-small .button.add_to_cart_button,
.products .product-small .button.product_type_simple,
.products .product-small .added_to_cart {
  font-family: var(--wml-font-heading) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.18em !important;
  font-size: 0.72rem !important;
  background: transparent !important;
  color: var(--wml-ink) !important;
  border: 1px solid var(--wml-ink) !important;
  border-radius: 0 !important;
  padding: 0.6rem 1.2rem !important;
  box-shadow: none !important;
  margin-top: 0.5rem;
}
.products .product-small .button.add_to_cart_button:hover {
  background: var(--wml-ink) !important;
  color: var(--wml-white) !important;
}

/* ---- Grid spacing ------------------------------------------------- */

.products.has-equal-box-heights .box-image,
.products .large-columns-4 > .col .col-inner,
.products .large-columns-3 > .col .col-inner {
  padding-bottom: 1rem;
}
.products > .col {
  padding: 0 clamp(0.35rem, 1vw, 0.9rem) clamp(1.5rem, 3vw, 2.5rem);
}

/* ---- Sidebar filters (if displayed) ------------------------------- */

#shop-sidebar,
.shop-sidebar,
.widget-area {
  background: transparent;
}
.widget-title,
.widget > h3,
.widget > h4 {
  font-family: var(--wml-font-heading) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.22em !important;
  font-size: 0.8rem !important;
  color: var(--wml-ink) !important;
  padding-bottom: 0.75rem;
  border-bottom: var(--wml-hairline-rule);
  margin-bottom: 1rem;
}
.widget ul li a {
  font-family: var(--wml-font-body);
  color: var(--wml-ink-soft);
  letter-spacing: 0.01em;
  background-image: none;
}
.widget ul li a:hover { color: var(--wml-accent); }

/* Price filter, color swatches, etc.*/
.price_slider_wrapper .ui-slider .ui-slider-range,
.price_slider_wrapper .ui-slider-handle {
  background: var(--wml-accent) !important;
}

/* ---- Pagination --------------------------------------------------- */

.woocommerce-pagination,
.page-numbers {
  font-family: var(--wml-font-heading);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.page-numbers li .page-number,
.page-numbers li a,
.page-numbers li span {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 0 !important;
  color: var(--wml-ink-soft) !important;
  min-width: 2.4rem;
  line-height: 2.4rem;
  font-size: 0.82rem;
}
.page-numbers li a:hover,
.page-numbers li span.current {
  background: transparent !important;
  border-color: var(--wml-accent) !important;
  color: var(--wml-accent) !important;
}

/* Empty results */
.woocommerce-info,
.woocommerce-error,
.woocommerce-message {
  background: var(--wml-bg-deep) !important;
  border-left: 3px solid var(--wml-accent) !important;
  color: var(--wml-ink) !important;
  font-family: var(--wml-font-body);
  border-radius: 0 !important;
}

@media (max-width: 48em) {
  .products .product-small .product-title,
  .products .product-small .woocommerce-loop-product__title,
  .products .product-small .title-wrapper a {
    font-size: 1rem !important;
  }
}
