/* ==========================================================================
   StoreX Style Studio — frontend demo panel
   ========================================================================== */

.storex-style-configurator {
  --storex-sc-panel-width: 352px;
  --storex-sc-z: 99990;
  --storex-sc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --storex-sc-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --storex-sc-brand: var(--storex-primary-color, #003eac);
  --storex-sc-accent: var(--storex-accent-color, #ffac00);
  --storex-sc-surface: #ffffff;
  --storex-sc-surface-2: #f8fafc;
  --storex-sc-muted: #64748b;
  --storex-sc-border: #e8edf3;
  --storex-sc-text: #0f172a;
  --storex-sc-glass: rgba(15, 23, 42, 0.82);
  --storex-sc-glass-border: rgba(255, 255, 255, 0.14);
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--storex-sc-z);
  font-family: var(--storex-body-font, "Rethink Sans", system-ui, sans-serif);
}

.storex-style-configurator * {
  box-sizing: border-box;
}

/* ---- Floating trigger (ultra premium) ---- */
.storex-sc-toggle {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 58px;
  min-height: 58px;
  padding: 12px 10px;
  border: 1px solid var(--storex-sc-glass-border);
  border-left: none;
  border-radius: 0 18px 18px 0;
  background:
    linear-gradient(155deg, rgba(30, 41, 59, 0.94) 0%, rgba(15, 23, 42, 0.98) 55%, rgba(15, 23, 42, 1) 100%);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
  transition:
    transform 0.5s var(--storex-sc-ease),
    left 0.5s var(--storex-sc-ease),
    border-radius 0.4s ease,
    box-shadow 0.4s ease,
    border-color 0.35s ease;
  z-index: calc(var(--storex-sc-z) + 2);
  overflow: visible;
}

.storex-sc-toggle::after {
  content: "";
  position: absolute;
  inset: 1px 1px 1px 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, transparent 42%);
  pointer-events: none;
  z-index: 1;
}

.storex-sc-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 65%
  );
  background-size: 240% 100%;
  opacity: 0.35;
  animation: storexScShimmer 2.4s ease-in-out infinite;
  pointer-events: none;
}

/* Always-on premium ring (runs while panel is closed) */
.storex-sc-toggle__ring {
  position: absolute;
  inset: -9px;
  border-radius: 0 24px 24px 0;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.storex-sc-toggle__ring-track {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 3px;
  display: none;
  background: conic-gradient(
    from 0deg,
    var(--storex-sc-brand),
    #60a5fa,
    var(--storex-sc-accent),
    #fef08a,
    #ffffff,
    var(--storex-sc-accent),
    var(--storex-sc-brand)
  );
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--storex-sc-accent) 50%, transparent));
  animation: storexScRingSpin 2.2s linear infinite;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.storex-sc-toggle__ring-glow {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid var(--storex-sc-brand);
  opacity: 0.45;
  animation: storexScRingGlow 2s ease-in-out infinite;
  box-shadow:
    0 0 18px color-mix(in srgb, var(--storex-sc-brand) 50%, transparent),
    0 0 28px color-mix(in srgb, var(--storex-sc-accent) 35%, transparent);
}

.storex-sc-toggle__ring-glow::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 1px solid color-mix(in srgb, var(--storex-sc-accent) 55%, transparent);
  opacity: 0.5;
  animation: storexScRingExpand 2.4s ease-out infinite;
}

.storex-sc-toggle__ring-orbit {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: storexScRingSpin 3.2s linear infinite;
}

.storex-sc-toggle__ring-orbit::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 50%;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff 0%, var(--storex-sc-accent) 45%, var(--storex-sc-accent) 100%);
  box-shadow:
    0 0 12px var(--storex-sc-accent),
    0 0 24px color-mix(in srgb, var(--storex-sc-accent) 75%, transparent);
  animation: storexScOrbitDot 1.5s ease-in-out infinite;
}

.storex-sc-toggle__ring-orbit--reverse {
  animation: storexScRingSpin 2.8s linear infinite reverse;
}

