/* General Resets and Base Styles */
body {
   
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.configurator-container {
    max-width: 100vw;
    margin: 20px auto;
    background-color: #fff;
    padding: 100px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* NEW: Header row for H1 and Tabs alignment */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Align tabs to the bottom of the H1 */
    margin-bottom: 20px;
}

#exterior-tab h1 {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 0; 
    margin-top: -60px;
}

#interior-tab h1 {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 0; 
    margin-top: -60px;
}

/* --- Tab Styles --- */
.tabs {
      display: flex;
    margin-bottom: 0;
    flex-direction: row;
    justify-content: flex-end;
	  
}
.tabs button{
  color: #272727;
}


[data-tab="exterior"]{
     border: 1px solid #ccc;
    padding: 15px 24px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
        border-radius: 30px 0px 0px 30px;

   
}

[data-tab="interior"]{
    border: 1px solid #ccc;
    padding: 15px 24px;
    cursor: pointer;
    font-weight: bold;
        border-radius: 0px 30px 30px 0px;

    transition: background-color 0.2s;
    
}
.tab-button{ font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
}
.tab-button.active {
       background-color: #D9D9D9;
	    color: #272727;
    
}
.tab-button:hover {
    background-color: #fff;
	    color: #272727;
    
}



.tab-content {
    display: none;
    padding: 20px 0;
   
}

.tab-content.active {
    display: block;
}

/* --- Exterior Car Viewer Area (Retained/Cleaned) --- */
.car-viewer-area {
    position: relative;
    text-align: right;
    background-color: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
}

.car-360-viewer {
    position: relative;
    width: 100%;
    max-width: 1000px; 
    margin: 0 auto;
    height: 350px; 
    overflow: hidden;
    cursor: grab;
}

.car-360-viewer.dragging {
    cursor: grabbing;
}

.car-360-viewer .car-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; 
    visibility: hidden;
    user-select: none;
    pointer-events: none;
}

/* Loading Overlay Styles (Retained) */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

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

.car-360-viewer.loaded #loading-overlay {
    display: none;
}

/* Exterior Controls Area Styles (Retained) */
.controls-area {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.color-options, .wheel-options {
    display: flex;
    gap: 15px; 
    
}

.color-swatch, .wheel-option {
    cursor: pointer;
    transition: all 0.2s;
    border: 3px solid transparent; 
    border-radius: 10%;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border: 3px solid transparent; 
}

.color-swatch.active {
    box-shadow: 0 0 0 2px #fff, 
                0 0 0 4px #000;
    transform: scale(1.15); 
}

.wheel-option {
    width: 60px;
    height: 60px;
    padding: 5px;
    border: 2px solid transparent;
    border-radius: 5px;
}

.wheel-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 3px;
}

.wheel-option.active {
    border-color: #000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.color-title h3,
.wheel-selection-title h3 {
    margin: 0;
   
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #20201E;

}

#current-color-name,
#current-wheel-size {
    margin-top: 5px;
       font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #20201E;
}

/* Modal and utility styles (Retained) */
.fullscreen-toggle{
    border: none;
    background-color: #faebd700;
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 50;
    opacity: 0.7;
}

#car-viewer-modal {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#modal-viewer-content {
    width: 90%;
    height: 90%;
    position: relative;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

#modal-viewer-content .car-360-viewer {
    width: 100%;
    height: 100%;
    max-width: 100%; 
   
}

#modal-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #000;
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    z-index: 1001;
    border-radius: 5px;
}

/* --- INTERIOR TAB STYLES (NEW SLIDER DESIGN) --- */

.interior-layout {
    display: flex;
    gap: 70px;
    align-items: flex-start;
    margin-top: 70px;
}

.interior-viewer {
    flex: 2; /* Takes up 2/3 of the space */
    max-width: 60%;
    position: relative;
}

.interior-controls {
    flex: 1; /* Takes up 1/3 of the space */
    min-width: 300px;
   
}

/* Image Slider Styles */
.image-slider-container {
    position: relative;
    width: 100%;
    height: 450px; /* Fixed height for the slider container */
    overflow: hidden;
    background-color: #f7f7f7;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.slide-track {
    display: flex;
    width: 300%; /* Contains three full-width slides */
    height: 100%;
    transition: transform 0.3s ease-in-out;
}

.slide-item {
    min-width: 33.333%; /* Each item takes 1/3 of the track width */
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.slide-item img {
    width: 100%;
    height: 100%;
    /* object-fit: cover; */
    display: block;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
}

.slider-nav:hover {
    background: rgba(255, 255, 255, 1);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* Feature Group for Interior Colors */
.feature-group {
    margin-bottom: 30px;
}

.feature-group h2 {
    font-family: "Montserrat", Sans-serif;
    font-size: 38px;
    font-weight: 600;
    color: #333333;
    margin: 0 auto;
}

#interior-description {
    color: #666;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 0.9em;
}


/* Styling for Trim Options (Matching image design) */
.trim-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    margin-bottom: 15px;
 
    border-radius: 8px;

    cursor: pointer;
    transition: all 0.2s;
}

