/**
 * LilamLilam main hub — Amazon-inspired marketplace homepage (main store only).
 */

html[data-store-theme="main"] {
  --hub-nav-bg: #131921;
  --hub-nav-bg-2: #232f3e;
  --hub-accent: #febd69;
  --hub-accent-hover: #f3a847;
  --hub-page-bg: #eaeded;
  --hub-card-bg: #fff;
  --hub-link: #007185;
}

html[data-store-theme="main"] body {
  background: var(--hub-page-bg);
}

/* ── Dark header (Amazon-style) ── */
html[data-store-theme="main"] header.safe-area-inset {
  background: var(--hub-nav-bg);
  border-bottom-color: var(--hub-nav-bg-2);
  box-shadow: none;
}

html[data-store-theme="main"] #store-menu-open-btn {
  color: #fff;
}
html[data-store-theme="main"] #store-menu-open-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

html[data-store-theme="main"] #store-title {
  color: #fff;
}

html[data-store-theme="main"] #store-login-link,
html[data-store-theme="main"] #store-signup-link {
  color: #fff;
}
html[data-store-theme="main"] #store-header-lang-select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: 0.5rem;
  padding: 0.35rem 1.75rem 0.35rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  min-height: 44px;
  max-width: 7.5rem;
  cursor: pointer;
  touch-action: manipulation;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.35rem center;
  background-size: 1rem;
}
html[data-store-theme="main"] #store-header-lang-select:hover {
  border-color: #fff;
  background-color: rgba(255, 255, 255, 0.16);
}
html[data-store-theme="main"] #store-header-lang-select option {
  color: #111;
  background: #fff;
}
html[data-store-theme="main"] #store-signup-link:hover {
  background: rgba(255, 255, 255, 0.08);
}
html[data-store-theme="main"] #store-profile-btn {
  color: #fff;
}
html[data-store-theme="main"] #store-profile-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

html[data-store-theme="main"] #store-cart-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
html[data-store-theme="main"] #store-cart-btn:hover {
  border-color: #fff;
}

html[data-store-theme="main"] .store-search-bar__submit {
  background: var(--hub-accent);
  color: #111;
}
html[data-store-theme="main"] .store-search-bar__submit:hover {
  background: var(--hub-accent-hover);
}

html[data-store-theme="main"] #store-category-nav {
  background: var(--hub-nav-bg-2);
  border-bottom: none;
}
html[data-store-theme="main"] #store-category-nav #category-strip-label,
html[data-store-theme="main"] #store-category-nav #category-strip-hint,
html[data-store-theme="main"] #store-category-nav #category-strip-hint-compact {
  color: #ccc;
}
html[data-store-theme="main"] #store-category-nav .category-btn:not(.active) {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
html[data-store-theme="main"] #store-category-nav .category-btn:not(.active):hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Secondary nav strip */
.hub-subnav {
  display: none;
  background: var(--hub-nav-bg-2);
  color: #fff;
  font-size: 0.8125rem;
}
html[data-store-theme="main"] .hub-subnav {
  display: block;
}
.hub-subnav-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hub-subnav-inner::-webkit-scrollbar { display: none; }
.hub-subnav-item {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  min-height: 44px;
}
.hub-subnav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.hub-subnav-item--menu {
  font-weight: 700;
}

/* Main hub: category strip always visible (home + shop) */
html[data-store-theme="main"] #store-category-nav:not(.hidden) {
  display: block;
}

/* Main hub: search in sticky header (always visible on home + shop) */
html[data-store-theme="main"] #store-header-search-row:not(.hidden) {
  display: block;
  background: var(--hub-nav-bg);
}
html[data-store-theme="main"] #store-header-search-row .store-search-bar {
  width: 100%;
  max-width: none;
  border-color: #cdcdcd;
}
html[data-store-theme="main"] #store-main-search-slot {
  display: none !important;
}
html[data-store-theme="main"]:not([data-hub-shop-view="1"]) #store-consumer-sell-banner {
  display: none !important;
}

/* Break out of main.max-w-7xl — gray page bg shows at sides like Amazon */
html[data-store-theme="main"] #hub-home-page:not(.hidden) {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
}

/* ── Homepage shell ── */
.hub-home {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 0 2rem;
}

.hub-home--loading {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #565959;
  font-size: 0.9375rem;
}

/* Hero full-bleed band; overlap cards stay centered (Amazon layout) */
.hub-hero-stack {
  position: relative;
  margin-bottom: 0.5rem;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.hub-hero {
  min-height: clamp(180px, 28vw, 320px);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 45%, #059669 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem 1.25rem 5.5rem;
  box-sizing: border-box;
  width: 100%;
}

.hub-hero__inner {
  max-width: 80rem;
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.hub-hero__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
}

.hub-hero__sub {
  margin: 0 0 1rem;
  font-size: clamp(0.875rem, 2vw, 1.0625rem);
  opacity: 0.95;
  line-height: 1.4;
}

.hub-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  background: var(--hub-accent);
  color: #111;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  min-height: 44px;
}
.hub-hero__cta:hover {
  background: var(--hub-accent-hover);
}

