/* ===== SIZE GUIDE & CUSTOMIZE MODALS STYLES ===== */

/* Size Guide Button in Product Page */
.size-guide-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 0.9rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-guide-link:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Customize Button */
.btn-customize {
    width: 100%;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-customize:hover {
    background: #b8895f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 165, 116, 0.3);
}

/* Modal Base Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 95%;
    max-width: 1200px;
    position: relative;
    animation: slideDown 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    color: #666;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
    z-index: 10;
}

.close-modal:hover {
    color: #000;
}

/* Modal Headers */
.modal-content h2 {
    font-size: 1.8rem;
    color: #2C2416;
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif;
}

/* Unit Toggle Styles */
.unit-toggle-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.toggle-label {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

.unit-toggle {
    display: inline-flex;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 2px;
    overflow: hidden;
}

.unit-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    background: transparent;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 25px;
}

.unit-btn.active {
    background: #2C2416;
    color: #fff;
}

.unit-btn:hover:not(.active) {
    background: #f5f5f5;
}

/* Size Display Options */
.size-display-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.size-label {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

.us-label {
    font-size: 0.85rem;
    color: #999;
}

.size-buttons {
    display: flex;
    gap: 0.5rem;
}

.size-btn {
    padding: 0.5rem 1.2rem;
    border: 2px solid #ddd;
    background: #fff;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.size-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.size-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Size Guide Content Layout */
.size-guide-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

/* Diagram Section */
.diagram-section {
    background: #fafafa;
    padding: 1.5rem;
    border-radius: 8px;
}

.diagram-wrapper {
    display: flex;
    gap: 1rem;
    justify-content: space-around;
}

.body-diagram-female,
.body-diagram-garment {
    flex: 1;
}

.diagram-svg {
    width: 100%;
    height: auto;
    max-width: 250px;
    margin: 0 auto;
    display: block;
}

/* Size Chart Section */
.size-chart-section {
    display: flex;
    flex-direction: column;
}

.chart-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.chart-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: #666;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.chart-tab:hover {
    color: var(--primary-color);
}

.chart-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.chart-table-wrapper {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.size-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.size-table thead {
    background: #f5f5f5;
}

.size-table th,
.size-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.size-table th {
    font-weight: 600;
    color: #333;
}

.size-table tr:hover {
    background: #fafafa;
}

.size-table td strong {
    color: var(--primary-color);
}

.size-note {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.size-note i {
    color: var(--primary-color);
}

.measure-link {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: auto;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.measure-link:hover {
    text-decoration: underline;
}

/* ===== CUSTOMIZE MODAL STYLES ===== */
.customize-modal {
    max-width: 1100px;
}

.customize-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-top: 1.5rem;
}

/* Measurement Inputs */
.measurement-inputs h3 {
    font-size: 1.3rem;
    color: #2C2416;
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif;
}

.input-group {
    margin-bottom: 1.2rem;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.input-group label i {
    color: var(--primary-color);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3.5rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.unit-display {
    position: absolute;
    right: 1rem;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    pointer-events: none;
}

/* Recommendation Panel */
.recommendation-panel {
    background: #fafafa;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.recommendation-panel h3 {
    font-size: 1.3rem;
    color: #2C2416;
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif;
}

.recommendation-result {
    text-align: center;
    margin-bottom: 1.5rem;
}

.recommended-size-box {
    background: #fff;
    border: 3px solid #ddd;
    border-radius: 12px;
    padding: 2rem 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.recommended-size-box.has-recommendation {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #fff 0%, #fafafa 100%);
}

.size-value {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.recommended-size-box p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.recommendation-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

.apply-custom-btn {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* Measurement Guide */
.measurement-guide {
    background: #fff;
    padding: 1.2rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.measurement-guide h4 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.measurement-guide h4 i {
    color: var(--primary-color);
}

.measurement-guide ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.measurement-guide li {
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

.measurement-guide li strong {
    color: #333;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 968px) {
    .size-guide-content {
        grid-template-columns: 1fr;
    }

    .customize-content-grid {
        grid-template-columns: 1fr;
    }

    .diagram-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1.5rem;
    }

    .close-modal {
        right: 1rem;
        top: 1rem;
        font-size: 1.5rem;
    }

    .modal-content h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .size-display-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .size-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .size-btn {
        flex: 1;
        padding: 0.5rem 0.8rem;
    }

    .unit-toggle-container {
        flex-direction: column;
        align-items: flex-start;
    }
}
