/* ==========================================================================
   Barracuda Brodovi Configurator - Custom Styles
   ========================================================================== */

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
  /* Colors */
  --color-primary: #e53935;
  --color-primary-dark: #b71c1c;
  --color-primary-darker: #a31515;
  --color-text: #222;
  --color-text-light: #888;
  --color-bg: #fff;
  --color-gray-light: #f5f5f5;
  --color-gray-medium: #dddddd;
  --color-text-dark: #888;

  /* Spacing */
  --spacing-4: 0.25rem;
  --spacing-8: 0.5rem;
  --spacing-12: 0.75rem;
  --spacing-16: 1rem;
  --spacing-24: 1.5rem;
  --spacing-32: 2rem;

  /* Font sizes */
  --font-tiny: 1.1rem;
  --font-small: 1.2rem;
  --font-medium: 1.5rem;
  --font-large: 1.7rem;
  --font-larger: 2.2rem;

  /* Font family */
  --font-family: Helvetica, Arial, sans-serif;

  /* Configurator height */
  --configurator-height: calc(100vh - 68px);
}

/* ==========================================================================
   Reset and Base Styles
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* font-family: var(--font-family); */
}

/* ==========================================================================
   Animations and Keyframes
   ========================================================================== */

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Main Configurator Layout
   ========================================================================== */

.home-button {
  position: absolute;
  top: 1rem;
  left: 0;
  padding: 0.8rem 1rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 0;
  font-size: 1.2rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 10;
  text-decoration: none;
}

.home-button:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.home-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.home-button-text {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.home-button-arrow {
  font-size: 1rem;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.home-button:hover .home-button-arrow {
  transform: translateX(-2px);
}

.model-name-display {
  position: absolute;
  top: 6rem;
  left: 10rem;
  font-size: 3.2rem;
  font-weight: bold;
  color: #222;
  background: rgba(255, 255, 255, 0);
  z-index: 10;
  letter-spacing: 0.05em;
}

#configurator-section {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100vh;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 0.2s ease-in-out;
  z-index: 1;
  max-height: var(--configurator-height);
}

#configurator-section.fade-out {
  opacity: 0;
}

#configurator-section.fade-in {
  opacity: 1;
}

#configurator-section.menu-hidden .image-container {
  width: 100%;
}

#configurator-section.menu-hidden .menu-container {
  width: 0;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   Configurator Disclaimer
   ========================================================================== */

.configurator-disclaimer {
  position: absolute;
  bottom: 5px;
  left: 1rem;
  z-index: 15;
  max-width: 70vw;
  background: white;
  color: black;
  padding: 0.8rem 1rem 0 1rem;
  font-size: 1.3rem;
  text-transform: uppercase;
  text-overflow: ellipsis;
}

.disclaimer-content {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.disclaimer-text {
  margin: 0;
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 600;
  line-height: 1;
  font-style: italic;
  
}

/* Mobile responsive disclaimer */
@media (max-width: 768px) {
  .configurator-disclaimer {
    bottom: 0;
    left: 0.5rem;
    right: 0.5rem;
    max-width: none;
    font-size: 0.75rem;
    padding: 0.6rem 0.8rem 0 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
  }
  
  .disclaimer-text {
    font-size: 0.7rem;
  }
}

/* ==========================================================================
   Loading States
   ========================================================================== */

#loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ==========================================================================
   Image Container and Background
   ========================================================================== */

.image-container {
  width: 75%;
  height: 100%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  max-height: var(--configurator-height);
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-color: white;
}

.camera-dots {
  position: absolute;
  left: 50%;
  bottom: 5rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.7rem;
  z-index: 20;
}

.camera-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #bbb;
  background: #fff;
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
  outline: none;
  display: inline-block;
}

.camera-dot.active {
  background: #e53935;
  border-color: #e53935;
}

.camera-dot:focus {
  box-shadow: 0 0 0 2px #e5393533;
}

.camera-dot:hover {
  border-color: #888;
  background: #f5f5f5;
}

/* ==========================================================================
   Menu Container and Layout
   ========================================================================== */

