/* ==========================================
   AUCTION PRODUCTS — Card & Listing Styles
   ========================================== */

/* --- Auction Card (Grid) --- */
.auction-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.auction-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Thumbnail */
.auction-card__thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f8f8f8;
}

.auction-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.auction-card:hover .auction-card__thumb img {
    transform: scale(1.05);
}

/* Badges (inline, below title) */
.auction-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.auction-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.auction-badge--active {
    background: #22c55e;
    color: #fff;
}

.auction-badge--pending {
    background: #f59e0b;
    color: #fff;
}

.auction-badge--ended {
    background: #6b7280;
    color: #fff;
}

.auction-badge--cancelled {
    background: #ef4444;
    color: #fff;
}

.auction-badge--condition {
    background: #334155;
    color: #fff;
}

/* Content */
.auction-card__content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.auction-card__title {
    font-size: 17px !important;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.auction-card__title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s;
}

.auction-card__title a:hover {
    color: var(--primary-color);
}

/* Price */
.auction-card__price {
    margin-bottom: 8px;
}

.auction-card__price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.auction-card__price-label {
    color: #6b7280;
    font-size: 13px;
}

.auction-card__price-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.auction-card__price-row--sub {
    font-size: 12px;
    color: #9ca3af;
}

/* Buy Now */
.auction-card__buy-now {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fef3c7;
    color: #d97706;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Meta */
.auction-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}

.auction-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #6b7280;
}

.auction-card__meta-item--ended {
    color: #9ca3af;
}

/* Countdown — Chip Style */
.auction-card__countdown {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff5f5;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.auction-card__countdown .auction-countdown-text {
    font-weight: 700;
    color: #dc2626;
    font-size: 13px;
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
}

.auction-card__countdown svg,
.auction-card__countdown i {
    color: #dc2626;
    font-size: 14px;
    flex-shrink: 0;
}

/* --- Auction Card (List mode) --- */
.auction-card--list {
    flex-direction: row;
    border-radius: 8px;
}

.auction-card--list .auction-card__thumb--list {
    aspect-ratio: auto;
    height: 100%;
    min-height: 180px;
    border-radius: 8px 0 0 8px;
}

.auction-card--list .auction-card__content--list {
    padding: 20px;
    justify-content: center;
}

.auction-card--list .auction-card__title {
    font-size: 17px;
    -webkit-line-clamp: 1;
    line-clamp: 1;
}

.auction-card--list .auction-card__desc {
    font-size: 13px;
    line-height: 1.5;
}

/* ==========================================
   Sidebar Filters
   ========================================== */
.auction-filter-form .tp-shop-widget {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 16px;
}

.auction-filter-form .tp-shop-widget-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6;
    color: #1f2937;
}

.auction-filter-form .form-check-label {
    font-size: 15px;
    color: #4b5563;
    cursor: pointer;
    transition: color 0.2s;
}

.auction-filter-form .form-check-label:hover {
    color: var(--primary-color);
}

.auction-filter-form .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.auction-filter-form .btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
}

.auction-filter-form .btn-outline-primary:hover {
    background: var(--primary-color);
    color: #fff;
}

.auction-filter-form .form-control-sm {
    border-radius: 8px;
    border-color: #e5e7eb;
    font-size: 13px;
    padding: 6px 10px;
}

.auction-filter-form .btn-outline-danger {
    border-radius: 8px;
    font-weight: 600;
}

/* ==========================================
   Price Range Slider (Dual Thumb)
   ========================================== */
.ac-price-slider {
    padding: 8px 0;
}

.ac-price-slider__track {
    position: relative;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    margin: 16px 0 12px;
}

.ac-price-slider__range {
    position: absolute;
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    z-index: 1;
}

.ac-price-slider__input {
    position: absolute;
    top: -6px;
    width: 100%;
    height: 18px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    z-index: 2;
    margin: 0;
}

.ac-price-slider__input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s;
}

.ac-price-slider__input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.ac-price-slider__input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #fff;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.ac-price-slider__values {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

/* ==========================================
   Toolbar Select Dropdowns
   ========================================== */
.tp-shop-top-select select {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 7px 32px 7px 12px;
    font-size: 13px;
    color: #374151;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.tp-shop-top-select select:hover {
    border-color: var(--primary-color);
}

.tp-shop-top-select select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(253, 75, 107, 0.1);
}

/* Toolbar Tabs */
.tp-shop-top-tab .nav-link {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 7px 10px;
    color: #6b7280;
    transition: all 0.2s;
}

.tp-shop-top-tab .nav-link.active,
.tp-shop-top-tab .nav-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.tp-shop-top-tab .nav-tabs {
    border: none;
    gap: 4px;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 991px) {
    .auction-card--list .auction-card__thumb--list {
        min-height: 150px;
    }
}

@media (max-width: 767px) {
    .auction-card--list {
        flex-direction: column;
    }

    .auction-card--list .auction-card__thumb--list {
        aspect-ratio: 16 / 9;
        min-height: auto;
        border-radius: 8px 8px 0 0;
    }

    .auction-card__price-value {
        font-size: 16px;
    }
}

/* ==========================================
   AUCTION DETAIL PAGE
   ========================================== */

/* --- Info Panel --- */
.auction-detail__info {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* --- Badges --- */
.auction-detail__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

/* --- Title --- */
.auction-detail__title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 16px;
    line-height: 1.35;
}

