/* MJT 2026 — Premium polish: hero, categories, shop, single product, responsive */

/* ── Section shapes ── */
.mjt-section-shape {
  position: relative;
  line-height: 0;
  margin-top: -1px;
}
.mjt-section-shape svg {
  display: block;
  width: 100%;
  height: clamp(28px, 4vw, 56px);
  color: var(--mjt-color-bg);
}
.mjt-hero-slider .mjt-section-shape {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 6;
  pointer-events: none;
}

/* ── Hero slider premium (Woodmart split) ── */
.mjt-hero-slider__track { isolation: isolate; }
.mjt-hero-slide {
  transition: opacity 0.85s var(--mjt-ease-out), visibility 0.85s;
}
.mjt-hero-slide.is-entering .mjt-hero-slide__copy > * {
  animation: mjtHeroFadeUp 0.65s var(--mjt-ease-out) both;
}
.mjt-hero-slide.is-entering .mjt-hero-slide__product {
  animation: mjtHeroProductIn 0.75s var(--mjt-ease-out) 0.15s both;
}

@media (max-width: 767px) {
  .mjt-hero-slide.is-entering .mjt-hero-slide__copy > * {
    animation: none;
  }
  .mjt-hero-slider__track,
  .mjt-hero-slide__stage,
  .mjt-hero-slide__grid {
    min-height: 0;
  }
  .mjt-hero-slide__copy { max-width: 100%; }
  .mjt-hero-slide__cta-row { flex-direction: column; align-items: stretch; }
  .mjt-hero-slide__btn { width: 100%; justify-content: center; }
}

/* ── Category tiles — horizontal scroll mobile ── */
@media (max-width: 767px) {
  .mjt-cat-tiles__grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.85rem;
    padding-bottom: 0.5rem;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .mjt-cat-tiles__grid::-webkit-scrollbar { display: none; }
  .mjt-cat-tile {
    flex: 0 0 min(78vw, 280px);
    scroll-snap-align: start;
    min-height: 220px;
  }
}

.mjt-cat-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  margin-bottom: 0.35rem;
  color: #fff;
}
.mjt-cat-tile__count {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(122, 15, 24, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ── Categories grid — featured first card ── */
.mjt-categories__grid--premium {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
  .mjt-categories__grid--premium {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, minmax(200px, 1fr));
    gap: 1.15rem;
  }
  .mjt-categories__grid--premium .mjt-category-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
    min-height: 100%;
  }
}
.mjt-category-card__count {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.85;
}
@media (max-width: 767px) {
  .mjt-category-card__cta {
    opacity: 1;
    transform: none;
  }
}

/* ── Shop premium ── */
.mjt-shop-content .products {
  gap: clamp(0.85rem, 2vw, 1.35rem);
}
@media (max-width: 991px) {
  /* Never sticky on mobile — fights the sticky header and covers products */
  .mjt-shop-toolbar {
    position: static !important;
    top: auto !important;
    z-index: auto;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: color-mix(in srgb, var(--mjt-color-bg-alt) 40%, var(--mjt-color-surface));
  }
  body.mjt-filters-open { overflow: hidden; }
}
@media (min-width: 481px) and (max-width: 991px) {
  body.mjt-cols-3:not(.mjt-shop-view-list) .mjt-shop-content ul.products:not(.mjt-view-list),
  body.mjt-cols-4:not(.mjt-shop-view-list) .mjt-shop-content ul.products:not(.mjt-view-list) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 480px) {
  body.mjt-cols-2:not(.mjt-shop-view-list) .mjt-shop-content ul.products:not(.mjt-view-list),
  body.mjt-cols-3:not(.mjt-shop-view-list) .mjt-shop-content ul.products:not(.mjt-view-list),
  body.mjt-cols-4:not(.mjt-shop-view-list) .mjt-shop-content ul.products:not(.mjt-view-list) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem;
  }
  .mjt-shop-toolbar__right { width: 100%; }
  .mjt-shop-toolbar__right .woocommerce-ordering { flex: 1; }
  .mjt-shop-toolbar__right .woocommerce-ordering select { width: 100%; }
}
.mjt-shop-sidebar.is-open + .mjt-shop-content,
.mjt-shop-layout:has(.mjt-shop-sidebar.is-open) {
  pointer-events: none;
}

/* ── Single product premium ── */
@media (min-width: 992px) {
  .mjt-single-product__gallery-col {
    position: sticky;
    top: calc(var(--mjt-sticky-offset) + 0.75rem);
    align-self: start;
  }

  .mjt-single-product__summary-col .summary-inner {
    position: static;
    top: auto;
  }
}
.mjt-single-product__gallery-col .woocommerce-product-gallery {
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.mjt-single-product .quantity:not(.mjt-qty-stepper) {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--mjt-color-border);
  border-radius: var(--mjt-radius-full);
  overflow: hidden;
  background: var(--mjt-color-input-bg);
}
.mjt-single-product .quantity:not(.mjt-qty-stepper) input.qty {
  border: none;
  border-radius: 0;
  width: 52px;
  height: 50px;
}
.mjt-sticky-atc {
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--mjt-color-surface) 92%, transparent);
  border-top: 1px solid var(--mjt-color-border);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.08);
}
body.mjt-sticky-atc-visible { padding-bottom: 76px; }
body.mjt-sticky-atc-visible .mjt-compare-bar { bottom: 76px; }

