/* CORECȚIE PRINCIPALĂ: Adăugat .made-to-measure-popup-suit */
.imagini-corp {
  display: flex;
  flex-direction: row;
  gap: 35px;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  margin-top: 0px;
}
@media (max-width: 768px) {
  .imagini-corp {
    gap: 58px; /* pe mobil */
    flex-wrap: wrap; /* opțional, dacă vrei să permită trecerea pe rândul următor */
  }
}
.option-images h3 {
    color: #FFFFFF !important;
    font-size: 14px !important;
    font-family: inherit !important;
    font-weight: 400 !important;
    margin-top: 7px;
    margin-bottom: 10px !important;
    text-align: center;
    line-height: 1.5 !important;
}

.imagini-corp img {
  max-height: 80px;
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.imagini-corp img:hover {
  transform: scale(1.2);
  z-index: 10;
}

.made-to-measure-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding-right: 7px;
    padding-left: 7px;
    padding-top: 60px;
    padding-bottom: 60px;
    box-sizing: border-box;
    overflow: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}


/* ===== CLIENT INPUTS (Nume + Prenume) ===== */
.measures-column input[type="text"] {
    background: #fff !important;
    border: 1px solid #FFA400 !important;
    border-radius: 4px !important;
    padding: 8px;
    width: 90% !important;
    height: 50px !important;
    line-height: 1.5 !important;
    color: #010043 !important;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    box-sizing: border-box !important;
    font-size: 15px !important;
}

.measures-column input[type="text"]:focus {
    border-color: #010043 !important;
    outline: none !important;
}

/* Grupare nume + prenume pe un rând (desktop) */
.measures-column .client-name-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .measures-column .client-name-group {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        gap: 15px !important;
    }

}


/* Stare invalidă */
.measures-column input.invalid {
    border-color: #ff5555 !important;
    background: #fff6f6 !important;
}



.standard-size-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 60px 7px;
    box-sizing: border-box;
    overflow: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}

.standard-size-popup::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.standard-size-popup .popup-content {
    background: #010043;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    position: relative;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.popup-content {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.made-to-measure-popup::-webkit-scrollbar,
.made-to-measure-popup-suit::-webkit-scrollbar {
    display: none; /* WebKit browsers (Chrome, Safari) */
}

.popup-content {
    background: #010043;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh; /* înlocuiește calc(100vh - 40px) */
    overflow-y: auto !important;
    position: relative;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.made-to-measure-popup .popup-content,
.standard-size-popup .popup-content {
    max-height: 85vh !important;
}

.popup-content h2 {
    color: #FFFFFF !important;
    text-align: center !important;
    margin: 0 0 20px 0 !important;
    font-size: 20px;
}

.popup-content::-webkit-scrollbar {
    width: 8px;
}

.popup-content::-webkit-scrollbar-track {
    background: #ccc;
    border-radius: 4px;
}

.popup-content::-webkit-scrollbar-thumb {
    background: #FFA400;
    border-radius: 4px;
}

popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: #FFA400;
    cursor: pointer;
}

.popup-close {
position: absolute;
  top: 5px !important; /* poziție verticală ajustabilă */
  right: 5px !important; /* poziție orizontală ajustabilă */
  z-index: 1104;
  width: 30px !important;
  height: 30px !important;
  background-color: rgba(255, 164, 0, 0.7) !important; /* fundal discret și uniform */
  line-height: 1;
  border-radius: 50%;
  font-size: 35px;
  padding: 0;
  opacity: 1 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  text-decoration: none;
}


.progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.progress-text {
    font-size: 12px;
    color: #FFFFFF;
    text-align: center !important;
    display: block;
    margin-bottom: 8px !important;
    width: 100%;
}

.progress-bar {
    height: 5px;
    background: #ccc;
    border-radius: 3px;
    width: 100%;
    margin: 0 !important;
}

.progress-fill {
    height: 100%;
    background: #FFA400;
    width: 0;
    transition: width 0.3s;
}

.made-to-measure-popup .form-row,
.made-to-measure-popup-suit .form-row,
.standard-size-popup .form-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin-bottom: 5px;
    align-items: stretch !important;
    width: 100%;
    min-height: 90px !important;
}

.form-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    flex-grow: 0;
    flex-shrink: 0;
}

.body-column, .shirt-column {
    flex: 0 0 20% !important;
    max-width: 20% !important;
    text-align: center;
    background: transparent !important;
    border: none !important;
}

.measures-column {
    flex: 0 0 80% !important;
    max-width: 80% !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start !important;
    padding: 0 !important;
}

.form-column h3 {
    color: #FFFFFF !important;
    font-size: 14px !important;
    font-family: inherit !important;
    font-weight: 400 !important;
    margin-bottom: 0px;
    line-height: 1.5 !important;
}

.option-row h3 {
    color: #FFFFFF !important;
    font-size: 14px !important;
    font-family: inherit !important;
    font-weight: 400 !important;
    margin-bottom: 5px;
    line-height: 1.5 !important;
}

.measures-column label {
    color: #FFFFFF !important;
    font-size: 14px !important;
    font-family: inherit !important;
    font-weight: 400 !important;
    margin-bottom: 5px;
    align-self: flex-start !important;
    line-height: 1.5 !important;
}

