/**
 * ShopGlowsy Signature — header icons, nav, filters, search, motion, family identity.
 */

.sg-ai-commerce {
  --sg-ease-premium: cubic-bezier(.22, 1, .36, 1);
  --sg-ease-out: cubic-bezier(.16, 1, .3, 1);
  --sg-motion-fast: .32s;
  --sg-motion-med: .48s;
}

.sg-sig-icon {
  width: 1.125rem;
  height: 1.125rem;
  display: block;
  flex-shrink: 0;
  transition: transform var(--sg-motion-fast) var(--sg-ease-premium), opacity var(--sg-motion-fast) ease;
}

.sg-shop-header__icon-swap {
  position: relative;
  width: 1.125rem;
  height: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sg-shop-header__icon-swap .sg-sig-icon--close {
  position: absolute;
  opacity: 0;
  transform: rotate(-90deg) scale(0.7);
}
.sg-shop-header__icon-btn--menu.is-morphed .sg-sig-icon--menu {
  opacity: 0;
  transform: rotate(90deg) scale(0.7);
}
.sg-shop-header__icon-btn--menu.is-morphed .sg-sig-icon--close {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.sg-shop-header__actions { gap: 0.35rem; }

.sg-shop-header__icon-btn {
  width: 2.625rem;
  height: 2.625rem;
  border: 1px solid color-mix(in srgb, var(--sg-border) 75%, transparent);
  background: color-mix(in srgb, var(--sg-surface) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  box-shadow:
    0 2px 10px color-mix(in srgb, var(--sg-ink) 7%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 35%, transparent);
}
.sg-shop-header__icon-btn:hover {
  transform: translateY(-1px) scale(1.04);
  border-color: color-mix(in srgb, var(--sg-accent) 35%, var(--sg-border));
  box-shadow:
    0 6px 20px color-mix(in srgb, var(--sg-accent) 18%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 45%, transparent);
}
.sg-shop-header__icon-btn:active {
  transform: translateY(0) scale(0.94);
  transition-duration: .12s;
}

.sg-shop-header__badge {
  top: 0;
  right: 0;
  min-width: 1.05rem;
  height: 1.05rem;
  border: 1.5px solid var(--sg-page-bg);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--sg-accent) 35%, transparent);
}

.sg-shop-header__search-wrap { position: relative; width: 100%; }

.sg-shop-header__search-icon {
  width: 1.125rem;
  height: 1.125rem;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sg-muted);
  transition: color var(--sg-motion-fast) ease, transform var(--sg-motion-fast) var(--sg-ease-premium);
}
.sg-shop-header__search.is-focused .sg-shop-header__search-icon {
  color: var(--sg-accent);
  transform: scale(1.06);
}
.sg-shop-header__search-icon::after { display: none; }

.sg-shop-header__search-voice {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--sg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: not-allowed;
  opacity: 0.45;
  flex-shrink: 0;
  margin-left: auto;
}

.sg-shop-header__search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 120;
  background: color-mix(in srgb, var(--sg-surface) 96%, var(--sg-page-bg));
  border: 1px solid color-mix(in srgb, var(--sg-border) 90%, transparent);
  border-radius: 16px;
  padding: 0.65rem 0.5rem;
  box-shadow: 0 16px 48px color-mix(in srgb, var(--sg-ink) 14%, transparent);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  filter: blur(4px);
  transition: opacity var(--sg-motion-med) var(--sg-ease-premium), transform var(--sg-motion-med) var(--sg-ease-premium), filter var(--sg-motion-med) ease;
  pointer-events: none;
}
.sg-shop-header__search-suggest.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  pointer-events: auto;
}

.sg-shop-header__suggest-label {
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sg-muted);
  margin: 0 0 0.35rem 0.65rem;
}
.sg-shop-header__suggest-list { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.sg-shop-header__suggest-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  font-size: 0.875rem;
  color: var(--sg-ink);
  cursor: pointer;
  transition: background var(--sg-motion-fast) ease, transform var(--sg-motion-fast) ease;
}
.sg-shop-header__suggest-item:hover {
  background: color-mix(in srgb, var(--sg-accent) 10%, transparent);
  transform: translateX(2px);
}
.sg-shop-header__suggest-list--trending .sg-shop-header__suggest-item::before {
  content: "↑";
  margin-right: 0.35rem;
  color: var(--sg-accent);
  font-size: 0.75rem;
}

