/* ----------------------------------------------------------------
    MODAL PREMIUM "BOTTOM SHEET" (UX/UI Surprising Solution)
-----------------------------------------------------------------*/

/* Blur Backdrop */
.modal-wrapper {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: flex-end;
    /* Drawer on Mobile */
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Desktop Handling */
@media (min-width: 992px) {
    .modal-wrapper {
        align-items: center;
    }

    .modal-content-custom.modal-wide {
        max-width: 1000px !important;
        border-radius: 24px;
        height: auto;
        max-height: 90vh;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Mobile Drawer Effect */
@media (max-width: 991px) {
    .modal-content-custom.modal-wide {
        width: 100% !important;
        max-width: 100% !important;
        height: 94vh !important;
        margin: 0;
        border-radius: 32px 32px 0 0 !important;
        padding: 0 !important;
        overflow-y: auto;
        overflow-x: hidden;
        background: #fff;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
        animation: sheetSlideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    }

    @keyframes sheetSlideUp {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    .close-modal {
        top: 25px !important;
        right: 20px !important;
        background: rgba(255, 255, 255, 0.85) !important;
        backdrop-filter: blur(10px);
        width: 42px !important;
        height: 42px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
        z-index: 10002 !important;
        border-radius: 50% !important;
        font-size: 20px !important;
    }
}

/* Modal Content Base */
.premium-drawer-content {
    position: relative;
    background: #fff;
}

.drawer-pull-bar {
    width: 36px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 10px;
    margin: 12px auto;
}

.drawer-image-section {
    position: relative;
    background: #111;
}

.hero-full-width {
    width: 100%;
    height: 450px;
    object-fit: cover;
}

@media (max-width: 767px) {
    .hero-full-width {
        height: 380px;
        object-fit: contain;
    }
}

/* Thumbnails */
.drawer-thumbnails {
    position: absolute;
    bottom: 25px;
    left: 0;
    width: 100%;
    z-index: 10;
}

.thumb-scroller {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
}

.thumb-box {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-box.active {
    border-color: #6eceff;
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

/* Info Section */
.drawer-body-section {
    padding-bottom: 140px;
    /* Space for fixed Footer */
}

.badge-premium-category {
    background: rgba(110, 206, 255, 0.1);
    color: #6eceff;
    padding: 5px 14px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 8px;
}

.posted-status {
    font-size: 11px;
    font-weight: 700;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
}

.drawer-title {
    font-weight: 900;
    font-size: 26px;
    color: #1e293b;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin: 10px 0 5px 0;
}

.drawer-price {
    font-size: 34px;
    font-weight: 900;
    color: #ff6e40;
    letter-spacing: -1.5px;
}

.divider-subtle {
    height: 1px;
    background: #f1f5f9;
    margin: 30px 0;
}

.drawer-label {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
    display: block;
}

.drawer-description-text {
    font-size: 16px;
    line-height: 1.8;
    color: #475569;
}

/* Seller Card */
.drawer-seller-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 24px;
    transition: transform 0.3s ease;
}

.drawer-avatar {
    width: 52px;
    height: 52px;
    background: #1e293b;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    margin-right: 18px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.drawer-vname {
    font-weight: 800;
    font-size: 16px;
    color: #1e293b;
}

.drawer-vlocation {
    font-size: 13px;
    color: #64748b;
    display: block;
}

/* Footer Action */
.drawer-footer-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 25px 45px 25px;
    z-index: 100;
    pointer-events: none;
    /* Let events pass for blur bg */
}

.drawer-footer-actions>* {
    pointer-events: auto;
}

.footer-blur-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 140px;
    background: linear-gradient(to top, #fff 60%, rgba(255, 255, 255, 0));
    z-index: -1;
}

.btn-whatsapp-premium {
    background: #1e293b;
    color: #fff !important;
    padding: 20px;
    border-radius: 100px;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: 2px;
    text-decoration: none !important;
    text-align: center;
    box-shadow: 0 15px 35px rgba(30, 41, 59, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-whatsapp-premium:hover {
    background: #000;
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.btn-whatsapp-premium:active {
    transform: scale(0.95);
}

/* Global Helpers */
.padding-horizontal-30px {
    padding-left: 30px;
    padding-right: 30px;
}

@media (max-width: 575px) {
    .padding-horizontal-30px {
        padding-left: 20px;
        padding-right: 20px;
    }
}

body.modal-open {
    overflow: hidden !important;
    height: 100vh !important;
}