.trim-option:hover {
    background-color: #f0f0f0;
}

.trim-option.active {
   
    background-color: #EFEFEF;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
}

.trim-option.active .option-swatch{
 border: 2px solid #000;
}

.option-swatch {
    min-width: 70px; /* Wider image area for the thumbnail */
    height: 70px;
    border-radius: 60px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0; /* Prevent it from shrinking */
}

.option-details {
    flex-grow: 1;
    font-size: 0.9em;
}

.option-details .name {
    margin: 0 0 5px 0;
    font-size: 1em;
    font-weight: bold;
    line-height: 1.2;
}

.option-details .spec {
    margin: 0;
    color: #555;
    line-height: 1.4;
    font-size: 0.85em;
}

.option-details .price {
    margin-top: 5px;
    font-weight: bold;
    color: #000;
    font-size: 1em;
}


/* --- Mobile/Tablet Media Queries --- */

@media (max-width: 992px) {
    .configurator-container {
        padding: 20px 40px; 
    }

    /* Interior layout switches to single column */
    .interior-layout {
        flex-direction: column;
        gap: 30px;
    }
    .interior-viewer,
    .interior-controls {
        flex: 1;
        max-width: 100%;
        width: 100%;
    }
    .image-slider-container {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .controls-area {
                display: flex;
        /* flex-direction: row; */
        gap: 20px;
        align-items: flex-start;
        justify-content: space-between;
		        align-items: stretch;
        
    }
    
    .car-360-viewer {
        height: 200px; 
    }

    .configurator-container {
        padding: 20px; 
    }

    .header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
	
	#exterior-tab h1{
		    margin-bottom: 90px;
		 font-size: 22px;
	}
	
	
	
	#exterior-tab h1{
		    margin-top : -156px;
	}
	
	#interior-tab h1{
		    margin-bottom: 90px;
		 font-size: 22px;
	}
	
	#interior-tab h1{
		    margin-top : -156px;
	}
	
	.interior-layout {
  
    margin-top: 110px;
	}
	
	
	.tabs {
    display: flex;
    margin-bottom: 0;
    flex-direction: row;
    justify-content: flex-start;
	}
	.tab-button {
   
    font-size: 13px;
    font-weight: 600; 
	}
	

	.fullscreen-toggle {
    border: none;
    background-color: #faebd700;
    position: absolute;
    bottom: 0px;
    right: -25px;
    z-index: 50;
    opacity: 0.7;
	}
	.fullscreen-toggle svg{
		width:30px;
		height:30px;
	}
	
	.color-title h3, .wheel-selection-title h3 {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #20201E;
}
	.color-swatch {
    width: 30px;
		height: 30px;}
	
		.color-wrapper{
	display: flex;
    flex-direction: column;
}

.wheel-wrapper{
	display: flex;
    flex-direction: column;
}
	
	.wheel-option {
    width: 45px;
    height: 45px;
	}
	
	
	.feature-group h2 {
   
    font-size: 14px;
	}

}

.image-slider-container button{
	color:#76686d !important;
	font-size:1.5rem;
}

 .image-slider-container button:focus
 {
    background-color: #c0bcbd;
    color: #fff;
}



@media (min-width: 1025px) and (max-width: 1920px) {
  .color-wrapper{
	display:contents;
}

.wheel-wrapper{
	display:contents;
}
}


/* Modal base */
.car-viewer-modal { display: none; position: fixed; z-index: 9999; inset: 0; align-items: center; justify-content: center; }
.car-viewer-modal[aria-hidden="false"] { display: flex; }

/* Backdrop */
.car-viewer-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.35); }

/* Inner white box */
.car-viewer-modal__inner {
  position: relative;
  width: 95%;
  max-width: 1200px;
  max-height: 92vh;
  background: #fff; /* white background as requested */
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  overflow: hidden;
  display:flex;
  align-items: center;
  justify-content: center;
}

/* Close button (top-right) */
.car-viewer-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 3;
  background: transparent;
  border: none;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

/* modal content that will contain the viewer */
.car-viewer-modal__content {
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* ensure viewer scales inside modal */
.car-viewer-modal__content .car-360-viewer {
  width: 100%;
  height: calc(100vh - 140px); /* adjust to fit modal chrome */
  max-height: 78vh;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

/* modal nav arrows */
.car-viewer-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  background: rgba(255,255,255,0.9);
  border: none;
  font-size: 36px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}
.car-viewer-modal__nav.prev { left: 8px; }
.car-viewer-modal__nav.next { right: 8px; }

/* small mobile tweaks */
@media (max-width:640px){
  .car-viewer-modal__inner { width: 100%; height: 100%; border-radius: 0; }
  .car-viewer-modal__content .car-360-viewer { height: calc(100vh - 80px); }
}
.fullscreen-toggle:hover , .fullscreen-toggle:focus {
    background-color: #ffffff00 !important;
}
.car-viewer-modal__close:hover , .car-viewer-modal__close:focus {
    background-color: #ffffff00 !important;
}
.car-viewer-modal__close{
	    color: #000000 !important;
}


