/* ====================================================
   THEORY OF BLOOM — UNIVERSAL HEADER v2.0
   Applied to: all pages except login/register/forgot-password/privacy-policy/reset-password
   ==================================================== */

:root {
  --tob-gold: #a37c4e;
  --tob-green: #4A6B5D;
  --tob-dark: #2C1A10;
  --tob-cream: #FAF7F2;
  --tob-line: #EAEAEA;
  --tob-serif: 'Cormorant Garamond', serif;
  --tob-sans: 'Inter', sans-serif;
}

/* ── Prevent desktop right-shift on all pages ── */
html,
body {
  max-width: 100vw;
  box-sizing: border-box;
}

/* ============ DESKTOP HEADER (≥992px) ============ */
.tob-header {
  display: block;
  position: sticky !important;
  top: 0 !important;
  z-index: 1100;
  background: #FFFFFF;
  border-bottom: 1px solid var(--tob-line);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s, padding 0.3s, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tob-header.tob-header-hidden {
  transform: translateY(-100%);
}

.tob-header.scrolled {
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.11);
}

/* ── Top row (brand + actions on same line) ── */
.tob-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 44px;
}

/* Brand block — no redirect, cursor default */
.tob-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: default;
  user-select: none;
  flex-shrink: 0;
}

.tob-logo {
  width: 80px;
  height: 80px;
  border-radius: 0;
  border: none;
  padding: 4px;
  background: transparent;
  filter: drop-shadow(0 0 8px rgba(163, 124, 78, 0.35)) drop-shadow(0 2px 12px rgba(163, 124, 78, 0.2));
  mix-blend-mode: normal;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s;
  object-fit: contain;
}

.tob-brand:hover .tob-logo {
  transform: rotate(-8deg) scale(1.08);
  filter: drop-shadow(0 0 12px rgba(163, 124, 78, 0.5)) drop-shadow(0 4px 18px rgba(163, 124, 78, 0.3));
}

.tob-brand-name {
  font-family: var(--tob-serif);
  font-size: 1.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--tob-gold);
  line-height: 1.1;
}

.tob-brand-name em {
  font-style: italic;
  font-weight: 700;
  font-size: 1.35rem;
  text-transform: lowercase;
}

/* ── All Blends mega trigger ── */
.tob-nav-item {
  position: relative;
}

.tob-nav-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid var(--tob-line);
  border-radius: 10px;
  background: transparent;
  font-family: var(--tob-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--tob-dark);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.tob-nav-trigger svg {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: var(--tob-gold);
}

.tob-nav-trigger:hover,
.tob-nav-item:hover .tob-nav-trigger {
  background: #FAF7F2;
  border-color: var(--tob-gold);
  color: var(--tob-gold);
}

.tob-nav-item:hover .tob-nav-trigger svg {
  transform: rotate(180deg);
}

/* ── Mega menu ── */
.tob-mega-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  width: 600px;
  background: #FFFFFF;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
  border: 1px solid #EEE8DF;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 100000;
  pointer-events: none;
}

.tob-mega-menu::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
}

.tob-nav-item:hover .tob-mega-menu,
.tob-nav-item:focus-within .tob-mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.tob-mega-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.22s;
}

.tob-mega-card:hover {
  background: var(--tob-cream);
  border-color: #E8DDD0;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(163, 124, 78, 0.08);
}

.tob-mega-card-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.tob-mega-card-title {
  font-family: var(--tob-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--tob-dark);
  letter-spacing: 0.3px;
}

.tob-mega-card-desc {
  font-size: 0.72rem;
  color: #888;
  line-height: 1.4;
  font-family: var(--tob-sans);
}

/* ── Bottom row: category pill-bar + search ── */
.tob-bottom,
.tob-cat-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 44px 10px;
  border-top: 1px solid var(--tob-line);
}

/* Search in the cat-row — pushed left, fixed width */
.tob-cat-search {
  flex: 0 0 280px !important;
  max-width: 280px !important;
}

