/* ==========================================================================
   DULUX COLOUR STUDIO - "FIND A COLOUR" SYSTEM
   Modern, Ultra-Luxury, Responsive Web System
   Inspired by Dulux UK Colour Details Studio
   ========================================================================== */

:root {
  --primary-brand: #0284c7;
  --primary-brand-dark: #0369a1;
  --primary-brand-light: #e0f2fe;
  --gold-accent: #d4af37;
  --gold-dark: #b45309;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 14px 34px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 22px 50px rgba(15, 23, 42, 0.16);
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-en: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-kh: 'Kantumruy Pro', 'Preahvihear', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-kh), var(--font-en);
  background-color: #f8fafc;
  color: var(--slate-800);
  line-height: 1.6;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button, input, select, textarea {
  font-family: inherit;
  letter-spacing: normal;
}

/* Dulux Signature Rainbow Bar */
.dulux-rainbow-strip {
  height: 6px;
  width: 100%;
  background: linear-gradient(90deg, 
    #e11d48 0%, 
    #ea580c 15%, 
    #eab308 30%, 
    #16a34a 45%, 
    #0284c7 60%, 
    #4f46e5 75%, 
    #9333ea 90%, 
    #ec4899 100%);
}

/* Studio Header */
.studio-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--slate-200);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.3rem;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.brand-titles h1 {
  font-family: var(--font-en);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: 0.5px;
  line-height: 1.2;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: #0284c7;
  color: #fff;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.brand-titles span {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0284c7;
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.btn-back-website {
  background: var(--slate-100);
  color: var(--slate-700);
  border-color: var(--slate-200);
}
.btn-back-website:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

.btn-fav-drawer {
  background: #fdf2f8;
  color: #db2777;
  border-color: #fbcfe8;
  position: relative;
}
.btn-fav-drawer:hover {
  background: #fce7f3;
}
.fav-count-pill {
  background: #e11d48;
  color: #fff;
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-weight: 800;
}

.btn-pos-portal {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}
.btn-pos-portal:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

/* Hero Find a Colour Section */
.hero-colour-section {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  padding: 40px 24px 30px;
  border-bottom: 1px solid var(--slate-200);
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-brand-light);
  color: var(--primary-brand-dark);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 14px;
  border: 1px solid #bae6fd;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--slate-600);
  max-width: 760px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* Search and Quick Filters Bar */
.search-filter-wrapper {
  max-width: 820px;
  margin: 0 auto 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-box-card {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-full);
  padding: 6px 10px 6px 20px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-fast);
}

.search-box-card:focus-within {
  border-color: var(--primary-brand);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.search-icon {
  color: var(--slate-400);
  font-size: 1.1rem;
  margin-right: 12px;
}

.search-input {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 1rem;
  color: var(--slate-800);
  width: 100%;
  background: transparent;
}

.search-clear-btn {
  background: var(--slate-100);
  border: none;
  color: var(--slate-500);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  margin-right: 8px;
}
.search-clear-btn:hover {
  background: var(--slate-200);
  color: var(--slate-800);
}

.btn-visualizer-shortcut {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}
.btn-visualizer-shortcut:hover {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  transform: translateY(-1px);
}

/* Secondary Tone & Sheen Filter Pills */
.filter-pills-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-500);
  margin-right: 4px;
}

.filter-pill {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-pill:hover {
  border-color: var(--primary-brand);
  color: var(--primary-brand);
}

.filter-pill.active {
  background: var(--slate-900);
  color: #ffffff;
  border-color: var(--slate-900);
}

/* ==========================================================================
   PICK YOUR COLOUR PALETTE (Interactive Family Swatches)
   ========================================================================== */
.palette-picker-section {
  max-width: 1360px;
  margin: 0 auto;
  padding: 30px 24px 10px;
}

.section-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-headline-left h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-headline-left p {
  font-size: 0.9rem;
  color: var(--slate-500);
  margin-top: 2px;
}

.palette-status-badge {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--slate-700);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

.palette-status-badge .active-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
}

/* Palette Family Scroll Track */
.palette-family-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  padding-bottom: 8px;
}

@media (max-width: 992px) {
  .palette-family-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 14px;
  }
}

.palette-family-card {
  background: #ffffff;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 10px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  position: relative;
  min-width: 105px;
  scroll-snap-align: start;
  user-select: none;
}

.palette-family-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-brand);
  box-shadow: var(--shadow-md);
}

.palette-family-card.active {
  border-color: var(--primary-brand);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.22);
  transform: translateY(-4px);
}

.palette-family-card.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  width: 24px;
  height: 4px;
  background: var(--primary-brand);
  border-radius: var(--radius-full);
}

