﻿/* ============================================================
   Nobo Deal â€” Header Account Control (nd-account.css)
   ------------------------------------------------------------
   Single, login-state-aware account entry (replaces the old
   duplicated Login/Register icons + always-/login Account pill):
   â€¢ Logged out â†’ click opens a Login / Register card.
   â€¢ Logged in  â†’ click opens the profile menu (avatar, name,
                  My Account / Orders / Addresses / Wishlist /
                  Cart / Logout).
   Hidden on <768px (mobile uses the bottom-nav Account tab).
   Admin shield icon = desktop only.
   ============================================================ */

.nd-admin-only { display: none !important; }
@media (min-width: 992px) {
  .nd-admin-only { display: inline-flex !important; }
}

/* Control wrapper + trigger */
.nd-account-ctl { position: relative; display: flex; align-items: center; }

.nd-acc-trigger { cursor: pointer; }

/* Avatar on the trigger (replaces the ti-user icon) */
.nd-acc-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; letter-spacing: .5px;
  color: #fff; background: var(--nd-emerald-grad, linear-gradient(135deg,#0e6b54,#073b2e));
  box-shadow: 0 2px 6px rgba(5,45,35,.25);
  overflow: hidden; flex: none; transition: transform .3s var(--nd-ease, ease);
}
.nd-acc-avatar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nd-acc-trigger:hover .nd-acc-avatar { transform: scale(1.08); }