/* Category pill-bar */
.tob-cat-pills {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.tob-cat-pills::-webkit-scrollbar {
  display: none;
}

.tob-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-bottom: 2px solid transparent;
  font-family: var(--tob-sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: #666;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  border-radius: 0;
  background: none;
}

.tob-cat-pill i {
  font-size: 0.75rem;
  color: var(--tob-gold);
}

.tob-cat-pill:hover {
  color: var(--tob-dark);
  border-bottom-color: var(--tob-gold);
}

.tob-cat-pill.active {
  color: var(--tob-dark);
  border-bottom-color: var(--tob-gold);
  font-weight: 600;
}

/* Actions stay right-most via margin-left:auto on actions within .tob-top */
.tob-top .tob-actions {
  margin-left: auto;
}

/* Remove old bottom row ordering rules */
.tob-bottom .tob-search-wrap {
  flex: 1;
  max-width: 500px;
  order: unset;
}

.tob-bottom .tob-nav-item {
  flex-shrink: 0;
  order: unset;
}

.tob-bottom .tob-actions {
  margin-left: auto;
  order: unset;
}


/* Search */
.tob-search-wrap {
  position: relative;
  flex: 0 0 380px;
}

.tob-search-form {
  display: flex;
}

.tob-search-input {
  width: 100%;
  height: 42px;
  padding: 0 46px 0 16px;
  border: 1px solid var(--tob-line);
  border-radius: 10px;
  background: #F9F9F9;
  font-size: 0.88rem;
  font-family: var(--tob-sans);
  color: var(--tob-dark);
  outline: none;
  transition: all 0.3s;
}

.tob-search-input:focus {
  background: white;
  border-color: var(--tob-gold);
  box-shadow: 0 0 0 3px rgba(163, 124, 78, 0.1);
}

.tob-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--tob-gold);
  transition: transform 0.25s;
  display: flex;
}

.tob-search-btn:hover {
  transform: translateY(-50%) scale(1.18);
}

/* Action group */
.tob-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.tob-action-item {
  position: relative;
}

.tob-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--tob-dark);
  transition: background 0.2s;
  font-size: unset;
}

.tob-icon-btn:hover {
  background: #FAF7F2;
}

.tob-icon-btn svg {
  color: var(--tob-gold);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tob-icon-btn:hover svg {
  transform: translateY(-3px) scale(1.12);
}

.tob-icon-label {
  font-size: 0.7rem;
  font-family: var(--tob-sans);
  font-weight: 500;
  color: var(--tob-dark);
  white-space: nowrap;
}

/* Cart specific animation */
.tob-cart-btn svg {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.tob-cart-btn:hover svg {
  transform: translateX(5px) rotate(-9deg) !important;
  color: var(--tob-green) !important;
}

/* Dropdown panels */
.tob-drop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.11);
  border: 1px solid #EEE8DF;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 100000;
  pointer-events: none;
}

.tob-drop::before {
  content: '';
  position: absolute;
  top: -25px;
  left: 0;
  right: 0;
  height: 25px;
}

.tob-action-item:hover .tob-drop,
.tob-action-item:focus-within .tob-drop {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.tob-drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.875rem;
  font-family: var(--tob-sans);
  color: var(--tob-dark);
  transition: background 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.tob-drop-item:hover {
  background: var(--tob-cream);
  color: var(--tob-gold);
}

.tob-drop-item.danger {
  color: #8B3030;
}

.tob-drop-item.danger:hover {
  background: #FFF4F4;
}

.tob-drop-divider {
  height: 1px;
  background: #F0EBE3;
  margin: 6px 4px;
}

.tob-drop-header {
  padding: 8px 12px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #AAA;
  font-family: var(--tob-sans);
}

/* ============ MOBILE HEADER (<992px) ============ */
.tob-mobile-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 1100;
  background: #FAF9F7;
  border-bottom: 1px solid #e8e0d6;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tob-mobile-header.tob-header-hidden {
  transform: translateY(-100%);
}

.tob-mob-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 4px;
}

/* Left: hamburger + logo in shared border */
/* Standalone hamburger button */
.tob-mob-ham-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 10px 12px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.tob-mob-ham-btn:hover {
  background: rgba(163, 124, 78, 0.08);
}

.tob-ham-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--tob-gold);
  border-radius: 2px;
  transition: all 0.38s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center;
}

.tob-ham-line--short {
  width: 14px;
  margin-left: 4px;
}

.tob-mob-ham-btn.open .tob-ham-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.tob-mob-ham-btn.open .tob-ham-line:nth-child(2) {
  opacity: 0;
  width: 0;
}

