/* =========================================================
   M3yar Product Cards — premium commerce UI
   ========================================================= */

:root {
  --m3c-ink: #1a0f0c;
  --m3c-brown: #3d2420;
  --m3c-warm: #6b4c3b;
  --m3c-accent: #7a3333;
  --m3c-accent-deep: #5c2222;
  --m3c-gold: #c4a574;
  --m3c-gold-soft: #e8d7b8;
  --m3c-cream: #f8f4ef;
  --m3c-cream-2: #efe7dc;
  --m3c-line: rgba(26, 15, 12, 0.08);
  --m3c-muted: #8a8279;
  --m3c-ok: #2f6b4f;
  --m3c-radius: 20px;
  --m3c-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --m3c-shadow: 0 8px 28px rgba(26, 15, 12, 0.07);
  --m3c-shadow-hover: 0 22px 48px rgba(26, 15, 12, 0.14);
}

/* Neutralize theme product box chrome on our cards */
.m3-card.product__box,
.m3-product-grid .product__box,
.m3-product-slider .product__box {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  width: auto !important;
  min-height: 0 !important;
  transform: none !important;
}

.m3-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 768px) {
  .m3-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (min-width: 1200px) {
  .m3-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
  }
}

.m3-products-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 200px;
  padding: 32px 18px;
  border-radius: var(--m3c-radius);
  border: 1px dashed rgba(122, 51, 51, 0.22);
  background:
    radial-gradient(circle at 20% 0%, rgba(196, 165, 116, 0.18), transparent 45%),
    linear-gradient(180deg, #fffaf5 0%, #fff 100%);
  text-align: center;
  color: var(--m3c-muted);
}

.m3-products-empty i {
  font-size: 30px;
  color: rgba(122, 51, 51, 0.45);
}

.m3-products-empty p {
  margin: 0;
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.m3-shop-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  width: 100%;
}

.m3-shop-head__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.m3-shop-head__hint {
  margin: 0;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--m3c-muted);
  line-height: 1.5;
}

.m3-shop-head__hint-short {
  display: none;
}

.m3-shop-tabs-wrap {
  width: 100%;
  max-width: 100%;
}

.m3-shop-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 100%;
}

.m3-shop-tabs__item {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 160px;
  min-width: 0;
}

.m3-shop-tab {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1.5px solid rgba(74, 44, 42, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #faf7f3 100%);
  box-shadow: 0 2px 8px rgba(44, 24, 16, 0.04);
  color: var(--m3c-brown);
  cursor: pointer;
  font: inherit;
  text-align: start;
  transition:
    background 0.25s var(--m3c-ease),
    border-color 0.25s var(--m3c-ease),
    color 0.25s var(--m3c-ease),
    box-shadow 0.25s var(--m3c-ease),
    transform 0.25s var(--m3c-ease);
}

.m3-shop-tab:hover {
  border-color: rgba(122, 51, 51, 0.28);
  background: #fff;
  box-shadow: 0 8px 22px rgba(44, 24, 16, 0.08);
  transform: translateY(-1px);
}

.m3-shop-tab:focus-visible {
  outline: 2px solid rgba(196, 165, 116, 0.85);
  outline-offset: 3px;
}

.m3-shop-tab__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(196, 165, 116, 0.16);
  color: #8B5A2B;
  font-size: 16px;
  transition: background 0.25s ease, color 0.25s ease;
}

.m3-shop-tab__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.m3-shop-tab__name {
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--m3c-ink);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m3-shop-tab__action {
  font-family: "Cairo", sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--m3c-muted);
  letter-spacing: 0.01em;
}

.m3-shop-tab__status {
  display: none;
  font-family: "Cairo", sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #e8d5b5;
  letter-spacing: 0.02em;
}

.m3-shop-tab__status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-inline-end: 7px;
  border-radius: 50%;
  background: #C4A574;
  vertical-align: 0;
  box-shadow: 0 0 0 3px rgba(196, 165, 116, 0.25);
}

.m3-shop-tab.is-active .m3-shop-tab__status,
.m3-shop-tab.active .m3-shop-tab__status {
  display: inline-flex;
  align-items: center;
  color: #f6e7c8;
  text-shadow: 0 0 12px rgba(232, 213, 181, 0.35);
  animation: m3TabStatusGlow 2.2s ease-in-out infinite;
}

.m3-shop-tab.is-active .m3-shop-tab__status::before,
.m3-shop-tab.active .m3-shop-tab__status::before {
  background: #f3e0b4;
  box-shadow:
    0 0 0 0 rgba(243, 224, 180, 0.5),
    0 0 8px rgba(243, 224, 180, 0.55);
  animation: m3TabStatusDot 2s ease-out infinite;
}

@keyframes m3TabStatusGlow {
  0%,
  100% {
    opacity: 0.78;
    text-shadow: 0 0 8px rgba(232, 213, 181, 0.2);
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 14px rgba(243, 224, 180, 0.55);
  }
}