.storex-sc-toggle__ring-orbit--reverse::before {
  top: auto;
  bottom: 6px;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  background: radial-gradient(circle at 30% 30%, #fff 0%, var(--storex-sc-brand) 50%, var(--storex-sc-brand) 100%);
  box-shadow:
    0 0 10px var(--storex-sc-brand),
    0 0 18px color-mix(in srgb, var(--storex-sc-brand) 70%, transparent);
  animation: storexScOrbitDot 1.8s ease-in-out infinite reverse;
}

.storex-sc-toggle__sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.storex-sc-toggle__sparkles i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px #fff;
  opacity: 0;
  animation: storexScSparkle 2.8s ease-in-out infinite;
}

.storex-sc-toggle__sparkles i:nth-child(1) {
  top: 8px;
  right: 10px;
  animation-delay: 0s;
}

.storex-sc-toggle__sparkles i:nth-child(2) {
  top: 50%;
  right: 6px;
  margin-top: -2px;
  animation-delay: 0.9s;
}

.storex-sc-toggle__sparkles i:nth-child(3) {
  bottom: 10px;
  right: 12px;
  animation-delay: 1.7s;
}

.storex-sc-toggle__icon,
.storex-sc-toggle__label {
  position: relative;
  z-index: 2;
}

.storex-sc-toggle__icon {
  display: block;
  width: 24px;
  height: 24px;
  background: linear-gradient(180deg, #fff 0%, #e2e8f0 100%);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
  transition: transform 0.5s var(--storex-sc-spring), filter 0.35s ease;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.storex-style-configurator:not(.is-open):not(.is-closing) .storex-sc-toggle__icon {
  animation: storexScGearSpin 10s linear infinite;
}

.storex-sc-toggle__label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.9;
  line-height: 1;
  animation: storexScLabelGlow 2.2s ease-in-out infinite;
}

.storex-sc-toggle:hover,
.storex-sc-toggle:focus-visible {
  transform: translateY(-50%) translateX(6px) scale(1.03);
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(155deg, color-mix(in srgb, var(--storex-sc-brand) 55%, #1e293b) 0%, #0f172a 100%);
  outline: none;
  box-shadow:
    0 22px 50px rgba(15, 23, 42, 0.42),
    0 0 32px color-mix(in srgb, var(--storex-sc-brand) 45%, transparent),
    0 0 48px color-mix(in srgb, var(--storex-sc-accent) 25%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.storex-sc-toggle:hover .storex-sc-toggle__ring-track,
.storex-sc-toggle:focus-visible .storex-sc-toggle__ring-track {
  animation-duration: 1.6s;
}

.storex-sc-toggle:hover .storex-sc-toggle__icon,
.storex-sc-toggle:focus-visible .storex-sc-toggle__icon {
  animation-duration: 3s;
}

.storex-style-configurator.is-open .storex-sc-toggle {
  left: var(--storex-sc-panel-width);
  border-radius: 0px 16px 16px 0px;
  transform: translateY(-50%);
}

.storex-style-configurator.is-open .storex-sc-toggle__icon {
  animation: none;
  transform: rotate(90deg);
}

.storex-style-configurator.is-open .storex-sc-toggle__ring,
.storex-style-configurator.is-closing .storex-sc-toggle__ring,
.storex-style-configurator.is-open .storex-sc-toggle__sparkles,
.storex-style-configurator.is-closing .storex-sc-toggle__sparkles {
  opacity: 0;
  visibility: hidden;
}

.storex-style-configurator:not(.is-open):not(.is-closing) .storex-sc-toggle {
  animation: storexScIdleFloat 3.5s ease-in-out infinite;
}

.storex-style-configurator:not(.is-open):not(.is-closing) .storex-sc-toggle:hover {
  animation: none;
  transform: translateY(-50%) translateX(6px) scale(1.03);
}

/* ---- Panel shell ---- */
.storex-sc-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--storex-sc-panel-width);
  max-width: 92vw;
  height: 100%;
  background:
    linear-gradient(180deg, #ffffff 0%, var(--storex-sc-surface-2) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    8px 0 48px rgba(15, 23, 42, 0.14),
    inset -1px 0 0 rgba(15, 23, 42, 0.04);
  transform: translate3d(-108%, 0, 0) scale(0.98);
  opacity: 0;
  filter: blur(6px);
  transition:
    transform 0.55s var(--storex-sc-ease),
    opacity 0.45s ease,
    filter 0.5s ease,
    box-shadow 0.45s ease;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  z-index: calc(var(--storex-sc-z) + 1);
  overflow: hidden;
  will-change: transform, opacity, filter;
}

.storex-style-configurator.is-open:not(.is-closing) .storex-sc-panel {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
  filter: blur(0);
  box-shadow: 12px 0 56px rgba(15, 23, 42, 0.18);
}

.storex-style-configurator.is-closing .storex-sc-panel {
  transform: translate3d(-104%, 0, 0) scale(0.98);
  opacity: 0;
  filter: blur(4px);
}

/* ---- Header ---- */
.storex-sc-panel__head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 20px 20px;
  background:
    linear-gradient(
      120deg,
      var(--storex-sc-brand) 0%,
      color-mix(in srgb, var(--storex-sc-brand) 75%, #0f172a) 45%,
      color-mix(in srgb, var(--storex-sc-accent) 35%, var(--storex-sc-brand)) 100%
    );
  background-size: 200% 200%;
  animation: storexScGradientShift 8s ease infinite;
  color: #ffffff;
  overflow: hidden;
}

/* Override theme heading/body colors inside header */
.storex-sc-panel__head .storex-sc-panel__title,
.storex-sc-panel__head .storex-sc-panel__subtitle,
.storex-sc-panel__head .storex-sc-panel__badge {
  color: #ffffff !important;
}

.storex-style-configurator.is-open:not(.is-closing) .storex-sc-panel__head-content {
  animation: storexScFadeUp 0.6s var(--storex-sc-ease) 0.12s both;
}

.storex-sc-panel__head::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  animation: storexScFloat 6s ease-in-out infinite;
}

.storex-sc-panel__head::after {
  content: "";
  position: absolute;
  bottom: -30px;
  left: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--storex-sc-accent);
  opacity: 0.2;
  filter: blur(2px);
  animation: storexScFloat 8s ease-in-out infinite reverse;
}

.storex-sc-panel__head-content {
  position: relative;
  z-index: 1;
}

.storex-sc-panel__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.storex-sc-panel__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: storexScBlink 1.8s ease-in-out infinite;
}

.storex-sc-panel__title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.storex-sc-panel__subtitle {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.95) !important;
  opacity: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.storex-sc-close {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s var(--storex-sc-spring);
}

.storex-sc-close span {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0 auto;
  background: #fff;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

.storex-sc-close:hover,
.storex-sc-close:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.06);
  outline: none;
}

