/* LinguaMaze marketplace — shop cards + single-product buy box */

:root {
  --lm-orange: #f26c3f;
  --lm-orangeA: #d94f27;
  --lm-ink: #1a1a2e;
  --lm-muted: #5a5a6e;
  --lm-cream: #fff8ec;
  --lm-line: #eadfd0;
  --lm-green: #8cc63f;
  --lm-red: #ef4e3a;
  --lm-yellow: #f4c430;
}

body.lm-marketplace-shop,
body.lm-marketplace-product {
  background: #f7f1e8;
}

body.lm-marketplace-shop .ast-container,
body.lm-marketplace-product .ast-container,
body.woocommerce-shop .ast-container,
body.tax-product_cat .ast-container {
  max-width: 1400px !important;
}

body.woocommerce-shop .ast-archive-title,
body.woocommerce-shop .ast-page-title,
body.tax-product_cat .ast-archive-description,
body.tax-product_cat h1.woocommerce-products-header__title {
  display: none !important;
}

/* ---------- Shop cards ---------- */
body.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px !important;
  margin: 0 0 40px !important;
}

@media (max-width: 1100px) {
  body.woocommerce ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  body.woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px !important;
  }
}

@media (max-width: 420px) {
  body.woocommerce ul.products {
    grid-template-columns: 1fr;
  }
}

body.woocommerce ul.products li.product,
body.woocommerce ul.products li.product.product {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  border: 1px solid var(--lm-line) !important;
  border-radius: 14px !important;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 24px rgba(26, 26, 46, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.woocommerce ul.products li.product:hover {
  transform: translateY(-3px);
  border-color: rgba(242, 108, 63, 0.45) !important;
  box-shadow: 0 18px 36px rgba(26, 26, 46, 0.1);
}

body.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
  display: block;
  text-decoration: none;
}

body.woocommerce ul.products li.product a img {
  width: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
  background: #f3ece2;
  transition: transform 0.35s ease;
}

body.woocommerce ul.products li.product:hover a img {
  transform: scale(1.03);
}

.lm-preview-chip {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  background: rgba(26, 26, 46, 0.86);
  color: #fff;
  font-family: Nunito, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

body.woocommerce ul.products li.product:hover .lm-preview-chip,
body.woocommerce ul.products li.product:focus-within .lm-preview-chip {
  opacity: 1;
  transform: none;
}

body.woocommerce ul.products li.product .onsale,
body.woocommerce ul.products li.product .ast-onsale-card,
.lm-free-badge {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
  z-index: 3;
  min-height: 0 !important;
  min-width: 0 !important;
  width: auto !important;
  height: auto !important;
  line-height: 1 !important;
  border: 0 !important;
  transform: none !important;
  border-radius: 999px !important;
  padding: 5px 10px !important;
  font-family: Fredoka, system-ui, sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.woocommerce ul.products li.product .onsale,
body.woocommerce ul.products li.product .ast-onsale-card {
  background: var(--lm-red) !important;
  color: #fff !important;
}

.lm-free-badge {
  background: var(--lm-green);
  color: var(--lm-ink);
}

body.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: Fredoka, system-ui, sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  color: var(--lm-ink) !important;
  padding: 12px 14px 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
}

.lm-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  padding: 6px 14px 0;
  font-family: Nunito, system-ui, sans-serif;
  font-size: 12px;
  color: var(--lm-muted);
}

.lm-card-cat {
  color: var(--lm-orangeA);
  font-weight: 800;
}

.lm-card-author {
  color: var(--lm-muted);
}

body.woocommerce ul.products li.product .price {
  display: block;
  padding: 8px 14px 0 !important;
  margin: 0 !important;
  color: var(--lm-orangeA) !important;
  font-family: Fredoka, system-ui, sans-serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
}

body.woocommerce ul.products li.product .price del {
  color: rgba(26, 26, 46, 0.4) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  margin-right: 6px;
}

body.woocommerce ul.products li.product .price ins {
  text-decoration: none !important;
  background: transparent !important;
}

body.woocommerce ul.products li.product .button,
body.woocommerce ul.products li.product a.button {
  display: block !important;
  width: calc(100% - 28px) !important;
  margin: 12px 14px 14px !important;
  text-align: center;
  background: var(--lm-orange) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 11px 14px !important;
  font-family: Fredoka, system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  box-shadow: none !important;
}

body.woocommerce ul.products li.product .button:hover,
body.woocommerce ul.products li.product a.button:hover {
  background: var(--lm-orangeA) !important;
  color: #fff !important;
  transform: none;
}

body.woocommerce ul.products li.product .button.lm-access-download {
  background: #2f8f72 !important;
}

body.woocommerce .woocommerce-result-count {
  font-family: Nunito, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--lm-muted);
}

body.woocommerce .woocommerce-ordering select {
  border: 1px solid var(--lm-line);
  border-radius: 10px;
  padding: 8px 32px 8px 12px;
  font-family: Nunito, system-ui, sans-serif;
  font-weight: 700;
  background: #fff;
  color: var(--lm-ink);
}

/* ---------- Single product ---------- */
.lm-back-to-shop {
  display: none !important;
}

