/* Jacket Customizer Styles - Updated Version */

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

#jacket-customizer {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0;
    background: transparent;
}

/* Header with logo and saved designs dropdown */
.customizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0 15px;
    border-bottom: 1px solid #f7f7f7;
}

.customizer-logo {
    height: 150px;
    width: 150px;
    object-fit: contain;
}

.saved-designs-dropdown {
    position: relative;
    display: inline-block;
}

.saved-designs-dropdown select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    min-width: 250px;
    font-family: 'Poppins', sans-serif;
}

.saved-designs-dropdown select:focus {
    outline: none;
    border-color: #666666;
}

/* Main Container */
.customizer-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    padding: 0 20px;
}

/* Customizer Sections - MODIFIED: Hide inactive sections */
.customizer-section {
    display: none;
    opacity: 1;
    transition: all 0.3s ease;
    padding: 20px 0;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 0;
}

.customizer-section:not(:last-child) {
    padding-bottom: 80px;
    margin-bottom: 80px;
    border-bottom: 2px solid #f7f7f7;
}

#style-selector {
    display: block;
    opacity: 1;
}

.customizer-section.active-section {
    display: block;
    opacity: 1;
    background: #fff;
}

#action-buttons {
    display: none;
    opacity: 1 !important;
    border-bottom: none !important;
    position: relative;
    margin-top: 30px;
}

#action-buttons.active-section {
    display: block;
}

/* Section Headers */
.section-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.section-header h3 {
    margin: 0;
    font-size: 22px;
    color: #666666;
    font-weight: 300;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.section-header .carousel-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.section-header .carousel-nav button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666666;
    padding: 0;
    transition: all 0.3s ease;
}

.section-header .carousel-nav button:hover {
    color: #000000;
}

/* Updated back button styles */
.section-header .back-button-container {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.section-header .back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #666666;
    font-family: 'Poppins', sans-serif;
    font-size: 32px; /* Increased from 24px */
    cursor: pointer;
    padding: 0;
    width: 50px; /* Increased from 40px */
    height: 50px; /* Increased from 40px */
    transition: all 0.2s ease;
}

.section-header .back-button:hover {
    color: #000000;
    transform: scale(1.1);
}

/* Two-column layout for measurements and addons */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.preview-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Preview Area */
#preview-area, #addons-preview-area {
    width: 100%;
    background: #fff;
    border-radius: 4px;
    padding: 20px;
    margin: 0 auto 30px;
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
    border: none;
}

#preview-area.preview-visible, #addons-preview-area.preview-visible {
    max-height: 1000px;
    border: 1px solid #eee;
}

.preview-main {
    text-align: center;
}

.preview-main img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    cursor: pointer;
}

.preview-thumbnails {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
}

.preview-thumb img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-thumb img:hover {
    opacity: 0.8;
}

/* Carousel Container */
.carousel-container {
    position: relative;
    width: 100%;
    padding: 0;
    margin: 0 auto;
}

/* Carousel Items */
.jacket-carousel,
.color-options {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    width: 100%;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    will-change: transform; /* Improves animation performance */
}

.jacket-carousel:active,
.color-options:active {
    cursor: grabbing;
}

.jacket-carousel::-webkit-scrollbar,
.color-options::-webkit-scrollbar {
    display: none;
}

.jacket-style,
.color-option {
    flex: 0 0 auto;
    width: 400px;
    background: #fff;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 500px;
    display: flex;
    flex-direction: column;
    user-select: none;
    -webkit-user-drag: none;
}

.jacket-style:hover,
.color-option:hover {
    transform: translateY(-3px);
}

.jacket-style.selected,
.color-option.selected {
    border-color: #666666;
    background: #fff; 
}

.jacket-style p,
.color-option p {
    margin: 8px 0 0 0;
    font-size: 14px;
    font-weight: 300;
    color: #666666;
}

.jacket-price {
    color: #666666 !important;
    font-weight: 300 !important;
    font-size: 13px !important;
    margin-top: auto;
}

.color-price {
    color: #666666 !important;
    font-weight: 400 !important;
    font-size: 13px !important;
    margin-top: auto;
}

.jacket-style .image-container,
.color-option .image-container {
    width: 100%;
    height: 500px;
    margin: 0 auto 0px auto;
    overflow: hidden;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jacket-style .image-container img,
.color-option .image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.jacket-style:hover .image-container img,
.color-option:hover .image-container img {
    transform: scale(1.03);
}

/* Size Grid */
.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.size-field {
    display: flex;
    flex-direction: column;
    position: relative;
}

.size-field label {
    font-weight: 400;
    color: #666666;
    margin-bottom: 8px;
    font-size: 14px;
}

.size-field input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    color: #666666;
}

.size-field input:focus {
    outline: none;
    border-color: #666666;
}

