/* ===== Carbon Online - 20 Store Themes ===== */
/* Each theme overrides CSS custom properties via body[data-theme="..."] */
/* These match Carbon Online's :root variable names */

/* All themes use brand colors */
body[data-theme="indigo"],
body[data-theme="emerald"],
body[data-theme="ocean"],
body[data-theme="royal"],
body[data-theme="sunset"],
body[data-theme="ruby"],
body[data-theme="rose"],
body[data-theme="midnight"],
body[data-theme="forest"],
body[data-theme="gold"],
body[data-theme="teal"],
body[data-theme="coral"],
body[data-theme="slate"],
body[data-theme="amber"],
body[data-theme="cyan"],
body[data-theme="magenta"],
body[data-theme="olive"],
body[data-theme="crimson"],
body[data-theme="arctic"],
body[data-theme="lavender"] {
  --primary: #3D1054;
  --primary-hover: #2D0C3F;
}

/* ===== Theme Picker UI ===== */
.theme-picker-toggle {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  z-index: 9999;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-picker-toggle:hover {
  transform: scale(1.1) rotate(30deg);
  box-shadow: 0 6px 25px rgba(0,0,0,0.35);
}

.theme-picker-panel {
  position: fixed;
  bottom: 90px;
  right: 25px;
  width: 320px;
  max-height: 70vh;
  background: var(--card-bg, #fff);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  border: 1px solid #F4F0F8;
  z-index: 10000;
  overflow-y: auto;
  padding: 20px;
  display: none;
  animation: themePanelIn 0.3s ease;
}
.theme-picker-panel.active { display: block; }

@keyframes themePanelIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.theme-picker-panel h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--secondary, #3D1054);
  text-align: center;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.theme-option {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.theme-option:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.theme-option.active {
  border-color: var(--secondary, #3D1054);
  box-shadow: 0 0 0 2px var(--primary);
}
.theme-option.active::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 16px;
  font-weight: 900;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.theme-option-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  padding: 3px 2px;
  backdrop-filter: blur(4px);
}

@media (max-width: 768px) {
  .theme-picker-panel {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: 80px;
  }
  .theme-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
