/* ===== CUSTOM VARIATION SELECTOR ===== */
.cvs-wrapper {
  background: #faf9f7;
  border: 1px solid #e8e0d5;
  border-radius: 12px;
  padding: 0;
  margin-bottom: 20px;
  font-family: inherit;
  overflow: hidden;
}

/* TABS */
.cvs-tabs {
  display: flex;
  border-bottom: 1px solid #e8e0d5;
  background: #fff;
}

.cvs-tab {
  flex: 1;
  text-align: center;
  padding: 14px 8px 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #aaa;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.cvs-tab:hover { color: #c9a96e; }

.cvs-tab.active {
  color: #c9a96e;
  border-bottom: 2px solid #c9a96e;
  background: #faf9f7;
}

.cvs-tab svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

/* PANELS */
.cvs-panels { padding: 20px; }

.cvs-panel { display: none; }
.cvs-panel.active { display: block; }

/* PANEL HEADER */
.cvs-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cvs-panel-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #333;
}

.cvs-size-guide {
  font-size: 12px;
  color: #c9a96e;
  text-decoration: none;
  cursor: pointer;
}

/* SIZE CARDS */
.cvs-size-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.cvs-size-card {
  border: 1.5px solid #e0d9d0;
  border-radius: 10px;
  padding: 12px 8px 10px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  transition: all 0.2s;
  position: relative;
}

.cvs-size-card:hover { border-color: #c9a96e; }

.cvs-size-card.selected {
  border-color: #c9a96e;
  background: #fdf8f0;
}

.cvs-size-card.unavailable {
  opacity: 0.4;
  cursor: not-allowed;
}

.cvs-size-card svg {
  width: 36px;
  height: 28px;
  margin-bottom: 6px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.cvs-size-card .size-name {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  display: block;
}

.cvs-size-card.selected .size-name { color: #c9a96e; }

.cvs-size-card .size-dim {
  font-size: 10px;
  color: #999;
  margin-top: 2px;
  display: block;
}

.cvs-popular-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: #c9a96e;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* FABRIC COLOURS */
.cvs-colour-selected-label {
  font-size: 12px;
  color: #c9a96e;
  font-weight: 600;
}

.cvs-colour-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cvs-colour-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.cvs-colour-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  transition: all 0.2s;
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.cvs-colour-swatch:hover .cvs-colour-circle { border-color: #c9a96e; }

.cvs-colour-swatch.selected .cvs-colour-circle {
  border-color: #c9a96e;
}

.cvs-colour-swatch.selected .cvs-colour-circle::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.cvs-colour-label {
  font-size: 10px;
  color: #666;
  font-weight: 500;
}

.cvs-colour-swatch.selected .cvs-colour-label { color: #c9a96e; font-weight: 600; }

/* FEET */
.cvs-feet-grid {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.cvs-feet-card {
  border: 1.5px solid #e0d9d0;
  border-radius: 10px;
  padding: 16px 20px 12px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  transition: all 0.2s;
  position: relative;
  min-width: 90px;
}

.cvs-feet-card:hover { border-color: #c9a96e; }

.cvs-feet-card.selected {
  border-color: #c9a96e;
  background: #fdf8f0;
}

.cvs-feet-ball {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 auto 8px;
  box-shadow: inset -4px -4px 10px rgba(0,0,0,0.2), inset 2px 2px 6px rgba(255,255,255,0.5);
}

.cvs-feet-ball.chrome {
  background: radial-gradient(circle at 35% 35%, #fff 0%, #d0d0d0 40%, #888 80%, #555 100%);
}

.cvs-feet-ball.gold {
  background: radial-gradient(circle at 35% 35%, #fff5cc 0%, #f0c040 40%, #b8860b 80%, #7a5800 100%);
}

.cvs-feet-ball.black {
  background: radial-gradient(circle at 35% 35%, #666 0%, #333 40%, #111 80%, #000 100%);
}

.cvs-feet-name {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  display: block;
}

.cvs-feet-card.selected .cvs-feet-name { color: #c9a96e; }

.cvs-feet-check {
  display: none;
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background: #c9a96e;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  line-height: 18px;
  text-align: center;
}

.cvs-feet-card.selected .cvs-feet-check { display: block; }

/* MATTRESS */
.cvs-mattress-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cvs-mattress-card {
  border: 1.5px solid #e0d9d0;
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  background: #fff;
  transition: all 0.2s;
  position: relative;
  text-align: center;
}

.cvs-mattress-card:hover { border-color: #c9a96e; }

.cvs-mattress-card.selected {
  border-color: #c9a96e;
  background: #fdf8f0;
}

.cvs-mattress-card svg {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  display: block;
  stroke: #bbb;
  fill: none;
  stroke-width: 1.5;
}

.cvs-mattress-card.selected svg { stroke: #c9a96e; }

.cvs-storage-photo {
  width: 100%;
  max-width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto 10px;
  display: block;
  border: 1px solid #e8e0d5;
}

.cvs-mattress-name {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  display: block;
  margin-bottom: 2px;
}

.cvs-mattress-card.selected .cvs-mattress-name { color: #c9a96e; }

.cvs-mattress-sub {
  font-size: 11px;
  color: #999;
  display: block;
  margin-bottom: 6px;
}

.cvs-mattress-price {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #666;
  background: #f0ece6;
  border-radius: 20px;
  padding: 2px 10px;
}

.cvs-mattress-included {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #c9a96e;
  background: #fdf0d8;
  border-radius: 20px;
  padding: 2px 10px;
}

.cvs-mattress-check {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: #c9a96e;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  line-height: 20px;
  text-align: center;
}

.cvs-mattress-card.selected .cvs-mattress-check { display: block; }

/* SUMMARY CHIPS */
.cvs-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid #e8e0d5;
  background: #fff;
}

.cvs-chip {
  font-size: 11px;
  color: #555;
  background: #f0ece6;
  border-radius: 20px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cvs-chip::before {
  content: '✓';
  color: #c9a96e;
  font-weight: 700;
  font-size: 10px;
}




.cvs-price-display {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.cvs-price-was {
  font-size: 18px;
  color: #999;
  text-decoration: line-through;
}

.cvs-price-total {
  font-size: 30px;
  font-weight: 700;
  color: #f59a57;
}


@media (min-width: 768px) {
  .cvs-panel[data-panel="drawer"] .cvs-mattress-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .cvs-panel[data-panel="storage"] .cvs-mattress-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .cvs-size-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}



/* HIDDEN WOOCOMMERCE SELECTS */
.variations_form .variations,
.woocommerce-variation-add-to-cart .woocommerce-variation-price,
table.variations { display: none !important; }