.tob-mob-ham-btn.open .tob-ham-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  width: 22px;
  margin-left: 0;
}

/* Center: Logo + name side by side */
.tob-mob-center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.tob-mob-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 0;
  padding: 2px;
  background: transparent;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(163, 124, 78, 0.3));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tob-mob-center:hover .tob-mob-logo-img {
  transform: rotate(10deg);
}

/* Center: Brand name */
.tob-mob-name {
  font-family: var(--tob-serif);
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--tob-gold);
  cursor: default;
  user-select: none;
}

.tob-mob-name em {
  font-style: italic;
  font-weight: 700;
  text-transform: lowercase;
}

/* Right: icons */
.tob-mob-icons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tob-mob-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tob-dark);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.tob-mob-icon:hover,
.tob-mob-icon:active {
  background: #F5F0E8;
  transform: scale(1.1);
}

.tob-mob-icon svg {
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tob-mob-icon.cart-ic:hover svg,
.tob-mob-icon.cart-ic:active svg {
  transform: translateX(4px) rotate(-8deg);
  color: var(--tob-green) !important;
}

/* Account dropdown (mobile) */
/* Sidebar Drawer (Mobile) */
.tob-mob-acc-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 290px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 5000;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.tob-mob-acc-drawer.active {
  transform: translateX(0);
}

/* Backdrop */
.tob-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(44, 26, 16, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 4500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.tob-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Drawer Card Header */
.drawer-profile-header {
  padding: 24px;
  background: var(--tob-dark);
  color: #fff;
  position: relative;
  overflow: hidden;
  margin: 15px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  text-align: left;
}

.drawer-profile-header::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
      transparent 45%,
      rgba(184, 154, 106, 0.1) 50%,
      transparent 55%);
  animation: cardShimmer 4s infinite linear;
}

@keyframes cardShimmer {
  0% {
    transform: translateX(-30%) translateY(-30%);
  }

  100% {
    transform: translateX(30%) translateY(30%);
  }
}

.drawer-header-top {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.drawer-avatar {
  width: 52px;
  height: 52px;
  background: var(--tob-gold);
  color: var(--tob-dark);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-family: var(--tob-serif);
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.drawer-name-wrap {
  display: flex;
  flex-direction: column;
}

.drawer-name {
  font-family: var(--tob-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0;
}

.drawer-status {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--tob-gold);
  font-weight: 700;
}

.drawer-header-meta {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  position: relative;
  z-index: 1;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1px;
}

.meta-value {
  font-size: 0.75rem;
  color: #fff;
  font-weight: 500;
}

/* Drawer Menu Grid */
.drawer-menu {
  flex: 1;
  padding: 0 15px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-menu-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  text-decoration: none;
  color: var(--tob-dark);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  opacity: 0;
  transform: translateY(20px);
}

.tob-mob-acc-drawer.active .drawer-menu-item {
  animation: nodeEntry 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes nodeEntry {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered entry */
.drawer-menu-item:nth-child(1) {
  animation-delay: 0.1s !important;
}

.drawer-menu-item:nth-child(2) {
  animation-delay: 0.15s !important;
}

.drawer-menu-item:nth-child(3) {
  animation-delay: 0.2s !important;
}

.drawer-menu-item:nth-child(4) {
  animation-delay: 0.25s !important;
}

.drawer-menu-item:nth-child(5) {
  animation-delay: 0.3s !important;
}

.drawer-menu-item:active {
  background: var(--tob-cream);
  transform: scale(0.97) !important;
  border-color: var(--tob-gold);
}

.drawer-menu-item i {
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  background: rgba(184, 154, 106, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--tob-gold);
  transition: all 0.3s;
}

.drawer-menu-item:hover i {
  background: var(--tob-gold);
  color: #fff;
}

.drawer-item-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.drawer-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tob-dark);
}

.drawer-item-sub {
  font-size: 0.7rem;
  color: #8a8a8a;
  margin-top: 1px;
}

.drawer-badge {
  padding: 2px 8px;
  background: var(--tob-gold);
  color: var(--tob-dark);
  font-size: 0.6rem;
  font-weight: 800;
  border-radius: 4px;
  text-transform: uppercase;
}

.drawer-footer {
  padding: 20px;
  border-top: 1px solid rgba(163, 124, 78, 0.1);
}

.drawer-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: #FFF4F4;
  color: #8B3030;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
}

/* Mobile search slide-down */
.tob-mob-search-bar {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 1px solid transparent;
}

.tob-mob-search-bar.open {
  max-height: 80px;
  border-top-color: #e8e0d6;
}

.tob-mob-search-inner {
  padding: 10px 14px;
  display: flex;
  gap: 8px;
}

.tob-mob-search-input {
  flex: 1;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--tob-gold);
  border-radius: 8px;
  background: white;
  font-size: 0.875rem;
  font-family: var(--tob-sans);
  color: var(--tob-dark);
  outline: none;
}

