/* Auction Detail Page Styles (Past Auctions) */

.auction-detail-container,
.auction-detail-container *,
.auction-detail-container *::before,
.auction-detail-container *::after {
    box-sizing: border-box;
}

.auction-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 16px;
    min-height: calc(100vh - 80px);
    width: 100%;
}

.auction-detail-header {
    margin-bottom: 24px;
}

.auction-detail-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

/* Main Content Area */
.auction-main {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.property-card {
    margin-bottom: 24px;
}

/* Image Carousel */
.image-carousel {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    background: #f3f4f6;
}

.carousel-container {
    width: 100%;
    height: 100%;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-image.active {
    opacity: 1;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.placeholder-image .material-icons-outlined {
    font-size: 80px;
    color: #9ca3af;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-btn .material-icons-outlined {
    font-size: 28px;
    color: #374151;
}

.prev-btn {
    left: 16px;
}

.next-btn {
    right: 16px;
}

.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* Auction Ended Badge */
.auction-ended-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(107, 114, 128, 0.9);
    color: #fff;
    border-radius: 8px;
    font-family: 'SFProText', sans-serif;
    font-size: 14px;
    font-weight: 600;
    z-index: 10;
}

.auction-ended-badge .material-icons-outlined {
    font-size: 20px;
}

/* Property Info */
.property-detail-info {
    padding: 24px;
}

.property-title-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.property-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.property-title h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.tier-badge {
    flex-shrink: 0;
}

.property-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'SFProText', sans-serif;
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 24px 0;
}

.property-location .material-icons-outlined {
    font-size: 20px;
    color: #EA794C;
}

/* Property Stats */
.property-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 24px;
}

.stat-item h3 {
    font-family: 'SFProText', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
    margin: 0 0 6px 0;
}

.stat-item p {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.stat-value-special {
    color: #EA794C !important;
}

/* Description */
.property-description h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 12px 0;
}

.description-content {
    font-family: 'SFProText', sans-serif;
    font-size: 15px;
    color: #4b5563;
    line-height: 1.7;
}

.description-content p {
    margin: 0 0 12px 0;
}

/* Memories Section — compact for auction detail main area */
.auction-main .landmark-memories {
    padding: 16px;
}

.auction-main .landmark-memories h2 {
    font-size: 18px;
    margin: 0 0 12px 0;
}

.auction-main .memories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.auction-main .memory-thumbnail {
    padding-top: 75%; /* 4:3 instead of 1:1 */
    border-radius: 8px;
}

.auction-main .memory-title {
    font-size: 12px;
    margin: 4px 0 2px 0;
}

.auction-main .memory-author {
    font-size: 11px;
}

.auction-main .memory-date {
    font-size: 10px;
}

.auction-main .no-memories-state {
    padding: 20px 12px;
}

@media (max-width: 768px) {
    .auction-main .memories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Sidebar */
.auction-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    min-width: 0;
}

