/*****************************
M3yar — Luxury Espresso UX Layer
Inspired by premium coffee equipment brands (Fellow, Acaia, Weber, Normcore, SAI).
CSS-only enhancements — no structure changes required.
Load after mobile-rtl.css
*****************************/

:root {
  --lux-espresso: #1A0F0C;
  --lux-brown: #3D2420;
  --lux-warm: #6B4C3B;
  --lux-gold: #C4A574;
  --lux-gold-light: #D4BC8E;
  --lux-cream: #F7F3EE;
  --lux-cream-deep: #EDE6DC;
  --lux-white: #FDFCFB;
  --lux-muted: #8A8279;
  --lux-border: rgba(61, 36, 32, 0.08);
  --lux-shadow-soft: 0 4px 24px rgba(26, 15, 12, 0.06);
  --lux-shadow-lift: 0 20px 48px rgba(26, 15, 12, 0.1);
  --lux-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --lux-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --lux-section-y: clamp(28px, 4.5vw, 48px);
}

/* ── Global atmosphere ── */
body {
  background: var(--lux-white);
}

.main-container {
  background: var(--lux-white);
}

/* Alternating section rhythm — editorial pacing */
.main-container > .product:nth-of-type(even),
.main-container > .cms,
.main-container > .testimonial {
  background: var(--lux-cream);
  padding-top: var(--lux-section-y);
  padding-bottom: var(--lux-section-y);
  margin-top: 0 !important;
}

.main-container > .banner,
.main-container > .newsletter {
  padding-top: var(--lux-section-y);
  padding-bottom: var(--lux-section-y);
}

.main-container > .product.m-t-100:first-of-type {
  padding-top: 0;
}

/* ── Section headers — Fellow-style minimal hierarchy ── */
.section-content__title {
  font-family: "Playfair Display", "Cairo", serif;
  font-weight: 600;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  letter-spacing: -0.02em;
  color: var(--lux-espresso);
  position: relative;
}

.product .section-content__title[data-eyebrow]::before {
  content: attr(data-eyebrow);
  display: block;
  font-family: "Cairo", "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--lux-gold);
  margin-bottom: 8px;
}

.product .section-content__title:not([data-eyebrow])::before {
  content: none;
  display: none;
}

.section-content--border {
  border-bottom: 1px solid var(--lux-border);
  align-items: flex-end;
}

.section-content .btn--border-green {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-color: var(--lux-border);
  color: var(--lux-brown);
}

.section-content .btn--border-green:hover {
  border-color: var(--lux-gold);
  color: var(--lux-espresso);
  background: transparent;
}

/* ── Hero promo — luxury touches ── */
.hero-promo {
  background: transparent;
}

.hero-promo__banner {
  box-shadow: var(--lux-shadow-lift);
}

.main-container > .hero-promo + .banner {
  padding-top: clamp(24px, 4vw, 40px);
}

/* ── Trust / CMS strip — conversion anchors ── */
.cms.m-t-100,
.cms.m3-trust-strip {
  margin-top: 0 !important;
  padding-top: clamp(28px, 4.5vw, 48px) !important;
  padding-bottom: clamp(28px, 4.5vw, 48px) !important;
  background: var(--lux-espresso) !important;
}

.cms.m-t-100 .cms__content,
.cms.m3-trust-strip .cms__content {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(196, 165, 116, 0.15);
  border-radius: 16px;
  padding: 24px 20px;
  backdrop-filter: blur(8px);
  transition: background 0.35s var(--lux-ease), border-color 0.35s var(--lux-ease),
              transform 0.35s var(--lux-ease);
}

.cms.m-t-100 .cms__content:hover,
.cms.m3-trust-strip .cms__content:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(196, 165, 116, 0.35);
  transform: translateY(-2px);
  box-shadow: none;
}

.cms.m-t-100 .cms__icon,
.cms.m3-trust-strip .cms__icon {
  color: var(--lux-gold);
}

