/* ========================================================
   VUARB - Core Design System & Global Styles
   Version: 2.3 (Optimized & Cached)
   ======================================================== */

/* 1. Global Layout & Balanced Typography */
html {
    overflow-x: clip;
    overflow-y: scroll;
    height: 100%;
}

body {
    overflow-x: clip;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 400;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.011em;
    line-height: 1.5;
    color: #18181b;
    background-color: #f4f4f5;
}

/* 2. Khóa kích thước và ổn định icon chống giật toàn web */
.bx,
.bi,
.fa,
.fas,
.far,
.fab,
[class^="bx-"],
[class^="bxs-"],
[class^="bi-"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
    font-style: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

.sidebar a,
.ws-auth-modal a {
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}

button,
input,
select,
textarea {
    font-family: inherit !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
}

b,
strong,
.ws-font-bold {
    font-weight: 600 !important;
}

.ws-font-extrabold {
    font-weight: 700 !important;
}

img {
    max-width: 100%;
}

/* 3. CKEditor Universal Rich-Text Reset */
.post-content ul,
.ws-more-show ul,
.ws-more ul,
.thele ul,
.rich-text ul {
    list-style-type: disc !important;
    padding-left: 28px !important;
    margin: 10px 0 14px 0 !important;
    display: block !important;
}

.post-content ol,
.ws-more-show ol,
.ws-more ol,
.thele ol,
.rich-text ol {
    list-style-type: decimal !important;
    padding-left: 28px !important;
    margin: 10px 0 14px 0 !important;
    display: block !important;
}

.post-content li,
.ws-more-show li,
.ws-more li,
.thele li,
.rich-text li {
    display: list-item !important;
    list-style: inherit !important;
    margin-bottom: 5px !important;
    white-space: normal !important;
    overflow: visible !important;
    width: auto !important;
    max-width: 100% !important;
    line-height: 1.6 !important;
}

.post-content p,
.ws-more-show p,
.ws-more p,
.thele p,
.rich-text p {
    margin-bottom: 10px;
    line-height: 1.7;
}

.post-content strong,
.ws-more-show strong,
.ws-more strong,
.thele strong,
.rich-text strong {
    font-weight: 700 !important;
}

.post-content table,
.ws-more-show table,
.ws-more table,
.thele table,
.rich-text table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 12px 0 !important;
}

.post-content table th,
.post-content table td,
.ws-more-show table th,
.ws-more-show table td,
.thele table td,
.thele table th {
    border: 1px solid #e2e8f0 !important;
    padding: 8px 12px !important;
}

/* 4. Căn giữa chữ "Không có dữ liệu" trong table có thanh cuộn ngang */
.dataTables_empty,
table.dataTable td.dataTables_empty {
    text-align: center !important;
    position: sticky !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    padding: 2.5rem 1rem !important;
    color: #64748b !important;
    font-weight: 500 !important;
}

.new {
    color: #fff !important;
    border-color: hsla(0, 0%, 57.3%, 0) !important;
    background: url(/assets/img/voucher.png);
    padding-left: 0.375rem;
    padding-right: 0.375rem;
}

/* 5. Modals & Overlays State */
.fade:not(.show),
.modal:not(.show):not(.in):not(.active):not(.isVisible),
.el-overlay:not(.show):not(.in):not(.active):not(.isVisible):not(#pop_thongbao),
.ws-auth-modal:not(.show):not(.in):not(.active):not(.isVisible),
.ws-recharge-modal:not(.show):not(.in):not(.active):not(.isVisible),
.modal.out,
.el-overlay.out {
    display: none !important;
}

.fade.show,
.modal.show,
.el-overlay.show,
.el-overlay.isVisible,
#pop_thongbao.show,
#pop_thongbao.active {
    display: flex !important;
}

.eKJDZl {
    color: #929292;
    border-color: #929292;
    font-size: 0.7rem !important;
    padding-left: 0.175rem;
    padding-right: 0.175rem;
    cursor: default;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    background-size: 105% 80% !important;
    background-position: center !important;
    background-repeat: repeat;
}

.stc-Tag {
    padding-left: 0.575rem;
    padding-right: 0.3rem;
    position: absolute;
    right: -1.5rem;
}

