/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f6f8;
    color: #111;
}

/* Header */
.site-header {
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid #eee;
}

.site-name {
    font-weight: bold;
    font-size: 2rem;
}

.main-nav a.icon-link {
    margin-left: 20px;
    text-decoration: none;
    color: #111;
    font-size: 20px; /* Adjust icon size */
    transition: transform 0.2s ease-in-out;
}

.main-nav a.icon-link:hover {
    transform: scale(1.1);
}

/* Main Container */
.product-page-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 40px;
}

/* Product Main Section */
.product-main-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}


.vto-upload-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 20;
    overflow-y: auto;
    padding: 20px 0 60px 0; /* Added more padding at the bottom */
}

.photo-requirements-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 550px;
    padding: 20px;
    text-align: center;
}

.requirements-header {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    margin-bottom: 20px;
}

.close-requirements-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.photo-requirements-container h1 {
    font-size: 36px;
    margin: 0;
}

.photo-requirements-container h2 {
    font-size: 20px;
    margin: 15px 0 10px;
}

.model-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.model-image {
    max-width: 100%;
    height: auto;
    max-height: 180px;
    border-radius: 10px;
    object-fit: cover;
}

video.model-image {
    width: 100%;
    display: block;
}

.requirements-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.requirement-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #1e8e3e;
    color: white;
    font-size: 12px;
}

.requirement-text {
    font-size: 16px;
}

.upload-and-privacy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.privacy-note {
    font-size: 11px;
    color: #333; /* Darker color for better visibility */
    max-width: 350px;
    line-height: 1.3;
    padding: 8px;
    background-color: #f9f9f9; /* Light background for emphasis */
    border-radius: 5px;
    border: 1px solid #eee;
    margin: 0;
}

.privacy-note a {
    color: #1a73e8;
    text-decoration: none;
}

.upload-photo-btn-main {
    background-color: #212121;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    white-space: nowrap;
}

.upload-photo-btn-main img {
    width: 14px;
    height: 14px;
    filter: invert(1);
}

.try-on-button-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.try-on-btn {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.try-on-btn img {
    width: 24px;
    height: 24px;
}

.try-on-btn:hover {
    background-color: #fff;
}

.product-image-gallery {
    position: relative;
    overflow: hidden;
    width: 400px;
    height: 550px;
}

.product-image-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

.image-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 15;
}

.image-nav-btn:hover {
    background-color: #fff;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.product-details h1 {
    font-size: 36px;
    margin: 0 0 10px 0;
}

.product-details .subheading {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.product-details .price {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

.product-details .description {
    line-height: 1.6;
    margin-bottom: 30px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 15px;
    background-color: #111;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: transform 0.2s ease-in-out;
}

.add-to-cart-btn:hover {
    transform: scale(1.02);
}

.fine-print {
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* Size and Color Selectors */
.size-selector, .color-selector {
    margin-bottom: 20px;
}

.options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.option-box {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    background-color: #fff;
    font-size: 14px;
    transition: transform 0.2s ease-in-out;
}

.option-box:hover {
    transform: scale(1.05);
}

.option-box.active {
    border-color: #111;
    box-shadow: 0 0 0 1px #111;
}

.color-options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-options-grid .color-box {
    width: 50px;
    height: 50px;
    border: 2px solid #eee;
    border-radius: 5px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
}

.color-options-grid .color-box:hover {
    transform: scale(1.1);
}

.color-options-grid .color-box.active {
    border-color: #007bff;
}

.color-options-grid .color-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Extra Details */
.product-extra-details {
    margin-top: 30px;
}

.product-extra-details h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.product-extra-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-extra-details li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.product-extra-details li:last-child {
    border-bottom: none;
}

.product-extra-details li span:first-child {
    font-weight: bold;
    color: #333;
}


/* VTO Section */
.vto-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.vto-controls {
    margin-bottom: 20px;
}

.upload-photo-btn, #try-on-btn {
    background-color: #fff;
    color: #111;
    border: 1px solid #111;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 50px;
    margin-right: 10px;
    transition: transform 0.2s ease-in-out;
    white-space: nowrap;
}

.upload-photo-btn:hover, #try-on-btn:hover {
    transform: scale(1.05);
}

.vto-images-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    position: relative;
}

#select-image-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    z-index: 15;
}

.image-preview-box {
    width: 50%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
    border: 2px dashed #ccc;
    border-radius: 10px;
}

.image-preview-box.has-content {
    /* No styles needed here anymore */
}

.image-preview-box img {
    max-width: 100%;
    max-height: 300px; /* Constrain max height */
    border-radius: 8px;
    object-fit: contain;
}

.vto-grid-container {
    width: 50%;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns for results */
    gap: 10px;
}

.vto-grid-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    max-height: 300px; /* Constrain max height */
}

.vto-image-box {
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
    width: 100%; /* Ensure it takes full width of the grid cell */
}

.vto-image-box:hover {
    transform: scale(1.05);
}

.vto-image-box.active {
    border-color: #007bff; /* Blue border for active VTO image */
}

.vto-image-box img {
    width: 100%;
    height: auto; /* Let height adjust automatically */
    object-fit: contain; /* Use contain to ensure the whole image is visible */
}



.view-outfit-section {
    text-align: left; /* Align to the left */
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

#view-outfit-btn {
    background-color: #111;
    color: #fff;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    transition: transform 0.2s ease-in-out;
}

#view-outfit-btn:hover {
    transform: scale(1.05);
}

.result-container {
    margin-top: 20px;
    min-height: 300px;
    display: flex;
    justify-content: flex-start; /* Align to the left */
    align-items: center;
    gap: 20px; /* Add space between images */
}

.result-container img {
    max-width: 25%; /* 50% smaller */
    height: auto;
    border-radius: 8px;
}

/* Loader Animation */
.loader {
    border: 4px solid #f3f3f3; /* Light grey */
    border-top: 4px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

.hidden {
    display: none;
}

/* Image Preview Screen */
.image-preview-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 30;
    display: none; /* Hide by default */
    flex-direction: column;
    border-radius: 0; /* Remove any rounded corners */
    overflow: hidden; /* Ensure no content spills out */
}

/* Show the image preview screen when it doesn't have the hidden class */
.image-preview-screen:not(.hidden) {
    display: flex;
}

.preview-header {
    padding: 20px;
    display: flex;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 35;
}

.back-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.preview-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    width: 100%;
}

.preview-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0; /* Remove rounded corners */
}

.preview-footer {
    padding: 20px;
    display: flex;
    justify-content: flex-end;
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 35;
}

.select-btn {
    background-color: #1e8e3e;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    text-align: center;
}

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

.loading-icon img {
    width: 48px;
    height: 48px;
}

.loading-text-container {
    overflow: hidden;
}

.loading-text {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(to right, #333, #999, #333);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    animation: gradient-animation 2s linear infinite;
}

.loading-subtext {
    font-size: 14px;
    color: #666;
}

@keyframes gradient-animation {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Chat Assistant Waiting State - Removed visual indicator */
.footer-sound-wave.waiting {
    /* No visual changes - just track state internally */
}