.family-swatch-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-bottom: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  border: 2px solid #ffffff;
  transition: var(--transition-fast);
  position: relative;
}

.palette-family-card:hover .family-swatch-circle {
  transform: scale(1.08);
}

.family-name-kh {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.25;
  margin-bottom: 2px;
}

.family-name-en {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--slate-500);
  line-height: 1.2;
}

.family-shade-count {
  margin-top: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--slate-100);
  color: var(--slate-600);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.palette-family-card.active .family-shade-count {
  background: var(--primary-brand-light);
  color: var(--primary-brand-dark);
}

/* ==========================================================================
   COLOUR SHADES GRID
   ========================================================================== */
.shades-main-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px;
  flex: 1;
}

.shades-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--slate-200);
  flex-wrap: wrap;
  gap: 12px;
}

.shades-info-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.shades-info-left h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--slate-900);
}

.shades-count-label {
  font-size: 0.88rem;
  color: var(--slate-500);
  font-weight: 600;
}

.shades-sort-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-select {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--slate-200);
  background: #ffffff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-700);
  outline: none;
  cursor: pointer;
}

.sort-select:focus {
  border-color: var(--primary-brand);
}

/* The Grid */
.colour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

@media (min-width: 1400px) {
  .colour-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Individual Colour Swatch Card */
.colour-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

.colour-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

/* Swatch Preview Block */
.colour-swatch-block {
  height: 170px;
  width: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  transition: var(--transition-fast);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Badges on Swatch */
.card-badges-top {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.badge-coty {
  background: linear-gradient(135deg, #d4af37, #b45309);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
}

.badge-popular {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-card-fav {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-600);
  font-size: 0.95rem;
  transition: var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.btn-card-fav:hover {
  background: #ffffff;
  color: #e11d48;
  transform: scale(1.1);
}

.btn-card-fav.active {
  color: #e11d48;
  background: #ffffff;
}

/* Hover Quick Action Buttons on Swatch */
.swatch-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-fast);
  z-index: 3;
}

.colour-card:hover .swatch-hover-overlay {
  opacity: 1;
  pointer-events: auto;
}

.btn-hover-action {
  background: #ffffff;
  color: var(--slate-900);
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: var(--transition-fast);
}

.btn-hover-action:hover {
  background: var(--primary-brand);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Card Body Details */
.colour-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.colour-name-kh {
  font-size: 1rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.3;
}

.colour-name-en {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-500);
}

/* Code and LRV strip */
.colour-codes-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--slate-50);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
}

.colour-dulux-code {
  font-family: monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-700);
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-copy-code {
  background: none;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
  padding: 2px;
  font-size: 0.75rem;
}
.btn-copy-code:hover {
  color: var(--primary-brand);
}

.colour-hex-pill {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--slate-500);
  font-weight: 600;
}

/* LRV Bar */
.lrv-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lrv-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--slate-500);
  font-weight: 600;
}

.lrv-progress-track {
  height: 5px;
  background: var(--slate-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.lrv-progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #94a3b8, #0284c7);
}

/* Coordinating dots preview */
.coordinating-preview-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.coordinating-label {
  font-size: 0.72rem;
  color: var(--slate-400);
  font-weight: 600;
}

.coordinating-chips {
  display: flex;
  align-items: center;
  gap: 5px;
}

.coord-chip-mini {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Empty search state */
.empty-state-box {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--slate-200);
}

.empty-state-box i {
  font-size: 3rem;
  color: var(--slate-300);
  margin-bottom: 16px;
}

.empty-state-box h3 {
  font-size: 1.25rem;
  color: var(--slate-800);
  margin-bottom: 6px;
}

.empty-state-box p {
  color: var(--slate-500);
  font-size: 0.9rem;
}

/* ==========================================================================
   COLOUR DETAILS MODAL & ROOM VISUALIZER
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.studio-modal-box {
  background: #ffffff;
  width: 100%;
  max-width: 1100px;
  max-height: 92vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: modalSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from {
    transform: translateY(30px) scale(0.97);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-md);
}
.modal-close-btn:hover {
  background: var(--slate-900);
  color: #ffffff;
  transform: rotate(90deg);
}

.modal-grid-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 580px;
}

@media (max-width: 868px) {
  .modal-grid-layout {
    grid-template-columns: 1fr;
  }
}

/* Visualizer Left Column */
.visualizer-column {
  background: #f1f5f9;
  border-right: 1px solid var(--slate-200);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.visualizer-screen {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-canvas-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.room-svg-art {
  width: 100%;
  height: 100%;
  display: block;
}

/* Lighting simulation filter classes */
.lighting-daylight {
  filter: brightness(1) contrast(1);
}
.lighting-warm {
  filter: brightness(0.96) sepia(0.2) saturate(1.15);
}
.lighting-cool {
  filter: brightness(1.04) hue-rotate(-8deg) contrast(1.05);
}

/* Room Control Toolbar */
.visualizer-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.control-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-600);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-toggle-group {
  display: flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: var(--radius-full);
  gap: 2px;
}

.btn-toggle-option {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--slate-600);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-toggle-option.active {
  background: #ffffff;
  color: var(--slate-900);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Paint Details Right Column */
.details-column {
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.details-header {
  border-bottom: 1px solid var(--slate-200);
  padding-bottom: 16px;
}

.details-swatch-chip {
  width: 100%;
  height: 70px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 14px;
}

.chip-hex-tag {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  color: #0f172a;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-family: monospace;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.modal-color-name-kh {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.25;
}

.modal-color-name-en {
  font-size: 0.95rem;
  color: var(--slate-500);
  font-weight: 700;
  margin-top: 2px;
}

.modal-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.metric-card {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
}

.metric-label {
  font-size: 0.68rem;
  color: var(--slate-500);
  text-transform: uppercase;
  font-weight: 700;
}

.metric-value {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--slate-800);
  font-family: monospace;
  margin-top: 2px;
}

.modal-desc-box {
  font-size: 0.88rem;
  color: var(--slate-600);
  line-height: 1.6;
}

/* Coordinating Colours Section in Modal */
.modal-coordinating-box {
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 14px;
}

.coordinating-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.coord-item-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.coord-item-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-brand);
  box-shadow: var(--shadow-sm);
}

.coord-circle-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  margin-bottom: 6px;
}