/* 6. Thanh cuộn ngang mượt mà cho bảng lịch sử Mobile */
.el-table__header-wrapper,
.el-table__body-wrapper,
.el-table__inner-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.el-table__header-wrapper::-webkit-scrollbar,
.overflow-x-auto::-webkit-scrollbar,
.ws-overflow-x-auto::-webkit-scrollbar {
    height: 5px;
}

.el-table__header-wrapper::-webkit-scrollbar-thumb,
.overflow-x-auto::-webkit-scrollbar-thumb,
.ws-overflow-x-auto::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* 7. Swiper & Layout Responsive */
@media screen and (min-width: 768px) {
    .swiper-desktop {
        display: block;
    }

    .swiper-mobile {
        display: none;
    }

    .md\:grid-cols-\[40\%\2c 60\%\] {
        grid-template-columns: 40% 60%;
    }
}

@media screen and (max-width: 767px) {
    .swiper-desktop {
        display: none;
    }

    .swiper-mobile {
        display: block;
    }
}

.min-h-\[16rem\] {
    min-height: 16rem;
}

.max-h-\[16rem\] {
    max-height: 16rem;
}

.h-\[16rem\] {
    height: 16rem;
}

.text-sm {
    font-size: .875rem;
    line-height: 1.25rem;
}

.p-4 {
    padding: 1rem;
}

.border-gray-200 {
    border-color: rgb(229 231 235);
}

.border {
    border-width: 1px;
}

.rounded-md {
    border-radius: .375rem;
}

.w-full {
    width: 100%;
}

.tw-col-span-12.tw-text-xs.tw-flex.tw-items-center.tw-text-gray-600.tw-sub-interface-info {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tw-marquee .mar {
    display: inline-block;
    min-width: unset !important;
    -webkit-animation: marquee 15s linear infinite;
}

.tw-new-1 {
    color: #fff !important;
    border-color: hsla(0, 0%, 57.3%, 0) !important;
    background: url(/assets/img/voucher3.png);
}

.dBVMxc {
    color: #929292;
    border-color: #929292;
    font-size: 0.7rem !important;
    cursor: default;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    background-size: 105% 80% !important;
    background-position: center !important;
}

/* 8. Design System Tokens & Utility Standards */
:root {
    --primary-red: #ef4444;
    --primary-red-hover: #dc2626;
    --primary-bg: #f4f4f5;
    --surface-card: #ffffff;
    --border-color: #e4e4e7;
}

.ws-home-id1000,
.ws-home,
.ws-container-main {
    max-width: 80rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

/* Card standards */
.ws-card-standard {
    background-color: #ffffff;
    border-radius: 0.5rem;
    border: 1px solid #e4e4e7;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ws-card-standard:hover {
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.08);
    border-color: #fca5a5;
}

/* Button standards */
.ws-btn-primary {
    background-color: #ef4444;
    color: #ffffff;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.ws-btn-primary:hover {
    background-color: #dc2626;
    color: #ffffff;
}

.ws-btn-secondary {
    background-color: #f4f4f5;
    color: #3f3f46;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    transition: background-color 0.2s ease;
}

.ws-btn-secondary:hover {
    background-color: #e4e4e7;
    color: #18181b;
}

/* Form input standards */
.ws-input-field {
    width: 100%;
    height: 2.5rem;
    padding: 0 0.75rem;
    background-color: #fafafa;
    border: 1px solid #e4e4e7;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #18181b;
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ws-input-field:focus {
    background-color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

/* Badge standards */
.ws-badge-red {
    background-color: #fee2e2;
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
}

.ws-badge-green {
    background-color: #dcfce7;
    color: #16a34a;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
}

/* 9. Đảm bảo toàn bộ Toast và Alert luôn nổi lên trên mọi Modal layer */
.el-notification,
.el-notification.right,
.swal2-container,
#toast-container,
.toast-container,
.Toastify {
    z-index: 999999999 !important;
    pointer-events: auto !important;
}

/* 10. Zero CLS & Sticky Footer */
.ws-footer-main {
    margin-top: auto !important;
}

.footer-logo-box {
    width: 100%;
    max-width: 180px;
    height: 48px;
    display: flex;
    align-items: center;
}

/* 11. Mobile Bottom Bar Safe Area Insets (iPhone & Android modern) */
@media (max-width: 768px) {
    .ws-bottom-nav-bar,
    .fixed-bottom,
    .bottom-navigation {
        padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
    }
}

/* 12. Main Header & Fixed Navbar (Client-side) */
#mainTopNavbar {
    z-index: 999;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 58px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
}
#mainNavbarSpacer {
    width: 100% !important;
    height: 58px !important;
    display: block !important;
    flex-shrink: 0 !important;
}
@media (min-width: 768px) {
    #mainTopNavbar {
        height: 65px !important;
    }
    #mainNavbarSpacer {
        height: 65px !important;
    }
}