/* ---- Body scroll ---- */
.storex-sc-panel__body {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px 20px 28px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

/* ---- Notice & reset ---- */
.storex-sc-demo-notice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  padding: 13px 15px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid transparent;
  background-clip: padding-box;
  font-size: 12px;
  line-height: 1.55;
  color: #1e40af;
  opacity: 0;
  transform: translateY(8px);
  overflow: hidden;
}

.storex-sc-demo-notice::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #93c5fd, #86efac, #93c5fd);
  background-size: 200% 200%;
  animation: storexScGradientShift 4s ease infinite;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.storex-sc-demo-notice__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

.storex-sc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s var(--storex-sc-spring), box-shadow 0.25s ease, filter 0.25s ease;
}

.storex-sc-btn__icon {
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.storex-sc-btn--reset-all {
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--storex-sc-brand) 0%, color-mix(in srgb, var(--storex-sc-brand) 80%, #000) 100%);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--storex-sc-brand) 35%, transparent);
  opacity: 0;
  transform: translateY(8px);
}

.storex-sc-btn--reset-all::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.storex-sc-btn--reset-all:hover::after {
  transform: translateX(120%);
}

.storex-sc-btn--reset-all:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--storex-sc-brand) 40%, transparent);
}

.storex-sc-btn--reset-all:active {
  transform: translateY(0) scale(0.98);
}

