/* shop-ui: course-style product archive (WoodMart markup). Scoped to body.mj-shop-on. */

.mj-shop-on .main-page-wrapper {
  background: var(--mj-page);
}

/* Page header: light sand with the girih lattice instead of the dark band */
.mj-shop-on .wd-page-title.page-title {
  padding-block: clamp(28px, 4vw, 48px);
  background-color: var(--mj-sand) !important;
  background-image:
    linear-gradient(180deg, rgba(245, 241, 234, 0) 50%, var(--mj-page) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23b08d57' stroke-opacity='.22' stroke-width='1'%3E%3Cpath d='M32 14l5.3 12.7L50 32l-12.7 5.3L32 50l-5.3-12.7L14 32l12.7-5.3z'/%3E%3Cpath d='M19.3 19.3h25.4v25.4H19.3z' transform='rotate(45 32 32)'/%3E%3Cpath d='M0 0l14 14M64 0L50 14M0 64l14-14M64 64L50 50'/%3E%3C/g%3E%3C/svg%3E") !important;
  border-bottom: 1px solid var(--mj-line);
}

.mj-shop-on .wd-page-title.page-title::before {
  display: none;
}

.mj-shop-on .wd-page-title .entry-title,
.mj-shop-on .wd-page-title .title {
  color: var(--mj-ink) !important;
  font-weight: 800;
}

.mj-shop-on .wd-page-title :is(.wd-back-btn, .wd-breadcrumbs, .woocommerce-breadcrumb, .breadcrumbs) a,
.mj-shop-on .wd-page-title :is(.wd-back-btn, .wd-breadcrumbs, .woocommerce-breadcrumb, .breadcrumbs) {
  color: var(--mj-muted) !important;
}

.mj-shop-on .wd-page-title .wd-back-btn > a::before {
  color: var(--mj-muted);
}

/* Toolbar */
.mj-shop-on .shop-loop-head {
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 16px;
  border: 1px solid var(--mj-line);
  border-radius: var(--mj-radius);
  background: var(--mj-surface);
}

.mj-shop-on .shop-loop-head .wd-breadcrumbs,
.mj-shop-on .shop-loop-head .woocommerce-breadcrumb {
  font-size: .9rem;
}

.mj-shop-on .woocommerce-ordering select {
  border: 0;
  background-color: transparent;
  color: var(--mj-ink);
  font-family: var(--mj-font);
}

/* Cards */
.mj-shop-on .products .wd-product .product-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid var(--mj-line);
  border-radius: var(--mj-radius-lg);
  background: var(--mj-surface);
  box-shadow: var(--mj-shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}

.mj-shop-on .products .wd-product:hover .product-wrapper {
  box-shadow: var(--mj-shadow);
  transform: translateY(-2px);
}

.mj-shop-on .products.products-bordered-grid-ins .wd-product,
.mj-shop-on .products.products-bordered-grid .wd-product {
  border: 0 !important;
}

.mj-shop-on .products .wd-product .wd-product-card-bg {
  display: none;
}

.mj-shop-on .products .wd-product .product-element-top {
  position: relative;
  margin: 0 !important;
  overflow: hidden;
  border-radius: 0 !important;
  aspect-ratio: 3 / 2;
  background: var(--mj-sand);
}

.mj-shop-on .products .wd-product .product-element-top .product-image-link,
.mj-shop-on .products .wd-product .product-element-top img {
  display: block;
  width: 100%;
  height: 100% !important;
  border-radius: 0 !important;
  object-fit: cover;
}

.mj-shop-on .products .wd-product.mj-owned .product-element-top::after {
  content: var(--mj-owned-label, "");
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--mj-success-soft);
  color: var(--mj-success);
  font-size: .78rem;
  font-weight: 700;
}

.mj-shop-on .products .wd-product .product-element-bottom {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px !important;
  text-align: start;
}

.mj-shop-on .products .wd-product .wd-entities-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.7;
}

.mj-shop-on .products .wd-product .wd-entities-title a {
  color: var(--mj-ink);
}

.mj-shop-on .products .wd-product .wd-product-stock {
  display: none;
}

.mj-loop-sub {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: .88rem;
  line-height: 1.8;
  color: var(--mj-muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mj-loop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mj-loop-chips li {
  margin: 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--mj-sand);
  color: var(--mj-muted);
  font-size: .78rem;
  font-weight: 600;
}

.mj-shop-on .products .wd-product .wrap-price {
  margin-top: auto;
  padding-top: 6px;
}

.mj-shop-on .products .wd-product .price,
.mj-shop-on .products .wd-product .price .amount {
  color: var(--mj-ink);
  font-size: 1.1rem;
  font-weight: 800;
}

.mj-shop-on .products .wd-product.mj-owned .wrap-price {
  display: none;
}

.mj-shop-on .products .wd-product .wd-add-btn {
  margin: 4px 0 0;
}

.mj-shop-on .products .wd-product .wd-add-btn .button,
.mj-shop-on .products .wd-product .wd-add-btn .added_to_cart {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border-radius: var(--mj-radius);
  background: var(--mj-primary);
  color: var(--mj-on-primary);
  font-family: var(--mj-font);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.mj-shop-on .products .wd-product .wd-add-btn .button:hover {
  background: var(--mj-primary-hover);
  color: var(--mj-on-primary);
}

.mj-shop-on .products .wd-product .wd-add-btn .mj-loop-owned--waiting {
  background: var(--mj-sand);
  color: var(--mj-muted);
}

.mj-shop-on .products .wd-product .wd-add-btn .button {
  position: relative;
  overflow: hidden;
}

.mj-shop-on .products .wd-product .wd-add-btn .button .wd-action-text {
  transition: opacity .2s ease, transform .2s ease;
}

.mj-shop-on .products .wd-product .wd-add-btn .button .wd-action-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity .2s ease, transform .2s ease;
}

.mj-shop-on .products .wd-product .wd-add-btn .button:hover .wd-action-text,
.mj-shop-on .products .wd-product .wd-add-btn .button:focus-visible .wd-action-text {
  opacity: 0;
  transform: translateY(-100%);
}

.mj-shop-on .products .wd-product .wd-add-btn .button:hover .wd-action-icon,
.mj-shop-on .products .wd-product .wd-add-btn .button:focus-visible .wd-action-icon {
  opacity: 1;
  transform: none;
}

.mj-shop-on .products .wd-product .wd-add-btn .mj-loop-owned .wd-action-text,
.mj-shop-on .products .wd-product .wd-add-btn .mj-loop-owned:hover .wd-action-text {
  opacity: 1;
  transform: none;
}

.mj-shop-on .products .wd-product .wd-product-card-hover {
  display: none;
}

@media (max-width: 767px) {
  .mj-shop-on .products .wd-product .product-element-bottom {
    padding: 12px !important;
  }

  .mj-shop-on .products .wd-product .wd-entities-title {
    font-size: .95rem;
  }
}