.cms.m-t-100 .cms__title,
.cms.m3-trust-strip .cms__title {
  color: #fff;
  font-family: "Playfair Display", "Cairo", serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.cms.m-t-100 .para__text,
.cms.m3-trust-strip .para__text {
  color: rgba(245, 240, 235, 0.72);
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}

.cms.m-t-100 .cms__icon i,
.cms.m3-trust-strip .cms__icon i {
  font-size: 28px;
}

/* ── Category discovery — horizontal scroll strip ── */
.product__catagory {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  background: transparent;
  box-shadow: none;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding: 4px 2px 12px;
}

.product__catagory::-webkit-scrollbar {
  height: 6px;
}

.product__catagory::-webkit-scrollbar-thumb {
  background: rgba(58, 21, 21, 0.25);
  border-radius: 999px;
}

@media (min-width: 992px) {
  .product__catagory {
    gap: 16px;
  }
}

.product__catagory--single {
  float: none !important;
  flex: 0 0 auto;
  width: min(280px, 78vw) !important;
  margin: 0 !important;
  min-height: 0;
  padding: 20px !important;
  background: #fff;
  border: 1px solid var(--lux-border) !important;
  border-radius: 14px;
  flex-direction: row-reverse;
  gap: 12px;
  box-shadow: var(--lux-shadow-soft);
  overflow: hidden;
  scroll-snap-align: start;
}

.product__catagory--single:hover {
  border-color: rgba(196, 165, 116, 0.4) !important;
  box-shadow: var(--lux-shadow-lift);
  background: var(--lux-cream);
}

.product__content--catagory {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 !important;
  width: auto !important;
}

.product__content--catagory .product__link {
  font-size: 15px;
  line-height: 1.35;
  margin-bottom: 4px;
}

.product__content--catagory .product__items--text {
  font-size: 11px;
  color: var(--lux-muted);
  letter-spacing: 0.06em;
}

.product__img-box--catagory {
  width: 72px !important;
  height: 72px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--lux-cream);
}

.product__img-box--catagory img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Product cards — premium presentation ── */
.product__box {
  border: 1px solid var(--lux-border);
  border-radius: 16px;
  padding-bottom: 0;
  box-shadow: var(--lux-shadow-soft);
  transition: box-shadow 0.4s var(--lux-ease), transform 0.4s var(--lux-ease),
              border-color 0.4s var(--lux-ease);
}

.product__box:hover {
  border-color: rgba(196, 165, 116, 0.35);
  box-shadow: var(--lux-shadow-lift);
  transform: translateY(-6px);
}

.product__img-box {
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, var(--lux-cream) 0%, #fff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.product__img-box img,
.product__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product__box:hover .product__img-box img,
.product__box:hover .product__img {
  transform: scale(1.05);
}

.product__content {
  padding: 16px 16px 18px !important;
  text-align: start !important;
}

.product__review {
  margin-bottom: 8px;
  justify-content: flex-start;
}

.product__link {
  font-family: "DM Sans", "Cairo", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--lux-espresso);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}

.product__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px !important;
  font-family: "Playfair Display", "Cairo", serif;
}

.product__price > .product__price,
.product__content .product__price > span:first-child {
  font-size: 17px;
  font-weight: 600;
  color: var(--lux-brown);
  letter-spacing: 0.01em;
}

.product__price del {
  font-family: "DM Sans", "Cairo", sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--lux-muted);
  opacity: 0.85;
}

.product__label {
  top: 12px;
  left: 12px;
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 5px 11px;
  backdrop-filter: blur(6px);
}

[dir="rtl"] .product__label {
  left: auto;
  right: 12px;
}

/* Quick actions — Acaia-style clean overlay */
.product__action--link {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 6px 10px !important;
  margin: 0 auto;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
  width: auto;
  box-shadow: 0 4px 20px rgba(26, 15, 12, 0.12);
}

[dir="rtl"] .product__action--link {
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
}

.product__action--link li a {
  background: #fff !important;
  border: 1px solid var(--lux-border);
  color: var(--lux-brown) !important;
}

.product__action--link li a:hover {
  background: var(--lux-espresso) !important;
  border-color: var(--lux-espresso);
  color: var(--lux-gold) !important;
}

.product__action--link li:first-child a {
  background: var(--lux-espresso) !important;
  border-color: var(--lux-espresso);
  color: var(--lux-gold) !important;
}