.menu-container {
  width: 25%;
  height: 100%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
  background: var(--color-bg);
  border-left: 3px solid var(--color-gray-light);
  overflow-y: auto;
  position: relative;
  z-index: 2;
  opacity: 1;
  display: flex;
  flex-direction: column;
  padding-top: 2rem;
  padding-left: 1rem;
  padding-right: 1rem;
  max-height: var(--configurator-height);
}

/* ==========================================================================
   Menu Header and Navigation
   ========================================================================== */

.menu-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-24) var(--spacing-24) var(--spacing-12)
    var(--spacing-24);
}

.menu-header h3 {
  margin: 0;
  font-size: var(--font-medium);
  font-weight: bold;
  color: var(--color-text);
}

/* ==========================================================================
   Menu Hide Button Components
   ========================================================================== */

.menu-hide-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-8);
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--font-small);
  color: var(--color-text);
  transition: color 0.2s;
  outline: none;
}

.menu-hide-btn .hide-btn-circle {
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.menu-hide-btn .hide-btn-circle svg {
  color: var(--color-bg);
  width: 18px;
  height: 18px;
  transition: color 0.2s;
}

.menu-hide-btn:hover .hide-btn-circle {
  background: var(--color-primary-dark);
}

.menu-hide-btn:active .hide-btn-circle {
  background: var(--color-primary-darker);
}

/* Standalone menu hide button */
.menu-hide-btn-standalone {
  position: absolute;
  top: 10px;
  right: 52px;
  z-index: 30;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-8);
  font-size: var(--font-small);
  color: var(--color-text);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s,
    color 0.2s;
  outline: none;
  padding: 0;
}

/* Reset configuration button (sibling to hide menu) */
.reset-config-btn {
  position: absolute;
  top: 10px;
  right: 10px; /* place to the left of the hide button */
  z-index: 30;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}
.reset-config-btn .hide-btn-circle {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.reset-config-btn .hide-btn-circle svg {
  color: var(--color-bg);
  width: 18px;
  height: 18px;
}
.reset-config-btn:hover .hide-btn-circle {
  background: var(--color-primary-dark);
}
.reset-config-btn:active .hide-btn-circle {
  background: var(--color-primary-darker);
}

.menu-hide-btn-standalone .hide-menu-text {
  display: inline;
  transition: opacity 0.2s;
}

.menu-hide-btn-standalone.menu-hide-btn-hidden {
  right: 12px;
}

.menu-hide-btn-standalone.menu-hide-btn-hidden .hide-menu-text {
  display: none;
}

.menu-hide-btn-standalone .hide-btn-circle {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.menu-hide-btn-standalone .hide-btn-circle svg {
  color: var(--color-bg);
  width: 18px;
  height: 18px;
  transition: color 0.2s;
}

.menu-hide-btn-standalone:hover .hide-btn-circle {
  background: var(--color-primary-dark);
}

.menu-hide-btn-standalone:active .hide-btn-circle {
  background: var(--color-primary-darker);
}

/* ==========================================================================
   Menu Items and Navigation
   ========================================================================== */

.menu-item {
  width: 100%;
  padding: var(--spacing-12) var(--spacing-18);
  margin-bottom: var(--spacing-8);
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  background: #fafbfc;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: var(--font-small);
}

.menu-item:hover {
  background: #f0f0f0;
}

.menu-item.selected,
.menu-item.active {
  background: var(--color-primary);
  color: var(--color-bg);
  border-color: var(--color-primary);
}

.menu-item.info-button {
  background: var(--color-gray-light);
  color: var(--color-text-light);
  border: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-8);
}

/* ==========================================================================
   Dropdown Components
   ========================================================================== */

.dropdown-caret {
  display: flex;
  align-items: center;
  margin-right: var(--spacing-8);
  transition: transform 0.3s ease;
  transform: rotate(0deg);
}

.dropdown-caret svg {
  width: 15px;
  height: 15px;
}

.dropdown-caret.open {
  transition: transform 0.3s ease;
  transform: rotate(90deg);
}

.dropdown-header {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding: var(--spacing-8) var(--spacing-16) var(--spacing-8) var(--spacing-8);
  background: var(--color-bg);
  transition: background 0.2s, box-shadow 0.2s;
  position: relative;
}

.dropdown-header.open {
  background: var(--color-bg);
}

.dropdown-header:hover {
  background: #f5eaea;
}

.menu-label {
  font-weight: 600;
  margin-left: var(--spacing-8);
  color: var(--color-text);
  flex: 1;
  text-align: left;
  transition: color 0.2s;
}

.menu-label.open {
  color: var(--color-primary);
}

/* ==========================================================================
   Info Icon Components
   ========================================================================== */

.info-icon-svg {
  display: flex;
  align-items: center;
  margin-right: var(--spacing-4);
  cursor: pointer;
  color: var(--color-text-light);
  transition: color 0.2s;
}

.info-icon-svg:hover {
  color: var(--color-primary);
}

.dropdown-header.open .info-icon-svg {
  color: var(--color-primary);
}

/* ==========================================================================
   Dropdown Content Transitions
   ========================================================================== */

.checklist-items,
.single-select-items,
.swatch-group-items,
.toggle-list-items {
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
  overflow-y: unset;
  overflow-x: unset;
  max-height: unset;
  opacity: 1;
  margin-left: 20px;
  height: unset;
  
}

.checklist-items {
  height: unset;
}

/* Custom scrollbar for swatch-group-items */
.menu-container::-webkit-scrollbar {
  width: 6px;
}

.menu-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.menu-container::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
}