@keyframes m3TabStatusDot {
  0% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(243, 224, 180, 0.5),
      0 0 6px rgba(243, 224, 180, 0.45);
  }
  70% {
    transform: scale(1);
    box-shadow:
      0 0 0 7px rgba(243, 224, 180, 0),
      0 0 10px rgba(243, 224, 180, 0.15);
  }
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(243, 224, 180, 0),
      0 0 6px rgba(243, 224, 180, 0.4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .m3-shop-tab.is-active .m3-shop-tab__status,
  .m3-shop-tab.active .m3-shop-tab__status,
  .m3-shop-tab.is-active .m3-shop-tab__status::before,
  .m3-shop-tab.active .m3-shop-tab__status::before {
    animation: none;
  }

  .m3-shop-tab.is-active .m3-shop-tab__status::before,
  .m3-shop-tab.active .m3-shop-tab__status::before {
    box-shadow: 0 0 0 3px rgba(196, 165, 116, 0.28);
  }
}

.m3-shop-tab__count {
  flex: 0 0 auto;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(122, 51, 51, 0.08);
  color: var(--m3c-accent);
  font-family: "Cairo", sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  transition: background 0.25s ease, color 0.25s ease;
}

.m3-shop-tab.is-active,
.m3-shop-tab.active {
  border-color: transparent;
  background: linear-gradient(135deg, #4A2C2A 0%, #2C1810 100%);
  box-shadow:
    0 10px 28px rgba(44, 24, 16, 0.22),
    0 0 0 1px rgba(196, 165, 116, 0.35) inset;
  color: #fff;
  transform: translateY(-1px);
  cursor: default;
}

.m3-shop-tab.is-active .m3-shop-tab__icon,
.m3-shop-tab.active .m3-shop-tab__icon {
  background: rgba(196, 165, 116, 0.22);
  color: #E8D5B5;
}

.m3-shop-tab.is-active .m3-shop-tab__name,
.m3-shop-tab.active .m3-shop-tab__name {
  color: #fff;
}

.m3-shop-tab.is-active .m3-shop-tab__action,
.m3-shop-tab.active .m3-shop-tab__action {
  display: none;
}

.m3-shop-tab.is-active .m3-shop-tab__status,
.m3-shop-tab.active .m3-shop-tab__status {
  display: inline-flex;
  align-items: center;
}

.m3-shop-tab.is-active .m3-shop-tab__count,
.m3-shop-tab.active .m3-shop-tab__count {
  background: rgba(196, 165, 116, 0.22);
  color: #E8D5B5;
}

.m3-shop-tab.is-active:hover,
.m3-shop-tab.active:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 28px rgba(44, 24, 16, 0.22),
    0 0 0 1px rgba(196, 165, 116, 0.35) inset;
}

/* Mobile: compact equal-width segmented filters */
@media (max-width: 767px) {
  .m3-shop-head {
    gap: 12px;
  }

  .m3-shop-head__hint {
    font-size: 12px;
  }

  .m3-shop-head__hint-full {
    display: none;
  }

  .m3-shop-head__hint-short {
    display: inline;
  }

  .m3-shop-tabs-wrap {
    margin-inline: 0;
  }

  .m3-shop-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 6px;
    padding: 4px;
    border-radius: 14px;
    background: rgba(245, 240, 235, 0.9);
    border: 1px solid rgba(74, 44, 42, 0.08);
    overflow: visible;
  }

  .m3-shop-tabs__item {
    flex: none;
    width: auto;
    min-width: 0;
  }

  .m3-shop-tab {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    min-height: 56px;
    padding: 8px 6px;
    border-radius: 11px;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
    text-align: center;
    transform: none;
  }

  .m3-shop-tab:hover {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.7);
    border-color: transparent;
  }

  .m3-shop-tab__icon,
  .m3-shop-tab__action,
  .m3-shop-tab__status {
    display: none !important;
  }

  .m3-shop-tab__text {
    width: 100%;
    align-items: center;
  }

  .m3-shop-tab__name {
    max-width: 100%;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.25;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .m3-shop-tab__count {
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    font-size: 10.5px;
    background: rgba(74, 44, 42, 0.08);
    color: #4A2C2A;
  }

  .m3-shop-tab.is-active,
  .m3-shop-tab.active {
    background: linear-gradient(145deg, #4A2C2A 0%, #2C1810 100%);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(44, 24, 16, 0.18);
    transform: none;
  }

  .m3-shop-tab.is-active:hover,
  .m3-shop-tab.active:hover {
    transform: none;
    box-shadow: 0 4px 14px rgba(44, 24, 16, 0.18);
  }

  .m3-shop-tab.is-active .m3-shop-tab__name,
  .m3-shop-tab.active .m3-shop-tab__name {
    color: #fff;
  }

  .m3-shop-tab.is-active .m3-shop-tab__count,
  .m3-shop-tab.active .m3-shop-tab__count {
    background: rgba(196, 165, 116, 0.28);
    color: #E8D5B5;
  }
}

@media (max-width: 380px) {
  .m3-shop-tabs {
    gap: 4px;
    padding: 3px;
  }

  .m3-shop-tab {
    min-height: 52px;
    padding: 6px 4px;
  }

  .m3-shop-tab__name {
    font-size: 10.5px;
  }
}

/* ---------- Card shell ---------- */
.m3-card {
  --card-pad: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--m3c-radius);
  background: #fff;
  border: 1px solid var(--m3c-line);
  box-shadow: var(--m3c-shadow);
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.45s var(--m3c-ease),
    box-shadow 0.45s var(--m3c-ease),
    border-color 0.35s ease;
}

