/* TBATAN Design System — Premium Glassmorphism overrides (loads last) */

html, body, button, input, select, textarea,
.woocommerce, .woocommerce-page {
  font-family: var(--tb-font) !important;
}

body {
  color: var(--tb-ink);
  background-color: var(--tb-lilac-bg);
}

/* Ambient soft wave (CSS-only) */
.tb-ambient-wave {
  position: absolute;
  inset-inline: -10%;
  bottom: 8%;
  height: 42vmin;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 40% at 30% 60%, rgba(135, 56, 232, 0.14), transparent 70%),
    radial-gradient(ellipse 50% 35% at 70% 40%, rgba(52, 92, 255, 0.12), transparent 70%),
    radial-gradient(ellipse 40% 30% at 55% 80%, rgba(22, 198, 200, 0.1), transparent 70%);
  filter: blur(8px);
  opacity: 0.9;
  animation: tb-wave-drift var(--tb-ambient-duration, 28s) ease-in-out infinite alternate;
}
@keyframes tb-wave-drift {
  from { transform: translate3d(-2%, 0, 0) scale(1); }
  to { transform: translate3d(3%, -2%, 0) scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  .tb-ambient-wave { animation: none; }
}

/* —— Header —— */
.site-header {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding-block: 0.85rem 0.45rem;
}
.site-header .tb-topbar {
  width: min(1180px, calc(100% - 1.1rem)) !important;
  margin-inline: auto;
  display: grid !important;
  /* Mobile default: brand row, then tools row — no overlap. */
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas:
    "brand"
    "end" !important;
  align-items: stretch;
  gap: 0.45rem 0.65rem;
  min-height: 0;
  padding: 0.55rem 0.7rem 0.55rem;
  border-radius: 22px;
  background: var(--tb-glass-strong);
  border: 1px solid var(--tb-border-soft);
  box-shadow: var(--tb-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(var(--tb-blur));
  -webkit-backdrop-filter: blur(var(--tb-blur));
}
.site-header .tb-brand {
  grid-area: brand;
  min-width: 0;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  text-align: right;
  direction: rtl;
}
.site-header .tb-header-end {
  grid-area: end;
  display: grid;
  grid-template-columns: repeat(4, minmax(2.75rem, 1fr));
  align-items: center;
  justify-items: center;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
}
.site-header .tb-nav {
  display: none;
  grid-area: nav;
  min-width: 0;
}
.site-header .tb-brand-text {
  min-width: 0;
  flex: 1 1 auto;
  display: block;
}
.site-header .tb-brand strong {
  display: block;
  font-size: clamp(0.88rem, 3.6vw, 1.05rem);
  font-weight: 800;
  line-height: 1.35;
  max-width: none;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.site-header .tb-mark {
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 0;
  flex-shrink: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible;
  display: inline-grid;
  place-items: center;
}
.site-header .tb-mark-img {
  width: 3.15rem !important;
  height: 3.15rem !important;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(91, 33, 182, 0.28));
}
.site-header .tb-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 44px;
  min-width: 44px;
  width: 100%;
  max-width: 5.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: 12px;
  border: 0;
  background: var(--tb-gradient);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(135, 56, 232, 0.28);
  flex-shrink: 0;
  justify-self: stretch;
}
.site-header .tb-menu-toggle-bars {
  width: 0.95rem;
  height: 0.7rem;
  display: inline-block;
  background:
    linear-gradient(#fff, #fff) 0 0 / 100% 2px no-repeat,
    linear-gradient(#fff, #fff) 0 50% / 100% 2px no-repeat,
    linear-gradient(#fff, #fff) 0 100% / 100% 2px no-repeat;
}
.site-header .tb-tools {
  display: contents;
}
.site-header .tb-icon-button {
  width: 100%;
  max-width: 2.85rem;
  min-width: 44px;
  min-height: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--tb-purple);
  border: 1px solid transparent;
  display: inline-grid;
  place-items: center;
  justify-self: center;
}
.site-header .tb-icon-button svg {
  width: 1.35rem;
  height: 1.35rem;
}
.site-header .tb-nav > a[aria-current="page"],
.site-header .tb-mega-toggle[aria-expanded="true"] {
  background: var(--tb-gradient);
  color: #fff;
  box-shadow: 0 8px 18px rgba(135, 56, 232, 0.25);
}

/* Mobile open menu: natural third grid row (not absolute overlay). */
.site-header .tb-topbar.is-open {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas:
    "brand"
    "end"
    "nav" !important;
  border-end-start-radius: 18px;
  border-end-end-radius: 18px;
}
.site-header .tb-topbar.is-open .tb-nav {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  width: 100%;
  max-height: min(70dvh, 28rem);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  padding: 0.45rem 0.15rem 0.2rem;
  border-top: 1px solid var(--tb-border-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.site-header .tb-topbar.is-open .tb-nav > a,
.site-header .tb-topbar.is-open .tb-mega-toggle {
  width: 100%;
  justify-content: flex-start;
  text-align: start;
  min-height: 44px;
}

@media (max-width: 22.5rem) {
  .site-header .tb-menu-toggle-label { display: none; }
  .site-header .tb-mark {
    width: 2.85rem;
    height: 2.85rem;
  }
  .site-header .tb-mark-img {
    width: 2.85rem !important;
    height: 2.85rem !important;
  }
}

@media (min-width: 64rem) {
  .site-header .tb-topbar,
  .site-header .tb-topbar.is-open {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-areas: "brand nav end" !important;
    align-items: center;
    gap: 0.65rem 0.85rem;
    min-height: 4.4rem;
    padding: 0.55rem 0.85rem 0.55rem 0.75rem;
  }
  .site-header .tb-menu-toggle { display: none !important; }
  .site-header .tb-nav {
    display: flex !important;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    padding: 0;
    max-height: none;
    overflow: visible;
    background: transparent;
  }
  .site-header .tb-header-end {
    display: inline-flex;
    grid-template-columns: none;
    width: auto;
    gap: 0.35rem;
    justify-items: initial;
  }
  .site-header .tb-tools {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }
  .site-header .tb-brand {
    width: auto;
    gap: 0.9rem;
    min-height: 5.25rem;
  }
  .site-header .tb-brand strong {
    max-width: none;
    font-size: 1.18rem;
    white-space: nowrap;
    overflow-wrap: normal;
  }
  .site-header .tb-nav > a,
  .site-header .tb-mega-toggle {
    min-height: 2.85rem;
    padding: 0.45rem 1.15rem;
    font-size: 1.06rem;
    font-weight: 750;
    border-radius: 14px;
  }
  .site-header .tb-mark {
    width: 5.25rem;
    height: 5.25rem;
    border-radius: 0;
  }
  .site-header .tb-mark-img {
    width: 5.25rem !important;
    height: 5.25rem !important;
  }
  .site-header .tb-icon-button {
    width: 3rem;
    max-width: none;
    min-width: 3rem;
    min-height: 3rem;
    height: 3rem;
    border-radius: 15px;
  }
  .site-header .tb-icon-button svg {
    width: 1.5rem;
    height: 1.5rem;
  }
}

/* —— Buttons —— */
.tb-button,
.woocommerce a.button,
.woocommerce button.button:not(.woocommerce-Button),
button.single_add_to_cart_button {
  border-radius: var(--tb-radius-pill);
  font-family: var(--tb-font);
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.tb-button:not(.tb-button-light),
.woocommerce a.button.alt,
button.single_add_to_cart_button {
  background: var(--tb-gradient);
  color: #fff;
  border: 0;
  box-shadow: 0 12px 28px rgba(135, 56, 232, 0.28);
}
.tb-button-light,
a.tb-button.tb-button-light {
  background: rgba(255, 255, 255, 0.85);
  color: var(--tb-purple);
  border: 1px solid rgba(181, 139, 255, 0.55);
  box-shadow: 0 6px 16px rgba(36, 19, 63, 0.05);
}
@media (hover: hover) and (pointer: fine) {
  .tb-button:not(:disabled):hover,
  button.single_add_to_cart_button:not(:disabled):hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
  }
}
button.single_add_to_cart_button:disabled,
.single_add_to_cart_button.disabled {
  background: #e8e3f2 !important;
  color: var(--tb-gray) !important;
  box-shadow: none !important;
  transform: none !important;
  cursor: not-allowed;
}

/* —— Related / catalog product grids ——
   Kill WooCommerce float column widths that crush cards. */
.tb-related ul.products,
.tb-related ul.products.columns-1,
.tb-related ul.products.columns-2,
.tb-related ul.products.columns-3,
.tb-related ul.products.columns-4,
.tb-related ul.products.columns-5,
.tb-related ul.products.columns-6,
.woocommerce .tb-related ul.products,
.woocommerce-page .tb-related ul.products,
ul.products.tb-catalog,
.tb-catalog,
.tb-product-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.75rem !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  width: 100% !important;
  max-width: none !important;
  float: none !important;
}
.tb-related ul.products::before,
.tb-related ul.products::after,
.woocommerce .tb-related ul.products::before,
.woocommerce .tb-related ul.products::after {
  display: none !important;
  content: none !important;
}
.tb-related ul.products li.product,
.tb-related .tb-catalog-card,
.woocommerce .tb-related ul.products li.product,
.tb-catalog .tb-catalog-card,
.tb-product-grid .tb-product-card {
  width: auto !important;
  max-width: none !important;
  float: none !important;
  margin: 0 !important;
  clear: none !important;
  min-width: 0 !important;
}
.tb-related .related > h2 { display: none !important; }

.tb-catalog-card,
.tb-related .tb-catalog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: var(--tb-glass-strong);
  border: 1px solid var(--tb-border-soft);
  box-shadow: var(--tb-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tb-catalog-media {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  padding: 0.55rem;
  background:
    radial-gradient(circle at 50% 28%, rgba(181, 139, 255, 0.22), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(248, 244, 255, 0.7));
}
.tb-catalog-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.tb-catalog-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.7rem 0.75rem 0.85rem;
  flex: 1;
  min-width: 0;
}
.tb-catalog-card h2,
.tb-catalog-card h2 a {
  margin: 0;
  font-size: clamp(0.86rem, 2.6vw, 1.02rem);
  font-weight: 700;
  color: var(--tb-ink);
  text-decoration: none;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tb-catalog-price,
.tb-catalog-price .amount {
  color: var(--tb-purple);
  font-weight: 800;
  font-size: clamp(0.82rem, 2.4vw, 0.98rem);
  direction: rtl;
  overflow-wrap: anywhere;
}
.tb-catalog-card .tb-sale-hold {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tb-gray);
  line-height: 1.4;
}
.tb-catalog-card .tb-button {
  margin-top: auto;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.84rem;
  white-space: nowrap;
}

@media (min-width: 48rem) {
  .tb-related ul.products,
  .tb-related ul.products[class*="columns-"],
  .tb-catalog,
  .tb-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1rem !important;
  }
}
@media (min-width: 75rem) {
  .tb-related ul.products,
  .tb-related ul.products[class*="columns-"],
  .tb-catalog,
  .tb-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}
/* Homepage featured: 4 columns from desktop (max 2 rows with ≤8 items). */
@media (min-width: 64rem) {
  .tb-home .tb-home-featured-grid.tb-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* —— Product shell polish —— */
.tb-product-shell,
.tb-panel,
.tb-buy-shell {
  border-radius: var(--tb-radius);
  background: var(--tb-glass-strong);
  border: 1px solid var(--tb-border-soft);
  box-shadow: var(--tb-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.tb-product-shell-media img,
.tb-product-gallery img {
  object-fit: contain;
  max-width: 100%;
  height: auto;
}

/* —— Footer —— */
.site-footer {
  margin-top: 2.5rem;
  padding: 1.25rem 1rem 2rem;
}
.tb-footer-bar {
  width: min(1180px, 100%);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 22px;
  background: var(--tb-glass-strong);
  border: 1px solid var(--tb-border-soft);
  box-shadow: var(--tb-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.tb-footer-btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(181, 139, 255, 0.45);
  color: var(--tb-purple);
  font-weight: 700;
  text-decoration: none;
}

/* —— Forms —— */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
  border-radius: 14px !important;
  border: 1px solid rgba(181, 139, 255, 0.4) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: var(--tb-ink);
  font-family: var(--tb-font);
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(135, 56, 232, 0.35);
  outline-offset: 2px;
  border-color: rgba(135, 56, 232, 0.55) !important;
}

/* WooCommerce notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-radius: 16px;
  border: 1px solid var(--tb-border-soft);
  background: var(--tb-glass-strong);
  box-shadow: var(--tb-shadow);
  font-family: var(--tb-font);
}

/* Prevent horizontal scroll from ambient/decor */
html, body { overflow-x: clip; }
.tb-ambient { pointer-events: none; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== FORCE VISIBLE IDENTITY (overrides hero-crystal !important) ===== */
body {
  background:
    radial-gradient(ellipse 90% 55% at 8% -5%, rgba(181, 139, 255, 0.42), transparent 58%),
    radial-gradient(ellipse 70% 50% at 96% 0%, rgba(52, 92, 255, 0.28), transparent 52%),
    radial-gradient(ellipse 55% 40% at 70% 95%, rgba(22, 198, 200, 0.18), transparent 55%),
    radial-gradient(ellipse 40% 30% at 20% 80%, rgba(216, 44, 235, 0.12), transparent 60%),
    #f8f4ff !important;
}

.tb-hero-panel.is-crystal {
  background:
    radial-gradient(ellipse 70% 60% at 18% 70%, rgba(52, 92, 255, 0.14), transparent 60%),
    radial-gradient(ellipse 55% 50% at 42% 35%, rgba(135, 56, 232, 0.16), transparent 62%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 244, 255, 0.88) 48%, rgba(236, 245, 255, 0.9) 100%) !important;
  background-image:
    radial-gradient(ellipse 70% 60% at 18% 70%, rgba(52, 92, 255, 0.14), transparent 60%),
    radial-gradient(ellipse 55% 50% at 42% 35%, rgba(135, 56, 232, 0.16), transparent 62%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 244, 255, 0.88) 48%, rgba(236, 245, 255, 0.9) 100%) !important;
  border: 1px solid rgba(181, 139, 255, 0.35) !important;
  border-radius: 28px !important;
  box-shadow:
    0 24px 50px rgba(36, 19, 63, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.tb-hero-panel.is-crystal .tb-hero-copy h1 .tb-hero-accent {
  background: linear-gradient(115deg, #8738e8 0%, #345cff 45%, #d82ceb 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

.tb-hero-panel.is-crystal .tb-hero-cta.tb-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.05)),
    linear-gradient(115deg, #8738e8 0%, #345cff 48%, #16c6c8 100%) !important;
  border-radius: 999px !important;
  box-shadow:
    0 16px 34px rgba(135, 56, 232, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset !important;
}

.tb-hero-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  justify-content: flex-start;
}
.tb-hero-benefits li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.1rem;
  padding: 0.25rem 0.7rem 0.25rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(181, 139, 255, 0.4);
  color: var(--tb-ink);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(36, 19, 63, 0.06);
}
.tb-hero-benefit-icon {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #8738e8, #345cff);
}
.tb-hero-panel.is-crystal .tb-hero-cta.tb-button {
  margin-top: 1.15rem;
}

/* Glass pedestal under hero cards */
.tb-hero-panel.is-crystal .tb-hero-stage {
  position: relative;
}
.tb-hero-panel.is-crystal .tb-hero-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: min(78%, 22rem);
  height: 2.4rem;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.95) 0%, rgba(181, 139, 255, 0.45) 35%, rgba(52, 92, 255, 0.2) 60%, transparent 75%);
  filter: blur(2px);
  box-shadow:
    0 0 28px rgba(135, 56, 232, 0.35),
    0 0 48px rgba(22, 198, 200, 0.2);
  pointer-events: none;
  z-index: 1;
}
.tb-hero-panel.is-crystal .tb-hero-card {
  z-index: 2;
  filter: drop-shadow(0 18px 28px rgba(52, 92, 255, 0.18));
}

/* Category / product cards more glass */
.tb-category-card,
.tb-product-card,
.tb-catalog-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(248, 244, 255, 0.78)) !important;
  border: 1px solid rgba(181, 139, 255, 0.4) !important;
  box-shadow: 0 14px 34px rgba(36, 19, 63, 0.09) !important;
}

.tb-button:not(.tb-button-light):not(:disabled),
.woocommerce a.button.alt,
.woocommerce button.button.alt {
  background: linear-gradient(115deg, #8738e8 0%, #345cff 50%, #d82ceb 100%) !important;
}

@media (max-width: 47.99rem) {
  .tb-hero-panel.is-crystal .tb-hero-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .tb-hero-panel.is-crystal .tb-hero-copy {
    order: 1 !important;
    justify-self: stretch !important;
    text-align: right;
  }
  .tb-hero-panel.is-crystal .tb-hero-art {
    order: 2 !important;
    min-height: 18rem !important;
  }
  .tb-hero-panel.is-crystal .tb-hero-copy h1 {
    white-space: normal !important;
    text-wrap: wrap !important;
    font-size: clamp(1.35rem, 6.2vw, 1.75rem) !important;
  }
  .tb-hero-benefits {
    justify-content: flex-start;
  }
}

/* —— Mobile: homepage category cards — one full-width column, uncropped banners —— */
@media (max-width: 47.99rem) {
  .tb-categories .tb-category-grid,
  .tb-home .tb-category-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.85rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .tb-categories .tb-category-card,
  .tb-home .tb-category-grid > .tb-category-card {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    min-height: 0 !important;
    height: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden;
    direction: rtl;
    text-align: right;
  }

  .tb-categories .tb-category-visual,
  .tb-home .tb-category-card .tb-category-visual {
    order: 0;
    position: relative;
    width: 100%;
    min-height: 0 !important;
    height: auto !important;
    aspect-ratio: auto;
    flex: 0 0 auto;
    overflow: hidden;
    background: linear-gradient(160deg, #f8f4ff, #efe6ff);
  }

  .tb-categories .tb-category-photo,
  .tb-home .tb-category-card .tb-category-photo {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
  }

  .tb-categories .tb-category-copy,
  .tb-home .tb-category-card .tb-category-copy {
    position: relative !important;
    inset: auto !important;
    order: 1;
    flex: 0 0 auto;
    display: flex !important;
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: flex-start;
    gap: 0.35rem;
    padding: 0.7rem 0.85rem 0.85rem !important;
    text-align: right !important;
    direction: rtl;
    font-family: var(--tb-font);
  }

  .tb-categories .tb-category-copy strong,
  .tb-home .tb-category-card .tb-category-copy strong {
    font-size: clamp(0.95rem, 3.8vw, 1.08rem) !important;
    font-weight: 800;
    line-height: 1.35;
    text-align: right;
    font-family: var(--tb-font);
  }

  .tb-categories .tb-category-copy small,
  .tb-home .tb-category-card .tb-category-copy small {
    font-size: clamp(0.78rem, 3.1vw, 0.9rem) !important;
    line-height: 1.45;
    text-align: right;
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    font-family: var(--tb-font);
  }

  .tb-categories .tb-category-card .tb-category-go,
  .tb-home .tb-category-card .tb-category-go {
    position: static !important;
    inset: auto !important;
    display: inline-grid !important;
    place-items: center;
    width: 2.25rem !important;
    height: 2.25rem !important;
    min-width: 44px;
    min-height: 44px;
    margin: 0.15rem 0 0 !important;
    flex-shrink: 0;
  }

  .tb-categories .tb-category-go svg {
    width: 14px;
    height: 14px;
  }

  .tb-categories .tb-category-depth,
  .tb-home .tb-category-card .tb-category-depth {
    display: none;
  }
}

/* Category archives: product cards already 2-col via design-system;
   reinforce for .tb-category-products on mobile only */
@media (max-width: 47.99rem) {
  .tb-category .tb-category-products.tb-product-grid,
  .tb-category .tb-product-grid.is-crystal {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
  }
}


/* —— Header scale polish 2026-11-03 —— */
.site-header .tb-brand { gap: 0.7rem; min-height: 48px; }
.site-header .tb-mega-icon {
  width: 3.4rem !important;
  height: 3.4rem !important;
  flex: 0 0 3.4rem !important;
  border-radius: 14px !important;
  background: linear-gradient(160deg, #fff, var(--tb-lavender)) !important;
  border: 1px solid rgba(181, 139, 255, 0.4);
  box-shadow: 0 6px 14px rgba(107, 42, 209, 0.12);
  color: var(--tb-purple);
}
.site-header .tb-mega-icon img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  padding: 0.18rem !important;
  image-rendering: -webkit-optimize-contrast;
}
.site-header .tb-mega-icon svg {
  width: 1.75rem !important;
  height: 1.75rem !important;
  stroke-width: 2.1;
}
.site-header .tb-mega-heading,
.site-header .tb-mega-link,
.site-header .tb-mega-product {
  gap: 0.85rem;
  min-height: 3.45rem;
  font-size: 1.04rem;
}
.site-header .tb-mega-cat span,
.site-header .tb-mega-product span {
  font-size: 1.02rem;
  line-height: 1.35;
  font-weight: 750;
}
@media (min-width: 64rem) {
  .site-header .tb-mega-panel {
    max-width: min(38rem, calc(100% - 1.5rem));
  }
  .tb-mega-layout { width: 36.5rem !important; }
  .tb-mega-grid { width: 17rem !important; }
  .tb-mega-group:not(.is-nested) > .tb-mega-sub { width: 18.5rem !important; }
}

/*
 * Scrolled header must keep the SAME geometry as resting.
 * Previous shrink rules (logo 2.55rem / shorter topbar) caused the jump.
 */
.site-header .tb-topbar,
.site-header .tb-mark,
.site-header .tb-mark-img {
  transition: none !important;
}
.site-header .tb-topbar {
  /* Must stay visible: mega/search panels hang below the glass bar. */
  overflow: visible;
}
.site-header .tb-mark,
.site-header .tb-brand .tb-mark {
  overflow: hidden;
  flex-shrink: 0;
}
/* Keep scrolled mobile geometry identical to the two-row resting header. */
@media (max-width: 63.99rem) {
  .site-header .tb-brand { min-height: 0; }
  .site-header.is-scrolled .tb-topbar {
    min-height: 0 !important;
    padding: 0.55rem 0.7rem 0.55rem !important;
    align-items: stretch !important;
    overflow: visible;
  }
  .site-header.is-scrolled .tb-brand {
    align-items: center !important;
    min-height: 0 !important;
  }
  .site-header.is-scrolled .tb-mark,
  .site-header.is-scrolled .tb-brand .tb-mark {
    width: 3.15rem !important;
    height: 3.15rem !important;
    max-width: 3.15rem !important;
    max-height: 3.15rem !important;
    flex: 0 0 3.15rem !important;
    transform: none !important;
  }
  .site-header.is-scrolled .tb-mark-img,
  .site-header.is-scrolled .tb-brand .tb-mark-img {
    width: 3.15rem !important;
    height: 3.15rem !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    filter: drop-shadow(0 8px 16px rgba(91, 33, 182, 0.28));
    transform: none !important;
  }
}
@media (min-width: 64rem) {
  .site-header .tb-topbar { align-items: center; }
  /* Match resting desktop sizes exactly (final override in this file) */
  .site-header.is-scrolled .tb-topbar {
    min-height: 4.4rem !important;
    padding: 0.55rem 0.85rem 0.55rem 0.75rem !important;
    align-items: center !important;
  }
  .site-header.is-scrolled .tb-brand {
    min-height: 5.25rem !important;
    gap: 0.9rem;
  }
  .site-header.is-scrolled .tb-mark,
  .site-header.is-scrolled .tb-brand .tb-mark {
    width: 5.25rem !important;
    height: 5.25rem !important;
    max-width: 5.25rem !important;
    max-height: 5.25rem !important;
    flex: 0 0 5.25rem !important;
  }
  .site-header.is-scrolled .tb-mark-img,
  .site-header.is-scrolled .tb-brand .tb-mark-img {
    width: 5.25rem !important;
    height: 5.25rem !important;
  }
}