.size-field input.error {
    border-color: #ff6b6b !important;
    background-color: #fff5f5;
}

.help-icon {
    position: absolute;
    right: 12px;
    top: 35px;
    background: #666666;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.help-icon:hover {
    transform: scale(1.1);
}

/* Update these styles in customizer.css */

.carousel-prev, 
.carousel-next {
    background: none;
    border: none;
    color: #666666;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none !important;
}

.carousel-prev:hover, 
.carousel-next:hover {
    color: #000000;
    background: none !important;
    transform: none;
}

/* Remove any active state styling */
.carousel-prev:active, 
.carousel-next:active,
.carousel-prev:focus, 
.carousel-next:focus {
    background: none !important;
    border: #ffffff !important;
    box-shadow: none !important;
    color: #000000;
}

/* Make the advance section button larger */
.advance-section-btn {
    display: block;
    margin: 20px auto 0;
    background: none;
    border: none;
    color: #666666;
    font-size: 32px;
    cursor: pointer;
    text-align: center;
    width: 100%;
    padding: 10px;
    outline: none !important;
}

.advance-section-btn:hover {
    color: #000;
    background: none !important;
}

.advance-section-btn:active, 
.advance-section-btn:focus {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #000000;
}

/* Addons List */
.addons-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.addon-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.addon-option:hover {
    border-color: #666666;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.addon-option.selected {
    border-color: #666666;
    background: #f5f5f5;
}

.addon-option .image-container {
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
    flex-shrink: 0;
}

.addon-option .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.addon-option .addon-info {
    flex-grow: 1;
}

.addon-option p {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    color: #666666;
}

.addon-price {
    color: #666666 !important;
    font-weight: 500 !important;
}

/* Final Action Section */
#action-buttons {
    background: #f8f8f8;
    padding: 30px;
    border-radius: 4px;
    text-align: center;
}

.final-price {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 20px;
    color: #666666;
}

.price-breakdown {
    margin-bottom: 30px;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.price-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 15px;
    color: #666666;
}

.price-item-label {
    font-weight: 300;
}

.price-item-value {
    font-weight: 400;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    position: relative;
}

#action-back-btn {
    position: static;
    background: none;
    border: 1px solid #666666;
    color: #666666;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
}

#action-back-btn:hover {
    background: #666666;
    color: white;
}

.action-buttons .button {
    min-width: 150px;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

#save-design {
    background: #fff;
    color: #666666;
    border: 1px solid #666666 !important;
}

#save-design:hover {
    background: #f8f8f8;
    transform: translateY(-2px);
}

#buy-now {
    background: #666666;
    color: white;
    border: 1px solid #666666 !important;
}

#buy-now:hover {
    background: #555555;
    transform: translateY(-2px);
}

/* Image Preview Modal */
#image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-content {
    background: white;
    border-radius: 4px;
    padding: 20px;
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

#image-preview-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #666666;
    background: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#image-preview-close:hover {
    color: #000;
}

#preview-modal-image {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
}

/* Video Modal */
#video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-content {
    position: relative;
    width: 80%;
    max-width: 800px;
}

#video-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 28px;
    cursor: pointer;
    color: white;
}

#video-frame {
    width: 100%;
    height: 450px;
}

/* Login Modal */
#login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    position: relative;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

.modal-content h3 {
    margin-bottom: 15px;
    color: #333;
}

.modal-content p {
    margin-bottom: 20px;
    color: #666;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.form-actions .button {
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn {
    background: #666666;
    color: white;
    border: 1px solid #666666;
}

.signup-btn {
    background: white;
    color: #666666;
    border: 1px solid #666666;
}

.login-btn:hover {
    background: #555555;
}

.signup-btn:hover {
    background: #f5f5f5;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .customizer-container {
        gap: 15px;
    }
    
    .two-column-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    #jacket-customizer {
        padding: 15px;
    }
    
    .customizer-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .customizer-logo {
        height: 100px;
        width: 100px;
    }
    
    .saved-designs-dropdown select {
        width: 100%;
    }
    
    .section-header h3 {
        font-size: 20px;
    }
    
    .size-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .section-header .carousel-nav {
        display: none;
    }
    
    .jacket-carousel,
    .color-options {
        padding-bottom: 20px;
    }
    
    .jacket-style,
    .color-option {
        width: 250px;
        height: 350px;
    }
    
    .jacket-style .image-container,
    .color-option .image-container {
        height: 250px;
    }

    #action-back-btn {
        width: 100%;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .customizer-container {
        gap: 30px;
    }
    
    .jacket-style,
    .color-option {
        width: 220px;
        height: 320px;
    }
    
    .jacket-style .image-container,
    .color-option .image-container {
        height: 220px;
    }
    
    .preview-main img {
        height: auto;
    }
    
    .preview-thumb img {
        height: 80px;
    }
}