.coord-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slate-800);
  line-height: 1.2;
}

.coord-role {
  font-size: 0.65rem;
  color: var(--slate-400);
}

/* Paint Quantity Calculator Inside Modal */
.calculator-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 16px;
}

.calculator-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.calculator-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.calc-input-group label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #166534;
  display: block;
  margin-bottom: 4px;
}

.calc-input-group input, .calc-input-group select {
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #86efac;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  background: #ffffff;
}

.calculator-results {
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  border: 1px solid #bbf7d0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calc-res-liters {
  font-size: 1.15rem;
  font-weight: 800;
  color: #15803d;
}

.calc-res-cans {
  font-size: 0.8rem;
  color: #166534;
  font-weight: 600;
}

/* Modal Bottom Action Buttons */
.modal-actions-bar {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn-modal-order {
  flex: 1;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
  text-decoration: none;
}
.btn-modal-order:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.4);
}

.btn-modal-share {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-modal-share:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

/* ==========================================================================
   FAVOURITES DRAWER
   ========================================================================== */
.fav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1100;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fav-drawer-overlay.open {
  display: block;
  opacity: 1;
}

.fav-drawer-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: #ffffff;
  box-shadow: var(--shadow-xl);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.fav-drawer-panel.open {
  right: 0;
}

.fav-drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fav-drawer-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.fav-drawer-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--slate-400);
  cursor: pointer;
}
.fav-drawer-close:hover {
  color: var(--slate-800);
}

.fav-items-list {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fav-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  padding: 10px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.fav-item-row:hover {
  background: #ffffff;
  border-color: var(--primary-brand);
}

.fav-item-swatch {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.fav-item-meta {
  flex: 1;
  min-width: 0;
}

.fav-item-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--slate-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-item-code {
  font-size: 0.72rem;
  color: var(--slate-500);
  font-family: monospace;
}

.fav-remove-btn {
  background: none;
  border: none;
  color: var(--slate-400);
  cursor: pointer;
  padding: 6px;
  font-size: 0.9rem;
}
.fav-remove-btn:hover {
  color: #e11d48;
}

.fav-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-export-palette {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-clear-favs {
  background: transparent;
  border: 1px solid var(--slate-200);
  color: var(--slate-600);
  padding: 8px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-clear-favs:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* Toast Notification */
.studio-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xl);
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.studio-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
}

/* Footer */
.studio-footer {
  background: #ffffff;
  border-top: 1px solid var(--slate-200);
  padding: 24px;
  margin-top: auto;
  text-align: center;
  font-size: 0.85rem;
  color: var(--slate-500);
}

/* ⚡ Strict Zero-Line-Break for Small Text (អក្សរ small មិនចុះបន្ទាត់ ច្បាស់) */
small,
.small,
.family-name-en,
.family-shade-count,
.spec-code,
.badge-soft,
.swatch-code {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  line-height: 1.4 !important;
  font-weight: 600 !important;
  -webkit-font-smoothing: antialiased !important;
  text-rendering: optimizeLegibility !important;
}

