.header_shop {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: center;
    align-items: center;
    font-size: 25px;
    padding: 15px;
    font-weight: 600 !important;
    background-color: #25396f;
}

.header_historypay {
    display: grid;
    grid-template-columns: 0.5fr 1fr 0.5fr;
    justify-content: center;
    align-items: center;
    font-size: 25px;
    padding: 15px;
    font-weight: 600 !important;
    background-color: #25396f;
}

.header_shop h2 {
    color: #fff;
}


.nav-tabs{
    color: #ffffff;
    border-radius: 0;
    background-color: #25396f;
}

.shop-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
}

.shop-tabs .nav-item {
    width: 100%;
}

.shop-tabs .nav-link {
    width: 100%;
    color: rgba(255, 255, 255, 0.75);
    border: 0;
    border-radius: 0;
    padding: 12px 6px;
    font-size: 15px;
}

.nav-tabs .nav-link.active {
    color: #ffffff !important;
    background-color: #25396f;
    border: 0;
    border-bottom: 3px solid #ffc107;
}

.tab-content {
    padding: 20px;
}

.product-item {
    background-color: #ffffff;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-item img {
    border-radius: 10px;
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 15px;
}

.product-item .details {
    flex-grow: 1;
    font-size: 18px;
}

.product-item .details h5 {
    margin-bottom: 5px;
    font-size: 22px;
}

.product-item .details p {
    margin-bottom: 10px;
    font-size: 18px;
}

.product-item .details span {
    font-size: 18px;
}

.product-item .details .item-detail {
    font-size: 20px;
}

.product-item .confirm-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
}

.product-item .details .price {
    font-size: 22px;
    font-weight: 500;
    color: #28a745;
}

.product-item .details .com {
    font-size: 22px;
    font-weight: 500;
    color: #ca1b1b;
}
.product-item .details .compree {
    font-size: 22px;
    font-weight: 500;
    color: #eba714;
}
a {
    text-decoration: none;
}

#productTabsContent {
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 12rem;
}

.shop-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f7;
    background-color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 5;
}

.shop-search-input {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #ff7aa6;
    border-radius: 999px;
    font-size: 14px;
    color: #333;
    outline: none;
    background-color: #fff;
}

.shop-search-input:focus {
    border-color: #ff4f86;
}

.shop-search-button {
    flex-shrink: 0;
    height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background-color: #ff4f86;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.shop-search-button:hover {
    background-color: #e63d72;
}

/* Sort bar (chips + filter button) */
.shop-sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background-color: #fff;
    border-bottom: 1px solid #eef2f7;
    position: sticky;
    top: 64px; /* below search bar */
    z-index: 4;
}

.shop-sort-chips {
    flex: 1;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.shop-sort-chips::-webkit-scrollbar { display: none; }

.shop-chip {
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 999px;
    background-color: #f0f4ff;
    color: #25396f;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.shop-chip:hover {
    background-color: #dde6f7;
    color: #25396f;
    text-decoration: none;
}

.shop-chip.is-active {
    background-color: #ff4f86;
    color: #fff;
    border-color: #ff4f86;
}

.shop-filter-btn {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f4ff;
    color: #25396f;
    border: 0;
    border-radius: 999px;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.shop-filter-btn:hover {
    background-color: #dde6f7;
}

.shop-filter-btn.has-active {
    background-color: #ff4f86;
    color: #fff;
}

.shop-filter-btn.has-active::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 0 0 2px #ff4f86;
}

/* Filter bottom sheet overlay */
.shop-filter-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 60;
    animation: shop-fade-in 0.2s ease;
}

.shop-filter-overlay[hidden] {
    display: none;
}

@keyframes shop-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.shop-filter-sheet {
    width: 100%;
    max-width: 540px;
    background-color: #fff;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 16px 18px 20px;
    animation: shop-slide-up 0.25s ease;
}

@keyframes shop-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.shop-filter-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.shop-filter-sheet__header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f2d56;
}

.shop-filter-close {
    width: 32px;
    height: 32px;
    border: 0;
    background-color: #f0f4ff;
    color: #25396f;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.shop-filter-section {
    margin-bottom: 18px;
}

.shop-filter-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #25396f;
    margin-bottom: 8px;
}

.shop-filter-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-filter-price-row input {
    flex: 1;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d0d8e8;
    border-radius: 10px;
    font-size: 15px;
    color: #25396f;
    outline: none;
    background-color: #f8fbff;
    -moz-appearance: textfield;
}