/* Mobile: persistent quick-add on cards */
@media (max-width: 991px) {
  .product__box .product__action--link {
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    bottom: auto !important;
    transform: none;
    left: auto !important;
    margin: 12px 16px 16px;
    display: flex;
    justify-content: center;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
    padding: 0 !important;
  }

  .product__box .product__action--link li a {
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
  }

  .product__box .product__action--link li:first-child {
    flex: 1;
  }

  .product__box .product__action--link li:first-child a {
    width: 100% !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .product__box .product__action--link li:first-child a::after {
    content: "Add";
    font-family: "DM Sans", "Cairo", sans-serif;
    font-size: 12px;
    font-weight: 600;
  }

  .product__box .product__action--link li:first-child a i {
    font-size: 14px;
  }

  .product__img-box:hover .product__action--link,
  .product__box:hover .product__action--link {
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* ── Banners — storytelling blocks ── */
.banner__box--single {
  border-radius: 18px;
  min-height: 280px;
}

.banner__content {
  padding: 24px;
}

.banner__title {
  font-family: "DM Sans", "Cairo", sans-serif;
  letter-spacing: 0.14em;
}

.banner__title--large {
  font-size: clamp(1.75rem, 4vw, 2.75rem) !important;
  letter-spacing: 0.06em;
}

/* ── Product single page — luxury detail ── */
.product-details {
  padding-top: clamp(24px, 4vw, 48px);
  background: var(--lux-white);
}

.product-details-box h4,
.product-details-content .product__title {
  font-family: "Playfair Display", "Cairo", serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--lux-espresso);
  line-height: 1.2;
}

.product-details-box .product__review {
  margin-bottom: 12px;
}

.product-details-box .product__price--large {
  font-family: "Playfair Display", "Cairo", serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  color: var(--lux-brown);
}

.product-details-box .product__price--large del {
  font-family: "DM Sans", "Cairo", sans-serif;
  font-size: 1rem;
  color: var(--lux-muted);
  margin-inline-start: 12px;
}

.product-details-box .product__tag {
  vertical-align: middle;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.product-details-box .product__desc {
  font-size: 15px;
  line-height: 1.75;
  color: var(--lux-muted);
  border-inline-start: 3px solid var(--lux-gold);
  padding-inline-start: 16px;
}

.product-details-box .product-var {
  border-top: 1px solid var(--lux-border);
  border-bottom: 1px solid var(--lux-border);
}

.product-details-box .btn--green {
  min-height: 52px;
  font-size: 13px;
  letter-spacing: 0.1em;
  padding-inline: 32px;
}

/* Gallery — product-focused */
.product-image--large {
  background: var(--lux-cream);
  border-radius: 18px !important;
  overflow: hidden;
  margin-bottom: 16px;
}

.product-image--large img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.product-image--thumb {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.product-image--thumb::-webkit-scrollbar {
  display: none;
}

.product-image--thumb a {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.25s var(--lux-ease);
}

.product-image--thumb a.zoom-active,
.product-image--thumb a:hover {
  border-color: var(--lux-gold);
}

.product-image--thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px !important;
}

/* Specs table — technical precision */
.product-dis__list.table {
  border: none;
  background: var(--lux-cream);
}

.product-dis__list td {
  border-color: var(--lux-border) !important;
  padding: 14px 18px !important;
  vertical-align: middle;
}

.product-dis__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lux-muted);
  width: 38%;
}

.product-dis__text {
  font-size: 14px;
  color: var(--lux-espresso);
  font-weight: 500;
}

/* Reviews — card layout */
#product-review .comment__list,
.product-details-tab-box .comment__list {
  padding: 20px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--lux-border);
  border-radius: 14px;
  box-shadow: var(--lux-shadow-soft);
  list-style: none;
}

#product-review .comment__name,
.product-details-tab-box .comment__name {
  font-weight: 600;
  color: var(--lux-espresso);
  font-family: "Playfair Display", "Cairo", serif;
}

#product-review .comment__img img,
.product-details-tab-box .comment__img img {
  border-radius: 50%;
  border: 2px solid var(--lux-cream-deep);
}

/* Tabs — clean underline */
.product-details-tab-area {
  background: var(--lux-cream);
  padding-bottom: var(--lux-section-y);
  margin-top: 0 !important;
}