/* 13. Banner & Critical Grid Layout */
.ws-home-grid {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 1.25rem !important;
    width: 100% !important;
}
.banner-slide-box {
    overflow: hidden !important;
    user-select: none !important;
    border-radius: 0.5rem !important;
    background-color: #fafafa !important;
    height: 11rem !important;
}
.banner-img-box {
    user-select: none !important;
    border-radius: 0.5rem !important;
    width: 100% !important;
    height: 11rem !important;
    object-fit: cover !important;
    display: block !important;
}
.recharge-form-box {
    min-height: 19.3rem !important;
    background-color: #ffffff !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}
@media (min-width: 768px) {
    .banner-slide-box,
    .banner-img-box,
    .recharge-form-box {
        height: 19.3rem !important;
    }
}
#top-tuan .el-form-item {
    margin-bottom: 12px !important;
}
#top-tuan .el-input__inner {
    height: 38px !important;
    line-height: 38px !important;
    border-radius: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}
#top-tuan .el-button--large {
    height: 40px !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-shadow: none !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}
#top-tuan .el-button--large span {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: none !important;
    -webkit-font-smoothing: antialiased !important;
}
.reward-content-box {
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: #334155 !important;
    word-break: break-word;
    padding-bottom: 16px;
}
.reward-content-box p {
    margin-bottom: 6px !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
}
.reward-content-box ul, .reward-content-box ol {
    margin: 4px 0 8px 18px !important;
    padding: 0 !important;
}
.reward-content-box li {
    margin-bottom: 4px !important;
    font-size: 12.5px !important;
    line-height: 1.5 !important;
}
.reward-content-box strong {
    color: #0f172a !important;
    font-weight: 700 !important;
}
.reward-content-box img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 6px;
    margin: 6px 0;
}
#reward-box, #top-box {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
#reward-box::-webkit-scrollbar, #top-box::-webkit-scrollbar {
    width: 5px;
}
#reward-box::-webkit-scrollbar-thumb, #top-box::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}
#reward-box::-webkit-scrollbar-track, #top-box::-webkit-scrollbar-track {
    background: transparent;
}

