/**
 * KB Marketplace Seller Auction - Front CSS
 */

/* Auction Block on Product Page */
.kbsa-auction-block {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    background: #fafafa;
}

.kbsa-auction-header h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Countdown Timer */
.kbsa-countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
    padding: 15px;
    background: #333;
    border-radius: 8px;
}

.kbsa-countdown-item {
    text-align: center;
}

.kbsa-countdown-value {
    display: inline-block;
    width: 40px;
    height: 45px;
    line-height: 45px;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    background: #222;
    border-radius: 5px;
    margin: 0 2px;
}

.kbsa-countdown-label {
    display: block;
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    margin-top: 5px;
}

.kbsa-countdown-separator {
    font-size: 30px;
    font-weight: bold;
    color: #fff;
}

/* Auction Info */
.kbsa-auction-info {
    margin-bottom: 20px;
}

.kbsa-info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.kbsa-info-row:last-child {
    border-bottom: none;
}

.kbsa-info-label {
    color: #666;
}

.kbsa-info-value {
    font-weight: 600;
    color: #333;
}

.kbsa-highest-bid {
    color: #c00;
    font-size: 18px;
}

/* Leading Notice */
.kbsa-leading-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 5px;
    margin-bottom: 15px;
}

.kbsa-leading-notice .material-icons {
    font-size: 20px;
}

/* Automatic Bid Section */
.kbsa-automatic-bid-section {
    margin-bottom: 15px;
}

.kbsa-automatic-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 10px;
}

.kbsa-automatic-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.kbsa-automatic-max {
    margin-bottom: 10px;
}

.kbsa-automatic-max input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.kbsa-automatic-bid-active {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 5px;
    color: #1565c0;
}

.kbsa-delete-auto-bid {
    background: none;
    border: none;
    cursor: pointer;
    color: #c00;
    padding: 5px;
}

.kbsa-delete-auto-bid:hover {
    color: #900;
}

/* Bid Form */
.kbsa-bid-form {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.kbsa-bid-form input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.kbsa-bid-btn {
    padding: 12px 25px;
    background: #00a0d2;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.kbsa-bid-btn:hover {
    background: #0088b3;
}

.kbsa-minimum-bid-notice {
    font-size: 12px;
    color: #666;
}

/* Not Allowed Notice */
.kbsa-not-allowed {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #ffebee;
    color: #c62828;
    border-radius: 5px;
}

/* Login Notice */
.kbsa-login-notice {
    text-align: center;
    padding: 15px;
    background: #fff3e0;
    border-radius: 5px;
}

.kbsa-login-notice a {
    color: #e65100;
    font-weight: 600;
}

/* Buy Now Section */
.kbsa-buy-now-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
}

.kbsa-buy-now-divider {
    text-align: center;
    margin-bottom: 15px;
}

.kbsa-buy-now-divider span {
    background: #fafafa;
    padding: 0 15px;
    color: #999;
    font-size: 12px;
}

.kbsa-buy-now-price {
    text-align: center;
    font-size: 16px;
}

.kbsa-buy-now-amount {
    color: #388e3c;
    font-size: 20px;
}

/* Message */
.kbsa-message {
    padding: 12px;
    border-radius: 5px;
    margin-top: 15px;
}

.kbsa-message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.kbsa-message.error {
    background: #ffebee;
    color: #c62828;
}

/* Category Page Mini Timer */
.kbsa-category-timer {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: #ff5722;
    color: #fff;
    border-radius: 15px;
    font-size: 12px;
    margin-top: 5px;
}

.kbsa-category-timer .material-icons {
    font-size: 14px;
}

.kbsa-mini-countdown span {
    font-weight: bold;
}

/* My Bids Page */
.kbsa-my-bids .table {
    font-size: 14px;
}

.kbsa-my-bids .badge {
    font-size: 11px;
    padding: 5px 10px;
}

/* ==========================================================================
   AUCTION LISTING PAGE
   ========================================================================== */

.kbsa-auction-list-page {
    max-width: 1200px;
    margin: 0 auto;
}

