.mc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999 !important;
    overflow: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mc-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc-modal.visible {
    opacity: 1;
}

.mc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99998 !important;
}

.mc-modal-content {
    position: relative;
    max-width: 900px;
    max-height: 90vh;
    margin: 20px;
    background: #fff;
    border-radius: 8px;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 99999 !important;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.mc-modal-content::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.mc-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    background: #1e3a8d;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 36px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    aspect-ratio: 1 / 1;
    font-family: Arial, sans-serif;
    text-align: center;
    vertical-align: middle;
}

.mc-modal-close:hover {
    background: #152a6b;
    transform: scale(1.1);
}

#mc-modal-body {
    padding: 30px;
}

.mc-modal-header {
    margin-bottom: 20px;
}

.mc-modal-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin: 0 0 10px 0;
}

.mc-modal-location {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.mc-modal-gallery {
    margin: 20px 0;
    position: relative;
}

.mc-gallery-main {
    position: relative;
    width: 100%;
    height: 500px;
    background: #000;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc-gallery-main img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.mc-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    aspect-ratio: 1 / 1;
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    font-weight: bold;
    line-height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    font-family: Arial, sans-serif;
    text-align: center;
    vertical-align: middle;
    color: #000;
}

.mc-gallery-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
    color: #000;
}

.mc-gallery-prev {
    left: 10px;
}

.mc-gallery-next {
    right: 10px;
}

.mc-gallery-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 14px;
}

.mc-gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: thin;
}

.mc-gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.mc-gallery-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.mc-gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.mc-gallery-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.mc-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mc-thumbnail:hover {
    border-color: #203d8b;
    transform: scale(1.05);
}

.mc-thumbnail.active {
    border-color: #203d8b;
    box-shadow: 0 0 0 2px rgba(32, 61, 139, 0.3);
}

.mc-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mc-modal-price {
    font-size: 32px;
    font-weight: bold;
    color: #203d8b;
    margin: 20px 0;
}

.mc-modal-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.mc-detail-box {
    text-align: center;
}

.mc-detail-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.mc-detail-value {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.mc-modal-section {
    margin: 30px 0;
}

.mc-section-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #203d8b;
}

.mc-description {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    white-space: pre-wrap;
}

.mc-inquiry-form {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
}

.mc-inquiry-title {
    margin: 0 0 20px 0;
    font-size: 22px;
    color: #203d8b;
}

.mc-inquiry-form-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.mc-form-row input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.mc-form-row input:focus {
    outline: none;
    border-color: #203d8b;
}

.mc-form-checkbox {
    display: flex;
    gap: 20px;
    padding: 10px 0;
}

.mc-form-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    cursor: pointer;
}

.mc-form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.mc-btn-inquiry {
    width: 100%;
    padding: 15px 20px;
    background: #203d8b;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.mc-btn-inquiry:hover {
    background: #1a3070;
}

.mc-inquiry-message {
    padding: 12px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.mc-inquiry-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mc-inquiry-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .mc-form-row {
        grid-template-columns: 1fr;
    }
}

.mc-scroll-button {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    aspect-ratio: 1 / 1;
    background: #203d8b;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.mc-scroll-button:hover {
    background: #1a3070;
    transform: translateX(-50%) scale(1.1);
}

.mc-scroll-down {
    bottom: 20px;
}

.mc-scroll-up {
    top: 80px;
}

@media (max-width: 768px) {
    .mc-modal-content {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }
    
    #mc-modal-body {
        padding: 20px;
    }
    
    .mc-gallery-main {
        height: 250px;
    }
    
    .mc-modal-title {
        font-size: 22px;
    }
}
