/* Mai Auction – Mobile-first, clean UI */
.mai-auction-wrapper,
.mai-auction-item-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1d2327;
    box-sizing: border-box;
}
.mai-auction-wrapper *,
.mai-auction-item-wrapper * {
    box-sizing: border-box;
}

/* Login */
.mai-login-box {
    background: #f0f6fc;
    border: 1px solid #c3d9ed;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}
.mai-login-box h3 { margin: 0 0 6px; font-size: 1.15rem; }
.mai-desc { color: #646970; font-size: 0.88rem; margin-bottom: 12px; }
.mai-form-group { margin-bottom: 10px; }
.mai-form-group label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 0.88rem; }
.mai-form-group input[type="text"],
.mai-form-group input[type="tel"] {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    border: 1px solid #8c8f94;
    border-radius: 8px;
    font-size: 1rem;
    -webkit-appearance: none;
}
.mai-logged-in {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.mai-logged-in p { margin: 0; font-size: 0.95rem; }

/* Buttons */
.mai-btn {
    display: inline-block;
    padding: 12px 18px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, opacity 0.2s;
    text-align: center;
    line-height: 1.3;
}
.mai-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.mai-btn-primary { background: #2271b1; color: #fff; }
.mai-btn-primary:hover { background: #135e96; color: #fff; }
.mai-btn-outline {
    background: transparent;
    border: 1.5px solid #2271b1;
    color: #2271b1;
}
.mai-btn-lg { padding: 14px 24px; font-size: 1.05rem; width: 100%; }
.mai-btn-block { display: block; width: 100%; }

/* Messages */
.mai-message, .mai-card-bid-msg {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.88rem;
}
.mai-message.success, .mai-card-bid-msg.success {
    background: #d1e7dd; color: #0f5132;
}
.mai-message.error, .mai-card-bid-msg.error {
    background: #f8d7da; color: #842029;
}
.mai-notice {
    background: #fff3cd;
    border: 1px solid #ffecb5;
    color: #664d03;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Filter tabs */
.mai-filter-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}
.mai-tab {
    padding: 8px 14px;
    border: 1px solid #c3c4c7;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.mai-tab.active, .mai-tab:hover {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* Grid – mobile first */
.mai-items-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 520px) {
    .mai-items-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (min-width: 900px) {
    .mai-items-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
}

.mai-item-card {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
}
.mai-item-image {
    position: relative;
    aspect-ratio: 4/3;
    background: #f0f0f1;
    overflow: hidden;
}
.mai-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mai-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #a7aaad;
    font-size: 0.9rem;
}
.mai-no-image.large { min-height: 240px; }
.mai-item-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.mai-item-title {
    margin: 0 0 10px;
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: 700;
}

/* Price rows */
.mai-price-rows {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.mai-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}
.mai-price-row .lbl {
    font-size: 0.82rem;
    color: #646970;
}
.mai-price-row .val {
    font-weight: 700;
    font-size: 0.95rem;
}
.mai-price-row.floor .val { color: #50575e; }
.mai-price-row.current .val {
    color: #d63638;
    font-size: 1.15rem;
}

/* Highest bidder */
.mai-highest-bidder {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #fef8e7;
    border: 1px solid #f0e0a0;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    line-height: 1.4;
}
.mai-highest-bidder.empty {
    background: #f0f0f1;
    border-color: #ddd;
    color: #646970;
    font-style: italic;
}
.mai-hb-icon { flex-shrink: 0; }
.mai-hb-phone { color: #1d2327; }
.mai-hb-amount { color: #d63638; }
.mai-highest-bidder.detail {
    font-size: 0.95rem;
    padding: 12px 14px;
}

.mai-item-time {
    font-size: 0.82rem;
    color: #646970;
    margin-bottom: 12px;
}

/* Card bid */
.mai-card-bid-area { margin-top: auto; }
.mai-card-bid-form {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.mai-card-bid-input {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #8c8f94;
    border-radius: 8px;
    font-size: 0.95rem;
    -webkit-appearance: none;
}
.mai-card-bid-btn {
    white-space: nowrap;
    padding: 11px 14px;
    flex-shrink: 0;
}
.mai-step-hint {
    margin: 6px 0 0;
    font-size: 0.78rem;
    color: #646970;
}

/* Badges */
.mai-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    position: absolute;
    top: 10px;
    left: 10px;
}
.mai-badge-live { background: #d63638; color: #fff; }
.mai-badge-upcoming { background: #dba617; color: #fff; }
.mai-badge-ended { background: #646970; color: #fff; }

/* Single item */
.mai-item-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 32px;
}
@media (min-width: 768px) {
    .mai-item-detail { grid-template-columns: 1fr 1fr; gap: 28px; }
}
.mai-main-image {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
}
.mai-price-box {
    margin: 14px 0;
}
.mai-time-box {
    font-size: 0.9rem;
    color: #50575e;
    margin-bottom: 12px;
}

/* Big countdown */
.mai-countdown-big {
    background: linear-gradient(135deg, #d63638, #b32d2e);
    color: #fff;
    padding: 18px 20px;
    border-radius: 12px;
    text-align: center;
    margin: 14px 0 18px;
    box-shadow: 0 4px 12px rgba(214, 54, 56, 0.28);
}
.mai-countdown-big.upcoming {
    background: linear-gradient(135deg, #dba617, #c09200);
    box-shadow: 0 4px 12px rgba(219, 166, 23, 0.28);
}
.mai-countdown-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 4px;
}
.mai-countdown-timer {
    font-size: 1.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}
@media (min-width: 600px) {
    .mai-countdown-timer { font-size: 2rem; }
}

.mai-winner-box {
    background: #d1e7dd;
    padding: 14px;
    border-radius: 8px;
    margin: 14px 0;
}

.mai-bid-form {
    margin-top: 16px;
    padding: 16px;
    background: #f0f6fc;
    border-radius: 12px;
}
.mai-bid-form input {
    width: 100%;
    padding: 12px 14px;
    font-size: 1.05rem;
    border: 1px solid #8c8f94;
    border-radius: 8px;
    -webkit-appearance: none;
}
.mai-bid-form small {
    display: block;
    margin-top: 6px;
    color: #646970;
    font-size: 0.85rem;
}

/* Bids history */
.mai-bids-history { margin-top: 32px; }
.mai-bids-history h3 { margin-bottom: 12px; font-size: 1.15rem; }
.mai-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.9rem;
}
.mai-table th, .mai-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e4e7;
}
.mai-table th {
    background: #f6f7f7;
    font-weight: 600;
    font-size: 0.82rem;
}
.mai-table tbody tr:hover { background: #f8f9fa; }

/* Mobile table scroll */
@media (max-width: 600px) {
    .mai-bids-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .mai-table { min-width: 360px; }
    .mai-login-box { padding: 14px; }
    .mai-item-body { padding: 12px; }
}

.mai-empty {
    color: #646970;
    font-style: italic;
    text-align: center;
    padding: 24px;
}


/* Video button */
.mai-video-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #c4302b;
    color: #fff !important;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none !important;
    line-height: 1.3;
    transition: background 0.2s, opacity 0.2s;
}
.mai-video-btn:hover {
    background: #a02622;
    color: #fff !important;
}
.mai-video-btn-lg {
    padding: 12px 16px;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
    margin-top: 12px;
}
.mai-card-video {
    margin: 4px 0 8px;
}
.mai-detail-video {
    margin-top: 10px;
}


/* Quantity & drop info */
.mai-qty-row {
    margin: 8px 0 6px;
    font-size: 0.92rem;
    color: #1d2327;
}
.mai-qty-row strong {
    color: #b32d2e;
    font-size: 1.05rem;
}
.mai-qty-row.detail {
    margin: 12px 0;
    padding: 10px 12px;
    background: #fff8e5;
    border-radius: 8px;
    border: 1px solid #f0e0a0;
}
.mai-drop-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.82rem;
    color: #646970;
}
.mai-accept-hint {
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: #1d2327;
}


/* ===== Promo code box (khung giờ vàng) ===== */
.mai-promo-box {
    margin: 0 0 20px;
    border-radius: 14px;
    overflow: hidden;
    font-family: inherit;
}
.mai-promo-waiting,
.mai-promo-expired {
    background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 100%);
    border: 1px solid #c3d0e0;
    border-radius: 14px;
    padding: 20px 16px;
    text-align: center;
}
.mai-promo-active {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 40%, #ffcc80 100%);
    border: 2px solid #ff9800;
    border-radius: 14px;
    padding: 22px 16px;
    text-align: center;
    box-shadow: 0 6px 24px rgba(255, 152, 0, 0.25);
    animation: mai-promo-pulse 2.4s ease-in-out infinite;
}
@keyframes mai-promo-pulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(255, 152, 0, 0.25); }
    50% { box-shadow: 0 8px 32px rgba(255, 87, 34, 0.4); }
}
.mai-promo-icon { font-size: 2rem; margin-bottom: 6px; }
.mai-promo-badge {
    display: inline-block;
    background: #e65100;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}
.mai-promo-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1d2327;
    margin-bottom: 6px;
    line-height: 1.35;
}
.mai-promo-code {
    display: inline-block;
    background: #1d2327;
    color: #ffeb3b;
    padding: 4px 14px;
    border-radius: 8px;
    font-size: 1.25rem;
    letter-spacing: 1.5px;
    margin-left: 4px;
}
.mai-promo-amount {
    font-size: 1.05rem;
    margin: 8px 0 12px;
    color: #b71c1c;
}
.mai-promo-countdown {
    font-size: 0.95rem;
    color: #50575e;
    margin: 10px 0;
}
.mai-promo-countdown.hot {
    color: #c62828;
    font-weight: 700;
    font-size: 1.05rem;
}
.mai-promo-timer {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}
.mai-promo-sub {
    margin: 8px 0 0;
    font-size: 0.88rem;
    color: #646970;
}
.mai-btn-promo {
    display: inline-block;
    width: 100%;
    max-width: 420px;
    margin-top: 8px;
    padding: 16px 20px;
    background: #0068ff;
    color: #fff !important;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(0, 104, 255, 0.35);
    transition: background 0.2s, transform 0.15s;
}
.mai-btn-promo:hover {
    background: #0052cc;
    color: #fff !important;
    transform: translateY(-1px);
}
.mai-promo-copied {
    margin-top: 10px;
    color: #0f5132;
    font-weight: 600;
    font-size: 0.9rem;
}


.mai-badge-closed {
    background: #646970;
    color: #fff;
}
.mai-item-card.is-closed {
    opacity: 0.72;
}
.mai-item-card.is-closed .mai-item-image img {
    filter: grayscale(0.35);
}


/* Promo expired – refined */
.mai-promo-expired {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: none;
    border-radius: 16px;
    padding: 0;
    text-align: center;
    color: #e8eef5;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(15, 52, 96, 0.35);
}
.mai-promo-expired-inner {
    padding: 28px 20px 26px;
    position: relative;
}
.mai-promo-expired-icon {
    font-size: 2.4rem;
    line-height: 1;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 8px rgba(255,255,255,0.15));
}
.mai-promo-expired-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    color: #a8c5e2;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}
.mai-promo-expired-title {
    margin: 0 0 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
}
.mai-promo-expired-desc {
    margin: 0 0 18px;
    font-size: 0.92rem;
    color: #9bb4d0;
    line-height: 1.45;
}
.mai-promo-expired-desc strong {
    color: #c5d8ef;
}
.mai-promo-expired-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, #e94560 0%, #ff6b6b 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(233, 69, 96, 0.4);
    line-height: 1.3;
    max-width: 100%;
}
.mai-promo-expired-cta-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
}
.mai-promo-expired-cta strong {
    font-weight: 800;
}