.m3-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  z-index: 4;
}

.m3-card:hover {
  transform: translateY(-8px);
  border-color: rgba(196, 165, 116, 0.55);
  box-shadow: var(--m3c-shadow-hover);
}

.m3-card.is-out {
  filter: saturate(0.88);
}

.m3-card.is-out .m3-card__thumb img {
  opacity: 0.72;
  filter: grayscale(0.2);
}

/* ---------- Visual / image ---------- */
.m3-card__visual {
  position: relative;
  aspect-ratio: 1 / 1.02;
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(196, 165, 116, 0.22), transparent 60%),
    linear-gradient(165deg, var(--m3c-cream) 0%, #fff 55%, var(--m3c-cream-2) 100%);
  overflow: hidden;
}

.m3-card__thumb {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

.m3-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.7s var(--m3c-ease), filter 0.45s ease;
  will-change: transform;
}

.m3-card:hover .m3-card__thumb img {
  transform: scale(1.08);
}

.m3-card__shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.28) 48%,
    transparent 60%
  );
  transform: translateX(-120%);
  transition: transform 0.8s var(--m3c-ease);
  z-index: 2;
}

.m3-card:hover .m3-card__shine {
  transform: translateX(120%);
}

.m3-card__flags {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: calc(100% - 64px);
}

.m3-flag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  font-family: "Cairo", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  color: #fff;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 18px rgba(26, 15, 12, 0.14);
}

.m3-flag--sale,
.m3-flag--offer {
  background: linear-gradient(135deg, var(--m3c-accent) 0%, var(--m3c-accent-deep) 100%);
}

.m3-flag--new {
  background: linear-gradient(135deg, #347a58 0%, #21563d 100%);
}

.m3-flag--best {
  background: linear-gradient(135deg, var(--m3c-gold) 0%, #a8844d 100%);
  color: var(--m3c-ink);
}

.m3-card__wish {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--m3c-brown);
  box-shadow: 0 10px 22px rgba(26, 15, 12, 0.12);
  cursor: pointer;
  transition: transform 0.3s var(--m3c-ease), background 0.25s ease, color 0.25s ease;
}

.m3-card__wish:hover,
.m3-card__wish.is-active {
  background: var(--m3c-accent);
  color: #fff;
  transform: scale(1.06);
}

.m3-card__oos {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: rgba(26, 15, 12, 0.28);
  backdrop-filter: blur(1px);
}

.m3-card__oos span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(26, 15, 12, 0.88);
  color: #fff;
  font-family: "Cairo", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.m3-card__quick {
  position: absolute;
  inset-inline: 12px;
  bottom: 12px;
  z-index: 5;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s var(--m3c-ease), transform 0.35s var(--m3c-ease);
}

.m3-card:hover .m3-card__quick {
  opacity: 1;
  transform: translateY(0);
}

.m3-card__quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--m3c-ink);
  text-decoration: none;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(26, 15, 12, 0.16);
  backdrop-filter: blur(10px);
  transition: background 0.25s ease, color 0.25s ease;
}

.m3-card__quick-btn:hover {
  background: var(--m3c-ink);
  color: #fff;
}

/* Mobile App Store–style get block — hidden on desktop */
.m3-card__get {
  display: none;
}

.m3-card__links,
.m3-card__command,
.m3-card__orb,
.m3-card__caption,
.m3-card__peek,
.m3-card__buy,
.m3-card__cta,
.m3-card__dock {
  display: none !important;
}

/* ---------- Info block ---------- */
.m3-card__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px var(--card-pad) 14px;
  flex: 1;
  background: linear-gradient(180deg, #fff 0%, #fffcf8 100%);
}

.m3-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 18px;
}

.m3-card__cat {
  font-family: "Cairo", sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: var(--m3c-accent);
  text-transform: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m3-card__ship {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "Cairo", sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--m3c-ok);
  white-space: nowrap;
}

.m3-card__name {
  margin: 0;
  font-size: 0;
}

.m3-card__name a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
  font-family: "Cairo", "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  color: var(--m3c-ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

.m3-card__name a:hover {
  color: var(--m3c-accent);
}