.menu-container::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-dark);
}

.hidden {
  max-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none;
  visibility: hidden;
  display: none;
}

/* ==========================================================================
   Camera Controls
   ========================================================================== */

.camera-controls {
  position: fixed;
  bottom: var(--spacing-32);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--spacing-16);
  z-index: 10;
}

.camera-controls button {
  padding: var(--spacing-12) var(--spacing-24);
  border-radius: 6px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.camera-controls button:hover {
  background: var(--color-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.camera-switch {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: background 0.2s;
  border: none;
}

.camera-switch svg {
  color: var(--color-text);
  transition: color 0.2s;
}

.camera-switch-left {
  left: var(--spacing-24);
}

.camera-switch-right {
  right: var(--spacing-24);
}

.camera-switch:hover {
  background: var(--color-primary);
}

.camera-switch:hover svg {
  color: var(--color-bg);
}

/* ==========================================================================
   Model Selector
   ========================================================================== */

.model-selector {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.95);
  padding: var(--spacing-12);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.model-selector button {
  padding: var(--spacing-8) var(--spacing-16);
  border: 2px solid #ddd;
  background: var(--color-bg);
  color: #333;
  border-radius: 6px;
  cursor: pointer;
  font-weight: normal;
  transition: all 0.2s ease;
  font-size: 14px;
  min-width: 80px;
}

.model-selector button:hover {
  background: #f0f0f0;
  border-color: #007bff;
}

.model-selector button.selected {
  border-color: #007bff;
  background: #007bff;
  color: var(--color-bg);
  font-weight: bold;
}

/* ==========================================================================
   Info Box Overlay
   ========================================================================== */

.info-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 400px;
  max-width: 90vw;
  height: 100%;
  background: var(--color-bg);
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: none;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.info-box.open {
  display: block;
  transform: translateX(0);
}

.info-box-content {
  padding: var(--spacing-32) var(--spacing-24) var(--spacing-24)
    var(--spacing-24);
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
}

.info-box-close {
  position: absolute;
  top: var(--spacing-16);
  right: var(--spacing-16);
  left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-light);
  z-index: 1;
  transition: color 0.2s;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.info-box-close:hover {
  color: var(--color-primary);
}

#info-box-image {
  width: 100%;
  max-width: 350px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  margin-bottom: var(--spacing-16);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: var(--color-gray-light);
}

#info-box-title {
  margin: 0 0 var(--spacing-8) 0;
  font-size: var(--font-medium);
  font-weight: bold;
  color: var(--color-text);
}

#info-box-description {
  font-size: var(--font-small);
  color: var(--color-text-light);
  line-height: 1.6;
}

/* ==========================================================================
   Single Select Components
   ========================================================================== */

.single-select-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-8) var(--spacing-12);
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  transition: all 0.2s ease;
  border-radius: 0;
  gap: var(--spacing-12);
  transition: all 0.2s ease;
}

.single-select-item:hover {
  opacity: 0.8;
  transform: scale(1.01);
}