.storex-sc-btn--reset-all.is-resetting .storex-sc-btn__icon {
  animation: storexScSpin 0.5s ease;
}

/* ---- Sections ---- */
.storex-sc-section {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--storex-sc-border);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  opacity: 0;
  transform: translateY(14px);
}

.storex-sc-section:last-child {
  margin-bottom: 0;
}

.storex-sc-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--storex-sc-muted);
  position: relative;
  padding-bottom: 8px;
}

.storex-sc-section__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--storex-sc-brand), var(--storex-sc-accent));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--storex-sc-ease);
}

.storex-style-configurator.is-open:not(.is-closing) .storex-sc-section__title::after {
  transform: scaleX(1);
}

.storex-sc-section__icon {
  width: 16px;
  height: 16px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--storex-sc-brand) 12%, #fff);
  position: relative;
}

.storex-sc-section__icon::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--storex-sc-brand);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.storex-sc-section__icon--palette::after {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10c1.38 0 2.5-1.12 2.5-2.5 0-.61-.22-1.17-.59-1.61-.36-.43-.59-.98-.59-1.61 0-1.38 1.12-2.5 2.5-2.5H16c2.76 0 5-2.24 5-5 0-4.41-4.03-8-9-8z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10c1.38 0 2.5-1.12 2.5-2.5 0-.61-.22-1.17-.59-1.61-.36-.43-.59-.98-.59-1.61 0-1.38 1.12-2.5 2.5-2.5H16c2.76 0 5-2.24 5-5 0-4.41-4.03-8-9-8z'/%3E%3C/svg%3E");
}

.storex-sc-section__icon--dropper::after {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 21c0 1.1.9 2 2 2s2-.9 2-2-.9-2-2-2-2 .9-2 2zm10-12.5L12.5 4.5 4 13l1.5 1.5L12.5 7l7 7.5L21 13l-4-4.5z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 21c0 1.1.9 2 2 2s2-.9 2-2-.9-2-2-2-2 .9-2 2zm10-12.5L12.5 4.5 4 13l1.5 1.5L12.5 7l7 7.5L21 13l-4-4.5z'/%3E%3C/svg%3E");
}

.storex-sc-section__icon--layout::after {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M4 4h7v7H4V4zm9 0h7v7h-7V4zM4 13h7v7H4v-7zm9 0h7v7h-7v-7z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M4 4h7v7H4V4zm9 0h7v7h-7V4zM4 13h7v7H4v-7zm9 0h7v7h-7v-7z'/%3E%3C/svg%3E");
}

.storex-sc-section__icon--direction::after {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9.4 6.65 4.8 11.25l4.6 4.6 1.4-1.4-2.2-2.2H19v-2H8.6l2.2-2.2-1.4-1.4z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9.4 6.65 4.8 11.25l4.6 4.6 1.4-1.4-2.2-2.2H19v-2H8.6l2.2-2.2-1.4-1.4z'/%3E%3C/svg%3E");
}

/* Staggered reveal on open */
.storex-style-configurator.is-animating .storex-sc-demo-notice,
.storex-style-configurator.is-open .storex-sc-demo-notice {
  animation: storexScFadeUp 0.5s var(--storex-sc-ease) 0.08s forwards;
}

.storex-style-configurator.is-animating .storex-sc-btn--reset-all,
.storex-style-configurator.is-open .storex-sc-btn--reset-all {
  animation: storexScFadeUp 0.5s var(--storex-sc-ease) 0.14s forwards;
}

.storex-style-configurator.is-animating .storex-sc-section,
.storex-style-configurator.is-open .storex-sc-section {
  animation: storexScFadeUp 0.55s var(--storex-sc-ease) forwards;
}

.storex-sc-section[data-sc-section="presets"] { animation-delay: 0.2s !important; }
.storex-sc-section[data-sc-section="colors"] { animation-delay: 0.28s !important; }
.storex-sc-section[data-sc-section="layout"] { animation-delay: 0.36s !important; }
.storex-sc-section[data-sc-section="direction"] { animation-delay: 0.44s !important; }