/* Result Card */
.result-card {
    padding: 24px;
    width: 100%;
    overflow: hidden;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.result-header .material-icons-outlined {
    font-size: 28px;
    color: #F59E0B;
}

.result-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.result-ended {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 20px;
}

.ended-label {
    font-family: 'SFProText', sans-serif;
    font-size: 12px;
    color: #6b7280;
}

.ended-date {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.ended-time-ago {
    font-family: 'SFProText', sans-serif;
    font-size: 13px;
    color: #9ca3af;
}

.section-label {
    display: block;
    font-family: 'SFProText', sans-serif;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
}

.winning-bid-section {
    margin-bottom: 20px;
}

.winning-bid-amount {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #EA794C;
    word-break: break-word;
    overflow-wrap: break-word;
}

.winning-bid-amount small {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
}

.winner-section, .owner-section {
    margin-bottom: 20px;
}

.winner-info, .owner-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 10px;
    overflow: hidden;
}

.winner-avatar, .owner-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.winner-name, .owner-name {
    font-family: 'SFProText', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.you-badge {
    padding: 4px 10px;
    background: #10B981;
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: auto;
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 0;
    margin-bottom: 20px;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.stats-row .stat {
    text-align: center;
}

.stats-row .stat-value {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.stats-row .stat-label {
    font-family: 'SFProText', sans-serif;
    font-size: 12px;
    color: #6b7280;
}

.back-to-auctions-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: #fff;
    color: #EA794C;
    border: 2px solid #EA794C;
    border-radius: 12px;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.back-to-auctions-btn:hover {
    background: #FEF3EE;
}

.back-to-auctions-btn .material-icons-outlined {
    font-size: 20px;
    flex-shrink: 0;
}

/* Bid History Card */
.bid-history-card {
    padding: 24px;
    width: 100%;
    overflow: hidden;
}

.bid-history-card h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bid-history-card h2::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #EA794C, #F59E0B);
    border-radius: 2px;
}

.bid-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
}

.bid-list::-webkit-scrollbar {
    width: 6px;
}

.bid-list::-webkit-scrollbar-track {
    background: transparent;
}

.bid-list::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 3px;
}

.bid-list::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

.bid-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px;
    min-height: 80px;
    gap: 16px;
    overflow: hidden;
    border-radius: 14px;
    background: #f9fafb;
    transition: all 0.2s ease;
    position: relative;
}

.bid-item:hover {
    background: #f3f4f6;
    transform: translateX(2px);
}

.bid-item.winner {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    padding: 22px 22px;
    min-height: 90px;
}

.bid-item.winner::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #10B981, #059669);
    border-radius: 14px 0 0 14px;
}

.bid-amount {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 10px 16px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bid-item.winner .bid-amount {
    color: #059669;
    background: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    padding: 12px 18px;
}

.bidder-info {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.bidder-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bid-item.winner .bidder-avatar {
    width: 54px;
    height: 54px;
    border-color: #10B981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.bidder-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
    padding: 4px 0;
}

.bidder-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'SFProText', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.winner-tag {
    padding: 4px 12px;
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
    flex-shrink: 0;
}

.bid-time {
    font-family: 'SFProText', sans-serif;
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.4;
}

.no-bids {
    font-family: 'SFProText', sans-serif;
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    padding: 40px 24px;
    background: #f9fafb;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.no-bids::before {
    content: 'gavel';
    font-family: 'Material Icons Outlined';
    font-size: 32px;
    color: #d1d5db;
}

/* Responsive Styles */
@media (min-width: 1024px) {
    .auction-detail-container {
        padding: 32px;
    }

    .auction-detail-content {
        flex-direction: row;
        align-items: flex-start;
    }

    .auction-main {
        flex: 2;
        min-width: 0;
    }

    .auction-sidebar {
        flex: 1;
        position: sticky;
        top: 24px;
        max-width: 400px;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .auction-detail-container {
        padding: 16px 12px;
    }

    .image-carousel {
        height: 250px;
        border-radius: 0;
    }

    .property-title h1 {
        font-size: 22px;
    }

    .property-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .result-card {
        padding: 16px;
    }

    .winning-bid-amount {
        font-size: 26px;
    }

    .bid-history-card {
        padding: 18px;
    }

    .bid-list {
        gap: 10px;
    }

    .bid-item {
        padding: 16px 14px;
        min-height: 70px;
        gap: 12px;
    }

    .bid-item.winner {
        padding: 18px 16px;
        min-height: 76px;
    }

    .bidder-avatar {
        width: 44px;
        height: 44px;
    }

    .bid-item.winner .bidder-avatar {
        width: 48px;
        height: 48px;
    }

    .bidder-details {
        gap: 6px;
        padding: 2px 0;
    }

    .bidder-name {
        font-size: 14px;
    }

    .bid-amount {
        font-size: 13px;
        padding: 8px 12px;
    }

    .bid-item.winner .bid-amount {
        font-size: 14px;
        padding: 10px 14px;
    }

    .stats-row {
        gap: 8px;
    }

    .stats-row .stat-value {
        font-size: 20px;
    }
}