.tob-mob-search-submit {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: var(--tob-gold);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.tob-mob-search-submit:hover {
  background: var(--tob-dark);
}

/* ============================================================
   MOBILE SIDE DRAWER — Left slide-in, 70% width, full-height
   ============================================================ */

/* ── Backdrop (dimmed right portion) ── */
.tob-overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 18, 8, 0.52);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.38s ease, visibility 0.38s;
}
.tob-overlay-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* ── Drawer panel ── */
.tob-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 72%;
  max-width: 320px;
  height: 100dvh;               /* dynamic viewport height — safe area aware */
  height: 100vh;                /* fallback */
  background:
    linear-gradient(175deg, #FEFDFB 0%, #F8F3EB 45%, #EEE5D5 100%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  visibility: hidden;
  opacity: 0;
  transform: translateX(-100%);
  transition:
    transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    opacity   0.38s ease,
    visibility 0.38s;
  box-shadow: 6px 0 40px rgba(44, 26, 16, 0.22), 2px 0 8px rgba(44,26,16,0.08);
  overflow: hidden;
}

/* Subtle warm botanical glow in top-left corner */
.tob-overlay::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -60px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(163, 124, 78, 0.1) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Decorative circle watermark bottom-right */
.tob-overlay::after {
  content: '';
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 1px solid rgba(163, 124, 78, 0.1);
  pointer-events: none;
  z-index: 0;
}

.tob-overlay.active {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
}

/* ── Drawer Header ── */
.tob-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(163, 124, 78, 0.14);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  background: rgba(255, 253, 250, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.tob-drawer-user {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.tob-drawer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EEE0C6 0%, #D9C5A0 100%);
  border: 1.5px solid rgba(163, 124, 78, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #7A5C2E;
  font-size: 0.95rem;
}

.tob-drawer-identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tob-drawer-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1A1208;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.tob-drawer-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(163, 124, 78, 0.75);
  margin-top: 1px;
}

/* Close button — top-right of header */
.tob-overlay-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(163, 124, 78, 0.3);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2C1A10;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  position: static;          /* override old absolute positioning */
  top: auto;
  right: auto;
  z-index: 2;
}

.tob-overlay-close:hover,
.tob-overlay-close:active {
  background: #a37c4e;
  color: #fff;
  border-color: #a37c4e;
  transform: rotate(90deg) scale(1.05);
}

/* ── Brand strip below header ── */
.tob-drawer-brand-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(163, 124, 78, 0.1);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.tob-drawer-brand-strip img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(163, 124, 78, 0.2));
}

.tob-drawer-brand-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: rgba(163, 124, 78, 0.75);
}

.tob-drawer-brand-label em {
  font-style: italic;
  font-weight: 700;
  text-transform: lowercase;
}

/* ── Nav list ── */
.tob-overlay-links {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  text-align: left;
  position: relative;
  z-index: 2;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}

.tob-overlay-links::-webkit-scrollbar { display: none; }

.tob-overlay-links li {
  opacity: 0;
  transform: translateX(-18px);
  position: relative;
}

/* Thin separator between items */
.tob-overlay-links li + li::before {
  content: '';
  display: block;
  height: 1px;
  margin: 0 22px;
  background: linear-gradient(90deg, rgba(163, 124, 78, 0.18), transparent);
}

/* No separator after last item */
.tob-overlay-links li:last-child::after { display: none; }