.m3-card__social {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.m3-card__sold,
.m3-card__code {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "Cairo", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--m3c-muted);
}

.m3-card__sold i {
  color: #c46b3a;
}

.m3-card__stock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "Cairo", sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.m3-card__stock i {
  font-size: 7px;
}

.m3-card__stock.is-in {
  color: var(--m3c-ok);
}

.m3-card__stock.is-out {
  color: var(--m3c-accent);
}

/* ---------- Footer / CTA ---------- */
.m3-card__footer {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(26, 15, 12, 0.06);
}

.m3-card__pricing {
  min-width: 0;
  flex: 1;
}

.m3-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.m3-card__price {
  font-family: "Cairo", sans-serif;
  font-size: 18px;
  font-weight: 900;
  color: var(--m3c-accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.m3-card__currency {
  font-family: "Cairo", sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: rgba(122, 51, 51, 0.75);
}

.m3-card__was {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.m3-card__was del {
  font-size: 12px;
  color: rgba(26, 15, 12, 0.38);
}

.m3-card__save {
  font-family: "Cairo", sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: var(--m3c-ok);
  background: rgba(47, 107, 79, 0.1);
  padding: 2px 7px;
  border-radius: 999px;
}

.m3-card__cart {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 46px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--m3c-accent) 0%, var(--m3c-accent-deep) 100%);
  color: #fff;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(122, 51, 51, 0.28);
  transition:
    transform 0.3s var(--m3c-ease),
    box-shadow 0.3s ease,
    background 0.25s ease;
}

.m3-card__cart span {
  display: none;
}

.m3-card__cart:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 28px rgba(122, 51, 51, 0.34);
  background: linear-gradient(145deg, #8d3d3d 0%, var(--m3c-accent) 100%);
}

.m3-card__cart:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.m3-card__cart:disabled {
  background: #cfc7be;
  box-shadow: none;
  cursor: not-allowed;
}

.m3-card__cart.is-added {
  background: linear-gradient(145deg, #347a58 0%, #21563d 100%);
  box-shadow: 0 10px 22px rgba(47, 107, 79, 0.28);
}

@media (min-width: 576px) {
  .m3-card__cart span {
    display: inline;
  }

  .m3-card__cart {
    min-width: 92px;
  }
}

/* ---------- Slider spacing ---------- */
.m3-product-slider .m3-card {
  margin-inline: 6px;
}

.m3-product-slider.slick-slider,
.default-slider .m3-product-slider {
  margin-inline: -6px;
}

.m3-product-slider .slick-list {
  padding-block: 10px 18px !important;
  margin-block: -4px;
  overflow: hidden;
}

/* Autoplay strip: keep motion inside the slider only */
.m3-home-product-slider {
  position: relative;
}

.m3-home-product-slider .slick-track {
  display: flex !important;
  align-items: stretch;
}

.m3-home-product-slider .slick-slide {
  height: auto;
  float: none;
}

.m3-home-product-slider .slick-slide > div {
  height: 100%;
}

.m3-home-product-slider .m3-card {
  height: 100%;
}

.m3-see-more {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.m3-see-more__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  text-decoration: none;
  font-family: "Cairo", sans-serif;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #7a3333 0%, #5c2222 100%);
  box-shadow: 0 12px 28px rgba(122, 51, 51, 0.28);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.m3-see-more__btn em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.85;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.m3-see-more__btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(122, 51, 51, 0.34);
}

/* Category listing page */
.m3-category-page {
  min-height: 60vh;
}

.m3-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(196, 165, 116, 0.2), transparent 55%),
    linear-gradient(135deg, #fffaf4 0%, #fff 100%);
  border: 1px solid rgba(26, 15, 12, 0.08);
}

.m3-category-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #7a3333;
  text-decoration: none;
  margin-bottom: 8px;
}

.m3-category-title {
  margin: 0;
  font-family: "Cairo", sans-serif;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  color: #1a0f0c;
}

.m3-category-sub {
  margin: 6px 0 0;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  color: #8a8279;
}

.m3-category-head__media {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid rgba(196, 165, 116, 0.45);
  box-shadow: 0 10px 24px rgba(26, 15, 12, 0.12);
}

.m3-category-head__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m3-category-chips-wrap {
  position: relative;
  margin-top: 18px;
}

.m3-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.m3-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(26, 15, 12, 0.1);
  background: #fff;
  color: #3d2420;
  text-decoration: none;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  flex: 0 0 auto;
}

.m3-category-chip span {
  font-size: 11px;
  font-weight: 800;
  color: #7a3333;
  background: rgba(122, 51, 51, 0.08);
  padding: 2px 7px;
  border-radius: 999px;
}

.m3-category-chip.is-active,
.m3-category-chip:hover {
  background: #7a3333;
  border-color: #7a3333;
  color: #fff;
}

