/* LIBSEH stage shell: header, splash, home sections, cart, favorites, auth, footer */
:root {
  --ls-burgundy: #66001f;
  --ls-olive: #59633a;
  --ls-beige: #e8d8be;
  --ls-ivory: #fbf7f0;
  --ls-ink: #31352c;
}

html,
body {
  max-width: 100%;
}

/* Splash — first home visit only */
.ls-splash {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(1200px 480px at 80% 0%, rgba(120, 29, 58, 0.08), transparent 55%),
    radial-gradient(900px 420px at 0% 100%, rgba(89, 99, 58, 0.1), transparent 50%),
    var(--ls-ivory);
  transition: opacity 0.55s ease;
}
.ls-splash.is-done {
  opacity: 0;
  pointer-events: none;
}
.ls-splash-inner {
  text-align: center;
  max-width: min(92vw, 420px);
}
.ls-splash-mark {
  display: inline-flex;
  justify-content: center;
  margin-bottom: 18px;
}
.ls-splash-mark svg,
.ls-splash-mark img {
  width: min(42vw, 168px);
  height: auto;
}
.ls-splash h1 {
  margin: 0;
  color: var(--ls-burgundy);
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.ls-splash-skip {
  margin-top: 1rem;
}
.ls-splash p {
  max-width: 22rem;
  margin: 12px 0 0;
  color: var(--ls-ink);
  font-size: clamp(1rem, 3.2vw, 1.2rem);
  line-height: 1.7;
}
@media (prefers-reduced-motion: reduce) {
  .ls-splash {
    transition: none;
  }
}

/* Unified header */
html body:not(.admin-view):not(.merchant-view) .libseh-header {
  background: rgba(251, 247, 240, 0.97) !important;
  border-bottom: 1px solid rgba(232, 216, 190, 0.85);
}
html body:not(.admin-view):not(.merchant-view) .libseh-header-inner {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "menu brand tools"
    "search search search";
  align-items: center;
  gap: 8px 10px;
  padding-block: 8px;
  min-height: 0;
}
html body:not(.admin-view):not(.merchant-view) .mobile-menu-toggle {
  grid-area: menu;
  width: 44px;
  min-width: 44px;
  height: 44px;
}
html body:not(.admin-view):not(.merchant-view) .libseh-mark {
  grid-area: brand;
  justify-self: start;
  max-width: min(46vw, 168px);
}
html body:not(.admin-view):not(.merchant-view) .libseh-nav.customer-main-nav {
  display: none;
}
html body:not(.admin-view):not(.merchant-view) .libseh-actions {
  grid-area: tools;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}
html body:not(.admin-view):not(.merchant-view) .header-tools {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
html body:not(.admin-view):not(.merchant-view) .header-tools > .round-icon,
html body:not(.admin-view):not(.merchant-view) .header-tools .account-menu > summary,
html body:not(.admin-view):not(.merchant-view) .header-login-link,
html body:not(.admin-view):not(.merchant-view) .header-account-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  width: auto;
  height: 44px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--ls-ink);
  text-decoration: none;
}
html body:not(.admin-view):not(.merchant-view) .header-login-link,
html body:not(.admin-view):not(.merchant-view) .header-account-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ls-burgundy);
  white-space: nowrap;
}
html body:not(.admin-view):not(.merchant-view) .language-switcher.header-language-switcher {
  display: inline-flex !important;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
html body:not(.admin-view):not(.merchant-view) .language-switcher.header-language-switcher a {
  min-width: 36px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  color: var(--ls-ink);
}
html body:not(.admin-view):not(.merchant-view) .language-switcher.header-language-switcher a.active {
  background: var(--ls-beige);
  color: var(--ls-burgundy);
}
html body:not(.admin-view):not(.merchant-view) .header-search-form {
  grid-area: search;
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 8px;
  background: #f6f1e8;
  border: 1px solid var(--ls-beige);
  border-radius: 999px;
  padding: 0 12px;
  min-height: 44px;
}
html body:not(.admin-view):not(.merchant-view) .header-search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  height: 42px;
  font: inherit;
  color: var(--ls-ink);
}
html body:not(.admin-view):not(.merchant-view) .header-search-form button {
  border: 0;
  background: transparent;
  min-width: 44px;
  min-height: 44px;
  color: var(--ls-burgundy);
}

@media (min-width: 1024px) {
  html body:not(.admin-view):not(.merchant-view) .libseh-header-inner {
    grid-template-columns: auto auto minmax(180px, 1fr) auto;
    grid-template-areas: "menu brand search tools";
  }
  html body:not(.admin-view):not(.merchant-view) .mobile-menu-toggle {
    display: none;
  }
  html body:not(.admin-view):not(.merchant-view) .libseh-nav.customer-main-nav {
    display: none;
  }
  html body:not(.admin-view):not(.merchant-view) .libseh-mark {
    max-width: 188px;
  }
}

/* Centered section titles */
html body.home-page .home-section-head,
html body:not(.admin-view) .stores-hero-inner,
html body.favs-view .ls-favs-head,
html body.cart-view .cart-hero {
  text-align: center;
  margin-inline: auto;
  max-width: 720px;
}
html body.home-page .home-section-head h2,
html body.home-page .home-section-head h1,
html body:not(.admin-view) .stores-hero-inner h1,
html body.favs-view .ls-favs-head h1 {
  text-align: center;
  font-size: clamp(1.35rem, 3.4vw, 2.1rem);
  color: var(--ls-ink);
}
html body.home-page .home-section-head::after,
html body:not(.admin-view) .stores-hero-inner::after,
html body.favs-view .ls-favs-head::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, var(--ls-burgundy), var(--ls-olive));
  border-radius: 99px;
}
html body.home-page .home-section-head .home-section-cta {
  display: inline-flex;
  margin-top: 12px;
}