/* Staggered entry animation when drawer opens */
.tob-overlay.active .tob-overlay-links li {
  animation: drawerLinkIn 0.45s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.tob-overlay.active .tob-overlay-links li:nth-child(1) { animation-delay: 0.10s; }
.tob-overlay.active .tob-overlay-links li:nth-child(2) { animation-delay: 0.17s; }
.tob-overlay.active .tob-overlay-links li:nth-child(3) { animation-delay: 0.24s; }
.tob-overlay.active .tob-overlay-links li:nth-child(4) { animation-delay: 0.31s; }
.tob-overlay.active .tob-overlay-links li:nth-child(5) { animation-delay: 0.38s; }

@keyframes drawerLinkIn {
  to { opacity: 1; transform: translateX(0); }
}

/* Nav link anchors */
.tob-overlay-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-decoration: none;
  color: #2C1A10;
  position: relative;
  transition: color 0.22s, background 0.22s, padding-left 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 54px;         /* generous touch target */
}

/* Icon wrapper */
.tob-overlay-links a .nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(163, 124, 78, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a37c4e;
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: background 0.22s, color 0.22s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Link text */
.tob-overlay-links a .nav-label {
  display: flex;
  flex-direction: column;
}

.tob-overlay-links a .nav-label span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.8px;
  color: inherit;
  line-height: 1.2;
}

/* Chevron indicator */
.tob-overlay-links a::after {
  content: '›';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) translateX(0px);
  font-size: 1.3rem;
  color: rgba(163, 124, 78, 0.35);
  font-family: Georgia, serif;
  line-height: 1;
  transition: color 0.22s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tob-overlay-links a:hover,
.tob-overlay-links a:active {
  color: #7A5C2E;
  background: rgba(163, 124, 78, 0.06);
  padding-left: 28px;
}

.tob-overlay-links a:hover .nav-icon,
.tob-overlay-links a:active .nav-icon {
  background: rgba(163, 124, 78, 0.15);
  color: #7A5C2E;
  transform: scale(1.08);
}

.tob-overlay-links a:hover::after,
.tob-overlay-links a:active::after {
  color: #a37c4e;
  transform: translateY(-50%) translateX(4px);
}

.tob-overlay-links a.shop-blends-toggle.expanded::after {
  transform: translateY(-50%) rotate(90deg) !important;
}

.shop-sub-menu {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding-left: 68px; /* aligns with text roughly */
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shop-sub-menu.open {
  padding-bottom: 16px;
}

.shop-sub-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #555;
  text-decoration: none;
  display: block;
  transition: color 0.2s;
  text-transform: capitalize;
}

.shop-sub-link:hover {
  color: #a37c4e;
}

/* Link ripple */
.tob-link-ripple {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(163, 124, 78, 0.3);
  transform: scale(0);
  animation: tob-ripple 0.65s ease-out forwards;
  pointer-events: none;
  margin-left: -3px;
  margin-top: -3px;
}

@keyframes tob-ripple {
  to {
    transform: scale(30);
    opacity: 0;
  }
}

/* ── Drawer Footer ── */
.tob-overlay-footer {
  padding: 16px 22px 20px;
  border-top: 1px solid rgba(163, 124, 78, 0.12);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  /* remove old absolute positioning */
  bottom: auto;
  left: auto;
  right: auto;
}

.tob-overlay-footer p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(163, 124, 78, 0.6);
  margin: 0 0 2px;
  text-align: left;
}

.tob-overlay-footer p em {
  font-style: italic;
  font-weight: 700;
  text-transform: lowercase;
}

.tob-overlay-footer small {
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(44, 26, 16, 0.3);
  display: block;
  text-align: left;
}

/* ── Legacy account section (kept for templates that use it) ── */
.tob-overlay-acc {
  display: none;   /* replaced by .tob-drawer-header user area */
}

.tob-overlay-acc-name,
.tob-overlay-acc-sub,
.tob-overlay-eyebrow { display: none; }

/* Divider (legacy) */
.tob-overlay-divider {
  width: 40px;
  height: 1px;
  background: rgba(163, 124, 78, 0.25);
  margin: 0.2rem auto;
}


/* ============ RESPONSIVE TOGGLE ============ */