.m3-category-chip.is-active span,
.m3-category-chip:hover span {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.m3-category-chip--all {
  font-weight: 800;
}

.m3-category-chip--all span {
  background: rgba(196, 165, 116, 0.22);
  color: #5c3d1e;
}

.m3-category-chip--all.is-active span,
.m3-category-chip--all:hover span {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

@media (max-width: 576px) {
  .m3-category-head {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .m3-see-more__btn {
    width: 100%;
    justify-content: center;
  }
}

.m3-home-products .section-content__title,
.m3-shop-by-category .section-content__title {
  font-family: "Cairo", sans-serif;
}

/* Keep theme product chrome from fighting the new card */
.m3-product-grid .product__img-box,
.m3-product-slider .product__img-box,
.m3-product-grid .product__action--link,
.m3-product-slider .product__action--link,
.m3-product-grid .product__label,
.m3-product-slider .product__label {
  display: none !important;
}

/* ---------- Mobile refinements ---------- */
@media (max-width: 991px) {
  .m3-card {
    --card-pad: 12px;
    border-radius: 16px;
  }

  .m3-card:hover {
    transform: translateY(-4px);
  }

  .m3-card__quick--desktop,
  .m3-card__cart--desktop {
    display: none;
  }

  .m3-card__wish {
    width: 36px;
    height: 36px;
  }

  .m3-card__oos {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
  }

  .m3-card__name a {
    font-size: 13.5px;
    min-height: 2.2em;
    letter-spacing: -0.01em;
  }

  .m3-card__social {
    margin-top: -2px;
  }

  .m3-card__price {
    font-size: 18px;
  }

  .m3-card__currency {
    font-size: 11px;
  }

  .m3-card__footer {
    border-top: 0;
    padding-top: 6px;
    padding-bottom: 0;
    margin-bottom: 0;
    margin-top: auto;
  }

  .m3-card__was {
    margin-top: 3px;
  }

  /*
   * App Store style:
   * big primary "get" button + light preview link under it.
   * Photo stays clean.
   */
  .m3-card__get {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(26, 15, 12, 0.06);
  }

  .m3-card__get-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(145deg, #8a3a3a 0%, var(--m3c-accent) 42%, var(--m3c-accent-deep) 100%);
    color: #fff;
    font-family: "Cairo", sans-serif;
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.18) inset,
      0 10px 22px rgba(122, 51, 51, 0.28);
    transition: transform 0.2s var(--m3c-ease), box-shadow 0.2s ease, filter 0.2s ease;
  }

  .m3-card__get-ico {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    flex-shrink: 0;
  }

  .m3-card__get-ico i {
    font-size: 12px;
  }

  .m3-card__get-btn:active:not(:disabled) {
    transform: scale(0.985);
    filter: brightness(0.96);
  }

  .m3-card__get-btn:disabled {
    opacity: 0.48;
    box-shadow: none;
    cursor: not-allowed;
    filter: grayscale(0.2);
  }

  .m3-card__get-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(122, 51, 51, 0.88);
    font-family: "Cairo", sans-serif;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
  }

  .m3-card__get-preview i {
    font-size: 12px;
    opacity: 0.9;
  }

  .m3-card__get-preview:active {
    color: var(--m3c-accent-deep);
    background: rgba(122, 51, 51, 0.06);
  }
}

@media (max-width: 420px) {
  .m3-product-grid {
    gap: 10px;
  }

  .m3-card__ship,
  .m3-card__save {
    display: none;
  }

  .m3-card__get {
    margin-top: 10px;
    padding-top: 10px;
    gap: 4px;
  }

  .m3-card__get-btn {
    min-height: 44px;
    font-size: 13px;
    gap: 8px;
  }

  .m3-card__get-ico {
    width: 24px;
    height: 24px;
  }

  .m3-card__get-preview {
    font-size: 11.5px;
    min-height: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .m3-card,
  .m3-card__thumb img,
  .m3-card__shine,
  .m3-card__quick,
  .m3-card__wish,
  .m3-card__cart,
  .m3-card__get-btn,
  .m3-card__get-preview {
    transition: none !important;
  }

  .m3-card:hover,
  .m3-card:hover .m3-card__thumb img,
  .m3-card:hover .m3-card__shine {
    transform: none !important;
  }
}

/* Focus visibility */
.m3-card__wish:focus-visible,
.m3-card__cart:focus-visible,
.m3-card__quick-btn:focus-visible,
.m3-card__get-btn:focus-visible,
.m3-card__get-preview:focus-visible,
.m3-card__name a:focus-visible,
.m3-card__thumb:focus-visible {
  outline: 2px solid var(--m3c-gold);
  outline-offset: 2px;
}

/* =========================================================
   Category detailed filters
   ========================================================= */

.m3-category-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.m3-category-toolbar__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #8a8279;
}

.m3-category-toolbar__meta strong {
  font-weight: 800;
  color: #3d2420;
}

.m3-category-toolbar__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c4a574;
}

