/* ─── DichVu Page ─── */
.dv-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px
}

/* Header */
.dv-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #fff5f0, #fff0eb);
    border: 1px solid #fdd;
    border-radius: 16px
}

.dv-header-icon {
    width: 54px;
    height: 54px;
    border-radius: 13px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center
}

.dv-header-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 13px
}

.dv-header-icon i {
    font-size: 24px;
    color: #fff
}

.dv-header h2 {
    font-size: 21px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    text-transform: uppercase
}

.dv-header p {
    font-size: 13px;
    color: #666;
    margin: 3px 0 0
}

/* ═══ IMAGES MODE (product cards) ═══ */
.dv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px
}

.dv-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: all .25s;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
    cursor: pointer
}

.dv-card:hover {
    border-color: #ff5722;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1)
}

.dv-card-imgwrap {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden
}

.dv-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease
}

.dv-card:hover .dv-card-img {
    transform: scale(1.05)
}

.dv-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, .15), transparent);
    pointer-events: none
}

.dv-card-body {
    padding: 10px 14px
}

.dv-card-title {
    font-size: 13px;
    color: #333;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    font-weight: 600
}

.dv-card-priceline {
    display: flex;
    align-items: baseline;
    gap: 8px
}

.dv-card-price {
    font-size: 17px;
    font-weight: 700;
    color: #e53935
}

.dv-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    border-top: 1px solid #f0f0f0
}

.dv-card-sold {
    font-size: 11px;
    color: #888
}

.dv-card-sold i {
    margin-right: 2px
}

.dv-card-btn {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #ff5722, #ff7043);
    padding: 5px 14px;
    border-radius: 6px;
    white-space: nowrap
}

/* ═══ CHECKOUT MODAL ═══ */
.dv-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 5000;
    justify-content: center;
    align-items: center;
    padding: 16px;
    /* iOS safe area */
    padding-bottom: env(safe-area-inset-bottom, 16px);
}

.dv-overlay.active {
    display: flex
}

.dv-checkout {
    width: 100%;
    max-width: 440px;
    max-height: min(96vh, 96dvh);
    background: #fff;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    animation: modalIn .25s ease;
    overflow: hidden;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(.95) translateY(12px)
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0)
    }
}

.dv-ck-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #e53935, #c62828);
    color: #fff;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    min-height: 52px;
}

.dv-ck-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px
}

.dv-ck-close {
    background: rgba(255, 255, 255, .15);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.dv-ck-close:hover {
    background: rgba(255, 255, 255, .3)
}

.dv-ck-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.dv-ck-scroll::-webkit-scrollbar {
    width: 3px
}

.dv-ck-scroll::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px
}

/* Product summary */
.dv-ck-product {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px
}

.dv-ck-product-name {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 2px
}

.dv-ck-product-price {
    font-size: 20px;
    font-weight: 800;
    color: #e53935
}

/* Video toggle */
.dv-ck-vid-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    margin-bottom: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #e53935;
    cursor: pointer;
    transition: all .2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.dv-ck-vid-toggle:hover {
    background: #fee2e2;
    border-color: #f87171;
}

.dv-ck-vid-toggle .bx-play-circle {
    font-size: 18px;
}

.dv-ck-vid-arrow {
    margin-left: auto;
    font-size: 16px;
    transition: transform .25s ease;
}

.dv-ck-vid-toggle.active .dv-ck-vid-arrow {
    transform: rotate(180deg);
}

.dv-ck-vid {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid #eee;
}

.dv-ck-vid iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Form */
.dv-ck-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px
}

.dv-ck-field {
    flex: 1;
    margin-bottom: 10px
}

.dv-ck-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 4px
}

.dv-ck-field input,
.dv-ck-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #1f2937;
    background: #fafafa;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s;
    /* iOS input zoom fix */
    -webkit-appearance: none;
    appearance: none;
}

.dv-ck-field input:focus,
.dv-ck-field textarea:focus {
    border-color: #e53935;
    background: #fff
}

.dv-ck-field textarea {
    resize: vertical;
    min-height: 52px
}

#thongbao {
    margin-bottom: 8px
}

.dv-ck-footer {
    padding: 12px 20px;
    flex-shrink: 0;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    /* iOS safe area bottom */
    padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
}

.dv-ck-btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #e53935, #c62828);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all .2s;
    -webkit-tap-highlight-color: transparent;
}

.dv-ck-btn:hover {
    box-shadow: 0 4px 14px rgba(229, 57, 53, .4)
}

.dv-ck-btn:active {
    transform: scale(.98)
}

/* ── Tablet (576–768px) ── */
@media(max-width:768px) and (min-width:577px) {
    .dv-checkout {
        max-width: 90vw;
        max-height: 94dvh
    }
}

