body {
    font-size: 15px;
}

.card {
    border-radius: 10px;
}

/* Product Stage Styles */
.ps-container {
    width: 100%;
}

.ps-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.ps-field {
    flex: 1;
    min-width: 150px;
    position: relative;
}

.ps-field label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.ps-field input,
.ps-field select {
    width: 100%;
}

/* SKU Search Popup */
.ps-popup {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.ps-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ps-results-list li {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease;
}

.ps-results-list li:last-child {
    border-bottom: none;
}

.ps-results-list li:hover {
    background-color: #f8f9fa;
}

.ps-results-list li:active {
    background-color: #e9ecef;
}

/* Button spacing */
#ps-search {
    white-space: nowrap;
}

#ps-load {
    white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ps-row {
        flex-direction: column;
        gap: 12px;
    }

    .ps-field {
        width: 100%;
        min-width: unset;
    }

    #ps-search,
    #ps-load {
        width: 100%;
    }
}

/* Stage wizard step indicator */
.stage-step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    padding: 0;
    list-style: none;
}

.stage-step-indicator li {
    flex: 1;
    text-align: center;
    padding: 8px 16px;
    position: relative;
    color: #6c757d;
    font-size: 14px;
}

.stage-step-indicator li.active {
    color: #0d6efd;
    font-weight: 600;
}

.stage-step-indicator li.completed {
    color: #198754;
}

.stage-step-indicator li::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #dee2e6;
    z-index: -1;
}

.stage-step-indicator li:last-child::after {
    display: none;
}

.stage-step-indicator li.completed::after {
    background: #198754;
}

/* Photos step */
.stage-photos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 8px;
}

/* Exactly 2 columns per row */
.stage-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stage-photo-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.stage-photo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.stage-photo-card--removing {
    opacity: 0.3;
    transform: scale(0.96);
}

.stage-photo-media {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    background-color: #f8f9fa;
}

.stage-photo-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Origin label on top right */
.stage-photo-origin-label {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 10;
    letter-spacing: 0.3px;
}

/* Featured badge on top left */
.stage-photo-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 11px;
    text-transform: uppercase;
}

/* Tags area */
.stage-photo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px 0;
}

.stage-photo-tag {
    background-color: #f1f3f5;
    color: #495057;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
}

/* Actions area with border to relate to photo */
.stage-photo-actions {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Same color for all action buttons except delete */
.stage-photo-actions .btn {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    border-width: 1px;
}

.stage-photo-actions .btn:not(.btn-danger) {
    color: #495057;
    background-color: #fff;
    border-color: #adb5bd;
}

.stage-photo-actions .btn:not(.btn-danger):hover {
    background-color: #e9ecef;
    border-color: #868e96;
}

/* Delete button always red */
.stage-photo-actions .btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.stage-photo-actions .btn-danger:hover {
    background-color: #bb2d3b;
    border-color: #b02a37;
}

@media (max-width: 576px) {
    .stage-photos-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stage-photo-grid {
        grid-template-columns: 1fr;
    }

    .stage-photo-actions {
        flex-direction: column;
    }
}