.m3-category-toolbar__sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}

.m3-category-toolbar__sort label {
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #3d2420;
  margin: 0;
}

.m3-category-toolbar__sort select {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(26, 15, 12, 0.12);
  background: #fff;
  padding: 0 12px;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #1a0f0c;
}

.m3-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 12px 6px 6px;
  border: 1px solid rgba(26, 15, 12, 0.1);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fffcf8 100%);
  color: #1a0f0c;
  font-family: "Cairo", sans-serif;
  box-shadow: 0 8px 20px rgba(26, 15, 12, 0.06);
}

.m3-filter-toggle__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(122, 51, 51, 0.1);
  color: #7a3333;
  font-size: 15px;
}

.m3-filter-toggle__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  text-align: start;
}

.m3-filter-toggle__copy strong {
  font-size: 13px;
  font-weight: 800;
}

.m3-filter-toggle__copy small {
  font-size: 11px;
  font-weight: 600;
  color: #8a8279;
}

.m3-filter-toggle__count {
  min-width: 22px;
  height: 22px;
  margin-inline-start: 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #7a3333;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

/* Mobile sticky filter/sort dock */
.m3-cat-dock {
  display: none;
}

.m3-active-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.m3-active-filters__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.m3-active-filters__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(122, 51, 51, 0.18);
  background: rgba(122, 51, 51, 0.06);
  color: #7a3333;
  text-decoration: none;
  font-family: "Cairo", sans-serif;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.m3-active-filters__chip:hover {
  background: rgba(122, 51, 51, 0.12);
  color: #5c2222;
  transform: translateY(-1px);
}

.m3-active-filters__chip i {
  font-size: 11px;
  opacity: 0.75;
}

.m3-active-filters__clear {
  font-family: "Cairo", sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #7a3333;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.m3-category-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

@media (min-width: 992px) {
  .m3-category-layout {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
  }
}

.m3-filter {
  background: #fff;
  border: 1px solid rgba(26, 15, 12, 0.08);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(26, 15, 12, 0.06);
  position: sticky;
  top: 100px;
}

.m3-filter__sheet {
  display: flex;
  flex-direction: column;
  max-height: none;
}

.m3-filter__grab {
  display: none;
}

.m3-filter__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(26, 15, 12, 0.06);
}

.m3-filter__title {
  margin: 0;
  font-family: "Cairo", sans-serif;
  font-size: 16px;
  font-weight: 900;
  color: #1a0f0c;
  display: flex;
  align-items: center;
  gap: 8px;
}

.m3-filter__hint {
  margin: 4px 0 0;
  font-family: "Cairo", sans-serif;
  font-size: 12px;
  color: #8a8279;
}

.m3-filter__close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #f5efe8;
  color: #3d2420;
  font-size: 16px;
  flex-shrink: 0;
}

.m3-filter__form {
  display: flex;
  flex-direction: column;
}

.m3-filter__body {
  padding: 16px 18px 8px;
}

.m3-filter__group {
  margin-bottom: 18px;
}

.m3-filter__label {
  display: block;
  margin-bottom: 8px;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #3d2420;
}

.m3-filter__mini {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #8a8279;
}

.m3-filter__search {
  position: relative;
}

.m3-filter__search i.fal.fa-search {
  position: absolute;
  top: 50%;
  inset-inline-start: 12px;
  transform: translateY(-50%);
  color: #8a8279;
  pointer-events: none;
}

.m3-filter__search .m3-filter__input {
  padding-inline-start: 36px;
  padding-inline-end: 40px;
}

.m3-filter__clear-field {
  position: absolute;
  top: 50%;
  inset-inline-end: 8px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(26, 15, 12, 0.06);
  color: #5c4033;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.m3-filter__input,
.m3-filter__select {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(26, 15, 12, 0.12);
  background: #fffcf8;
  padding: 0 12px;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1a0f0c;
}

.m3-filter__input:focus,
.m3-filter__select:focus {
  outline: 2px solid rgba(196, 165, 116, 0.55);
  border-color: rgba(196, 165, 116, 0.7);
  background: #fff;
}

.m3-filter__price {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: end;
}

.m3-filter__dash {
  padding-bottom: 12px;
  color: #8a8279;
}

.m3-filter__range-hint {
  margin: 8px 0 0;
  font-family: "Cairo", sans-serif;
  font-size: 11px;
  color: #8a8279;
}

.m3-filter__segment {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border-radius: 16px;
  background: #f5efe8;
}

.m3-filter__seg {
  margin: 0;
  cursor: pointer;
}

.m3-filter__seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.m3-filter__seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 12px;
  font-family: "Cairo", sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #5c4033;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.m3-filter__seg input:checked + span {
  background: #fff;
  color: #7a3333;
  box-shadow: 0 4px 12px rgba(26, 15, 12, 0.08);
}

.m3-filter__checks {
  display: grid;
  gap: 8px;
}