/* 14. Flash Sale & Product Detail View */
.flash-sale {
    align-items: center;
    background: linear-gradient(-90deg, #f0451e 9%, #f32424 96%);
    color: #fff;
    display: flex;
    height: 2.25rem;
    margin-top: .625rem;
    border-radius: 0.25rem;
}
.flash-sale .icon-flash {
    height: 1.3125rem;
    object-fit: contain;
    object-position: center;
    width: 7.625rem;
}
.flash-sale .icon-time {
    margin-left: auto;
    margin-right: .375rem;
}
.flash-sale .text-time {
    font-size: 1rem;
    margin-right: .625rem;
    text-transform: uppercase;
}
.flash-sale .timer {
    background-color: black;
    color: white;
    font-weight: bold;
    padding: 1px 3px;
    margin: 0px 0px 4px;
    border-radius: 5px;
    margin-right: 5px;
}
@media (max-width: 768px) {
    .title-time {
        display: none;
    }
}
.mySwiperView .swiper-slide {
    width: 90px !important;
}

/* 15. News & Blog Shared Styles */
.news-search-box {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.news-search-box:hover {
    border-color: #cbd5e1;
}
.news-card-row {
    display: flex;
    gap: 16px;
    background: #ffffff;
    border-radius: 10px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    margin-bottom: 14px;
    text-decoration: none !important;
    color: inherit;
    transition: all 0.2s ease;
}
.news-card-row:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}
.news-card-row:hover .news-card-row-title {
    color: #ef4444;
}
.news-card-row-thumb {
    width: 200px;
    height: 125px;
    min-width: 200px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
}
.news-card-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.news-card-row:hover .news-card-row-thumb img {
    transform: scale(1.04);
}
.news-card-row-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.news-card-row-tag {
    font-size: 11px;
    font-weight: 700;
    color: #ef4444;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}
.news-card-row-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    margin: 0 0 6px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}
.news-card-row-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.45;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card-row-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: #94a3b8;
    border-top: 1px solid #f8fafc;
    padding-top: 6px;
}
@media (max-width: 640px) {
    .news-card-row {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    .news-card-row-thumb {
        width: 100%;
        min-width: 100%;
        height: 160px;
    }
}
.news-side-panel {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.news-side-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #fee2e2;
    display: flex;
    align-items: center;
    gap: 6px;
}
.news-side-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #334155;
    text-decoration: none !important;
    transition: all 0.2s ease;
}
.news-side-cat-link:hover {
    background: #fef2f2;
    color: #ef4444;
}
.news-side-cat-link.active {
    background: #fee2e2;
    color: #dc2626;
    font-weight: 600;
}
.news-side-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none !important;
    color: inherit;
    transition: opacity 0.2s;
}
.news-side-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.news-side-item:hover {
    opacity: 0.85;
}
.news-side-thumb {
    width: 68px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.news-side-item-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-side-date {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 3px;
}
.trending-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none !important;
    color: inherit;
    transition: transform 0.2s ease;
}
.trending-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.trending-item:hover {
    transform: translateX(3px);
}
.trending-rank {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.trending-item:nth-child(1) .trending-rank { background: #ef4444; color: #ffffff; }
.trending-item:nth-child(2) .trending-rank { background: #f97316; color: #ffffff; }
.trending-item:nth-child(3) .trending-rank { background: #eab308; color: #ffffff; }
.trending-text {
    font-size: 12.5px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.trending-item:hover .trending-text {
    color: #ef4444;
}
.post-detail-box {
    background: #ffffff;
    border-radius: 10px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.post-detail-box .post-content {
    font-size: 14.5px;
    line-height: 1.8;
    color: #1e293b;
    word-break: break-word;
}
.post-detail-box .post-content p {
    margin-bottom: 14px;
}
.post-detail-box .post-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 6px;
    margin: 14px auto;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* 16. Profile Withdraw & Custom Radios */
.vactive {
    --border-opacity: 1;
    border-color: rgba(239, 68, 68, var(--border-opacity));
    --bg-opacity: 1;
    background-color: rgba(239, 68, 68, var(--bg-opacity));
    font-weight: 800 !important;
    --text-opacity: 1;
    color: rgba(255, 255, 255, var(--text-opacity));
}
.checkbox-withdraw {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: solid 2px #cd3e3e;
    border-radius: 9999px;
}
#xTech-GasForm input[type=radio] {
    display: none;
}
#xTech-GasForm input[type=radio]:checked + .checkbox-withdraw {
    background-color: #cd3e3e;
}
.col-span-7 {
    grid-column: span 7 / span 7;
}

/* ==========================================================
   FIX MODAL XÁC NHẬN MUA HÀNG & DỊCH VỤ - CÂN ĐỐI 100% TRÊN MOBILE & DESKTOP
   ========================================================== */
.ws-buying-modal,
#datdonmodal {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    z-index: 2009 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

.ws-buying-modal.show,
.ws-buying-modal.isVisible,
.ws-buying-modal.active,
.ws-buying-modal.in,
#datdonmodal.show,
#datdonmodal.isVisible,
#datdonmodal.active,
#datdonmodal.in {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    box-sizing: border-box !important;
}

/* Reset .modal-dialog và .el-overlay-dialog bên trong để flexbox căn giữa tuyệt đối */
.ws-buying-modal .modal-dialog,
.ws-buying-modal .el-overlay-dialog,
#datdonmodal .modal-dialog,
#datdonmodal .el-overlay-dialog {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

#datdonmodal .modal-dialog,
#datdonmodal .el-overlay-dialog {
    max-width: 520px !important;
}

/* Hộp nội dung dialog */
.ws-buying-modal .el-dialog,
#datdonmodal .el-dialog {
    position: relative !important;
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

#datdonmodal .el-dialog {
    max-width: 520px !important;
}

/* Header modal mua hàng */
.ws-buying-modal .el-dialog__header {
    background: #cc0808 !important;
    padding: 12px 16px !important;
    margin-right: 0 !important;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .ws-buying-modal.show,
    .ws-buying-modal.isVisible,
    .ws-buying-modal.active,
    .ws-buying-modal.in,
    #datdonmodal.show,
    #datdonmodal.isVisible,
    #datdonmodal.active,
    #datdonmodal.in {
        padding: 12px 10px !important;
        align-items: center !important;
    }

    .ws-buying-modal .modal-dialog,
    .ws-buying-modal .el-overlay-dialog,
    #datdonmodal .modal-dialog,
    #datdonmodal .el-overlay-dialog {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    .ws-buying-modal .el-dialog,
    #datdonmodal .el-dialog {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        border-radius: 10px !important;
    }
}