.sg-ai-nav__drawer { width: min(92vw, 24rem); overflow: hidden; }

.sg-ai-nav__hero { position: relative; min-height: 9.5rem; overflow: hidden; }
.sg-ai-nav__hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transform: scale(1.02);
  transition: transform 1.2s var(--sg-ease-premium);
}
.sg-ai-nav.is-open .sg-ai-nav__hero-img { transform: scale(1); }
.sg-ai-nav__hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--sg-page-bg) 95%, transparent), color-mix(in srgb, var(--sg-ink) 25%, transparent));
}
.sg-ai-nav__hero-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1rem 0.85rem;
}
.sg-ai-nav__logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sg-font-display);
  font-weight: 600;
  font-size: 1rem;
  background: color-mix(in srgb, var(--sg-accent) 22%, var(--sg-page-bg));
  border: 1px solid color-mix(in srgb, var(--sg-accent) 40%, transparent);
  color: var(--sg-ink);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--sg-accent) 20%, transparent);
}
.sg-ai-nav__brand-name {
  margin: 0;
  font-family: var(--sg-font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--sg-ink);
}
.sg-ai-nav__brand-tag {
  margin: 0.1rem 0 0;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sg-muted);
}
.sg-ai-nav__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--sg-page-bg) 70%, transparent);
  backdrop-filter: blur(10px);
  color: var(--sg-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sg-ai-nav__welcome { padding: 0.85rem 1rem 0.25rem; animation: sg-fade-up var(--sg-motion-med) var(--sg-ease-premium) both; animation-delay: .08s; }
.sg-ai-nav__welcome-text {
  margin: 0;
  font-family: var(--sg-font-display);
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--sg-muted);
}

.sg-ai-nav__featured {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.65rem 1rem 0.85rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--sg-ink);
  background: color-mix(in srgb, var(--sg-accent) 12%, var(--sg-surface));
  border: 1px solid color-mix(in srgb, var(--sg-accent) 22%, var(--sg-border));
  box-shadow: 0 4px 20px color-mix(in srgb, var(--sg-accent) 12%, transparent);
  transition: transform var(--sg-motion-fast) var(--sg-ease-premium), box-shadow var(--sg-motion-fast) ease;
  animation: sg-fade-up var(--sg-motion-med) var(--sg-ease-premium) both;
  animation-delay: .12s;
}
.sg-ai-nav__featured-kicker {
  display: block;
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sg-accent);
  margin-bottom: 0.2rem;
}
.sg-ai-nav__featured-title {
  display: block;
  font-family: var(--sg-font-display);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
}

.sg-ai-nav__body { padding: 0 0.75rem 1rem; overflow-y: auto; }
.sg-ai-nav__divider {
  height: 1px;
  margin: 0 0.5rem 0.5rem;
  background: linear-gradient(90deg, transparent, var(--sg-border), transparent);
}
.sg-ai-nav.is-open .sg-ai-nav__link {
  animation: sg-nav-link-in var(--sg-motion-med) var(--sg-ease-premium) both;
  animation-delay: calc(.06s + var(--sg-nav-i, 0) * .03s);
}
@keyframes sg-nav-link-in {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes sg-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.sg-ai-shop__filter-panel-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sg-accent);
}
.sg-ai-shop__filter-panel-title {
  margin: 0;
  font-family: var(--sg-font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sg-ink);
}

.sg-ai-shop__filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 1rem 0.75rem;
  border-bottom: 1px solid var(--sg-border);
}
.sg-ai-shop__filter-summary-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; flex: 1; }
.sg-ai-shop__filter-summary-chip {
  font-size: 0.6875rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sg-accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--sg-accent) 25%, transparent);
}
.sg-ai-shop__filter-clear {
  border: 0;
  background: transparent;
  color: var(--sg-muted);
  font-size: 0.75rem;
  text-decoration: underline;
  cursor: pointer;
}

.sg-ai-shop__filter-chip,
.sg-ai-shop__filter-option {
  border: 1px solid var(--sg-border);
  background: color-mix(in srgb, var(--sg-surface) 80%, transparent);
  border-radius: 999px;
  padding: 0.48rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--sg-motion-fast) ease, background var(--sg-motion-fast) ease, transform var(--sg-motion-fast) var(--sg-ease-premium);
}
.sg-ai-shop__filter-chip.is-active,
.sg-ai-shop__filter-option.is-active {
  border-color: color-mix(in srgb, var(--sg-accent) 55%, var(--sg-border));
  background: color-mix(in srgb, var(--sg-accent) 14%, var(--sg-surface));
  box-shadow: 0 2px 12px color-mix(in srgb, var(--sg-accent) 15%, transparent);
}