.single-select-item.selected {
  /* background: #f0f0f0; */
}

.single-select-img-wrap {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  margin-right: var(--spacing-12);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 0;
  overflow: hidden;
  background: #f8f8f8;
}

.single-select-img-wrap.selected {
  border: 2px solid #d72424;
  background: var(--color-bg);
}

.single-select-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

.single-select-label {
  flex: 1;
  font-size: var(--font-small);
  color: var(--color-text);
  font-weight: 500;
  transition: color 0.2s;
}

.single-select-label.selected {
  color: #d72424;
}

.single-select-radio {
  margin-left: var(--spacing-16);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.single-select-radio svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* ==========================================================================
   Checklist Components
   ========================================================================== */

.checklist-items {
  list-style: none;
  margin: 0;
  padding: 0 0 0 var(--spacing-8);
}

.checklist-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-4) 0;
  font-size: 0.97rem;
  color: var(--color-text);
  position: relative;
  min-height: 26px;
  line-height: 1.6;
}

.checklist-bullet {
  color: var(--color-text);
  font-size: 1.1em;
  margin-right: 10px;
  font-weight: normal;
  width: 18px;
  display: inline-block;
  text-align: center;
}

.checklist-label {
  flex: 1;
  font-size: var(--font-small);
  color: var(--color-text);
  font-weight: normal;
  line-height: 1.6;
}

.checklist-item.selected .checklist-label {
  font-weight: normal;
}

.checklist-check {
  margin-left: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.checklist-check svg {
  width: 20px;
  height: 20px;
  color: #d72424;
}

/* ==========================================================================
   Toggle Components
   ========================================================================== */

.toggle-single-row {
  display: flex;
  align-items: center;
  padding: var(--spacing-8) 0;
  gap: 0.3rem;
  margin-left: 25px;
  transition: all 0.2s ease;
}

.toggle-single-row:hover {
  background: var(--color-gray-light);
  opacity: 0.8;
}

.toggle-list-items .toggle-single-row {
  display: flex;
  align-items: center;
  padding: var(--spacing-8) 0;
  gap: 10px;
  margin-left: 45px;
}

.toggle-single-row .info-icon-svg {
  margin-right: var(--spacing-8);
}

.toggle-single-label {
  flex: 1;
  color: var(--color-text);
  font-weight: 700;
}

.toggle-list-items .toggle-single-label {
  flex: 1;
  font-size: var(--font-small);
  color: var(--color-text);
  font-weight: 400;
}

.toggle-switch-btn {
  background: none;
  border: none;
  padding: 0;
  margin-left: var(--spacing-12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.toggle-switch-icon svg {
  width: 39px;
  height: 21px;
  display: block;
}

/* ==========================================================================
   Menu Content Layout
   ========================================================================== */

.menu-content-indent {
  margin-left: 3rem;
}

/* ==========================================================================
   Swatch Selector Components
   ========================================================================== */

.swatch-selector-row {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--spacing-24);
}

.swatch-selector-row.nested {
  margin-left: 0;
}

.swatch-selector-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-8);
  margin-bottom: var(--spacing-8);
}

.swatch-selector-label {
  font-size: var(--font-small);
  color: var(--color-text);
  font-weight: 500;
}

.swatch-selector-row.nested .swatch-selector-label {
  font-weight: 400;
}

.swatch-selector-group-label {
  font-size: var(--font-small);
  font-weight: 400;
  color: #444;
  margin-bottom: var(--spacing-4);
  margin-left: var(--spacing-16);
}

.swatch-selector-swatches {
  display: flex;
  flex-direction: row;
  gap: var(--spacing-12);
  margin-left: var(--spacing-16);
}

.swatch-btn {
  width: 48px;
  height: 48px;
  border: 1px solid #e0e0e0;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  position: relative;
  border-radius: 0;
}

.swatch-btn.selected {
  border: 2px solid var(--color-primary);
  background: #ffeaea;
}

.swatch-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  pointer-events: none;
 /*  filter: grayscale(1); */
  position: relative;
}

.swatch-btn.disabled::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 6px,
    rgba(255, 0, 0, 1) 6px,
    rgba(255, 0, 0, 1) 8px
  );
  pointer-events: none;
  z-index: 1;
}

.swatch-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  display: block;
}