.hub-overlap-row {
  position: relative;
  z-index: 2;
  margin-top: -4.5rem;
  padding: 0 0.75rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .hub-overlap-row {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    padding: 0 1rem;
    margin-top: -5rem;
  }
}

/* White card panels */
.hub-panel {
  background: var(--hub-card-bg);
  border-radius: 4px;
  padding: 1rem 1rem 0.85rem;
  box-sizing: border-box;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.hub-panel__title {
  margin: 0 0 0.65rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #0f1111;
  line-height: 1.25;
}

.hub-panel__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  flex: 1;
}

.hub-panel__tile {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 4px;
  overflow: hidden;
  min-height: 0;
}
.hub-panel__tile:hover .hub-panel__tile-label {
  color: var(--hub-link);
  text-decoration: underline;
}

.hub-panel__tile-img {
  aspect-ratio: 1;
  background: #f3f3f3;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hub-panel__tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hub-panel__tile-img--emoji {
  font-size: 2.25rem;
  line-height: 1;
}

.hub-panel__tile-label {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  line-height: 1.25;
  color: #0f1111;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hub-panel__link {
  margin-top: 0.65rem;
  font-size: 0.8125rem;
  color: var(--hub-link);
  text-decoration: none;
  font-weight: 500;
}
.hub-panel__link:hover {
  text-decoration: underline;
  color: #c7511f;
}

/* Section rows below hero */
.hub-section-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  padding: 0.85rem 0.75rem 0;
}

@media (min-width: 640px) {
  .hub-section-row {
    grid-template-columns: repeat(2, 1fr);
    padding: 1rem 1rem 0;
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .hub-section-row--triple {
    grid-template-columns: repeat(3, 1fr);
  }
  .hub-section-row--quad {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Horizontal product carousel */
.hub-carousel-panel {
  background: var(--hub-card-bg);
  border-radius: 4px;
  padding: 1rem 0 0.85rem 1rem;
  overflow: hidden;
}

.hub-carousel-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding-right: 1rem;
  margin-bottom: 0.75rem;
}

.hub-carousel-panel__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #0f1111;
}

.hub-carousel-wrap {
  position: relative;
}

.hub-carousel-track {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.25rem;
  padding-right: 1rem;
}
.hub-carousel-track::-webkit-scrollbar { display: none; }

.hub-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 2.75rem;
  height: 4.5rem;
  border: 1px solid #d5d9d9;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(15, 17, 17, 0.15);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #0f1111;
  border-radius: 2px;
}
.hub-carousel-btn:hover {
  background: #fff;
}
.hub-carousel-btn--prev { left: 0; }
.hub-carousel-btn--next { right: 0.75rem; }

@media (min-width: 768px) {
  .hub-carousel-btn { display: flex; }
}

/* Compact product card for carousels */
.hub-prod-card {
  flex: 0 0 140px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
@media (min-width: 640px) {
  .hub-prod-card { flex-basis: 160px; }
}

.hub-prod-card__img {
  aspect-ratio: 1;
  background: #f3f3f3;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.4rem;
  position: relative;
}
.hub-prod-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hub-prod-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #ccc;
}

.hub-prod-card__title {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.3;
  color: #007185;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hub-prod-card:hover .hub-prod-card__title {
  color: #c7511f;
  text-decoration: underline;
}

.hub-prod-card__price {
  margin: 0.25rem 0 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f1111;
}

.hub-prod-card__badge {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: #cc0c39;
  color: #fff;
}

/* Sign-in strip */
.hub-signin-strip {
  margin: 1.25rem 0.75rem 0;
  padding: 1.75rem 1rem;
  background: var(--hub-card-bg);
  border-radius: 4px;
  text-align: center;
}

.hub-signin-strip p {
  margin: 0 0 0.85rem;
  font-size: 0.9375rem;
  color: #0f1111;
}

.hub-signin-strip__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 2.5rem;
  border-radius: 8px;
  background: var(--hub-accent);
  color: #111;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.hub-signin-strip__btn:hover {
  background: var(--hub-accent-hover);
}

/* Back to top */
.hub-back-top {
  margin-top: 1.5rem;
  background: var(--hub-nav-bg-2);
  text-align: center;
}
.hub-back-top button {
  width: 100%;
  padding: 0.85rem;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 0.8125rem;
  cursor: pointer;
  min-height: 44px;
}
.hub-back-top button:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Minimal footer columns */
.hub-footer {
  background: var(--hub-nav-bg);
  color: #ddd;
  padding: 2rem 1rem 1.5rem;
  font-size: 0.8125rem;
}

.hub-footer__grid {
  max-width: 80rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 1rem;
}

@media (min-width: 640px) {
  .hub-footer__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hub-footer__col h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.hub-footer__col a {
  display: block;
  color: #ddd;
  text-decoration: none;
  margin-bottom: 0.45rem;
  line-height: 1.35;
}
.hub-footer__col a:hover {
  text-decoration: underline;
}

.hub-footer__copy {
  max-width: 80rem;
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid #3a4553;
  text-align: center;
  color: #999;
  font-size: 0.75rem;
}

/* Shop view: full-width main padding tweak */
html[data-hub-shop-view="1"] main.max-w-7xl {
  max-width: 80rem;
}
