.sale-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.sale-header .section-title {
    margin-bottom: 0;
}

.sale-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sale-intro {
    font-size: 1rem;
    line-height: 1.8;
    color: #d0d0d0;
    margin: 15px 0 25px;
}

.sale-button,
.sale-button-secondary {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.sale-button {
    border: none;
    background: linear-gradient(90deg, #c41e3a, #d4a017);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.sale-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sale-button-secondary {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #e0d6c8;
}

.reorder-toolbar[hidden] {
    display: none;
}

.reorder-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid rgba(212, 160, 23, 0.3);
    background: rgba(0, 0, 0, 0.2);
}

.reorder-hint {
    font-size: 0.9rem;
    color: #e0d6c8;
}

.reorder-toolbar-actions {
    display: flex;
    gap: 10px;
}

.sale-item.reorder-active {
    border-color: rgba(212, 160, 23, 0.4);
}

.sale-reorder-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sale-move-button {
    flex: 1;
    max-width: 90px;
    padding: 6px 0;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #e0d6c8;
    font-size: 0.9rem;
    cursor: pointer;
}

.sale-move-button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.sale-wizard {
    margin-bottom: 25px;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid rgba(212, 160, 23, 0.3);
    background: rgba(0, 0, 0, 0.2);
}

.wizard-step-title {
    font-size: 1rem;
    color: #d4a017;
    margin-bottom: 12px;
}

.wizard-step label {
    display: block;
    font-size: 0.85rem;
    color: #e0d6c8;
    margin-bottom: 6px;
}

.wizard-spaced-label {
    margin-top: 12px;
}

/* First category sits below the "For Sale" header with the same gap the
   .trophy-intro / .sale-intro paragraph would give (15px); stacked
   categories get a wider gap between them. */
.sale-category {
    margin-top: 15px;
}

.sale-category + .sale-category {
    margin-top: 30px;
}

.sale-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.sale-category-title {
    color: #d4a017;
    font-size: 1.2rem;
    margin: 0;
}

.sale-category-description {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #a0a0a0;
    margin: 6px 0 18px;
}

.sale-textarea,
.sale-input {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    resize: vertical;
}

.sale-textarea:focus,
.sale-input:focus {
    outline: none;
    border-color: #c41e3a;
}

.sale-form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sale-form-row > div {
    flex: 1;
    min-width: 160px;
}

.sale-filename-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sale-filename-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sale-filename-row .sale-input {
    flex: 1;
}

.sale-filename-remove {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #e0d6c8;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.sale-add-filename-button {
    margin-top: 10px;
}

.wizard-hint {
    font-size: 0.8rem;
    color: #a0a0a0;
    margin: 10px 0 0;
}

.wizard-hint code {
    color: #d4a017;
}

.wizard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.sale-message {
    margin: 0 0 16px 0;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.sale-message-error {
    background: rgba(196, 30, 58, 0.15);
    border: 1px solid rgba(196, 30, 58, 0.5);
    color: #ffb3c0;
}

.sale-message-success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.5);
    color: #b5e8bd;
}

.sale-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #a0a0a0;
    font-style: italic;
    padding: 40px 0;
}

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

.sale-item {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.sale-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(196, 30, 58, 0.2);
    border-color: rgba(196, 30, 58, 0.4);
}

.sale-photo-wrap {
    position: relative;
}

.sale-photo {
    aspect-ratio: 4/3;
    width: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.sale-item.reorder-active .sale-photo {
    cursor: default;
}

.sale-photo-count {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    pointer-events: none;
}

.sale-photo-count-icon {
    display: block;
    font-size: 0.85rem;
    line-height: 1;
}

.sale-body {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 10px;
    padding: 16px;
    color: #d0d0d0;
    flex: 1;
}

.sale-body-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Clamp long names to two lines so a wordy title can't blow the card out,
   but don't reserve a second line when the name only needs one. */
.sale-name {
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.35;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.sale-description-text {
    display: block;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #d0d0d0;
    margin-bottom: 14px;
}

/* Price + Enquire share the card's bottom row, so the price no longer
   pushes the description around and the buttons line up across a row. */
.sale-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 12px;
    flex-wrap: wrap;
}

.sale-price {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    background: linear-gradient(90deg, #c41e3a, #d4a017);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Holds the left slot (keeping Enquire right-aligned) when there's no price. */
.sale-price-empty {
    visibility: hidden;
}

.sale-enquire-button {
    display: block;
    width: fit-content;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    background: linear-gradient(90deg, #c41e3a, #d4a017);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.sale-enquire-button:hover {
    opacity: 0.9;
}

.sale-edit-button {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #e0d6c8;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.sale-edit-form {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.sale-edit-form label {
    font-size: 0.8rem;
    color: #e0d6c8;
}

.sale-edit-form .sale-add-filename-button {
    align-self: flex-start;
}

.sale-edit-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.sale-button-danger {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    background: rgba(196, 30, 58, 0.15);
    border: 1px solid rgba(196, 30, 58, 0.5);
    color: #ff8a8a;
    margin-left: auto;
}

@media (max-width: 480px) {
    .sale-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.sale-lightbox[hidden] {
    display: none;
}

.sale-lightbox {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding: 30px;
    box-sizing: border-box;
}

.sale-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, 0.92);
}

.sale-lightbox-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: min(900px, 100%);
    max-height: 100%;
}

.sale-lightbox-image {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: block;
}

.sale-lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.sale-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.sale-lightbox-prev {
    left: -20px;
}

.sale-lightbox-next {
    right: -20px;
}

.sale-lightbox-caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    color: #e0d6c8;
    font-size: 0.95rem;
    text-align: center;
}

.sale-lightbox-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.05rem;
}

.sale-lightbox-price {
    color: #d4a017;
    font-weight: 700;
}

.sale-lightbox-counter {
    flex-shrink: 0;
    color: #a0a0a0;
    font-size: 0.85rem;
}

.sale-admin-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

label.sale-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    color: #e0d6c8;
    line-height: 1.4;
    cursor: pointer;
}

label.sale-checkbox-label input {
    flex-shrink: 0;
    margin-top: 2px;
}

/* "Sold Out" overlay - drawn over an item's photo in the grid and in the
   lightbox whenever sale_item.sold_out is set. */
.sale-sold-out-overlay[hidden] {
    display: none;
}

.sale-sold-out-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 12, 0.55);
    pointer-events: none;
    z-index: 2;
}

.sale-sold-out-label {
    padding: 6px 22px;
    border: 2px solid #ffffff;
    border-radius: 6px;
    background: rgba(196, 30, 58, 0.9);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    transform: rotate(-8deg);
}

.sale-item.sold-out .sale-photo {
    filter: grayscale(0.6) brightness(0.85);
}

.sale-lightbox-image-wrap {
    position: relative;
    display: flex;
}

@media (max-width: 700px) {
    .sale-lightbox {
        padding: 20px;
    }

    .sale-lightbox-nav {
        width: 38px;
        height: 38px;
    }

    .sale-lightbox-prev {
        left: -8px;
    }

    .sale-lightbox-next {
        right: -8px;
    }
}