.shop-filter-price-row input::-webkit-outer-spin-button,
.shop-filter-price-row input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.shop-filter-price-row input:focus {
    border-color: #435ebe;
    background-color: #fff;
}

.shop-filter-dash {
    color: #6c757d;
    font-weight: 600;
}

.shop-filter-rating-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shop-filter-rating-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background-color: #f0f4ff;
    color: #25396f;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.12s ease;
}

.shop-filter-rating-chip input {
    display: none;
}

.shop-filter-rating-chip.is-active {
    background-color: #f5a623;
    color: #fff;
    border-color: #f5a623;
}

.shop-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.shop-filter-btn-clear,
.shop-filter-btn-apply {
    flex: 1;
    height: 46px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: 0;
}

.shop-filter-btn-clear {
    background-color: #f0f4ff;
    color: #25396f;
}

.shop-filter-btn-apply {
    background-color: #ff4f86;
    color: #fff;
}

.shop-filter-btn-apply:hover {
    background-color: #e63d72;
}

.shop-sold-count {
    margin-top: 4px;
    font-size: 11px;
    color: #6c757d;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.shop-commission-preview {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #ff7a00;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.shop-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-top: 4px;
    color: #f5a623;
    font-size: 13px;
    line-height: 1;
}

.shop-stars .bi {
    font-size: 13px;
    color: #f5a623;
}

.shop-stars__value {
    margin-left: 4px;
    color: #6c757d;
    font-size: 12px;
    font-weight: 600;
}

.shop-stars--detail {
    margin: 4px 0 8px;
    gap: 3px;
}

.shop-stars--detail .bi {
    font-size: 18px;
}

.shop-stars--detail .shop-stars__value {
    margin-left: 6px;
    font-size: 14px;
}

/* ============================================
   Event / Hot Time UI
   ============================================ */

/* HOT badge that floats on top of card image */
.shop-product-card.is-event {
    position: relative;
    box-shadow: 0 5px 18px rgba(255, 79, 79, 0.18);
    border: 1px solid rgba(255, 79, 79, 0.3);
}

.shop-hot-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff5252 0%, #ff7a00 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 79, 79, 0.4);
}

/* Strike-through original price */
.price-strike {
    display: inline-block;
    margin-right: 6px;
    color: #9aa3b9;
    text-decoration: line-through;
    font-size: 0.85em;
    font-weight: 500;
}

/* "×Event" tag next to commission */
.shop-bonus-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 4px;
    background-color: #ff5252;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
}

/* Countdown badge on card */
.shop-event-countdown {
    margin-top: 6px;
    padding: 3px 8px;
    border-radius: 6px;
    background-color: rgba(255, 79, 79, 0.12);
    color: #d63031;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.3px;
}

.shop-event-countdown.is-expired {
    background-color: #f1f3f5;
    color: #868e96;
}

/* Event banner on product detail page */
.shop-detail-event {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 12px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(255, 82, 82, 0.08) 0%, rgba(255, 122, 0, 0.08) 100%);
    border: 1px dashed rgba(255, 79, 79, 0.4);
    border-radius: 10px;
}

.shop-detail-event .shop-hot-badge {
    position: static;
}

.shop-detail-event__name {
    flex: 1;
    color: #c0392b;
    font-weight: 700;
    font-size: 14px;
    min-width: 0;
}

.shop-detail-event .shop-event-countdown {
    margin-top: 0;
    font-size: 14px;
    padding: 4px 10px;
}

.refund-countdown,
.refund-countdown-done {
    display: inline-block;
    margin-left: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    background-color: rgba(255, 62, 62, 0.12);
    color: #ff3e3e;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* =====================================================
   Order history — Layout A
   ===================================================== */

/* Card container */
.oh-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    margin: 12px 16px;
    overflow: hidden;
}

/* Status badge */
.oh-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.oh-badge--pending {
    background-color: rgba(240, 116, 0, 0.15);
    color: rgb(240, 116, 0);
}

.oh-badge--success {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

/* Row layout for label/value pairs */
.oh-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 18px;
}

.oh-label {
    color: #6c757d;
    font-size: 16px;
}

.oh-qty {
    color: #6c757d;
    font-size: 16px;
}

.oh-date {
    color: #4f5d75;
    font-size: 16px;
}