.m3-filter__check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(26, 15, 12, 0.08);
  background: #fffcf8;
  font-family: "Cairo", sans-serif;
  color: #3d2420;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.m3-filter__check-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
}

.m3-filter__check-copy strong {
  font-size: 13px;
  font-weight: 800;
}

.m3-filter__check-copy small {
  font-size: 11px;
  font-weight: 600;
  color: #8a8279;
}

.m3-filter__check input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.m3-filter__box {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1.5px solid rgba(26, 15, 12, 0.25);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.m3-filter__box::after {
  content: "";
  width: 8px;
  height: 5px;
  border-inline-start: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px) scale(0);
  transition: transform 0.15s ease;
}

.m3-filter__check input[type="checkbox"]:checked + .m3-filter__box {
  background: #7a3333;
  border-color: #7a3333;
}

.m3-filter__check input[type="checkbox"]:checked + .m3-filter__box::after {
  transform: rotate(-410deg) translateY(0px) translateX(1px) scale(1);
  direction: ltr;
}

.m3-filter__check:has(input:checked) {
  border-color: rgba(122, 51, 51, 0.35);
  background: rgba(122, 51, 51, 0.06);
}

.m3-filter__check:has(input:checked) .m3-filter__check-copy strong {
  color: #7a3333;
}

.m3-filter__actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
  padding: 12px 18px 18px;
  border-top: 1px solid rgba(26, 15, 12, 0.06);
  background: linear-gradient(180deg, rgba(255, 252, 248, 0.4) 0%, #fff 100%);
}

.m3-filter__apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, #7a3333 0%, #5c2222 100%);
  color: #fff;
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(122, 51, 51, 0.25);
}

.m3-filter__apply-count {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.m3-filter__apply-count:empty,
.m3-filter__apply-count[data-empty="1"] {
  display: none;
}

.m3-filter__reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(26, 15, 12, 0.12);
  background: #fff;
  color: #3d2420;
  text-decoration: none;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.m3-filter-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 15, 12, 0.5);
  backdrop-filter: blur(2px);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.m3-filter-backdrop.is-visible {
  opacity: 1;
}

/* Infinite scroll */
.m3-category-infinite {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  min-height: 56px;
}

.m3-category-infinite__loader {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: #fffcf8;
  border: 1px solid rgba(26, 15, 12, 0.06);
  font-family: "Cairo", sans-serif;
  color: #8a6f5e;
}

.m3-category-infinite.is-loading .m3-category-infinite__loader {
  display: inline-flex;
}

.m3-category-infinite__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
}

.m3-category-infinite__copy strong {
  font-size: 13px;
  font-weight: 800;
  color: #3d2420;
}

.m3-category-infinite__copy small {
  font-size: 11px;
  font-weight: 600;
}

.m3-category-infinite__spinner {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(92, 64, 51, 0.15);
  border-top-color: #7a3333;
  animation: m3-category-spin 0.7s linear infinite;
  flex-shrink: 0;
}

.m3-category-infinite__error {
  text-align: center;
  font-family: "Cairo", sans-serif;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(122, 51, 51, 0.06);
  border: 1px solid rgba(122, 51, 51, 0.12);
}

.m3-category-infinite__error p {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #7a3333;
}

.m3-category-infinite__retry {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: #7a3333;
  color: #fff;
  font-family: "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.m3-category-infinite__sentinel {
  width: 100%;
  height: 1px;
  pointer-events: none;
}

.m3-category-infinite__end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
  padding: 14px 18px;
  border-radius: 16px;
  background: #fffcf8;
  border: 1px dashed rgba(26, 15, 12, 0.12);
  font-family: "Cairo", sans-serif;
  color: #3d2420;
}

.m3-category-infinite__end-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(46, 125, 50, 0.1);
  color: #2e7d32;
  font-size: 18px;
}

.m3-category-infinite__end strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.m3-category-infinite__end small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #8a8279;
}