.tablist--style-black {
  border-bottom: 1px solid var(--lux-border);
  gap: 4px;
}

.tablist--style-black .nav-link {
  font-family: "DM Sans", "Cairo", sans-serif;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lux-muted);
  border-radius: 0;
  padding: 14px 20px;
}

.tablist--style-black .nav-link.active {
  color: var(--lux-espresso);
  background: transparent;
}

/* ── Sticky mobile purchase bar ── */
.m3-sticky-buy {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: rgba(253, 252, 251, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--lux-border);
  box-shadow: 0 -8px 32px rgba(26, 15, 12, 0.08);
  transform: translateY(100%);
  transition: transform 0.35s var(--lux-ease-out);
}

.m3-sticky-buy.is-visible {
  transform: translateY(0);
}

.m3-sticky-buy__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
}

.m3-sticky-buy__info {
  flex: 1;
  min-width: 0;
}

.m3-sticky-buy__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--lux-espresso);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 2px;
}

.m3-sticky-buy__price {
  font-family: "Playfair Display", "Cairo", serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--lux-brown);
  margin: 0;
}

.m3-sticky-buy__btn {
  flex-shrink: 0;
  min-height: 48px;
  min-width: 140px;
  padding: 0 24px;
  font-size: 12px;
  letter-spacing: 0.08em;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--lux-brown) 0%, var(--lux-espresso) 100%);
  color: var(--lux-gold);
  border: none;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(26, 15, 12, 0.2);
  transition: transform 0.25s var(--lux-ease), box-shadow 0.25s var(--lux-ease);
}

.m3-sticky-buy__btn:active {
  transform: scale(0.98);
}

@media (max-width: 991px) {
  .m3-sticky-buy {
    display: block;
  }

  body.m3-has-sticky-buy {
    padding-bottom: 80px;
  }

  body.m3-has-sticky-buy .material-scrolltop {
    bottom: calc(80px + env(safe-area-inset-bottom)) !important;
  }
}

/* ── Shop page ── */
.sort-box {
  border-radius: 14px;
  border-color: var(--lux-border);
  background: #fff;
  box-shadow: var(--lux-shadow-soft);
}

.shop-grid .product__box {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.shop-grid .product__content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.shop-grid .product__link {
  flex: 1;
}

.sidebar__widget {
  border-radius: 14px;
  border: 1px solid var(--lux-border);
  background: #fff;
}

.sidebar__title {
  font-family: "Playfair Display", "Cairo", serif;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

/* ── Checkout — fast flow ── */
.checkout-box,
.your-order-box {
  border-radius: 16px;
  border: 1px solid var(--lux-border);
  box-shadow: var(--lux-shadow-soft);
}

.your-order-box.gray-bg {
  background: var(--lux-cream) !important;
}

/* ── Testimonial & newsletter ── */
.testimonial__content {
  font-family: "Playfair Display", "Cairo", serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  line-height: 1.65;
  color: var(--lux-espresso);
}

.newsletter__content {
  border-radius: 20px;
  overflow: hidden;
}

/* ── Footer refinement ── */
.footer {
  background: var(--lux-espresso) !important;
}

.footer__title {
  font-family: "Playfair Display", "Cairo", serif;
  letter-spacing: 0.04em;
}

/* ── Image load polish ── */
.product__img,
.banner__img {
  opacity: 0;
  transition: opacity 0.5s var(--lux-ease), transform 0.55s var(--lux-ease);
}

.product__img.m3-img-loaded,
.banner__img.m3-img-loaded {
  opacity: 1;
}

/* ── Slider arrows — subtle luxury ── */
.default-slider__arrow {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid var(--lux-border);
  color: var(--lux-brown) !important;
  transition: background 0.25s var(--lux-ease), color 0.25s var(--lux-ease),
              box-shadow 0.25s var(--lux-ease);
}

.default-slider__arrow:hover {
  background: var(--lux-espresso) !important;
  color: var(--lux-gold) !important;
  box-shadow: var(--lux-shadow-lift);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .product__box,
  .product__catagory--single,
  .cms__content,
  .m3-sticky-buy,
  .hero-espresso .hero-btn-primary {
    transition: none !important;
    transform: none !important;
  }
}
