* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #181818;
    background: #f5f5f5;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 16px;
}

.hero,
.card {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

h1, h2, h3, p {
    margin-top: 0;
}

.inline-form,
.stack-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.stack-form {
    flex-direction: column;
    align-items: stretch;
}

input,
textarea,
select,
button {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #d3d3d3;
    padding: 11px 12px;
    font-size: 16px;
    background: #fff;
}

button {
    border: none;
    background: #1d1d1d;
    color: #fff;
    font-weight: 600;
}

.ghost-btn {
    background: #ececec;
    color: #1d1d1d;
}

.btn-link {
    display: inline-block;
    width: auto;
    text-decoration: none;
    border-radius: 10px;
    padding: 11px 14px;
    background: #1d1d1d;
    color: #fff;
    font-weight: 600;
}

.btn-link-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
}

.cards {
    display: grid;
    gap: 14px;
}

.card.is-sold {
    opacity: 0.7;
    filter: grayscale(0.2);
}

.carousel {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: -4px -4px 12px;
    padding: 4px;
}

.carousel img,
.empty-photo {
    width: 100%;
    min-width: 100%;
    max-height: 340px;
    object-fit: cover;
    border-radius: 12px;
    scroll-snap-align: start;
    background: #ececec;
}

.empty-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    min-height: 180px;
}

.meta {
    color: #666;
    margin-bottom: 8px;
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 8px 0 12px;
}

.action-btn {
    width: 100%;
}

.sold-label {
    margin-top: 10px;
    color: #444;
    font-weight: 700;
}

.admin-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.wizard-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.wizard-tab {
    padding: 10px;
    background: #ececec;
    color: #1d1d1d;
}

.wizard-tab.is-active {
    background: #1d1d1d;
    color: #fff;
}

.is-hidden {
    display: none !important;
}

.wizard-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 8px;
}

.draft-list {
    display: grid;
    gap: 8px;
}

.draft-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.admin-item {
    border-top: 1px solid #ececec;
    padding-top: 10px;
    margin-top: 10px;
}

.admin-item-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.admin-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-item-actions button,
.admin-item-actions .btn-link-inline {
    width: auto;
    flex: 0 0 auto;
}

#adminEditSection.is-focused-edit {
    box-shadow: 0 0 0 2px rgba(29, 29, 29, 0.22), 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.22s ease;
}

.mini-photos {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.mini-photos img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.mini-photos figure {
    margin: 0;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    font-size: 14px;
    padding: 8px;
    border-bottom: 1px solid #ececec;
}

.hint {
    color: #666;
}

.wizard-screen h2 {
    margin-bottom: 8px;
}

.wiz-progressbar {
    height: 8px;
    width: 100%;
    background: #ececec;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}

.wiz-progressbar > span {
    display: block;
    height: 100%;
    width: 0%;
    background: #1d1d1d;
    transition: width 0.2s ease;
}

.recap p {
    margin-bottom: 8px;
}

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

.row-check input {
    width: auto;
}

.wizard-mobile .card {
    min-height: 70vh;
}

.wizard-photo-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.wizard-file-btn {
    position: relative;
    cursor: pointer;
}

.wizard-file-btn input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.wizard-preview-list figure {
    position: relative;
}

.wizard-preview-list .remove-photo-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: auto;
    padding: 6px 9px;
    font-size: 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
}

.wizard-preview-list .photo-controls {
    position: absolute;
    bottom: 6px;
    left: 6px;
    display: flex;
    gap: 6px;
}

.wizard-preview-list .move-photo-btn {
    width: auto;
    padding: 6px 9px;
    font-size: 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
}

.wizard-preview-list .move-photo-btn:disabled {
    opacity: 0.45;
}

.recap-photo-preview {
    margin-top: 8px;
}

.recap-photo-preview img {
    width: 90px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.wizard-toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translate(-50%, 12px);
    background: rgba(29, 29, 29, 0.95);
    color: #fff;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
}

.wizard-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (min-width: 860px) {
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wizard-actions {
        grid-template-columns: repeat(4, 1fr);
    }
}