.m3-product-grid > .m3-card.is-appended {
  animation: m3-card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.m3-infinite-skeletons {
  display: contents;
}

.m3-card-skeleton {
  border-radius: 20px;
  background: linear-gradient(90deg, #f5efe8 25%, #fff8f0 37%, #f5efe8 63%);
  background-size: 400% 100%;
  animation: m3-skeleton-shine 1.2s ease infinite;
  min-height: 320px;
  border: 1px solid rgba(26, 15, 12, 0.05);
}

@keyframes m3-category-spin {
  to { transform: rotate(360deg); }
}

@keyframes m3-card-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes m3-skeleton-shine {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@media (max-width: 991px) {
  .m3-category-page {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .m3-category-toolbar {
    justify-content: center;
  }

  .m3-category-toolbar__meta {
    width: 100%;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 12px;
    background: #fffcf8;
    border: 1px solid rgba(26, 15, 12, 0.06);
  }

  .m3-category-toolbar__sort label {
    display: none;
  }

  .m3-cat-dock {
    display: flex;
    align-items: stretch;
    position: fixed;
    z-index: 1030;
    inset-inline: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    min-height: 56px;
    padding: 6px;
    border-radius: 18px;
    background: rgba(255, 252, 248, 0.94);
    border: 1px solid rgba(26, 15, 12, 0.1);
    box-shadow: 0 14px 36px rgba(26, 15, 12, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.28s ease, opacity 0.28s ease;
  }

  body.m3-filter-open .m3-cat-dock {
    opacity: 0;
    transform: translateY(120%);
    pointer-events: none;
  }

  .m3-cat-dock__btn {
    position: relative;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    min-height: 44px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #1a0f0c;
    font-family: "Cairo", sans-serif;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .m3-cat-dock__btn i {
    font-size: 16px;
    color: #7a3333;
  }

  .m3-cat-dock__btn--filter:active,
  .m3-cat-dock__btn--sort:active {
    background: rgba(122, 51, 51, 0.08);
  }

  .m3-cat-dock__badge {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #7a3333;
    color: #fff;
    font-style: normal;
    font-size: 11px;
    font-weight: 800;
  }

  .m3-cat-dock__divider {
    width: 1px;
    margin-block: 8px;
    background: rgba(26, 15, 12, 0.12);
    flex-shrink: 0;
  }

  .m3-cat-dock__sort {
    flex: 1;
    display: flex;
    margin: 0;
  }

  .m3-cat-dock__btn--sort {
    width: 100%;
    overflow: hidden;
  }

  .m3-cat-dock__select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 16px; /* prevents iOS zoom */
  }

  .m3-filter-backdrop {
    z-index: 1080;
  }

  .m3-filter {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-height: min(92vh, 820px);
    border-radius: 24px 24px 0 0;
    border: 0;
    box-shadow: 0 -16px 48px rgba(26, 15, 12, 0.22);
    z-index: 1090;
    transform: translateY(110%);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    padding: 0;
  }

  .m3-filter.is-open {
    transform: translateY(0);
  }

  .m3-filter__sheet {
    max-height: min(92vh, 820px);
    height: 100%;
  }

  .m3-filter__grab {
    display: flex;
    justify-content: center;
    padding: 10px 0 2px;
  }

  .m3-filter__grab span {
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: rgba(26, 15, 12, 0.18);
  }

  .m3-filter__head {
    padding: 4px 16px 12px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
  }

  .m3-filter__form {
    min-height: 0;
    flex: 1;
    overflow: hidden;
  }

  .m3-filter__body {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 8px 16px 12px;
    max-height: calc(min(92vh, 820px) - 170px);
  }

  .m3-filter__actions {
    position: sticky;
    bottom: 0;
    grid-template-columns: 0.9fr 1.5fr;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 24px rgba(26, 15, 12, 0.06);
    z-index: 2;
  }

  body.m3-filter-open {
    overflow: hidden;
    touch-action: none;
  }

  .m3-category-chips-wrap {
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .m3-category-chips-wrap::before,
  .m3-category-chips-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 28px;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .m3-category-chips-wrap::before {
    inset-inline-start: 0;
    background: linear-gradient(to left, rgba(255, 252, 248, 0), #fffcf8 85%);
  }

  .m3-category-chips-wrap::after {
    inset-inline-end: 0;
    background: linear-gradient(to right, rgba(255, 252, 248, 0), #fffcf8 85%);
  }

  [dir="rtl"] .m3-category-chips-wrap::before {
    background: linear-gradient(to right, rgba(255, 252, 248, 0), #fffcf8 85%);
  }

  [dir="rtl"] .m3-category-chips-wrap::after {
    background: linear-gradient(to left, rgba(255, 252, 248, 0), #fffcf8 85%);
  }

  .m3-category-chips-wrap.is-overflow-start::before,
  .m3-category-chips-wrap.is-overflow-end::after {
    opacity: 1;
  }

  .m3-category-chips {
    margin-inline: -4px;
    padding: 4px 4px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    gap: 8px;
    scroll-snap-type: x proximity;
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: none;
  }

  .m3-category-chips.is-programmatic {
    scroll-snap-type: none;
  }

  .m3-category-chips::-webkit-scrollbar {
    display: none;
  }

  .m3-category-chip {
    flex: 0 0 auto;
    scroll-snap-align: center;
    scroll-snap-stop: normal;
    min-height: 40px;
    padding: 0 16px;
    box-shadow: 0 4px 12px rgba(26, 15, 12, 0.04);
    will-change: transform;
  }

  .m3-category-chip.is-active {
    box-shadow: 0 8px 18px rgba(122, 51, 51, 0.22);
  }
}

@media (min-width: 992px) {
  .m3-category-results .m3-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .m3-filter-backdrop {
    display: none !important;
  }
}

@media (min-width: 1400px) {
  .m3-category-results .m3-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