.oh-countdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eef2f7;
}

/* Coloured stat values inside oh-card */
.oh-card .price {
    color: #28a745;
    font-weight: 700;
    font-size: 22px;
}

.oh-card .com {
    color: #ca1b1b;
    font-weight: 700;
    font-size: 22px;
}

.oh-card .compree {
    color: #eba714;
    font-weight: 700;
    font-size: 22px;
}

/* Layout A: name + status on top, full-width image, then stats */
.oh-card-a__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
}

.oh-card-a__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1f2d56;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.oh-card-a__img {
    width: 50%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background-color: #eef2f7;
    display: block;
    margin: 0 auto;
}

.oh-card-a__body {
    padding: 14px 16px 16px;
}

.oh-card-a__desc {
    margin: 0 0 12px;
    color: #4f5d75;
    font-size: 16px;
    line-height: 1.5;
}

.shop-loader,
.shop-end-message {
    text-align: center;
    padding: 16px 0;
    color: #6c757d;
    font-size: 13px;
}

.shop-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.shop-product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    background-color: #fff;
    border-radius: 10px;
    color: #25396f;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.shop-product-card:hover {
    color: #25396f;
}

.shop-product-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 0;
    object-fit: cover;
    background-color: #eef2f7;
}

.shop-product-card-body {
    min-width: 0;
    flex: 1;
    padding: 8px 10px 10px;
}

.shop-product-card-body h5 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    color: #1f2d56;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.shop-product-card-body p {
    margin: 0 0 4px;
    color: #6c757d;
    font-size: 12px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.shop-product-card-body .price,
.shop-detail-price {
    color: #28a745;
    font-weight: 700;
}

.shop-product-arrow {
    display: none;
}

.shop-detail-page {
    height: calc(100% - 64px);
    overflow-y: auto;
    padding-bottom: 96px;
    background-color: #f2f7ff;
}

.shop-detail-media {
    background-color: #fff;
    padding: 16px 0;
}

.shop-detail-media img {
    display: block;
    width: 75%;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background-color: #eef2f7;
    border-radius: 12px;
}

.shop-detail-body {
    padding: 22px 18px 24px;
    background-color: #fff;
}

.shop-detail-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.shop-detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: #eef3ff;
    color: #25396f;
    font-size: 13px;
    font-weight: 600;
}

.shop-detail-body h1 {
    margin: 0 0 10px;
    color: #1f2d56;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.35;
}

.shop-detail-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 14px 0;
}

.shop-detail-price {
    font-size: 22px;
    color: #28a745;
    font-weight: 700;
}

.shop-detail-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 18px;
    color: #6c757d;
    font-size: 14px;
}

.shop-detail-sold {
    display: inline-block;
}

.shop-detail-commission {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgba(255, 122, 0, 0.12);
    color: #ff7a00;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
}

/* Quantity selector on product detail */
.qty-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 18px;
}

.qty-selector__label {
    color: #4f5d75;
    font-size: 15px;
    font-weight: 600;
    margin-right: 4px;
}

.qty-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d0d8e8;
    border-radius: 10px;
    background-color: #fff;
    color: #25396f;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease;
    user-select: none;
}

.qty-btn:hover {
    background-color: #eef3ff;
    border-color: #25396f;
}

.qty-btn:active {
    background-color: #dde6f7;
}

.qty-input {
    width: 70px;
    height: 38px;
    text-align: center;
    border: 1px solid #d0d8e8;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #25396f;
    background-color: #fff;
    outline: none;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input:focus {
    border-color: #435ebe;
    box-shadow: 0 0 0 3px rgba(67, 94, 190, 0.15);
}

.shop-detail-text {
    color: #4f5d75;
    font-size: 17px;
    line-height: 1.75;
    white-space: pre-line;
    margin: 10px 0 0;
}

.buy-product-btn {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 82px;
    max-width: 508px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    background-color: #28a745;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(40, 167, 69, 0.28);
}

.buy-product-btn:disabled {
    background-color: #8eb99b;
    cursor: wait;
}

@media (max-width: 380px) {
    .shop-product-card {
        border-radius: 8px;
    }

    .shop-product-card-body {
        padding: 7px 8px 9px;
    }

    .shop-product-card-body h5 {
        font-size: 13px;
    }

    .shop-product-card-body p,
    .shop-product-card-body .price {
        font-size: 11px;
    }
}