/* Search shake */
@keyframes tob-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-5px); }
  40%       { transform: translateX(5px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.tob-search-shake {
  animation: tob-shake 0.45s ease;
  border-color: #a37c4e !important;
  box-shadow: 0 0 0 3px rgba(163, 124, 78, 0.2) !important;
}

@media (max-width: 991.98px) {
  .tob-header {
    display: none !important;
  }

  .tob-mobile-header {
    display: block !important;
  }
}

@media (min-width: 992px) {
  .tob-header {
    display: block;
  }

  .tob-mobile-header {
    display: none !important;
  }

  /* Overlay and backdrop are MOBILE ONLY — never render on desktop */
  .tob-overlay,
  .tob-overlay-backdrop {
    display: none !important;
  }
}

/* ============ MOBILE CATEGORY PILL BAR ============ */
.tob-mob-cat-bar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 6px 14px 7px;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  background: #FAF9F7;
  /* Fix potential overflow bleed */
  width: 100%;
  box-sizing: border-box;
}

.tob-mob-cat-bar::-webkit-scrollbar {
  display: none;
}

.tob-mob-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-bottom: 1.5px solid transparent;
  font-family: var(--tob-sans);
  font-size: 0.7rem;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.18s, border-color 0.18s;
}

.tob-mob-cat-pill i {
  font-size: 0.65rem;
  color: var(--tob-gold);
}

.tob-mob-cat-pill:hover,
.tob-mob-cat-pill.active {
  color: var(--tob-dark);
  border-bottom-color: var(--tob-gold);
}

/* ============ MOBILE OVERFLOW BUG FIX ============ */
.tob-mobile-header {
  overflow: hidden;
  max-width: 100vw;
}

.tob-mob-bar {
  overflow: hidden;
}

/* ── ERP DASHBOARD (NEXUS) UTILITIES ────────────────────────── */
.dash-nexus {
  background: var(--tob-dark);
  padding: 2.5rem 1.5rem;
  border-radius: 0 0 32px 32px;
  position: relative;
  overflow: hidden;
  margin-top: -80px;
  /* Underlap mobile bar */
  margin-bottom: 2rem;
}

.dash-nexus::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(184, 154, 106, 0.15) 0%, transparent 70%);
  animation: cardShimmer 15s linear infinite;
}

.nexus-id-card {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nexus-avatar {
  width: 64px;
  height: 64px;
  background: var(--tob-gold);
  color: var(--tob-dark);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--tob-serif);
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.nexus-details {
  flex: 1;
}

.nexus-name {
  color: #fff;
  font-family: var(--tob-serif);
  font-size: 1.4rem;
  margin-bottom: 2px;
}

.nexus-tier {
  color: var(--tob-gold);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}

.nexus-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 1.5rem;
  position: relative;
  z-index: 2;
}

.nexus-stat-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 15px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.nexus-stat-label {
  font-size: 0.5rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  display: block;
  margin-bottom: 2px;
}

.nexus-stat-value {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--tob-sans);
}

/* Modular Glass Nodes */
.tob-glass-node {
  background: #fff;
  border: 1px solid var(--tob-border);
  border-radius: 20px;
  padding: 1.8rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.node-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--tob-border);
}

.node-title {
  font-family: var(--tob-serif);
  font-size: 1.2rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.node-title i {
  color: var(--tob-gold);
  font-size: 1.1rem;
}

.tob-system-badge {
  padding: 4px 10px;
  background: rgba(184, 154, 106, 0.1);
  color: var(--tob-gold);
  border-radius: 6px;
  font-size: 0.6rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
}

/* Mobile Order Cards */
.mobile-order-card {
  background: var(--tob-cream);
  border: 1px solid var(--tob-border);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
}

.order-card-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.order-card-id {
  font-family: var(--tob-sans);
  font-weight: 700;
  font-size: 0.8rem;
}

.order-card-date {
  font-size: 0.75rem;
  color: var(--tob-muted);
}

.order-card-meta {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--tob-border);
}

.order-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-node-edit {
  background: var(--tob-dark);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  cursor: pointer;
}

.btn-node-save {
  background: var(--tob-gold);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(184, 154, 106, 0.3);
}


/* ═══════════════════════════════════════════════
   3D CATEGORY SPINNER — Theory of Bloom theme
═══════════════════════════════════════════════ */