/* --- Seller --- */
.auction-detail__seller {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.auction-detail__seller-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.auction-detail__seller-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auction-detail__seller-name {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

/* --- Countdown Box --- */
.auction-detail__countdown-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fbbf24;
    color: #92400e;
    font-weight: 600;
    font-size: 14px;
    flex-wrap: wrap;
}

.auction-detail__countdown-box--ended {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-color: #d1d5db;
    color: #6b7280;
}

.auction-detail__countdown-box--pending {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #93c5fd;
    color: #1e40af;
}

.auction-detail__countdown-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #92400e;
    font-weight: 600;
    width: 100%;
    margin-bottom: 4px;
}

.auction-detail__countdown-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    min-width: 56px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.countdown-value {
    font-size: 22px;
    font-weight: 800;
    color: #dc2626;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 10px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    margin-top: 2px;
}

.countdown-sep {
    font-size: 20px;
    font-weight: 700;
    color: #d1d5db;
    line-height: 1;
}

/* --- Price Section --- */
.auction-detail__price-section {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
}

.auction-detail__price-label {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.auction-detail__price-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color, #fd4b6b);
    line-height: 1.2;
}

.auction-detail__bid-count {
    font-size: 13px;
    color: #9ca3af;
    margin-left: 6px;
}

.auction-detail__price-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
    font-size: 14px;
    color: #374151;
}

.auction-detail__price-meta .text-danger {
    color: #dc2626 !important;
    font-size: 15px;
}

/* --- Bid Form --- */
.auction-detail__bid-form {
    margin-bottom: 16px;
}

.auction-detail__bid-input-group {
    display: flex;
    gap: 8px;
}

.auction-detail__bid-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    transition: border-color 0.2s;
    outline: none;
}

.auction-detail__bid-input:focus {
    border-color: var(--primary-color, #fd4b6b);
    box-shadow: 0 0 0 3px rgba(253, 75, 107, 0.1);
}

.auction-detail__bid-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.auction-detail__bid-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(253, 75, 107, 0.35);
}

.auction-detail__bid-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auction-detail__bid-note {
    font-size: 13px;
    color: #6b7280;
    margin-top: 8px;
}

.auction-detail__bid-message {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.auction-detail__bid-message--success {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.auction-detail__bid-message--error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* --- Buy Now Button --- */
.auction-detail__buy-now-form {
    margin-bottom: 18px;
}

.auction-detail__buy-now-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.auction-detail__buy-now-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

/* Buy Now Preview (pending) */
.auction-detail__buy-now-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px dashed #f59e0b;
    border-radius: 10px;
    color: #92400e;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 18px;
}

.auction-detail__buy-now-preview svg,
.auction-detail__buy-now-preview i {
    color: #f59e0b;
    font-size: 20px;
}

.auction-detail__buy-now-preview small {
    width: 100%;
    font-weight: 400;
    font-size: 12px;
}

/* --- Recent Bids --- */
.auction-detail__section-title {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.auction-detail__recent-bids {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.auction-detail__bid-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    transition: background 0.15s;
}

.auction-detail__bid-item:nth-child(even) {
    background: #fafafa;
}

.auction-detail__bid-item--highest {
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0;
}

.auction-detail__bid-name {
    font-weight: 600;
    color: #374151;
    min-width: 80px;
}

.auction-detail__bid-amount {
    font-weight: 700;
    color: var(--primary-color, #fd4b6b);
}

.auction-detail__bid-time {
    color: #9ca3af;
    font-size: 12px;
}

/* --- Tabs --- */
.auction-detail__tabs {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.auction-detail__tab-nav {
    display: flex;
    border-bottom: 2px solid #f3f4f6;
}

.auction-detail__tab-btn {
    flex: 1;
    padding: 14px 20px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.auction-detail__tab-btn:hover {
    color: #1f2937;
}

.auction-detail__tab-btn.active {
    color: var(--primary-color, #fd4b6b);
}

.auction-detail__tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color, #fd4b6b);
    border-radius: 3px 3px 0 0;
}

.auction-detail__tab-content {
    padding: 24px;
}

.auction-detail__tab-pane {
    display: none;
}

.auction-detail__tab-pane.active {
    display: block;
}

.auction-detail__description {
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
}

.auction-detail__description img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}

/* --- History Table --- */
.auction-detail__history-table {
    width: 100%;
}

.auction-detail__history-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.auction-detail__history-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 10px 14px;
    font-size: 14px;
    border-bottom: 1px solid #f9fafb;
    transition: background 0.15s;
}

.auction-detail__history-row:hover {
    background: #fafafa;
}

.auction-detail__history-row--highest {
    background: #ecfdf5 !important;
    border-radius: 8px;
    border: 1px solid #a7f3d0;
}

/* --- Responsive Detail --- */
@media (max-width: 991px) {
    .auction-detail__title {
        font-size: 20px;
    }

    .auction-detail__price-value {
        font-size: 24px;
    }
}

@media (max-width: 767px) {
    .auction-detail__info {
        padding: 18px;
    }

    .auction-detail__title {
        font-size: 18px;
    }

    .auction-detail__price-value {
        font-size: 22px;
    }

    .auction-detail__bid-input-group {
        flex-direction: column;
    }

    .auction-detail__bid-btn {
        justify-content: center;
    }

    .countdown-unit {
        padding: 6px 10px;
        min-width: 48px;
    }

    .countdown-value {
        font-size: 18px;
    }

    .auction-detail__tab-btn {
        font-size: 13px;
        padding: 12px 10px;
    }

    .auction-detail__tab-content {
        padding: 16px;
    }

    .auction-detail__history-header,
    .auction-detail__history-row {
        grid-template-columns: 1fr 1fr auto;
        font-size: 12px;
        padding: 8px 10px;
    }
}