/* =========================================================
   Auction Lots Widget — style.css
   Gerard S Digital Agency
   ========================================================= */

.alw-grid {
    display: grid;
    gap: 24px;
    margin: 24px 0;
}

.alw-cols-2 { grid-template-columns: repeat(2, 1fr); }
.alw-cols-3 { grid-template-columns: repeat(3, 1fr); }
.alw-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .alw-cols-3,
    .alw-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .alw-cols-2,
    .alw-cols-3,
    .alw-cols-4 { grid-template-columns: 1fr; }
}

/* Card */
.alw-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
}

.alw-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,0,0,.13);
}

/* Thumb */
.alw-card__thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f4f4f4;
}

.alw-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.alw-card__no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 13px;
}

.alw-card__lot {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: .5px;
}

/* Body */
.alw-card__body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alw-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
}

.alw-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.alw-card__meta span {
    font-size: 12px;
    color: #555;
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.alw-card__price {
    font-size: 22px;
    font-weight: 700;
    color: #1a73e8;
    margin-top: auto;
    padding-top: 8px;
}

/* Button */
.alw-btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: background .2s;
}

.alw-btn--detail {
    background: #1a73e8;
    color: #fff;
    width: 100%;
    margin-top: 8px;
}

.alw-btn--detail:hover {
    background: #1558b0;
}

.alw-btn--load-more {
    background: #f5f5f5;
    color: #333;
    margin: 24px auto 0;
    display: block;
    padding: 12px 32px;
}

.alw-btn--load-more:hover {
    background: #e0e0e0;
}

/* Empty state */
.alw-empty {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 15px;
}

/* Modal */
.alw-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.alw-modal-overlay.is-open {
    display: flex;
}

.alw-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 720px;
    width: 94%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    padding: 28px;
    animation: alwFadeIn .2s ease;
}

@keyframes alwFadeIn {
    from { opacity: 0; transform: scale(.96); }
    to   { opacity: 1; transform: scale(1);   }
}

.alw-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: #666;
    line-height: 1;
}

.alw-modal__gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.alw-modal__gallery img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 6px;
}

.alw-modal__info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.alw-modal__info-item {
    background: #f5f5f5;
    padding: 10px 14px;
    border-radius: 8px;
}

.alw-modal__info-item strong {
    display: block;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 3px;
}

.alw-modal__info-item span {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.alw-modal__loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

@media (max-width: 560px) {
    .alw-modal__gallery   { grid-template-columns: repeat(2, 1fr); }
    .alw-modal__info      { grid-template-columns: 1fr; }
}

/* Source badge (Copart / IAAI) */
.alw-card__source {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.alw-source--copart {
    background: #1a73e8;
    color: #fff;
}
.alw-source--iaai {
    background: #e8711a;
    color: #fff;
}