/* ── Outer wrapper ── */
.tob-spinner-wrap {
  perspective: 1400px;
  width: 100%;
  max-width: 1000px;
  height: 64px;
  margin: 0px auto 0;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(253,250,245,0.92) 0%, rgba(245,239,228,0.95) 50%, rgba(253,250,245,0.92) 100%),
    url('/images/spinner-bg.png') center/cover no-repeat;
  border-top: 1px solid rgba(220, 205, 180, 0.4);
  border-bottom: 1px solid rgba(220, 205, 180, 0.4);
  border-left: none;
  border-right: none;
  border-radius: 0;
  cursor: grab;
  touch-action: pan-x;
  user-select: none;
  position: relative;
  overflow: visible;
  box-shadow:
    inset 0 2px 8px rgba(200, 180, 140, 0.12),
    inset 0 -2px 8px rgba(200, 180, 140, 0.08);
}

.tob-spinner-wrap:active {
  cursor: grabbing;
}

/* ── Compass indicator — centred caret below the active pill ── */
.tob-spinner-wrap::before {
  content: '◆';                        /* diamond gem — on-brand & clear     */
  position: absolute;
  bottom: 4px;                         /* sits just inside the bottom edge   */
  left: 50%;
  transform: translateX(-50%);
  color: #a37c4e;
  font-size: 0.45rem;
  opacity: 0.7;
  z-index: 10;
  line-height: 1;
  pointer-events: none;
}

/* ── Tilt container (preserve-3d) ── */
.tob-spinner-tilt {
  transform-style: preserve-3d;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Ring anchor (zero-size, 3d origin) ── */
.tob-spinner-ring {
  position: relative;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}

/* ── Each category pill ── */
.tob-spinner-item {
  position: absolute;
  top: 50%;
  left: 50%;
  white-space: nowrap;
  font-family: var(--tob-sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  /* base transform — JS overrides scale dynamically */
  transform: translate(-50%, -50%) rotateY(calc(var(--i) * var(--angle-step, 60deg))) translateZ(200px) scale(var(--scale, 1));
  backface-visibility: visible;
  color: var(--tob-dark, #3b2f24);
  transition:
    transform   0.4s cubic-bezier(.25, .8, .25, 1),
    opacity     0.4s ease,
    filter      0.4s ease,
    box-shadow  0.4s ease,
    background  0.4s ease,
    color       0.4s ease;
  padding: 7px 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.65),
    0 4px 14px rgba(0, 0, 0, 0.08);
}

/* Active pill visual (handled by JS, but provide a base) */
.tob-spinner-item.tob-active {
  background: rgba(255, 255, 255, 0.7);
  color: #3b2f24;
  box-shadow:
    inset 0 2px 8px rgba(255, 255, 255, 0.8),
    0 6px 20px rgba(163, 124, 78, 0.18);
}

.tob-spinner-item i {
  font-size: 0.72rem;
  color: var(--tob-gold, #a37c4e);
}

/* ── Depth bullets (hidden by JS, kept for fallback) ── */
.tob-spinner-bullet {
  position: absolute;
  top: 50%;
  left: 50%;
  font-family: var(--tob-sans);
  font-size: 0.9rem;
  color: rgba(163, 124, 78, 0.35);
  transform: translate(-50%, -50%) rotateY(calc(var(--i) * var(--angle-step, 60deg))) translateZ(230px);
  backface-visibility: hidden;
}

/* ═══════════════════════════════════════════════
   MOBILE OVERRIDES  (≤ 991.98 px)
═══════════════════════════════════════════════ */
@media (max-width: 991.98px) {

  .tob-spinner-wrap {
    height: 56px;
    max-width: 100%;
    margin: 0;
    padding: 0 8px;
    border-radius: 0;
  }

  .tob-spinner-item {
    font-size: 0.62rem;
    letter-spacing: 1.2px;
    padding: 6px 13px;
    transform: translate(-50%, -50%) rotateY(calc(var(--i) * var(--angle-step, 60deg))) translateZ(150px) scale(var(--scale, 1));
  }

  .tob-spinner-bullet {
    transform: translate(-50%, -50%) rotateY(calc(var(--i) * var(--angle-step, 60deg))) translateZ(185px);
  }

  .tob-spinner-tilt {
    transform: none;
  }
}