/* ===== Dropdown menu ===== */
.nd-acc-menu {
  position: absolute; top: calc(100% + 12px); right: 0;
  width: 272px; max-width: calc(100vw - 24px);
  background: #fff; border-radius: 18px;
  border: 1px solid rgba(201,162,75,.4);
  border-top: 4px solid var(--nd-gold, #c9a24b);
  box-shadow: 0 24px 60px rgba(5,45,35,.22), 0 6px 18px rgba(5,45,35,.12);
  padding: 10px; z-index: 1300;
  animation: ndAccIn .18s ease;
}
@keyframes ndAccIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

/* Logged-in: profile header */
.nd-acc-menu-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: 14px;
  background: linear-gradient(135deg, #0e6b54, #073b2e 70%);
  color: #fff;
}
.nd-acc-menu-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--nd-gold-grad, linear-gradient(135deg,#e3c87e,#c9a24b));
  color: var(--nd-emerald-deep, #073b2e);
  font-weight: 700; font-size: 17px;
  overflow: hidden; box-shadow: 0 3px 10px rgba(0,0,0,.3);
}
.nd-acc-menu-avatar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nd-acc-menu-id { min-width: 0; }
.nd-acc-menu-id strong { display: block; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nd-acc-menu-id small { display: block; color: rgba(255,255,255,.72); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Menu links */
.nd-acc-menu-links { list-style: none; margin: 8px 0 0; padding: 0; }
.nd-acc-menu-links a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 11px;
  color: var(--nd-ink, #17342b); font-size: 14px; font-weight: 600;
  text-decoration: none; min-height: 42px;
  transition: background .18s ease, color .18s ease, padding-left .18s ease;
}
.nd-acc-menu-links a i { width: 18px; text-align: center; color: var(--nd-muted, #67817a); font-size: 15px; transition: color .18s ease; }
.nd-acc-menu-links a:hover { background: rgba(14,59,46,.07); color: var(--nd-emerald-deep, #0b5c43); padding-left: 18px; }
.nd-acc-menu-links a:hover i { color: var(--nd-gold-dark, #a8842f); }

.nd-acc-menu-foot { border-top: 1px solid #eef0ec; margin-top: 6px; padding-top: 6px; }
.nd-acc-menu-foot button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: none; background: transparent; cursor: pointer;
  color: #c0392b; font: 600 14px/1 inherit; padding: 11px 14px; border-radius: 11px;
  font-family: inherit; min-height: 42px;
}
.nd-acc-menu-foot button i { width: 18px; text-align: center; font-size: 15px; }
.nd-acc-menu-foot button:hover { background: #fdecea; }

/* Logged-out: guest card */
.nd-acc-menu-guest {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 4px; padding: 16px 12px 10px;
}
.nd-acc-guest-ico {
  width: 52px; height: 52px; border-radius: 50%; margin-bottom: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(201,162,75,.16); color: var(--nd-gold-dark, #a8842f); font-size: 24px;
}
.nd-acc-menu-guest strong { font-size: 15px; color: var(--nd-ink, #17342b); }
.nd-acc-menu-guest span { font-size: 12.5px; color: var(--nd-muted, #67817a); line-height: 1.55; }

.nd-acc-menu-cta { display: grid; gap: 8px; padding: 6px 4px 4px; }
.nd-acc-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 30px; padding: 12px 16px; font-size: 14.5px; font-weight: 700;
  text-decoration: none !important; min-height: 46px;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.nd-acc-btn-solid { background: var(--nd-emerald-grad, linear-gradient(135deg,#0e6b54,#073b2e)); color: #fff !important; box-shadow: 0 6px 16px rgba(7,59,46,.28); }
.nd-acc-btn-solid:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(7,59,46,.32); }
.nd-acc-btn-outline { border: 1.5px solid var(--nd-emerald-deep, #0b5c43); color: var(--nd-emerald-deep, #0b5c43) !important; background: #fff; }
.nd-acc-btn-outline:hover { background: rgba(11,92,67,.07); transform: translateY(-1px); }

/* Mobile (<768): the bottom nav owns Cart & Account â€” the top bar keeps only
   the Sales Assistant + Wishlist icons. */
@media (max-width: 767.98px) {
  .nd-account-ctl,
  .nd-actions .nd-admin-only,
  .nd-actions #header-cart-link { display: none !important; }
}

/* Bottom-navigation Sales Assistant button (5th item) â€” same look as links */
.bottom-navigation ul li .nd-btm-assistant {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; width: 100%; height: 100%;
  background: transparent; border: none; cursor: pointer;
  color: #87928d; font-size: 10.5px; font-weight: 600; line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
}
.bottom-navigation ul li .nd-btm-assistant i { font-size: 17px; line-height: 1; }
.bottom-navigation ul li .nd-btm-assistant:hover,
.bottom-navigation ul li .nd-btm-assistant:active { color: var(--nd-emerald-deep, #0b5c43); }
@media (max-width: 380px) {
  .bottom-navigation ul li .nd-btm-assistant span { font-size: 9.5px; }
}

/* ===== Bottom-nav Account shows the member's avatar after login ===== */
.bottom-navigation ul li .nd-btm-u {
  width: 21px; height: 21px; border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--nd-gold, #c9a24b);
  background: linear-gradient(135deg, #0e6b54, #073b2e);
}
.bottom-navigation ul li .nd-btm-u img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bottom-navigation ul li .nd-btm-u-ini {
  font-style: normal; color: #e8b64a; font-weight: 700; font-size: 11px; line-height: 1;
}
.bottom-navigation ul li.active .nd-btm-u { border-color: var(--nd-gold, #c9a24b); box-shadow: 0 0 0 2px rgba(201, 162, 75, .18); }

/* ===== Desktop-only: search pill breathes (grow â‡„ shrink) while the
   typewriter teaser is running; mobile stays untouched. ===== */
@media (min-width: 992px) {
  .nd-header .nd-search.nd-island-rotating {
    animation: ndSearchBreath 4.6s ease-in-out infinite;
    will-change: min-width;
  }
  .nd-header .nd-search.nd-island-rotating.nd-island-open,
  .nd-header .nd-search.nd-island-rotating:focus-within {
    animation-play-state: paused;
  }
}
@keyframes ndSearchBreath {
  0%, 10%  { min-width: 235px; }
  28%, 62% { min-width: 315px; }
  88%, 100%{ min-width: 235px; }
}

/* Sales-assistant ask screen: divider + continue-chat ghost button */
.nd-asst-divider {
  text-align: center; font-size: 11px; color: #9aa79f; margin: 12px 0 6px;
}
.nd-asst-actions .nd-asst-act.ghost {
  border: 1.5px solid rgba(14,107,84,0.35); background: #fff; color: #0e6b54;
}

/* Mobile: smaller profile avatar (was showing too big) + NO wishlist heart
   on the product page (client request). */
@media (max-width: 767.98px) {
  .nd-acc-avatar { width: 46px; height: 46px; font-size: 15px; }
  .nd-acc-user h5 { font-size: 15px; }
  .nd-acc-avatar-lg { width: 74px; height: 74px; font-size: 24px; }
  .nd-wish-inline { display: none !important; }
}

/* Mobile top-bar actions: always above anything else, generous tap targets
   (client: icons were not tappable until the page scrolled) */
@media (max-width: 767.98px) {
  .nd-header,
  .nd-header .nd-header-main,
  .nd-header .nd-actions { position: relative; z-index: 6000; }
  .nd-header .nd-actions .nd-action-btn {
    pointer-events: auto;
    min-width: 36px;
    min-height: 38px;
  }
  /* No cart icon in the mobile top bar (two header cart links exist — desktop
     & mobile variants — so hide by attribute, not only by id). */
  .nd-header a[title='Cart'],
  .nd-header #header-cart-link,
  .nd-header a[href='/checkout'] { display: none !important; }
}

/* Mobile account avatars — not oversized on small screens */
@media (max-width: 767.98px) {
  .nd-acc-user .nd-acc-avatar { width: 54px; height: 54px; font-size: 20px; }
  .nd-acc-avatar-lg { width: 84px; height: 84px; font-size: 30px; }
  .nd-acc-user h5 { font-size: 15px; margin-bottom: 1px; }
  .nd-acc-user small { font-size: 11px; }
}