.swatch-color {
  width: 100%;
  height: 100%;
  border-radius: 0;
  display: block;
}

.swatch-btn.selected .swatch-color {
  /* outline: 2px solid #D72424; */
}

.swatch-btn:hover {
  opacity: 0.8;
  transform: scale(1.01);
}

.swatch-selector-header .info-icon-svg {
  margin-right: var(--spacing-4);
  color: var(--color-text-light);
  transition: color 0.2s;
}

.swatch-selector-header .info-icon-svg:hover {
  color: var(--color-primary);
}

.swatch-group-items .swatch-selector-header {
  display: none;
}


/* For mixed menu items, remove the bottom margin from nested swatch selector rows */
.swatch-selector-row.nested>.swatch-selector-row {
  margin-bottom: 0rem;
}

/* ==========================================================================
   Menu Types (Legacy Grid Layouts)
   ========================================================================== */

.swatch-menu,
.toggle-menu,
.radio-menu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: var(--spacing-8);
  margin-top: var(--spacing-8);
}

.swatch-item,
.toggle-item,
.radio-item {
  aspect-ratio: 1;
  padding: var(--spacing-8);
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  background: var(--color-bg);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: var(--font-tiny);
}

.swatch-item.selected,
.toggle-item.active,
.radio-item.selected {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-bg);
}

/* ==========================================================================
   Price Display
   ========================================================================== */

.price {
  color: var(--color-primary);
  font-weight: bold;
  margin-left: auto;
}

/* ==========================================================================
   Media Queries - Responsive Design
   ========================================================================== */

/* Large screens */
@media (max-width: 1200px) {
}

/* Medium screens */
@media (max-width: 900px) {
  #configurator-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.2s ease-in-out;
    z-index: 1;
    max-height: var(--configurator-height);
  }

  .camera-switch {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background: none;
    border-radius: 0;
    display: flex
;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: background 0.2s;
    border: none;
}
.camera-switch-left {
    left: var(--spacing-8);
}
.camera-switch-right {
    right: var(--spacing-8);
}


  .camera-dots {
    position: absolute;
    left: 50%;
    bottom: 6rem;
    transform: translateX(-50%);
    display: flex;
    gap: 0.7rem;
    z-index: 20;
  }

  .home-button {
    top: 0rem;
    left: 0;
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
  }
  
  .home-button-text {
    font-size: 1rem;
  }
  
  .home-button-arrow {
    font-size: 0.9rem;
  }

  .model-name-display {
    position: absolute;
    top: 3rem;
    left: 1rem;
    font-size: 2.2rem;
    font-weight: bold;
    color: #222;
    background: rgba(255, 255, 255, 0);
    z-index: 10;
    letter-spacing: 0.05em;
  }

  .image-container {
    width: 100%;
    height: 45dvh;
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    position: relative;
    background-color: white;
  }

  /* Move the hide menu button inside image-container, just below camera-dots */
  .image-container .menu-hide-btn-standalone {
    position: absolute;
    left: 50%;
    top: auto;
    bottom: 0.2em;
    transform: translateX(-50%);
    z-index: 31;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    gap: 0;
    box-shadow: none;
  }
  .image-container .reset-config-btn {
    position: absolute;
    left: 50%;
    bottom: 0.2em;
    transform: translateX(-50%);
    margin-left: 44px; /* offset to be next to the hide button */
    z-index: 31;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
  .image-container .menu-hide-btn-standalone .hide-menu-text {
    display: none !important;
  }
  .image-container .menu-hide-btn-standalone .hide-btn-circle {
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  }
  .image-container .menu-hide-btn-standalone .hide-btn-circle svg {
    color: var(--color-bg);
    width: 18px;
    height: 18px;
    transition: color 0.2s, transform 0.2s;
    transform: rotate(0deg);
  }
  /* Chevron points up when menu is hidden */
  .image-container .menu-hide-btn-standalone.menu-hide-btn-collapsed .hide-btn-circle svg {
    transform: rotate(180deg);
  }

  .menu-container {
    height: 45dvh;
    padding: var(--spacing-8);
    padding-top: 0 !important;
    font-size: 1rem;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
  }
  .menu-item {
    font-size: 1rem;
    padding: var(--spacing-8) var(--spacing-12);
  }
  .menu-label, .swatch-selector-label, .toggle-single-label {
    font-size: 1rem;
  }
  /* Hide menu slides down and image-container expands */
  #configurator-section.menu-hidden .menu-container,
  #configurator-section.menu-hidden-mobile .menu-container {
    height: 0 !important;
    min-height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    overflow: hidden !important;
  }
  #configurator-section.menu-hidden .image-container,
  #configurator-section.menu-hidden-mobile .image-container {
    height: 74dvh !important;
    max-height: 74dvh !important;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .info-box {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 90vw;
    max-width: 100vw;
    height: 100vh;
    min-height: 100vh;
    z-index: 10000;
    border-radius: 0;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.15);
    background: var(--color-bg);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
  }
  .info-box.open {
    transform: translateX(0);
    display: block;
  }
}