/* Hero */
html body.home-page .home-hero {
  position: relative;
  min-height: clamp(280px, 52vw, 520px);
  overflow: hidden;
}
html body.home-page .home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(49, 53, 44, 0.18), rgba(120, 29, 58, 0.38));
  pointer-events: none;
}
html body.home-page .home-hero-slides img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}
html body.home-page .hero-copy {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 640px);
  padding: 28px 20px 36px;
}
html body.home-page .hero-copy h1,
html body.home-page .hero-copy p,
html body.home-page .hero-user-greeting {
  color: #fff;
  text-shadow: 0 1px 10px rgba(49, 53, 44, 0.25);
}
html body.home-page .hero-user-greeting {
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  font-weight: 700;
  margin: 0 0 8px;
}

/* Why + benefits + about */
.ls-why-grid,
.ls-strip {
  display: grid;
  gap: 14px;
}
.ls-why-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.ls-why-card,
.ls-strip-item {
  text-align: center;
  color: var(--ls-ink);
}
.ls-strip-item {
  background: #f6f1e8;
  border: 1px solid var(--ls-beige);
  border-radius: 18px;
  padding: 16px;
}
.ls-why-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 8px 4px 12px;
}
.ls-why-card svg,
.ls-strip-item svg {
  width: 28px;
  height: 28px;
  color: var(--ls-burgundy);
}
.ls-strip {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  padding: 18px 0 8px;
}
.about-libseh.ls-about-cover {
  position: relative;
  isolation: isolate;
  min-height: clamp(260px, 48vw, 420px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--ls-burgundy) center / cover no-repeat;
}
.about-libseh.ls-about-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(120, 29, 58, 0.72), rgba(89, 99, 58, 0.55));
  z-index: 0;
}
.about-libseh.ls-about-cover .about-libseh-copy {
  position: relative;
  z-index: 1;
  color: #fff;
  text-align: center;
  max-width: 640px;
  padding: 32px 20px;
}
.about-libseh.ls-about-cover .about-libseh-copy h2,
.about-libseh.ls-about-cover .about-libseh-copy p,
.about-libseh.ls-about-cover .about-libseh-copy li {
  color: #fff;
}

/* Footer */
.libseh-footer .footer-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
  padding-block: 28px 12px;
}
.libseh-footer .footer-acc {
  border: 0;
}
.libseh-footer .footer-acc a,
.libseh-footer .footer-links a {
  display: block;
  padding: 6px 0;
  color: var(--ls-ink);
  text-decoration: none;
}
@media (min-width: 900px) {
  .libseh-footer .footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
    align-items: start;
  }
  .libseh-footer .footer-acc summary {
    pointer-events: none;
    list-style: none;
  }
  .libseh-footer .footer-acc[open] summary,
  .libseh-footer .footer-acc summary {
    font-weight: 800;
    margin-bottom: 8px;
  }
}

/* Favorites */
.ls-favs {
  padding: 24px 0 40px;
}
.ls-favs-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 16px auto 22px;
}
.ls-favs-tabs button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--ls-beige);
  background: #f6f1e8;
}
.ls-favs-tabs button.is-active {
  background: var(--ls-burgundy);
  color: #fff;
  border-color: var(--ls-burgundy);
}
.ls-fav-products,
.ls-fav-stores {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr));
  gap: 12px;
}
.ls-favs-empty {
  text-align: center;
  padding: 32px 16px;
  display: grid;
  justify-items: center;
  gap: 10px;
}

/* Cart */
html body.cart-view .cart-layout {
  display: grid;
  gap: 18px;
}
html body.cart-view .cart-line {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  background: #f6f1e8;
  border: 1px solid var(--ls-beige);
  border-radius: 18px;
  overflow: hidden;
}
html body.cart-view .cart-line img {
  width: 88px;
  height: 110px;
  object-fit: cover;
  border-radius: 12px;
}
html body.cart-view .cart-line-total,
html body.cart-view .cart-line-actions {
  grid-column: 1 / -1;
}
html body.cart-view .qty-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
html body.cart-view .qty-form button {
  min-width: 44px;
  min-height: 44px;
}
@media (min-width: 960px) {
  html body.cart-view .cart-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    align-items: start;
  }
  html body.cart-view .cart-line {
    grid-template-columns: 96px minmax(0, 1fr) auto auto;
  }
  html body.cart-view .cart-line-total,
  html body.cart-view .cart-line-actions {
    grid-column: auto;
  }
}

/* Auth + account */
.auth-page .auth-card {
  background: #f6f1e8;
  border: 1px solid var(--ls-beige);
  border-radius: 22px;
}
.auth-submit[disabled] {
  opacity: 0.7;
}
.customer-hub .customer-shortcuts,
.ls-account-sections {
  display: grid;
  gap: 10px;
}
.libseh-toast {
  position: fixed;
  inset-inline: 16px;
  inset-block-end: calc(18px + env(safe-area-inset-bottom));
  z-index: 220;
  background: var(--ls-burgundy);
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 10px 24px rgba(120, 29, 58, 0.16);
}

.aya-cms-preview {
  max-width: 220px;
  max-height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--ls-beige);
  margin-top: 8px;
}
