/* ==========================================
   AUCTION PAGES STYLES
   Silent Auction & Target Raffle Pages
   ========================================== */

/* ==========================================
   PAGE HEADER
   ========================================== */

.page-header {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2C1810 0%, #5D4037 50%, #3E2723 100%);
    margin-top: 80px;
    overflow: hidden;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="rgba(212,175,55,0.1)"/></svg>');
    opacity: 0.3;
}

.page-header .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 5rem;
    color: var(--color-secondary);
    letter-spacing: 8px;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-subtitle {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-light);
    margin-bottom: 1rem;
    font-style: italic;
}

.breadcrumb {
    color: var(--color-light);
    opacity: 0.8;
    margin-top: 1rem;
}

.breadcrumb a {
    color: var(--color-secondary);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ==========================================
   FILTER SECTION
   ========================================== */

.filter-section {
    background: var(--color-light);
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-secondary);
    position: sticky;
    top: 80px;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Search Box */
.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1.25rem;
    font-size: 0.95rem;
    border: 2px solid var(--color-primary);
    border-radius: 50px;
    outline: none;
    transition: var(--transition-smooth);
    background: white;
}

.search-box input:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    pointer-events: none;
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--color-primary);
    border-radius: 20px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--color-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.25);
}

.filter-btn.active {
    background: var(--color-secondary);
    color: var(--color-dark);
    border-color: var(--color-secondary);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.filter-btn .count {
    display: inline-block;
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.filter-btn.active .count {
    background: rgba(0, 0, 0, 0.2);
}

/* ==========================================
   AUCTION GRID
   ========================================== */

.auction-section {
    padding: 4rem 0;
    background: white;
}

.auction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Loading Spinner */
.loading-spinner {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--color-light);
    border-top: 4px solid var(--color-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   AUCTION ITEM CARD
   ========================================== */

.auction-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    animation: fadeInScale 0.5s ease-out;
    animation-fill-mode: both;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.auction-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.auction-item:hover .item-image img {
    transform: scale(1.1);
}

/* Item Number Badge */
.item-number {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, var(--color-secondary), #F4C542);
    color: var(--color-dark);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

/* Category Badge */
.item-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(139, 0, 0, 0.9);
    color: white;
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

/* Item Image */
.item-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-light) 0%, #E8D4B8 100%);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.item-image.no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    font-size: 1.2rem;
}

.item-image.no-photo::before {
    content: '📦';
    font-size: 4rem;
    opacity: 0.3;
}

/* Item Content */
.item-content {
    padding: 1.5rem;
}

.item-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    font-weight: 700;
}

.item-description {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-donor {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-light);
    font-size: 0.9rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-light);
}

.donor-icon {
    color: var(--color-secondary);
    font-size: 1.1rem;
}

/* View Details Button */
.view-details-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--color-primary), #6D4C41);
    color: white;
    border: none;
    border-radius: 0;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 1rem;
}

.view-details-btn:hover {
    background: linear-gradient(135deg, #6D4C41, var(--color-primary));
}

/* ==========================================
   LIGHTBOX
   ========================================== */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 1200px;
    max-height: 90vh;
    margin: 2rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    animation: lightboxZoom 0.3s ease-out;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Lightbox Header Buttons Container */
.lightbox-header-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    gap: 0.75rem;
}

.lightbox-header-buttons .item-category {
    position: static;
    margin: 0;
}

.lightbox-close {
    position: static;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.lightbox-close:hover {
    background: var(--color-accent);
    transform: rotate(90deg);
}

/* Two-column lightbox body */
.lightbox-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    flex: 1;
    overflow: hidden;
}

.lightbox-image-container {
    background: var(--color-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: hidden;
}

.lightbox-image {
    width: 100%;
    height: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.lightbox-image.no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-light) 0%, #E8D4B8 100%);
}

.lightbox-info {
    padding: 4rem 2rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    position: relative;
}

.lightbox-info .item-number {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.lightbox-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--color-primary);
    margin: 0;
    margin-top: 0.75rem;
    line-height: 1.3;
}

.lightbox-description {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.lightbox-donor {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-light);
    font-size: 0.9rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-light);
}

.lightbox-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--color-light);
}

.btn-compact {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    flex: 1;
    min-width: 140px;
    text-align: center;
}

/* ==========================================
   INFO BANNER
   ========================================== */

.info-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, #6D4C41 100%);
    padding: 3rem 0;
    color: white;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: space-between;
}

.banner-icon {
    font-size: 4rem;
    flex-shrink: 0;
}

.banner-text {
    flex: 1;
}

.banner-text h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

.banner-text p {
    font-size: 1.1rem;
    line-height: 1.6;
}

.banner-text a {
    color: var(--color-secondary);
    font-weight: 700;
}

.banner-text a:hover {
    text-decoration: underline;
}

/* ==========================================
   BACK TO TOP BUTTON
   ========================================== */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--color-secondary);
    color: var(--color-dark);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #F4C542;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

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

@media (max-width: 968px) {
    .auction-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .banner-content {
        flex-direction: column;
        text-align: center;
    }

    .filter-section {
        top: 70px;
    }
}

@media (max-width: 768px) {
    .page-header {
        min-height: 300px;
        margin-top: 70px;
    }

    .page-title {
        font-size: 3.5rem;
        letter-spacing: 4px;
    }

    .page-subtitle {
        font-size: 1.2rem;
    }

    .category-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .auction-grid {
        grid-template-columns: 1fr;
    }

    .lightbox-content {
        margin: 1rem;
        max-height: 95vh;
    }

    .lightbox-body {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .lightbox-image-container {
        max-height: 40vh;
    }

    .lightbox-info {
        padding: 1.5rem;
    }

    .lightbox-title {
        font-size: 1.3rem;
    }

    .lightbox-description {
        font-size: 0.9rem;
    }

    .lightbox-info {
        padding-top: 5rem;
    }

    .lightbox-title {
        margin-top: 0;
    }

    .banner-text h3 {
        font-size: 1.5rem;
    }

    .banner-icon {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2.5rem;
    }

    .search-box {
        max-width: 100%;
    }

    .item-image {
        height: 240px;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 1rem;
        right: 1rem;
    }
}