@media (max-width: 767px) {
  .mjt-single-product__grid {
    gap: 1.25rem;
  }
  .mjt-single-breadcrumbs-bar__inner {
    flex-wrap: wrap;
  }
  .mjt-products-nav { margin-left: auto; }
  .mjt-single-product .single_add_to_cart_button,
  .mjt-single-product .button.alt {
    flex: 1 1 100%;
  }
  .mjt-sticky-atc__inner {
    flex-wrap: wrap;
    gap: 0.65rem;
  }
  .mjt-sticky-atc__product { flex: 1 1 100%; }
  .mjt-sticky-atc__actions { width: 100%; }
  .mjt-sticky-atc__btn { width: 100%; }
}

/* ── Global responsive fixes ── */
.mjt-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}
.mjt-section-badge {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mjt-color-accent);
  background: var(--mjt-color-accent-soft);
  border-radius: 999px;
}
@media (max-width: 767px) {
  .mjt-section-header { align-items: flex-start; }
  .mjt-products-tabs__nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
  }
  .mjt-products-tabs__nav::-webkit-scrollbar { display: none; }
  .mjt-products-tabs__btn { flex-shrink: 0; }
  .mjt-collection-block {
    grid-template-columns: 1fr !important;
  }
  .mjt-collection-block__products {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .mjt-collection-week__layout { grid-template-columns: 1fr; }
  .mjt-buying-guide__grid { grid-template-columns: 1fr; }
  .mjt-latest-posts__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .mjt-hero-slide.is-entering .mjt-hero-slide__copy > * {
    animation: none !important;
  }
}

/* ── Category cards premium ── */
.mjt-categories__grid--premium .mjt-category-card {
  border-radius: var(--mjt-radius-xl);
  overflow: hidden;
  border: 0;
  outline: none;
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.08);
  transition: transform 0.45s var(--mjt-ease-out), box-shadow 0.45s var(--mjt-ease-out);
}
.mjt-categories__grid--premium .mjt-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(17, 17, 17, 0.12);
}
.mjt-categories__grid--premium .mjt-category-card:focus-visible {
  outline: 2px solid var(--mjt-color-accent);
  outline-offset: 3px;
}
.mjt-categories__grid--premium .mjt-category-card__overlay {
  background: linear-gradient(180deg, rgba(17, 17, 19, 0.08) 0%, rgba(17, 17, 19, 0.92) 72%, rgba(17, 17, 19, 0.98) 100%);
  padding: 1rem 1.05rem 1.1rem;
  min-height: 52%;
}

.mjt-categories__grid--premium .mjt-category-card:not(:first-child) .mjt-category-card__overlay {
  min-height: 58%;
}

.mjt-categories__grid--premium .mjt-category-card__cta {
  opacity: 1;
  transform: none;
}
.mjt-cat-tile {
  border-radius: var(--mjt-radius-xl);
  border: 0;
  outline: none;
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.08);
}

/* ── Home sections polish ── */
.mjt-product-collections .mjt-collection-block {
  border-radius: var(--mjt-radius-xl);
  overflow: hidden;
  border: 1px solid var(--mjt-color-border);
}
.mjt-collection-week__spotlight {
  border-radius: var(--mjt-radius-xl);
  overflow: hidden;
}
.mjt-buying-guide__card,
.mjt-latest-posts__card {
  border-radius: var(--mjt-radius-lg);
  transition: transform 0.35s var(--mjt-ease-out), box-shadow 0.35s var(--mjt-ease-out);
}
.mjt-buying-guide__card:hover,
.mjt-latest-posts__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--mjt-shadow-md);
}

/* ── Header mobile polish ── */
@media (max-width: 767px) {
  .mjt-header__actions {
    gap: 0.35rem;
  }
  .mjt-brand-logo--header.mjt-brand-logo--layout-horizontal.mjt-brand-logo--has-dark {
    width: min(172px, 52vw);
    height: 44px;
  }
  .mjt-brand-logo--has-dark .mjt-brand-logo__img--light,
  .mjt-brand-logo--has-dark .mjt-brand-logo__img--dark {
    max-height: 44px;
  }
  .mjt-compare-bar {
    padding: 0.65rem 1rem;
  }
  .mjt-compare-bar__inner {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* ── Product card mobile density ── */
@media (max-width: 480px) {
  .mjt-product-card__title {
    font-size: 0.82rem;
    line-height: 1.35;
  }
  .mjt-product-card__price {
    font-size: 0.9rem;
  }
  .mjt-product-card__media {
    aspect-ratio: 4 / 5;
  }
}

/* ── Single product gallery polish ── */
.mjt-single-product__gallery-col .woocommerce-product-gallery {
  overflow: visible;
}
.mjt-single-product__tools {
  gap: 0.5rem;
}
.mjt-single-product__tools .mjt-wishlist-toggle,
.mjt-single-product__tools .mjt-compare-toggle {
  flex: 1;
}