/* ---- Swatches ---- */
.storex-sc-swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.storex-sc-swatch {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(140deg, var(--swatch-primary) 52%, var(--swatch-accent) 52%);
  box-shadow:
    0 6px 16px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  opacity: 0;
  transform: scale(0.85);
  transition:
    transform 0.3s var(--storex-sc-spring),
    box-shadow 0.3s ease,
    border-color 0.25s ease;
}

.storex-style-configurator.is-open .storex-sc-swatch {
  animation: storexScPopIn 0.45s var(--storex-sc-spring) var(--sc-delay, 0s) forwards;
}

.storex-sc-swatch::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.storex-sc-swatch:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
  z-index: 1;
}

.storex-sc-swatch:hover::before {
  opacity: 1;
}

.storex-sc-swatch.is-active {
  border-color: #fff;
  box-shadow:
    0 0 0 2px var(--storex-sc-text),
    0 8px 20px color-mix(in srgb, var(--swatch-primary) 45%, transparent);
  transform: scale(1.05);
}

.storex-sc-swatch__check {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.25s ease, transform 0.35s var(--storex-sc-spring);
}

.storex-sc-swatch__check::after {
  content: "";
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.storex-sc-swatch.is-active .storex-sc-swatch__check {
  opacity: 1;
  transform: scale(1);
}

.storex-sc-swatch.is-picked {
  animation: storexScPick 0.45s var(--storex-sc-spring);
}

.storex-sc-swatch .storex-sc-ripple {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  transform: scale(0);
  animation: storexScRipple 0.65s ease-out forwards;
  pointer-events: none;
}

.storex-sc-field__row.is-color-updated {
  animation: storexScFieldGlow 0.7s ease;
}

/* ---- Color fields ---- */
.storex-sc-field {
  display: block;
  margin-bottom: 14px;
}

.storex-sc-field > span:first-child {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--storex-sc-text);
}

.storex-sc-field__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--storex-sc-border);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.storex-sc-field__row:focus-within {
  border-color: var(--storex-sc-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--storex-sc-brand) 15%, transparent);
}

.storex-sc-color-picker {
  width: 44px;
  height: 40px;
  padding: 3px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: transparent;
}

.storex-sc-hex {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
  color: var(--storex-sc-text);
}

.storex-sc-hex:focus {
  outline: none;
}

/* ---- Toggle chips ---- */
.storex-sc-toggle-group {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 4px;
  border-radius: 14px;
  background: #f1f5f9;
}

.storex-sc-chip-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  transition:
    left 0.45s var(--storex-sc-spring),
    width 0.45s var(--storex-sc-spring),
    transform 0.35s var(--storex-sc-spring);
  pointer-events: none;
  z-index: 0;
}

.storex-sc-chip-slider.is-bump {
  transform: scale(0.96);
}

.storex-sc-chip {
  position: relative;
  padding: 11px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--storex-sc-muted);
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s var(--storex-sc-spring);
  z-index: 1;
}

.storex-sc-chip:hover {
  color: var(--storex-sc-text);
}

.storex-sc-chip.is-active {
  color: var(--storex-sc-brand);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.storex-sc-chip:active {
  transform: scale(0.97);
}

/* ---- Backdrop ---- */
.storex-sc-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  pointer-events: none;
  z-index: var(--storex-sc-z);
}

.storex-style-configurator.is-open:not(.is-closing) .storex-sc-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: storexScBackdropIn 0.5s var(--storex-sc-ease) forwards;
}

.storex-style-configurator.is-closing .storex-sc-backdrop {
  animation: storexScBackdropOut 0.35s ease forwards;
}

.storex-style-configurator.is-open .storex-sc-backdrop[hidden] {
  display: block;
}

body.storex-sc-open {
  overflow: hidden;
}

html.storex-sc-theme-flash::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 99980;
  pointer-events: none;
  background: radial-gradient(
    circle at 12% 50%,
    color-mix(in srgb, var(--storex-sc-brand) 18%, transparent),
    transparent 55%
  );
  opacity: 0;
  animation: storexScThemeFlash 0.75s ease-out;
}