.lm-back-library {
  margin: 0 0 16px;
  font-family: Nunito, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.lm-back-library a {
  color: var(--lm-orangeA);
  text-decoration: none;
}

.lm-back-library a:hover {
  color: var(--lm-orange);
}

.lm-preview-kicker {
  margin: 0 0 10px;
  font-family: Nunito, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lm-orangeA);
}

body.single-product div.product {
  position: relative;
}

@media (min-width: 922px) {
  body.single-product div.product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 36px 40px;
    align-items: start;
  }

  body.single-product div.product .woocommerce-product-gallery,
  body.single-product div.product div.images {
    grid-column: 1;
    grid-row: 1;
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
  }

  body.single-product div.product .summary {
    grid-column: 2;
    grid-row: 1;
    width: 100% !important;
    float: none !important;
    position: sticky;
    top: 96px;
    background: #fff;
    border: 1px solid var(--lm-line);
    border-radius: 16px;
    padding: 22px 22px 18px;
    box-shadow: 0 16px 40px rgba(26, 26, 46, 0.07);
    margin: 0 !important;
  }

  body.single-product div.product .woocommerce-tabs,
  body.single-product div.product .related.products,
  body.single-product div.product .up-sells {
    grid-column: 1 / -1;
  }
}

body.single-product div.product .woocommerce-product-gallery,
body.single-product div.product div.images {
  background: #fff;
  border: 1px solid var(--lm-line);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(26, 26, 46, 0.05);
}

body.single-product div.product .woocommerce-product-gallery img,
body.single-product .ast-article-single figure,
body.single-product .ast-article-single img:not(figure img) {
  box-shadow: none !important;
  border-radius: 10px;
}

body.single-product div.product .product_title {
  font-family: Fredoka, system-ui, sans-serif !important;
  font-size: clamp(26px, 3vw, 34px) !important;
  line-height: 1.15 !important;
  color: var(--lm-ink) !important;
  margin: 0 0 10px !important;
}

.lm-buy-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.lm-buy-chips span {
  display: inline-flex;
  align-items: center;
  background: var(--lm-cream);
  border: 1px solid var(--lm-line);
  color: var(--lm-ink);
  font-family: Nunito, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
}

body.single-product div.product p.price {
  color: var(--lm-orangeA) !important;
  font-family: Fredoka, system-ui, sans-serif !important;
  font-size: 32px !important;
  font-weight: 700 !important;
  margin: 0 0 12px !important;
}

body.single-product div.product p.price del {
  color: rgba(26, 26, 46, 0.4) !important;
  font-size: 16px !important;
}

body.single-product .woocommerce-product-details__short-description {
  font-family: Nunito, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--lm-muted);
  margin-bottom: 16px;
}

.lm-included {
  margin: 0 0 16px;
  padding: 14px 0 2px;
  border-top: 1px solid var(--lm-line);
}

.lm-included-title {
  margin: 0 0 8px !important;
  font-family: Fredoka, system-ui, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--lm-ink) !important;
}

.lm-included-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-included-list li {
  position: relative;
  padding: 5px 0 5px 22px;
  font-family: Nunito, system-ui, sans-serif;
  font-size: 14px;
  color: var(--lm-ink);
}

.lm-included-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><path d='M5 12l5 5L20 7' stroke='%238CC63F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 12px no-repeat;
}

body.single-product form.cart {
  margin-bottom: 10px !important;
}

body.single-product form.cart .quantity {
  display: none;
}

body.single-product form.cart .single_add_to_cart_button,
body.single-product .lm-access-note .button {
  width: 100%;
  background: var(--lm-orange) !important;
  border: 0 !important;
  border-radius: 12px !important;
  padding: 14px 18px !important;
  font-family: Fredoka, system-ui, sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  box-shadow: none !important;
}

body.single-product form.cart .single_add_to_cart_button:hover,
body.single-product .lm-access-note .button:hover {
  background: var(--lm-orangeA) !important;
}

.lm-license-note,
.lm-access-or {
  margin: 10px 0 0;
  font-family: Nunito, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--lm-muted);
}

.lm-access-or a,
.lm-license-note a {
  color: var(--lm-orangeA);
  font-weight: 800;
}

body.single-product .product_meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--lm-line);
  font-family: Nunito, system-ui, sans-serif;
  font-size: 13px;
}

body.single-product .woocommerce-tabs {
  margin-top: 28px;
  background: #fff;
  border: 1px solid var(--lm-line);
  border-radius: 16px;
  padding: 8px 22px 22px;
}

body.single-product .woocommerce-tabs ul.tabs {
  padding: 0 !important;
  margin: 0 0 16px !important;
  border-bottom: 1px solid var(--lm-line) !important;
}

body.single-product .woocommerce-tabs ul.tabs li {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}

body.single-product .woocommerce-tabs ul.tabs li a {
  font-family: Fredoka, system-ui, sans-serif;
  font-weight: 600;
  color: var(--lm-muted);
}

body.single-product .woocommerce-tabs ul.tabs li.active a {
  color: var(--lm-orangeA);
}

body.single-product .related.products > h2,
body.single-product .up-sells > h2 {
  font-family: Fredoka, system-ui, sans-serif !important;
  font-size: 28px !important;
  margin: 36px 0 18px !important;
}

@media (prefers-reduced-motion: reduce) {
  body.woocommerce ul.products li.product,
  body.woocommerce ul.products li.product a img,
  .lm-preview-chip {
    transition: none;
  }
}