/* Cover Banner */
.kbsa-cover-banner {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.kbsa-cover-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* Filters Bar */
.kbsa-filters-bar {
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.kbsa-status-tabs {
    display: flex;
    gap: 10px;
}

.kbsa-tab {
    display: inline-block;
    padding: 10px 20px;
    background: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s;
}

.kbsa-tab:hover {
    background: #e0e0e0;
    color: #333;
}

.kbsa-tab.active {
    background: #00a0d2;
    color: #fff;
}

.kbsa-search-form .input-group {
    display: flex;
}

.kbsa-search-form .form-control {
    border-radius: 25px 0 0 25px;
    border: 1px solid #ddd;
}

.kbsa-search-form .btn {
    border-radius: 0 25px 25px 0;
    padding: 10px 20px;
}

/* Results Info */
.kbsa-results-info {
    margin-bottom: 20px;
    color: #666;
}

/* Auction Grid */
.kbsa-auction-grid {
    display: grid;
    gap: 20px;
}

.kbsa-grid-view {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.kbsa-list-view {
    grid-template-columns: 1fr;
}

.kbsa-list-view .kbsa-auction-card {
    display: flex;
    flex-direction: row;
}

.kbsa-list-view .kbsa-card-image {
    width: 200px;
    flex-shrink: 0;
}

.kbsa-list-view .kbsa-card-body {
    flex: 1;
}

/* Auction Card */
.kbsa-auction-card {
    position: relative;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.kbsa-auction-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.kbsa-auction-card.kbsa-featured {
    border-color: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
}

.kbsa-auction-card.kbsa-sold {
    opacity: 0.8;
}

/* Badges */
.kbsa-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.kbsa-badge-featured {
    background: #ffc107;
    color: #333;
}

/* Sold Overlay */
.kbsa-sold-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.kbsa-sold-overlay span {
    background: #c00;
    color: #fff;
    padding: 10px 30px;
    font-size: 18px;
    font-weight: bold;
    transform: rotate(-15deg);
}

/* Card Image */
.kbsa-card-image {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
}

.kbsa-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

/* Card Body */
.kbsa-card-body {
    padding: 15px;
}

.kbsa-product-name {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.kbsa-product-name a {
    color: #333;
    text-decoration: none;
}

.kbsa-product-name a:hover {
    color: #00a0d2;
}

/* Countdown in Cards */
.kbsa-auction-card .kbsa-countdown {
    margin-bottom: 15px;
    padding: 10px;
    background: #333;
    border-radius: 5px;
}

.kbsa-time-unit {
    text-align: center;
}

.kbsa-time-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
}

.kbsa-time-label {
    display: block;
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
}

.kbsa-separator {
    color: #fff;
    font-weight: bold;
}

/* Upcoming/Ended Labels */
.kbsa-upcoming-label,
.kbsa-ended-label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 13px;
}

.kbsa-upcoming-label {
    background: #e3f2fd;
    color: #1565c0;
}

.kbsa-ended-label {
    background: #fafafa;
    color: #666;
}

/* Price Info */
.kbsa-price-info {
    margin-bottom: 10px;
}

.kbsa-current-bid {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kbsa-current-bid .kbsa-label {
    color: #666;
    font-size: 13px;
}

.kbsa-current-bid .kbsa-price {
    font-size: 18px;
    font-weight: bold;
    color: #c00;
}

.kbsa-reserve-notice {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #f57c00;
    margin-top: 5px;
}

.kbsa-reserve-notice .material-icons {
    font-size: 14px;
}

/* Card Meta */
.kbsa-card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: #666;
    font-size: 13px;
}

.kbsa-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.kbsa-card-meta .material-icons {
    font-size: 16px;
}

/* Bid Button */
.kbsa-bid-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #00a0d2;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s;
}

.kbsa-bid-btn:hover {
    background: #0088b3;
    color: #fff;
}

/* Pagination */
.kbsa-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.kbsa-pagination .pagination {
    display: flex;
    gap: 5px;
}

.kbsa-pagination .page-item .page-link {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}

.kbsa-pagination .page-item.active .page-link {
    background: #00a0d2;
    border-color: #00a0d2;
}

/* No Auctions */
.kbsa-no-auctions {
    text-align: center;
    padding: 60px 20px;
    background: #fafafa;
    border-radius: 8px;
}

.kbsa-no-auctions .material-icons {
    font-size: 60px;
    color: #ddd;
}

.kbsa-no-auctions p {
    color: #666;
    margin: 20px 0;
}

/* ==========================================================================
   HOMEPAGE FEATURED AUCTIONS
   ========================================================================== */

.kbsa-home-featured {
    padding: 40px 0;
    background: #f8f9fa;
    margin: 30px 0;
}

.kbsa-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.kbsa-section-title {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.kbsa-view-all {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #00a0d2;
    text-decoration: none;
    font-weight: 500;
}

.kbsa-view-all:hover {
    color: #0088b3;
}

.kbsa-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.kbsa-featured-card {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.kbsa-featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.kbsa-featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #ffc107;
    color: #333;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.kbsa-featured-badge .material-icons {
    font-size: 14px;
}

.kbsa-featured-image {
    display: block;
    position: relative;
    padding-top: 75%;
    overflow: hidden;
}

.kbsa-featured-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.kbsa-featured-card:hover .kbsa-featured-image img {
    transform: scale(1.05);
}

.kbsa-featured-body {
    padding: 15px;
}

.kbsa-featured-title {
    margin: 0 0 10px 0;
    font-size: 15px;
    line-height: 1.4;
}

.kbsa-featured-title a {
    color: #333;
    text-decoration: none;
}

.kbsa-featured-title a:hover {
    color: #00a0d2;
}

.kbsa-featured-countdown {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    background: #333;
    border-radius: 5px;
    margin-bottom: 15px;
}

.kbsa-featured-countdown .kbsa-time-value {
    font-size: 16px;
}

.kbsa-featured-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.kbsa-featured-price .kbsa-label {
    color: #666;
    font-size: 13px;
}

.kbsa-featured-price .kbsa-price {
    font-size: 18px;
    font-weight: bold;
    color: #c00;
}

.kbsa-featured-meta {
    margin-bottom: 15px;
    color: #666;
    font-size: 13px;
}

.kbsa-featured-meta .kbsa-bids {
    display: flex;
    align-items: center;
    gap: 5px;
}

.kbsa-featured-meta .material-icons {
    font-size: 16px;
}

.kbsa-bid-now-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #00a0d2;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s;
}

.kbsa-bid-now-btn:hover {
    background: #0088b3;
    color: #fff;
}

/* ==========================================================================
   BID HISTORY & FOLLOWERS
   ========================================================================== */

.kbsa-bid-history {
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.kbsa-bid-history h5 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.kbsa-bid-list {
    max-height: 250px;
    overflow-y: auto;
}

.kbsa-bid-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.kbsa-bid-item:last-child {
    border-bottom: none;
}

.kbsa-bidder-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kbsa-bidder-avatar {
    width: 35px;
    height: 35px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: 600;
    font-size: 14px;
}

.kbsa-bidder-name {
    font-weight: 500;
    color: #333;
}

.kbsa-bid-time {
    font-size: 12px;
    color: #999;
}

.kbsa-bid-amount {
    font-weight: bold;
    color: #c00;
}

/* Follow Button */
.kbsa-follow-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.kbsa-follower-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
}

.kbsa-follower-stats .material-icons {
    font-size: 18px;
}

.kbsa-follow-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.kbsa-follow-btn:hover {
    border-color: #00a0d2;
    color: #00a0d2;
}

.kbsa-follow-btn.following {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #4caf50;
}

.kbsa-follow-btn .material-icons {
    font-size: 18px;
}

/* Reserve Price Display */
.kbsa-reserve-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #fff3e0;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 13px;
}

.kbsa-reserve-info.reserve-met {
    background: #e8f5e9;
    color: #2e7d32;
}

.kbsa-reserve-info .material-icons {
    font-size: 18px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .kbsa-countdown-value {
        width: 35px;
        height: 40px;
        line-height: 40px;
        font-size: 20px;
    }

    .kbsa-countdown-separator {
        font-size: 24px;
    }

    .kbsa-bid-form {
        flex-direction: column;
    }

    .kbsa-bid-btn {
        width: 100%;
    }

    .kbsa-filters-bar .row {
        flex-direction: column;
        gap: 15px;
    }

    .kbsa-status-tabs {
        flex-wrap: wrap;
    }

    .kbsa-section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .kbsa-featured-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .kbsa-list-view .kbsa-auction-card {
        flex-direction: column;
    }

    .kbsa-list-view .kbsa-card-image {
        width: 100%;
    }
}