/* Small screens */
@media (max-width: 768px) {
  .menu-container {
    width: 100%;
    max-width: none;
    min-width: auto;
    border:none;
    margin-bottom: 3rem;
  }
}

/* Extra small screens */
@media (max-width: 600px) {
  /* No specific layout changes for extra small screens */
}

/* ==========================================================================
   Landscape Mobile Device Media Queries
   ========================================================================== */

/* Landscape mobile devices - iPhone, Android phones in landscape */
@media (max-height: 500px) and (orientation: landscape) {
  /* Adjust main configurator for limited height */
  #configurator-section {
    height: 100vh;
    min-height: 300px;
  }

  /* Reduce menu container height and adjust layout */
  .menu-container {
    height: 100vh;
    margin-top: 0;
    overflow-y: auto;
    max-height: 100vh;
  }

  /* Adjust image container for landscape */
  .image-container {
    height: 100vh;
    min-height: 300px;
  }
}

/* Very short landscape devices (like some Android tablets) */
@media (max-height: 400px) and (orientation: landscape) {
  /* Adjust main configurator for very limited height */
  #configurator-section {
    height: 100vh;
    min-height: 250px;
  }

  .menu-container {
    height: 100vh;
    margin-top: 0;
    overflow-y: auto;
    max-height: 100vh;
  }

  .image-container {
    height: 100vh;
    min-height: 250px;
  }
}

/* Landscape tablets and larger mobile devices */
@media (min-width: 768px) and (max-height: 600px) and (orientation: landscape) {
  /* Optimize main configurator for landscape tablets */
  #configurator-section {
    height: 100vh;
    min-height: 350px;
  }

  .menu-container {
    width: 30%;
    min-width: 300px;
    height: 100vh;
    margin-top: 0;
    overflow-y: auto;
    max-height: 100vh;
  }

  .image-container {
    width: 70%;
    height: 100vh;
    min-height: 350px;
  }

  /* Keep menu visible on tablets in landscape */
  #configurator-section.menu-hidden .image-container {
    width: 70%;
  }

  #configurator-section.menu-hidden .menu-container {
    width: 30%;
    opacity: 1;
    pointer-events: auto;
  }
}

/* ==========================================================================
   Offer Button
   ========================================================================== */

.offer-button {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 0;
  font-size: 1.2rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  display: flex
;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  position: sticky;
  bottom: 5px;
}

.offer-button:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.offer-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.offer-button-text {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.offer-button-arrow {
  font-size: 1rem;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.offer-button:hover .offer-button-arrow {
  transform: translateY(2px);
}

/* Mobile responsive styles for offer button */
@media (max-width: 900px) {
  #offer-section {
    display: flex
    ;
        flex-direction: column;
  }

  .offer-button {
    padding: 0.6rem 0.8rem;
    margin-top: 1rem;
    font-size: 1rem;
    bottom: 0rem;
  }
  
  .offer-button-text {
    font-size: 1rem;
  }
  
  .offer-button-arrow {
    font-size: 0.9rem;
  }
}

@media (max-width: 600px) {
  .offer-button {
    padding: 0.5rem 0.7rem;
    margin-top: 0.8rem;
    font-size: 0.9rem;
    bottom: 0rem;
  }
  
  .offer-button-text {
    font-size: 0.9rem;
  }
  
  .offer-button-arrow {
    font-size: 0.8rem;
  }
}