.measures-column select {
    background: #fff !important;
    border: 1px solid #FFA400 !important;
    border-radius: 4px !important;
    padding: 8px;
    width: 95% !important;
    height: 50px !important;
    line-height: 1.5 !important;
    color: #010043;
    transition: background 0.2s, color 0.2s;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.measures-column select.filled {
    background: #FFA400 !important;
    color: #010043;
}
.body-column select.filled {
    background: #FFA400 !important;
    color: #010043;
}
.measures-column select.error {
    border-color: red !important;
}

.measures-column select.error + .tooltip {
    display: block;
    position: absolute;
    background: red;
    color: #fff;
    padding: 5px;
    border-radius: 4px;
    font-size: 12px;
    top: -30px;
    left: 10px;
}

.explanatory-image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    border: none !important;
    cursor: pointer;
    margin-top: 3px;
    margin-right: 5px;
    background: transparent !important;
    position: relative;
    transition: transform 0.2s ease;
}

.explanatory-image:hover {
    transform: scale(1.1);
}

.explanatory-image::after {
    content: '🔍';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 14px;
    color: #FFA400;
    background: rgba(1, 0, 67, 0.7);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.explanatory-image:hover::after {
    opacity: 1;
}

@media screen and (max-width: 768px) {
    .popup-content {
        width: 100% !important;
        max-width: 380px !important;
        padding: 30px 15px;
    }
        .standard-size-popup .popup-content {
        width: 100% !important;
        max-width: 380px !important;
        padding: 30px 15px;
    }
    .popup-content h2 {
        margin-bottom: 20px !important;
    }
    .form-column h3 {
        margin-bottom: 0 !important;
    }
    .explanatory-image {
        max-width: 50px !important;
        max-height: 50px !important;
    }
    .explanatory-image::after {
        opacity: 0.5;
        font-size: 12px;
        width: 18px;
        height: 18px;
    }
    .explanatory-image:active::after {
        opacity: 1;
    }
}

.photos-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: nowrap;
    margin-top: 20px;
}

.photo-upload {
    flex: 0 1 auto;
    text-align: center;
    position: relative;
}

.photo-button {
    width: 95px;
    height: 95px;
    background: #010043;
    border: 1px solid #FFA400;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #FFFFFF;
    cursor: pointer;
    font-size: 12px;
    text-align: center;
}

.camera-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.photo-preview {
    width: 100px;
    height: 100px;
    display: none;
    position: relative;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #FFA400;
}

.photo-options {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 5px;
}

.photo-options button {
    background: #FFA400;
    color: #010043;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.photo-options button:hover {
    background: #e69500;
}

/* Media query pentru desktop (laptop și PC) */
@media screen and (min-width: 769px) {
    .popup-content {
        max-width: 500px !important;
    }
    .made-to-measure-popup .explanatory-image,
    .standard-size-popup .explanatory-image {
        width: 70px !important;
        height: 50px !important;
        max-width: 70px !important;
        max-height: 50px !important;
    }
}

/* Stiluri Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 7px;
    right: 7px;
    font-size: 30px;
    color: #FFA400;
    background: #010043;
    border-radius: 20%;
    width: 55px;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
    transition: background 0.3s;
}

.lightbox-close:hover {
    background: #FFA400;
    color: #010043;
}

/* Stil pentru cursor de mărire */
.explanatory-image {
    cursor: zoom-in;
}

/* Butonul de submit */
.submit-measures-shirt {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 57px;
    background-color: #010043 !important;
    font-weight: 500;
    fill: #FFA400;
    color: #FFFFFF !important;
    box-shadow: 1px 1px 10px 0px #FFA400 !important;
    border-style: none;
    border-radius: 7px 7px 7px 7px !important;
    cursor: pointer;
    transition: background 0.2s;
}
.submit-measures-shirt:hover {
    background: #FFFFFF !important;
    color: #010043 !important;
    transition: background 0.2s;
}

.submit-standard-shirt {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 25px;
    background-color: #010043 !important;
    font-weight: 500;
    fill: #FFA400;
    color: #FFFFFF !important;
    box-shadow: 1px 1px 10px 0px #FFA400 !important;
    border-style: none;
    border-radius: 7px 7px 7px 7px !important;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-standard-shirt:hover {
    background: #FFFFFF !important;
    color: #010043 !important;
    transition: background 0.2s;
}

.submit-measures-suits {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 57px;
    background: #FFA400;
    color: #010043;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-measures-suits:hover {
    background: #e69500;
}

body.popup-open {
    overflow: hidden;
    position: relative;
    height: 100%;
}

.made-to-measure-popup,
.made-to-measure-popup-suit {
    overflow-y: auto;
}

.popup-content {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.add-measurements-btn.edited {
    color: #FFA400 !important;
    border: 1px solid #FFA400;
}

.btn-measurements-standard.edited {
    color: #FFA400 !important;
    border: 1px solid #FFA400;
}

.option-row {
    margin-top: 10px;
    text-align: center;
}

.option-images {
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.option-pick {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.option-pick:hover {
    transform: scale(1.05);
}

.mtm-reset-text {
    color: #ff6b6b;
    font-size: 0.9em;
    font-style: italic;
}

.add-measurements-btn.edited:hover .mtm-reset-text {
    text-decoration: underline;
}

.option-pick.selected {
    border: 4px solid #FFA400;
}

.option-pick,
.explanatory-image {
    width: 95px;
    height: 95px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.option-pick.selected,
.explanatory-image.selected {
    border-color: #FFA400;
}

.mtm-tooltip {
    position: absolute;
    background: #e60012;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    top: -38px;
    left: 10px;
    white-space: nowrap;
    z-index: 9999;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    font-weight: 500;
    line-height: 1.4;
}

.option-row.error .option-images { outline: 2px solid #ffa400; outline-offset: 4px; }
.option-pick.selected { box-shadow: 0 0 0 3px #010043 inset; border-radius: 4px; }
.mtm-tooltip { display:block; margin:6px 0 0; font-size:13px; color:#ffa400; }