/* ---- Layout preview ---- */
.boxed_wrapper.storex-layout-boxed {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 0 48px rgba(15, 23, 42, 0.08);
  transition: max-width 0.45s var(--storex-sc-ease), box-shadow 0.45s ease;
}

.demo-rtl,
.demo-ltr {
  display: none !important;
}

/* ---- Keyframes ---- */
@keyframes storexScRingSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes storexScRingGlow {
  0%, 100% {
    opacity: 0.35;
    filter: brightness(1);
  }
  50% {
    opacity: 0.75;
    filter: brightness(1.15);
  }
}

@keyframes storexScRingExpand {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}

@keyframes storexScOrbitDot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.25);
    opacity: 0.75;
  }
}

@keyframes storexScGearSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes storexScLabelGlow {
  0%, 100% {
    opacity: 0.75;
    text-shadow: none;
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.45);
  }
}

@keyframes storexScSparkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0.4) translateY(0);
  }
  45% {
    opacity: 1;
    transform: scale(1.2) translateY(-3px);
  }
  70% {
    opacity: 0;
    transform: scale(0.6) translateY(-6px);
  }
}

@keyframes storexScPulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  70% {
    transform: scale(1.12);
    opacity: 0;
  }
  100% {
    transform: scale(1.12);
    opacity: 0;
  }
}

@keyframes storexScBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes storexScFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(8px, -8px); }
}

@keyframes storexScFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes storexScIdleFloat {
  0%, 100% {
    transform: translateY(-50%);
  }
  50% {
    transform: translateY(calc(-50% - 5px));
  }
}

@keyframes storexScPopIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes storexScPick {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1.05); }
}

@keyframes storexScSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

@keyframes storexScShimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -80% 0; }
}

@keyframes storexScGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes storexScRipple {
  to {
    transform: scale(5);
    opacity: 0;
  }
}

@keyframes storexScBackdropIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
}

@keyframes storexScBackdropOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes storexScThemeFlash {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes storexScFieldGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--storex-sc-brand) 0%, transparent);
  }
  40% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--storex-sc-brand) 22%, transparent);
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .storex-sc-toggle,
  .storex-sc-toggle__ring,
  .storex-sc-toggle__ring-track,
  .storex-sc-toggle__ring-glow,
  .storex-sc-toggle__ring-glow::after,
  .storex-sc-toggle__ring-orbit,
  .storex-sc-toggle__ring-orbit::before,
  .storex-sc-toggle__ring-orbit--reverse,
  .storex-sc-toggle__ring-orbit--reverse::before,
  .storex-sc-toggle__sparkles i,
  .storex-sc-toggle__icon,
  .storex-sc-toggle__label,
  .storex-sc-toggle::before,
  .storex-sc-demo-notice::before,
  .storex-sc-panel__head,
  .storex-sc-panel__head::before,
  .storex-sc-panel__head::after,
  .storex-sc-panel__badge::before,
  html.storex-sc-theme-flash::after {
    animation: none !important;
  }

  .storex-sc-panel,
  .storex-sc-toggle,
  .storex-sc-swatch,
  .storex-sc-chip,
  .storex-sc-btn {
    transition-duration: 0.01ms !important;
  }

  .storex-style-configurator.is-open .storex-sc-section,
  .storex-style-configurator.is-open .storex-sc-demo-notice,
  .storex-style-configurator.is-open .storex-sc-btn--reset-all,
  .storex-style-configurator.is-open .storex-sc-swatch {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---- Mobile ---- */
@media (max-width: 575px) {
  .storex-style-configurator {
    --storex-sc-panel-width: 100%;
  }

  .storex-style-configurator.is-open .storex-sc-toggle {
    left: auto;
    right: 14px;
    top: 14px;
    transform: none;
    border-radius: 14px;
    flex-direction: row;
    width: auto;
    min-height: 48px;
    padding: 10px 14px;
  }

  .storex-sc-toggle__label {
    font-size: 11px;
  }

  .storex-sc-swatches {
    grid-template-columns: repeat(4, 1fr);
  }
}