/* ── Mobile ≤576px: bottom sheet ── */
@media(max-width:576px) {

    .dv-checkout {
        max-width: 100%;
        width: 100%;
        max-height: 98dvh;
        max-height: 98vh;
        border-radius: 18px 18px 0 0;
        animation: sheetIn .3s ease;
    }

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

        to {
            transform: translateY(0)
        }
    }

    .dv-ck-header {
        border-radius: 18px 18px 0 0;
        padding: 14px 18px
    }

    .dv-ck-scroll {
        padding: 16px 18px
    }

    .dv-ck-row {
        flex-direction: column;
        gap: 0
    }

    .dv-ck-footer {
        padding: 12px 18px;
        padding-bottom: max(16px, env(safe-area-inset-bottom, 16px))
    }

    .dv-ck-field input,
    .dv-ck-field textarea {
        font-size: 16px
    }

    /* prevents iOS zoom on focus */
}

/* ═══ LISTORDER MODE ═══ */
.lo-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px
}

/* Service card list */
.lo-services {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04)
}

.lo-services h4 {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 6px
}

.lo-services h4 i {
    color: #e53935;
    font-size: 18px
}

.lo-search {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 13px;
    color: #1a1a1a;
    outline: none;
    margin-bottom: 10px;
    box-sizing: border-box;
    background: #fafafa
}

.lo-search:focus {
    border-color: #e53935
}

.lo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    max-height: 400px;
    overflow-y: auto
}

.lo-grid::-webkit-scrollbar {
    width: 3px
}

.lo-grid::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px
}

.lo-pkg {
    padding: 12px 14px;
    background: #fafafa;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s;
    position: relative
}

.lo-pkg:hover {
    background: #fef2f2;
    border-color: #fecaca
}

.lo-pkg.active {
    background: #fef2f2;
    border-color: #e53935
}

.lo-pkg.active::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: #e53935;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center
}

.lo-pkg-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px
}

.lo-pkg-price {
    font-size: 15px;
    font-weight: 800;
    color: #e53935
}

/* Order form section */
.lo-form-section {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px
}

.lo-form {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04)
}

.lo-form h4 {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 6px
}

.lo-form h4 i {
    color: #e53935;
    font-size: 18px
}

.lo-row {
    display: flex;
    gap: 10px
}

.lo-fg {
    flex: 1;
    margin-bottom: 10px
}

.lo-fg label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 4px
}

.lo-fg input,
.lo-fg textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    color: #1a1a1a;
    background: #fafafa;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s
}

.lo-fg input:focus,
.lo-fg textarea:focus {
    border-color: #e53935;
    background: #fff
}

.lo-fg textarea {
    resize: vertical;
    min-height: 48px
}

.lo-total-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    margin-bottom: 12px
}

.lo-total-bar span:first-child {
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase
}

.lo-total-bar span:last-child {
    font-size: 22px;
    font-weight: 800;
    color: #e53935
}

.lo-submit-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #e53935, #c62828);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: box-shadow .2s
}

.lo-submit-btn:hover {
    box-shadow: 0 4px 14px rgba(229, 57, 53, .4)
}

.lo-submit-btn:disabled {
    opacity: .6;
    cursor: not-allowed
}

/* Sidebar notes */
.lo-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px
}

.lo-notes {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04)
}

.lo-notes h4 {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 6px
}

.lo-notes h4 i {
    color: #f59e0b;
    font-size: 18px
}

.lo-note {
    display: flex;
    gap: 8px;
    margin-bottom: 8px
}

.lo-note-num {
    width: 22px;
    height: 22px;
    background: #fef2f2;
    color: #e53935;
    font-weight: 800;
    font-size: 11px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0
}

.lo-note-text {
    font-size: 13px;
    color: #555;
    line-height: 1.5
}

.lo-note-text b {
    color: #e53935
}

.lo-video-box {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee
}

.lo-video-box iframe {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
    border: 0
}

/* Empty */
.dv-empty {
    text-align: center;
    padding: 70px 20px;
    color: #aaa
}

.dv-empty i {
    font-size: 52px;
    display: block;
    margin-bottom: 12px;
    opacity: .4
}

.dv-empty p {
    font-size: 14px;
    margin: 0;
    color: #888
}

/* Scroll */
.dv-scroll-btns {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999
}

.dv-scroll-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e53935;
    color: #fff;
    border: 2px solid #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
    transition: all .2s
}

.dv-scroll-btn:hover {
    transform: scale(1.1);
    background: #c62828
}

/* ═══ Responsive ═══ */
@media(max-width:768px) {
    .dv-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px
    }

    .dv-card-imgwrap {
        height: 140px
    }

    .dv-header {
        padding: 14px 16px;
        gap: 12px
    }

    .dv-header h2 {
        font-size: 17px
    }

    .dv-header-icon {
        width: 44px;
        height: 44px
    }

    .lo-form-section {
        grid-template-columns: 1fr
    }

    .lo-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .lo-row {
        flex-direction: column;
        gap: 0
    }
}