.sg-ai-shop__filter-slider-track {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sg-border) 80%, transparent);
  margin: 1.25rem 0.5rem 0.75rem;
}
.sg-ai-shop__filter-slider-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sg-accent), color-mix(in srgb, var(--sg-accent) 70%, var(--sg-ink)));
}
.sg-ai-shop__filter-slider-thumb {
  position: absolute;
  top: 50%;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: -0.625rem;
  margin-left: -0.625rem;
  border-radius: 50%;
  border: 2px solid var(--sg-page-bg);
  background: var(--sg-accent);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--sg-accent) 35%, transparent);
}

.sg-ai-shop__filter-swatch { position: relative; width: 2rem; height: 2rem; border-radius: 50%; background: var(--sg-swatch); border: 2px solid transparent; cursor: pointer; }
.sg-ai-shop__filter-swatch-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color var(--sg-motion-fast) ease;
}
.sg-ai-shop__filter-swatch.is-active .sg-ai-shop__filter-swatch-ring { border-color: var(--sg-accent); }

.sg-ai-shop__filter-toggle-track {
  width: 2.5rem;
  height: 1.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sg-border) 70%, transparent);
  position: relative;
  transition: background var(--sg-motion-fast) ease;
}
.sg-ai-shop__filter-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px color-mix(in srgb, var(--sg-ink) 15%, transparent);
  transition: transform var(--sg-motion-fast) var(--sg-ease-premium);
}
.sg-ai-shop__filter-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.sg-ai-shop__filter-toggle input:checked + .sg-ai-shop__filter-toggle-track { background: var(--sg-accent); }
.sg-ai-shop__filter-toggle input:checked + .sg-ai-shop__filter-toggle-track .sg-ai-shop__filter-toggle-thumb { transform: translateX(1.1rem); }

.sg-ai-shop__filter-apply {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  background: var(--sg-accent);
  color: var(--sg-accent-contrast, #fff);
  font-weight: 600;
  box-shadow: 0 8px 28px color-mix(in srgb, var(--sg-accent) 30%, transparent);
}

/* Family identity — luxury v2 expression: sg-ai-commerce-family-luxury.css */
.sg-ai-commerce--editorial .sg-shop-header__float { border-radius: 0; border-width: 0 0 1px 0; }
.sg-ai-commerce--editorial .sg-shop-header__icon-btn { border-radius: 0; }
.sg-ai-commerce--editorial .sg-shop-header__search { border-radius: 0; }
.sg-ai-commerce--editorial .sg-ai-nav__drawer { border-radius: 0; }
.sg-ai-commerce--editorial .sg-ai-nav__link { text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.12em; border-radius: 0; }
.sg-ai-commerce--editorial .sg-ai-shop__filter-chip { border-radius: 0; }

.sg-ai-commerce--minimal .sg-shop-header__float { background: color-mix(in srgb, var(--sg-page-bg) 94%, transparent); box-shadow: none; }
.sg-ai-commerce--minimal .sg-shop-header__icon-btn { background: transparent; border-color: transparent; box-shadow: none; }
.sg-ai-commerce--minimal .sg-ai-nav__hero { min-height: 7rem; }

.sg-ai-commerce--glass .sg-shop-header__float { background: color-mix(in srgb, var(--sg-surface) 42%, transparent); box-shadow: 0 12px 48px color-mix(in srgb, var(--sg-accent) 14%, transparent); }
.sg-ai-commerce--glass .sg-shop-header__icon-btn { backdrop-filter: blur(20px); }
.sg-ai-commerce--glass .sg-ai-nav__drawer { background: color-mix(in srgb, var(--sg-surface) 55%, transparent); backdrop-filter: blur(28px); }

.sg-ai-commerce--organic .sg-shop-header__float { border-radius: 999px; }
.sg-ai-commerce--organic .sg-ai-nav__drawer { border-radius: 0 28px 28px 0; }
.sg-ai-commerce--organic .sg-ai-nav__link { border-radius: 999px; }
.sg-ai-commerce--organic .sg-ai-nav__welcome-text { font-style: italic; }
.sg-ai-commerce--organic .sg-ai-shop__filter-panel { border-radius: 28px 28px 0 0; }