/* ==========================================================
   17. Pinned Categories Grid (Trang chủ)
   ========================================================== */
.pinned-cat-box {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px 12px;
    margin: 12px 0 16px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    width: 100%;
}
.pinned-cat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px 12px;
    width: 100%;
}
@media (max-width: 991px) {
    .pinned-cat-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px 8px;
    }
}
@media (max-width: 575px) {
    .pinned-cat-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px 6px;
    }
    .pinned-cat-box {
        padding: 12px 8px;
        margin: 8px 0 12px 0;
    }
}
.pinned-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none !important;
    transition: transform 0.2s ease;
}
.pinned-cat-item:hover {
    transform: translateY(-2px);
}
.pinned-cat-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}
@media (max-width: 575px) {
    .pinned-cat-icon {
        width: 50px;
        height: 50px;
        border-radius: 12px;
    }
}
.pinned-cat-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.pinned-cat-title {
    font-weight: 700;
    color: #ef4444;
    font-size: 11.5px;
    line-height: 1.25;
    margin-top: 6px;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
    min-height: 28px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (max-width: 575px) {
    .pinned-cat-title {
        font-size: 10px;
        margin-top: 4px;
        min-height: 24px;
    }
}

/* ==========================================================
   18. Flash Sale Swiper & Tabs Layout (Trang chủ)
   ========================================================== */
#flashSaleTabs {
    contain: layout;
}
.flashSaleSwiper {
    width: 100%;
    overflow: hidden;
}
.flashSaleSwiper .swiper-wrapper {
    display: flex;
    flex-wrap: nowrap;
    box-sizing: content-box;
}
.flashSaleSwiper .swiper-slide {
    flex-shrink: 0;
    box-sizing: border-box;
    width: calc((100% - 10px) / 2);
}
@media (min-width: 640px) {
    .flashSaleSwiper .swiper-slide {
        width: calc((100% - 20px) / 3);
    }
}
@media (min-width: 768px) {
    .flashSaleSwiper .swiper-slide {
        width: calc((100% - 36px) / 4);
    }
}
@media (min-width: 1024px) {
    .flashSaleSwiper .swiper-slide {
        width: calc((100% - 48px) / 5);
    }
}
.flash-sale-tab-btn {
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.flash-sale-skeleton-item {
    flex: 0 0 calc((100% - 10px) / 2);
    box-sizing: border-box;
}
@media (min-width: 640px) {
    .flash-sale-skeleton-item {
        flex: 0 0 calc((100% - 20px) / 3);
    }
}
@media (min-width: 768px) {
    .flash-sale-skeleton-item {
        flex: 0 0 calc((100% - 36px) / 4);
    }
}
@media (min-width: 1024px) {
    .flash-sale-skeleton-item {
        flex: 0 0 calc((100% - 48px) / 5);
    }
}

/* ==========================================================
   19. Mobile Bottom Navigation Bar & iOS Safe Area Insets
   ========================================================== */
.ws-bottom-nav-bar {
    z-index: 999 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    border-top: 1px solid #e4e4e7 !important;
    padding-top: 6px !important;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 8px)) !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05) !important;
    display: flex !important;
}
.ws-bottom-nav-spacer {
    width: 100% !important;
    height: calc(56px + env(safe-area-inset-bottom, 8px)) !important;
    display: block !important;
    flex-shrink: 0 !important;
}
@media (min-width: 768px) {
    .ws-bottom-nav-bar,
    .ws-bottom-nav-spacer {
        display: none !important;
    }
}