/* ============================================================
   VIRTUAL TRY-ON — Trigger Button
   ============================================================ */

.pdp-tryon-btn {
    width: 100%;
    height: 52px;
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 0;
    margin-top: -20px;
    margin-bottom: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.pdp-tryon-btn:hover {
    background: #000000;
    color: #ffffff;
}

/* ============================================================
   VIRTUAL TRY-ON — MODAL OVERLAY
   ============================================================ */

.tryon-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.tryon-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.tryon-modal-content {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    text-align: left;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.30);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s ease;
}

.tryon-modal.is-open .tryon-modal-content {
    transform: translateY(0) scale(1);
}

.tryon-modal-header {
    background: #000000;
    color: #fff;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tryon-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-heading);
}

#tryonModalClose {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: background 0.2s ease, transform 0.2s ease;
}

#tryonModalClose:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.tryon-modal-body {
    padding: 28px 30px 32px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tryon-modal-subtext {
    font-size: 13.5px;
    color: #555555;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.tryon-dropzone {
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 340px;
    border: 2px dashed #cccccc;
    border-radius: 10px;
    background: #fafafa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.tryon-dropzone:hover {
    border-color: #000000;
    background: #f4f4f4;
}

.tryon-dropzone-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #666666;
}

.tryon-dropzone-empty i {
    font-size: 30px;
    color: #999999;
    margin-bottom: 4px;
}

.tryon-dropzone-empty span {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #111111;
}

.tryon-dropzone-empty small {
    font-size: 11.5px;
    color: #999999;
}

.tryon-preview-wrap {
    width: 100%;
    height: 100%;
    position: relative;
}

.tryon-preview-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tryon-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: none;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.tryon-remove-btn:hover {
    background: rgba(0, 0, 0, 0.85);
}

.tryon-error-text {
    color: #c62828;
    font-size: 12.5px;
    font-weight: 600;
    margin: 12px 0 0 0;
    min-height: 16px;
}

.tryon-generate-btn {
    width: 100%;
    height: 50px;
    background: #000000;
    color: #ffffff;
    border: none;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 20px;
    transition: background 0.2s ease;
}

.tryon-generate-btn:hover:not(:disabled) {
    background: #222222;
}

.tryon-generate-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* LOADING STATE */

.tryon-loading-state {
    padding-top: 50px;
    padding-bottom: 50px;
}

.tryon-spinner {
    width: 46px;
    height: 46px;
    border: 4px solid #eeeeee;
    border-top-color: #000000;
    border-radius: 50%;
    animation: tryon-spin 0.8s linear infinite;
    margin-bottom: 22px;
}

@keyframes tryon-spin {
    to { transform: rotate(360deg); }
}

.tryon-loading-title {
    font-size: 15px;
    font-weight: 700;
    color: #111111;
    margin: 0 0 6px 0;
}

.tryon-loading-subtext {
    font-size: 12.5px;
    color: #888888;
    margin: 0;
}

/* RESULT STATE */

.tryon-result-img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    border-radius: 10px;
    background: #f4f4f4;
    margin-bottom: 22px;
}

.tryon-result-actions {
    width: 100%;
    display: flex;
    gap: 12px;
}

.tryon-tryagain-btn,
.tryon-close-btn {
    flex: 1;
    height: 46px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tryon-tryagain-btn {
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
}

.tryon-tryagain-btn:hover {
    background: #f4f4f4;
}

.tryon-close-btn {
    background: #000000;
    color: #ffffff;
    border: 1px solid #000000;
}

.tryon-close-btn:hover {
    background: #222222;
}

/* RESPONSIVE */

@media (max-width: 600px) {
    .tryon-modal-content {
        max-width: 100%;
    }

    .tryon-modal-body {
        padding: 22px 20px 26px 20px;
    }
}