/**
 * Fuji Photo Upload v3.0 - Frontend Styles
 *
 * Design system: drewnianysklep.pl
 * Colors: charcoal #3d3d3d, olive #52583C, beige #AA8C74,
 *         light-beige #D6C1AE, ecru #EDE6DE, off-white #FBFBFB
 * Font: inherit (Manrope from theme)
 *
 * @package Fuji_Photo_Upload
 */

/* ╔══════════════════════════════════════════════════════════════╗
   ║  DESIGN TOKENS                                              ║
   ╚══════════════════════════════════════════════════════════════╝ */

:root {
    --fpu-charcoal:    #3d3d3d;
    --fpu-olive:       #52583C;
    --fpu-olive-light: #6b7350;
    --fpu-beige:       #AA8C74;
    --fpu-beige-light: #D6C1AE;
    --fpu-ecru:        #EDE6DE;
    --fpu-off-white:   #FBFBFB;
    --fpu-white:       #ffffff;
    --fpu-danger:      #c0392b;
    --fpu-danger-bg:   #fdf0ef;
    --fpu-success:     #27ae60;
    --fpu-success-bg:  #eafaf1;
    --fpu-warning:     #e67e22;
    --fpu-warning-bg:  #fef9e7;

    --fpu-radius-sm:   6px;
    --fpu-radius:      10px;
    --fpu-radius-lg:   14px;

    --fpu-shadow-sm:   0 1px 3px rgba(0,0,0,.06);
    --fpu-shadow:      0 2px 8px rgba(0,0,0,.07);
    --fpu-shadow-lg:   0 8px 24px rgba(0,0,0,.10);

    --fpu-transition:  .2s ease;
    --fpu-font:        inherit;
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  CONTAINER                                                  ║
   ╚══════════════════════════════════════════════════════════════╝ */

.fpu-wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    padding: 0 16px;
    font-family: var(--fpu-font);
    color: var(--fpu-charcoal);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Force full width — override theme content width restrictions */
.entry-content .fpu-wrap,
.site-content .fpu-wrap,
.page-content .fpu-wrap,
.post-content .fpu-wrap,
.elementor-widget-container .fpu-wrap,
.wp-block-post-content .fpu-wrap,
article .fpu-wrap {
    max-width: 100% !important;
    width: 100% !important;
}

/* ── 3-column layout ──────────────────── */

.fpu-layout {
    display: grid !important;
    grid-template-columns: 280px 1fr 280px;
    gap: 24px;
    align-items: start;
}

.fpu-layout__sidebar {
    position: sticky;
    top: 24px;
}

.fpu-layout__sidebar--left,
.fpu-layout__sidebar--right {
    display: block !important;
}

.fpu-layout__center {
    min-width: 0;
}

.fpu-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--fpu-charcoal);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--fpu-ecru);
}

.fpu-btn--block {
    width: 100%;
    justify-content: center;
}

.fpu-wrap *,
.fpu-wrap *::before,
.fpu-wrap *::after {
    box-sizing: border-box;
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  0b. SESSION BAR                                             ║
   ╚══════════════════════════════════════════════════════════════╝ */

.fpu-session-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--fpu-success-bg);
    border: 1px solid #a3d9b1;
    border-radius: var(--fpu-radius);
    padding: 10px 16px;
    margin-bottom: 16px;
}

.fpu-session-bar__status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1a5632;
}

.fpu-session-bar__info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.fpu-session-bar__timer {
    font-size: 11px;
    font-weight: 400;
    color: #5a8a6a;
}

.fpu-session-bar--saved {
    animation: fpuBarFlash .6s ease;
}
@keyframes fpuBarFlash {
    0%   { background: #c8f0d4; }
    100% { background: var(--fpu-success-bg); }
}

.fpu-session-bar__actions {
    display: flex;
    gap: 8px;
}

/* ── Saved sessions list ────────────── */

.fpu-sessions-list {
    background: var(--fpu-white);
    border: 1px solid var(--fpu-ecru);
    border-radius: var(--fpu-radius-lg);
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: var(--fpu-shadow);
}

.fpu-sessions-list__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.fpu-sessions-list__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--fpu-charcoal);
    margin: 0;
}

.fpu-sessions-list__close {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--fpu-ecru);
    border-radius: 50%;
    font-size: 18px;
    color: var(--fpu-charcoal);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background var(--fpu-transition);
}

.fpu-sessions-list__close:hover {
    background: var(--fpu-beige-light);
}

.fpu-sessions-list__items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fpu-session-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--fpu-off-white);
    border: 1px solid var(--fpu-ecru);
    border-radius: var(--fpu-radius-sm);
    cursor: pointer;
    transition: all var(--fpu-transition);
}

.fpu-session-item:hover {
    border-color: var(--fpu-olive);
    box-shadow: var(--fpu-shadow-sm);
}

.fpu-session-item__info {
    flex: 1;
    min-width: 0;
}

.fpu-session-item__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--fpu-charcoal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fpu-session-item__meta {
    font-size: 11px;
    color: var(--fpu-beige);
    margin-top: 2px;
}

.fpu-session-item__expiry {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    margin-top: 3px;
    line-height: 1.2;
}

.fpu-session-item__expiry--ok {
    color: var(--fpu-olive);
}

.fpu-session-item__expiry--warn {
    color: #d4940a;
    font-weight: 600;
}

.fpu-session-item__expiry--expired {
    color: var(--fpu-danger);
    font-weight: 600;
}

.fpu-session-item__actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.fpu-session-item__delete {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--fpu-danger);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0.6;
    transition: all var(--fpu-transition);
}

.fpu-session-item__delete:hover {
    opacity: 1;
    background: var(--fpu-danger-bg);
}

.fpu-sessions-list__empty {
    text-align: center;
    padding: 20px;
    color: var(--fpu-beige);
    font-size: 13px;
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  1. SESSION CONFIG                                          ║
   ╚══════════════════════════════════════════════════════════════╝ */

.fpu-session-config {
    background: var(--fpu-white);
    border: 1px solid var(--fpu-ecru);
    border-radius: var(--fpu-radius-lg);
    padding: 20px;
    box-shadow: var(--fpu-shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Field ─────────────────────────────── */

.fpu-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fpu-field--inline {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.fpu-field__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fpu-charcoal);
    letter-spacing: .02em;
    text-transform: uppercase;
}

.fpu-field__required {
    color: var(--fpu-danger);
    text-decoration: none;
    font-weight: 700;
}

.fpu-field__input,
.fpu-field__select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--fpu-beige-light);
    border-radius: var(--fpu-radius-sm);
    font-size: 15px;
    font-family: var(--fpu-font);
    color: var(--fpu-charcoal);
    background: var(--fpu-off-white);
    transition: border-color var(--fpu-transition), box-shadow var(--fpu-transition);
    outline: none;
}

.fpu-field__input:focus,
.fpu-field__select:focus {
    border-color: var(--fpu-olive);
    box-shadow: 0 0 0 3px rgba(82,88,60,.12);
}

.fpu-field__input::placeholder {
    color: var(--fpu-beige-light);
}

.fpu-field__value {
    font-size: 15px;
    font-weight: 600;
    color: var(--fpu-charcoal);
}

.fpu-format-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--fpu-ecru);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .03em;
}

/* ── Checkbox ──────────────────────────── */

.fpu-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
}

.fpu-checkbox__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.fpu-checkbox__box {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--fpu-beige-light);
    border-radius: 4px;
    background: var(--fpu-white);
    transition: all var(--fpu-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fpu-checkbox__input:checked + .fpu-checkbox__box {
    background: var(--fpu-olive);
    border-color: var(--fpu-olive);
}

.fpu-checkbox__input:checked + .fpu-checkbox__box::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid var(--fpu-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

.fpu-checkbox__input:focus-visible + .fpu-checkbox__box {
    box-shadow: 0 0 0 3px rgba(82,88,60,.2);
}

.fpu-checkbox__label {
    font-size: 14px;
    color: var(--fpu-charcoal);
}

.fpu-field__info-link {
    font-size: 12px;
    color: var(--fpu-olive);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--fpu-transition);
    white-space: nowrap;
}

.fpu-field__info-link:hover {
    color: var(--fpu-charcoal);
}

/* ── Tooltip (?) button ────────────── */

.fpu-tooltip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--fpu-beige-light);
    background: var(--fpu-off-white);
    color: var(--fpu-beige);
    font-size: 11px;
    font-weight: 700;
    font-family: var(--fpu-font);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    position: relative;
    transition: all var(--fpu-transition);
    flex-shrink: 0;
}

.fpu-tooltip-btn:hover,
.fpu-tooltip-btn--active {
    border-color: var(--fpu-olive);
    color: var(--fpu-olive);
    background: var(--fpu-ecru);
}

.fpu-tooltip-bubble {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--fpu-charcoal);
    color: var(--fpu-white);
    padding: 10px 14px;
    border-radius: var(--fpu-radius-sm);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    width: 220px;
    z-index: 100;
    box-shadow: var(--fpu-shadow-lg);
    pointer-events: none;
    animation: fpu-fadeIn .15s ease;
}

.fpu-tooltip-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--fpu-charcoal);
}

/* ── Volume Pricing ────────────────────── */

.fpu-volume {
    /* full width in sidebar */
}

.fpu-volume__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-family: var(--fpu-font);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: var(--fpu-beige);
    cursor: pointer;
    padding: 4px 0;
    transition: color var(--fpu-transition);
}

.fpu-volume__toggle:hover {
    color: var(--fpu-olive);
}

.fpu-volume__chevron {
    transition: transform var(--fpu-transition);
}

.fpu-volume__toggle[aria-expanded="true"] .fpu-volume__chevron {
    transform: rotate(180deg);
}

.fpu-volume__table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.fpu-volume__th {
    padding: 8px 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--fpu-beige);
    border-bottom: 2px solid var(--fpu-ecru);
}

.fpu-volume__th:first-child {
    text-align: left;
}

.fpu-volume__td {
    padding: 8px 12px;
    text-align: center;
    border-bottom: 1px solid var(--fpu-ecru);
}

.fpu-volume__td--tier {
    text-align: left;
    font-weight: 600;
    color: var(--fpu-charcoal);
    white-space: nowrap;
}

.fpu-volume__td--price {
    font-variant-numeric: tabular-nums;
    color: var(--fpu-charcoal);
}

.fpu-volume__row--active {
    background: rgba(82,88,60,.06);
}

.fpu-volume__row--active .fpu-volume__td--price {
    font-weight: 700;
    color: var(--fpu-olive);
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  2. UPLOAD SECTION                                          ║
   ╚══════════════════════════════════════════════════════════════╝ */

.fpu-upload-section {
    margin-bottom: 24px;
}

/* ── Dropzone ──────────────────────────── */

.fpu-dropzone {
    border: 2px dashed var(--fpu-beige-light);
    border-radius: var(--fpu-radius-lg);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    background: var(--fpu-off-white);
    transition: all var(--fpu-transition);
    position: relative;
    outline: none;
}

.fpu-dropzone:hover,
.fpu-dropzone:focus-visible {
    border-color: var(--fpu-olive);
    background: rgba(82,88,60,.03);
}

.fpu-dropzone.fpu-dragover {
    border-color: var(--fpu-olive);
    background: rgba(82,88,60,.06);
    transform: scale(1.005);
}

.fpu-dropzone__icon {
    color: var(--fpu-beige-light);
    margin-bottom: 12px;
    transition: color var(--fpu-transition);
}

.fpu-dropzone:hover .fpu-dropzone__icon {
    color: var(--fpu-olive);
}

.fpu-dropzone__text {
    font-size: 16px;
    font-weight: 600;
    color: var(--fpu-charcoal);
    margin: 0 0 6px;
}

.fpu-dropzone__hint {
    font-size: 13px;
    color: var(--fpu-beige);
    margin: 0;
}

/* ── File input (hidden) ───────────────── */

.fpu-file-input {
    display: none !important;
}

/* ── Upload Progress ───────────────────── */

.fpu-upload-progress {
    background: var(--fpu-white);
    border: 1px solid var(--fpu-ecru);
    border-radius: var(--fpu-radius);
    padding: 16px 20px;
    margin-top: 16px;
    transition: background-color .4s ease, border-color .4s ease;
}

.fpu-upload-progress__bar {
    width: 100%;
    height: 8px;
    background: var(--fpu-ecru);
    border-radius: 4px;
    overflow: hidden;
}

.fpu-upload-progress__fill {
    height: 100%;
    width: 0%;
    background: hsl(30, 70%, 50%);
    border-radius: 4px;
    transition: width .3s ease, background-color .4s ease;
}

.fpu-upload-progress__info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    gap: 12px;
}

.fpu-upload-progress__counter {
    font-size: 13px;
    color: var(--fpu-charcoal);
    font-variant-numeric: tabular-nums;
}

.fpu-upload-progress__pct {
    position: absolute;
    right: 0;
    top: -2px;
    font-size: 11px;
    font-weight: 700;
    color: inherit;
    font-variant-numeric: tabular-nums;
    transition: color .4s ease;
}

.fpu-upload-progress__bar {
    position: relative;
}

.fpu-upload-progress__eta {
    font-size: 12px;
    color: var(--fpu-beige);
    font-weight: 600;
    white-space: nowrap;
    margin-left: auto;
}

/* ── Game button in progress bar ───────────── */

.fpu-upload-progress__game-btn {
    margin-left: auto;
    padding: 6px 16px;
    font-size: 13px;
}

/* ── Mini-game popup ──────────────────────── */

.fpu-game-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fpu-game-popup__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.fpu-game-popup__dialog {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 840px;
    animation: fpu-game-popup-in .25s ease;
}

@keyframes fpu-game-popup-in {
    from { opacity: 0; transform: scale(.92) translateY(16px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Game invite popup ────────────────────── */

.fpu-game-invite {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fpu-game-invite__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(3px);
}

.fpu-game-invite__box {
    position: relative;
    z-index: 1;
    background: var(--fpu-off-white);
    border-radius: var(--fpu-radius-lg);
    padding: 28px 32px 24px;
    box-shadow: var(--fpu-shadow-lg);
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: fpu-game-popup-in .25s ease;
}

.fpu-game-invite__text {
    font-size: 15px;
    line-height: 1.5;
    color: var(--fpu-charcoal);
    margin: 0 0 18px;
}

.fpu-game-invite__btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.fpu-game-invite__play {
    padding: 10px 28px;
    background: var(--fpu-olive);
    color: var(--fpu-white);
    border: none;
    border-radius: var(--fpu-radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
}

.fpu-game-invite__play:hover {
    background: var(--fpu-olive-light);
    transform: scale(1.05);
}

.fpu-game-invite__skip {
    padding: 10px 20px;
    background: transparent;
    color: var(--fpu-beige);
    border: 1px solid var(--fpu-beige-light);
    border-radius: var(--fpu-radius);
    font-size: 13px;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.fpu-game-invite__skip:hover {
    background: var(--fpu-ecru);
    color: var(--fpu-charcoal);
}

/* ── Mini-game: Photo Rider ───────────────── */

.fpu-game {
    border: 1px solid var(--fpu-ecru);
    border-radius: var(--fpu-radius);
    background: var(--fpu-white);
    overflow: hidden;
    position: relative;
    box-shadow: 0 12px 40px rgba(0,0,0,.15);
}

.fpu-game__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: var(--fpu-ecru);
}

.fpu-game__title {
    font-weight: 700;
    font-size: 13px;
    color: var(--fpu-charcoal);
}

.fpu-game__close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: var(--fpu-charcoal);
    cursor: pointer;
    padding: 0 4px;
    opacity: .6;
    transition: opacity .2s;
    margin-left: auto;
}

.fpu-game__close:hover {
    opacity: 1;
}

.fpu-game__canvas {
    display: block;
    width: 100%;
    cursor: pointer;
}

/* Game over overlay */
.fpu-game__gameover {
    position: absolute;
    top: 36px; /* below header */
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(245,239,233,.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.fpu-game__go-box {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.fpu-game__go-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--fpu-charcoal);
}

.fpu-game__go-score {
    font-size: 15px;
    color: var(--fpu-charcoal);
}

.fpu-game__go-restart {
    font-size: 11px;
    color: var(--fpu-beige);
    margin-top: 4px;
}

.fpu-game__replay-btn {
    padding: 10px 28px;
    background: var(--fpu-olive);
    color: var(--fpu-white);
    border: none;
    border-radius: var(--fpu-radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    margin-top: 6px;
}

.fpu-game__replay-btn:hover {
    background: var(--fpu-olive-light);
    transform: scale(1.05);
}

.fpu-game__nick {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 4px;
}

.fpu-game__nick-input {
    width: 130px;
    padding: 5px 10px;
    border: 1px solid var(--fpu-ecru);
    border-radius: var(--fpu-radius-sm);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
}

.fpu-game__nick-input:focus {
    border-color: var(--fpu-olive);
}

.fpu-game__nick-btn {
    padding: 5px 14px;
    background: var(--fpu-olive);
    color: var(--fpu-white);
    border: none;
    border-radius: var(--fpu-radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.fpu-game__nick-btn:hover {
    background: var(--fpu-olive-dark, #3d4a2a);
}

.fpu-game__nick-btn:disabled {
    opacity: .5;
    cursor: default;
}

.fpu-game__nick-msg {
    font-size: 11px;
    min-height: 16px;
}

/* Ranking table */
.fpu-game__ranking {
    padding: 0 14px 10px;
}

.fpu-game__rank-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 6px;
}

.fpu-game__rank-table th {
    text-align: left;
    font-weight: 700;
    color: var(--fpu-beige);
    border-bottom: 1px solid var(--fpu-ecru);
    padding: 4px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.fpu-game__rank-table td {
    padding: 4px 8px;
    border-bottom: 1px solid rgba(0,0,0,.04);
    color: var(--fpu-charcoal);
}

.fpu-game__rank-table tr:last-child td {
    border-bottom: none;
}

.fpu-game__rank-top td {
    font-weight: 600;
}

.fpu-game__rank-table td:last-child,
.fpu-game__rank-table th:last-child {
    text-align: right;
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  3. TOOLBAR                                                 ║
   ╚══════════════════════════════════════════════════════════════╝ */

.fpu-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--fpu-white);
    border: 1px solid var(--fpu-ecru);
    border-radius: var(--fpu-radius);
    padding: 12px 20px;
    margin-bottom: 20px;
}

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

.fpu-toolbar__select-all {
    margin-right: auto;
}

.fpu-toolbar__bulk {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fpu-toolbar__qty-label {
    font-size: 13px;
    color: var(--fpu-beige);
    font-weight: 600;
    text-transform: uppercase;
}

.fpu-toolbar__qty-input {
    width: 64px;
    padding: 6px 8px;
    border: 1px solid var(--fpu-beige-light);
    border-radius: var(--fpu-radius-sm);
    font-size: 14px;
    font-family: var(--fpu-font);
    text-align: center;
    color: var(--fpu-charcoal);
    background: var(--fpu-off-white);
    outline: none;
    transition: border-color var(--fpu-transition);
}

.fpu-toolbar__qty-input:focus {
    border-color: var(--fpu-olive);
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  BUTTONS                                                    ║
   ╚══════════════════════════════════════════════════════════════╝ */

.fpu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--fpu-radius-sm);
    font-family: var(--fpu-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--fpu-transition);
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
    outline: none;
}

.fpu-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(82,88,60,.2);
}

.fpu-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* Primary = "Kup teraz" */
.fpu-btn--primary {
    background: linear-gradient(135deg, var(--fpu-beige), var(--fpu-olive));
    color: var(--fpu-white);
    padding: 14px 32px;
    font-size: 16px;
    border-radius: var(--fpu-radius);
}

.fpu-btn--primary:hover:not(:disabled) {
    filter: brightness(1.05);
    box-shadow: var(--fpu-shadow);
}

/* Secondary = "Dodaj do koszyka" */
.fpu-btn--secondary {
    background: var(--fpu-olive);
    color: var(--fpu-white);
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--fpu-radius);
}

.fpu-btn--secondary:hover:not(:disabled) {
    background: var(--fpu-olive-light);
    box-shadow: var(--fpu-shadow);
}

/* Outline = "Przejdź do koszyka" */
.fpu-btn--outline {
    background: transparent;
    color: var(--fpu-olive);
    border: 2px solid var(--fpu-olive);
    padding: 12px 28px;
    font-weight: 600;
    border-radius: var(--fpu-radius);
    text-decoration: none;
    text-align: center;
}

.fpu-btn--outline:hover {
    background: var(--fpu-olive);
    color: var(--fpu-white);
    box-shadow: var(--fpu-shadow);
}

/* Small */
.fpu-btn--small {
    padding: 6px 14px;
    font-size: 13px;
    background: var(--fpu-ecru);
    color: var(--fpu-charcoal);
}

.fpu-btn--small:hover:not(:disabled) {
    background: var(--fpu-beige-light);
}

/* Icon */
.fpu-btn--icon {
    padding: 6px 12px;
    background: var(--fpu-ecru);
    color: var(--fpu-charcoal);
    font-size: 13px;
}

.fpu-btn--icon:hover:not(:disabled) {
    background: var(--fpu-beige-light);
}

.fpu-btn__text {
    font-size: 12px;
}

/* Danger */
.fpu-btn--danger {
    background: transparent;
    color: var(--fpu-danger);
    border: 1px solid var(--fpu-danger);
}

.fpu-btn--danger:hover:not(:disabled) {
    background: var(--fpu-danger);
    color: var(--fpu-white);
}

/* Uploading state — pulsing disabled */
.fpu-btn--uploading {
    opacity: .5;
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
}

.fpu-btn--uploading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.3) 50%, transparent 100%);
    animation: fpu-btn-shimmer 1.5s ease-in-out infinite;
}

@keyframes fpu-btn-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  4. PHOTO GALLERY GRID                                     ║
   ╚══════════════════════════════════════════════════════════════╝ */

.fpu-photo-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    min-height: 0;
}

.fpu-photo-list:empty {
    display: none;
}

/* ── Photo Card ────────────────────────── */

.fpu-photo-card {
    background: var(--fpu-white);
    border: 1px solid var(--fpu-ecru);
    border-radius: var(--fpu-radius);
    overflow: hidden;
    position: relative;
    transition: box-shadow var(--fpu-transition), transform var(--fpu-transition);
    cursor: default;
}

.fpu-photo-card:hover {
    box-shadow: var(--fpu-shadow);
}

.fpu-photo-card--selected {
    border-color: var(--fpu-olive);
    box-shadow: 0 0 0 2px rgba(82,88,60,.2);
}

.fpu-photo-card--focused {
    outline: 2px solid var(--fpu-olive);
    outline-offset: 2px;
}

.fpu-photo-card--uploading {
    opacity: .55;
    filter: grayscale(.25);
    transition: opacity .4s ease, filter .4s ease;
}
.fpu-photo-card--uploading .fpu-photo-card__edit-btn,
.fpu-photo-card--uploading .fpu-photo-card__rotate-btn {
    pointer-events: none;
    opacity: 0;
}

/* ── Batch processing state ──── */
.fpu-photo-card--processing {
    pointer-events: none;
}

.fpu-photo-card--processing .fpu-photo-card__thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.65);
    z-index: 5;
    animation: fpu-processing-pulse 1.2s ease-in-out infinite;
}

.fpu-photo-card__processing-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 6;
    width: 28px;
    height: 28px;
    border: 3px solid var(--fpu-ecru);
    border-top-color: var(--fpu-olive);
    border-radius: 50%;
    animation: fpu-spin .7s linear infinite;
}

@keyframes fpu-processing-pulse {
    0%, 100% { opacity: .5; }
    50%      { opacity: .8; }
}

@keyframes fpu-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Paper preview mockup — physical print feel */
.fpu-photo-card__thumb {
    box-shadow: inset 0 0 0 3px var(--fpu-white);
}

.fpu-photo-card:not(.fpu-photo-card--uploading):not(.fpu-photo-card--error) {
    box-shadow: var(--fpu-shadow-sm), 2px 3px 8px rgba(0,0,0,.06);
}

.fpu-photo-card:not(.fpu-photo-card--uploading):hover {
    box-shadow: var(--fpu-shadow), 3px 4px 12px rgba(0,0,0,.10);
}

.fpu-photo-card--error {
    border-color: var(--fpu-danger);
}

/* ── Thumbnail area ────────────────────── */

.fpu-photo-card__thumb {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 square */
    background: var(--fpu-ecru);
    overflow: hidden;
}

.fpu-photo-card__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity var(--fpu-transition);
}

/* ── Global border preview ─────────── */
/* When .fpu-photo-list--border is toggled, add white border on all cards */
.fpu-photo-list--border .fpu-photo-card__img {
    /* Scale down the image to make room for the border (~4mm simulated) */
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    top: 6px;
    left: 6px;
    border-radius: 1px;
    transition: all .3s ease;
}

.fpu-photo-list--border .fpu-photo-card__thumb {
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}

/* Lazy loading placeholder */
.fpu-photo-card__img.fpu-lazy {
    background: linear-gradient(90deg, var(--fpu-ecru) 25%, #f5efe9 50%, var(--fpu-ecru) 75%);
    background-size: 200% 100%;
    animation: fpu-skeleton 1.5s ease-in-out infinite;
    filter: blur(4px);
    transform: scale(1.02);
}

/* Smooth reveal after lazy-load */
.fpu-photo-card__img {
    transition: filter .3s ease, transform .3s ease;
}

/* Skeleton loading placeholder */
.fpu-photo-card__skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--fpu-ecru) 25%, #f5efe9 50%, var(--fpu-ecru) 75%);
    background-size: 200% 100%;
    animation: fpu-skeleton 1.5s ease-in-out infinite;
}

@keyframes fpu-skeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Upload progress on card */
.fpu-photo-card__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0,0,0,.08);
    z-index: 4;
}

.fpu-photo-card__progress-fill {
    height: 100%;
    width: 0%;
    background: var(--fpu-olive);
    border-radius: 0 2px 2px 0;
    transition: width .3s ease;
}

/* ── Card overlays ─────────────────────── */

.fpu-photo-card__select {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    opacity: 0;
    transition: opacity var(--fpu-transition);
}

.fpu-photo-card:hover .fpu-photo-card__select,
.fpu-photo-card--selected .fpu-photo-card__select {
    opacity: 1;
}

.fpu-photo-card__actions {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    gap: 4px;
    z-index: 5;
    opacity: 0;
    transition: opacity var(--fpu-transition);
}

.fpu-photo-card:hover .fpu-photo-card__actions {
    opacity: 1;
}

.fpu-photo-card__action {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: var(--fpu-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background var(--fpu-transition);
}

.fpu-photo-card__action:hover {
    background: rgba(0,0,0,.8);
}

.fpu-photo-card__action--delete:hover {
    background: var(--fpu-danger);
}

/* Grip handle for drag & drop sorting */
.fpu-photo-card__grip {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 3;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--fpu-radius-sm);
    background: rgba(0,0,0,.5);
    color: rgba(255,255,255,.9);
    font-size: 14px;
    line-height: 1;
    cursor: grab;
    opacity: 0;
    transition: opacity var(--fpu-transition);
    user-select: none;
}

.fpu-photo-card:hover .fpu-photo-card__grip {
    opacity: 1;
}

.fpu-photo-card__grip:active {
    cursor: grabbing;
    background: rgba(0,0,0,.7);
}

/* Rotate button on card */
.fpu-photo-card__rotate-btn {
    position: absolute;
    top: 38px;
    right: 8px;
    z-index: 3;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: var(--fpu-white);
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: 0;
    transition: all var(--fpu-transition);
}

.fpu-photo-card:hover .fpu-photo-card__rotate-btn {
    opacity: 1;
}

.fpu-photo-card__rotate-btn:hover {
    background: rgba(0,0,0,.8);
    transform: scale(1.1);
}

.fpu-photo-card__rotate-btn.fpu-photo-card__rotate-btn--loading {
    pointer-events: none;
    opacity: .5;
}

/* Always-visible edit button on card */
.fpu-photo-card__edit-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 14px;
    background: var(--fpu-olive);
    color: var(--fpu-white);
    border: none;
    cursor: pointer;
    font-family: var(--fpu-font);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    transition: all var(--fpu-transition);
    opacity: 0.9;
}

.fpu-photo-card__edit-btn:hover {
    opacity: 1;
    background: var(--fpu-olive-light);
    box-shadow: var(--fpu-shadow-sm);
}

.fpu-photo-card__edit-btn svg {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

/* Crop overlay (aspect ratio visualization) */
.fpu-photo-card__crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

/* crop-inner box-shadow handles the dimming outside the crop area;
   no extra ::before overlay needed (it was double-darkening the image). */

.fpu-photo-card__crop-inner {
    position: absolute;
    /* top/left/transform set inline by JS (_getCropOverlayHtml) */
    border: 2px dashed rgba(255,255,255,.7);
    border-radius: 2px;
    z-index: 2;
    box-shadow: 0 0 0 9999px rgba(0,0,0,.3);
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
}

.fpu-photo-card__crop-inner.fpu-dragging {
    cursor: grabbing;
}

.fpu-photo-card__crop-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,.9);
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
    background: rgba(0,0,0,.45);
    padding: 2px 7px;
    border-radius: 3px;
    line-height: 1.3;
    z-index: 1;
    white-space: nowrap;
}

/* ── Before/After comparison overlay ── */
.fpu-photo-card__before-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s ease;
}

.fpu-photo-card__thumb:hover .fpu-photo-card__before-after {
    opacity: 1;
}

.fpu-photo-card__before-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: inset(0 50% 0 0);
    transition: clip-path .3s ease;
}

.fpu-photo-card__thumb:hover .fpu-photo-card__before-img {
    clip-path: inset(0 50% 0 0);
}

.fpu-photo-card__before-after::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: rgba(255,255,255,.8);
    transform: translateX(-50%);
    box-shadow: 0 0 4px rgba(0,0,0,.3);
}

.fpu-photo-card__ba-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 9px;
    font-weight: 700;
    background: var(--fpu-olive);
    color: var(--fpu-white);
    padding: 2px 6px;
    border-radius: 3px;
    line-height: 1.3;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease;
}

/* Show badge even when not hovering - indicate photo was edited */
.fpu-photo-card__thumb .fpu-photo-card__ba-badge {
    opacity: 1;
}

/* DPI quality badge (3 levels) — positioned top-left below grip */
.fpu-photo-card__dpi-badge {
    position: absolute;
    top: 6px;
    left: 34px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.3;
    z-index: 2;
    pointer-events: none;
    animation: fpuBadgeIn .3s ease-out;
}
@keyframes fpuBadgeIn {
    from { opacity: 0; transform: scale(.7); }
    to   { opacity: 1; transform: scale(1); }
}

.fpu-photo-card__dpi-badge--good {
    background: var(--fpu-success);
    color: var(--fpu-white);
}

.fpu-photo-card__dpi-badge--ok {
    background: var(--fpu-warning);
    color: var(--fpu-white);
}

.fpu-photo-card__dpi-badge--low {
    background: var(--fpu-danger);
    color: var(--fpu-white);
}

/* Error overlay */
.fpu-photo-card__error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(192,57,43,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fpu-danger);
    font-size: 12px;
    font-weight: 600;
    padding: 8px;
    text-align: center;
}

/* ── Card body ─────────────────────────── */

.fpu-photo-card__body {
    padding: 10px 12px 12px;
}

.fpu-photo-card__name {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--fpu-charcoal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
    line-height: 1.3;
}

/* ── Quantity control ──────────────────── */

.fpu-qty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.fpu-qty__btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--fpu-beige-light);
    background: var(--fpu-off-white);
    color: var(--fpu-charcoal);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all var(--fpu-transition);
    line-height: 1;
}

.fpu-qty__btn:first-child {
    border-radius: var(--fpu-radius-sm) 0 0 var(--fpu-radius-sm);
}

.fpu-qty__btn:last-child {
    border-radius: 0 var(--fpu-radius-sm) var(--fpu-radius-sm) 0;
}

.fpu-qty__btn:hover {
    background: var(--fpu-ecru);
    border-color: var(--fpu-beige);
}

.fpu-qty__input {
    width: 40px;
    height: 28px;
    border: 1px solid var(--fpu-beige-light);
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--fpu-font);
    color: var(--fpu-charcoal);
    background: var(--fpu-white);
    outline: none;
    -moz-appearance: textfield;
}

.fpu-qty__input::-webkit-inner-spin-button,
.fpu-qty__input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  5. SUMMARY                                                 ║
   ╚══════════════════════════════════════════════════════════════╝ */

.fpu-summary {
    background: var(--fpu-white);
    border: 1px solid var(--fpu-ecru);
    border-radius: var(--fpu-radius-lg);
    padding: 20px;
    box-shadow: var(--fpu-shadow-sm);
}

.fpu-summary[hidden] {
    display: none;
}

.fpu-summary--sticky {
    position: sticky;
    bottom: 0;
    z-index: 90;
    box-shadow: 0 -4px 16px rgba(0,0,0,.08);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.fpu-summary__stats {
    margin-bottom: 20px;
}

.fpu-summary__dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.fpu-summary__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fpu-summary__item--wide {
    grid-column: 1 / -1;
}

.fpu-summary__item--total {
    grid-column: 1 / -1;
    border-top: 1px solid var(--fpu-ecru);
    padding-top: 10px;
}

.fpu-summary__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--fpu-beige);
    margin: 0;
}

.fpu-summary__value {
    font-size: 22px;
    font-weight: 700;
    color: var(--fpu-charcoal);
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.fpu-summary__item--total .fpu-summary__value {
    font-size: 26px;
    color: var(--fpu-olive);
}

.fpu-summary__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fpu-summary__actions .fpu-btn {
    padding: 11px 16px;
    font-size: 13px;
}

/* Savings hint */
/* Upload status in summary */
.fpu-upload-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fef9e7;
    border: 1px solid #f0e6c0;
    border-radius: var(--fpu-radius-sm);
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--fpu-charcoal);
    margin-bottom: 12px;
    transition: background-color .4s ease, border-color .4s ease;
}
.fpu-upload-status__spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #d4c9a0;
    border-top-color: var(--fpu-olive);
    border-radius: 50%;
    animation: fpu-spin .8s linear infinite;
    flex-shrink: 0;
}
@keyframes fpu-spin {
    to { transform: rotate(360deg); }
}
.fpu-upload-status__remaining {
    color: #888;
}
.fpu-upload-status__ok {
    color: var(--fpu-success);
    font-weight: 600;
}

.fpu-savings-hint {
    background: var(--fpu-success-bg);
    border: 1px solid #b2dfdb;
    border-radius: var(--fpu-radius-sm);
    padding: 10px 14px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--fpu-charcoal);
    margin-bottom: 12px;
}

.fpu-savings-hint strong {
    font-weight: 700;
    color: var(--fpu-success);
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  5b. POPUP                                                    ║
   ╚══════════════════════════════════════════════════════════════╝ */

.fpu-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    animation: fpu-fadeIn .2s ease;
}

.fpu-popup {
    background: var(--fpu-white);
    border-radius: var(--fpu-radius-lg);
    padding: 32px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: var(--fpu-shadow-lg);
    text-align: center;
}

.fpu-popup__close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--fpu-ecru);
    border-radius: 50%;
    font-size: 20px;
    color: var(--fpu-charcoal);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background var(--fpu-transition);
}

.fpu-popup__close:hover {
    background: var(--fpu-beige-light);
}

.fpu-popup__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--fpu-charcoal);
    margin: 0 0 16px;
}

.fpu-popup__content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--fpu-charcoal);
    margin-bottom: 24px;
}

.fpu-popup__content p {
    margin: 0 0 8px;
}

.fpu-popup__ok {
    padding: 12px 36px !important;
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  5c. PAGINATION                                              ║
   ╚══════════════════════════════════════════════════════════════╝ */

.fpu-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.fpu-pagination__btn {
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--fpu-ecru);
    border-radius: var(--fpu-radius-sm);
    background: var(--fpu-white);
    color: var(--fpu-charcoal);
    font-family: var(--fpu-font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    transition: all var(--fpu-transition);
}

.fpu-pagination__btn:hover:not(:disabled) {
    border-color: var(--fpu-olive);
    background: var(--fpu-ecru);
}

.fpu-pagination__btn--active {
    background: var(--fpu-olive);
    color: var(--fpu-white);
    border-color: var(--fpu-olive);
}

.fpu-pagination__btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.fpu-pagination__info {
    font-size: 12px;
    color: var(--fpu-beige);
    margin-left: 12px;
}

.fpu-pagination__ellipsis {
    font-size: 14px;
    color: var(--fpu-beige);
    padding: 0 4px;
    user-select: none;
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  5d. KEYBOARD SHORTCUTS PANEL                                ║
   ╚══════════════════════════════════════════════════════════════╝ */

.fpu-toolbar__shortcuts-btn {
    margin-left: auto;
}

.fpu-shortcuts-panel {
    background: var(--fpu-white);
    border: 1px solid var(--fpu-ecru);
    border-radius: var(--fpu-radius);
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: var(--fpu-shadow);
    animation: fpu-fadeIn .15s ease;
}

.fpu-shortcuts-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.fpu-shortcuts-panel__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--fpu-charcoal);
}

.fpu-shortcuts-panel__close {
    width: 24px;
    height: 24px;
    border: none;
    background: var(--fpu-ecru);
    border-radius: 50%;
    font-size: 16px;
    color: var(--fpu-charcoal);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background var(--fpu-transition);
}

.fpu-shortcuts-panel__close:hover {
    background: var(--fpu-beige-light);
}

.fpu-shortcuts-panel__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 6px 24px;
}

.fpu-shortcuts-panel__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

.fpu-shortcuts-panel__key {
    display: inline-block;
    min-width: 64px;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--fpu-beige-light);
    background: var(--fpu-ecru);
    font-family: var(--fpu-font);
    font-size: 11px;
    font-weight: 600;
    color: var(--fpu-charcoal);
    text-align: center;
    white-space: nowrap;
}

.fpu-shortcuts-panel__desc {
    font-size: 12px;
    color: var(--fpu-charcoal);
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  6. MESSAGES                                                ║
   ╚══════════════════════════════════════════════════════════════╝ */

.fpu-message {
    padding: 0;
    border-radius: var(--fpu-radius);
    font-size: 14px;
    transition: all .3s ease;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
}

.fpu-message.fpu-message--visible {
    padding: 14px 20px;
    max-height: 200px;
    opacity: 1;
    margin-bottom: 20px;
}

.fpu-message--success {
    background: var(--fpu-success-bg);
    color: #1a5632;
    border: 1px solid #a3d9b1;
}

.fpu-message--error {
    background: var(--fpu-danger-bg);
    color: #922b21;
    border: 1px solid #f1a9a0;
}

.fpu-message--warning {
    background: var(--fpu-warning-bg);
    color: #7d5a29;
    border: 1px solid #f5cba7;
}

/* ── Undo toast ─────────────────────── */

.fpu-undo-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--fpu-charcoal);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--fpu-radius);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.25);
    z-index: 10100;
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
    font-size: 14px;
}
.fpu-undo-toast--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.fpu-undo-toast__text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}
.fpu-undo-toast__btn {
    background: none;
    border: 1px solid rgba(255,255,255,.4);
    color: #ffd78a;
    font-weight: 700;
    font-size: 13px;
    padding: 4px 14px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s;
}
.fpu-undo-toast__btn:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.6);
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  6b. FOOTER INFO BAR                                        ║
   ╚══════════════════════════════════════════════════════════════╝ */

.fpu-footer-info {
    background: var(--fpu-ecru);
    border-radius: var(--fpu-radius);
    padding: 14px 20px;
    margin-top: 8px;
}

.fpu-footer-info p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12px;
    color: var(--fpu-beige);
    line-height: 1.5;
}

.fpu-footer-info p + p {
    margin-top: 6px;
}

.fpu-footer-info svg {
    flex-shrink: 0;
    color: var(--fpu-beige);
}

.fpu-footer-info a {
    color: var(--fpu-olive);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
    transition: color var(--fpu-transition);
}

.fpu-footer-info a:hover {
    color: var(--fpu-charcoal);
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  7. PHOTO EDITOR MODAL                                     ║
   ╚══════════════════════════════════════════════════════════════╝ */

.fpu-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all .25s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.fpu-editor-overlay.fpu-editor-visible {
    opacity: 1;
    visibility: visible;
}

.fpu-editor-modal {
    background: var(--fpu-white);
    border-radius: var(--fpu-radius-lg);
    width: 94vw;
    max-width: 1100px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--fpu-shadow-lg);
    overflow: hidden;
    transform: scale(.95);
    transition: transform .25s ease;
}

/* Wide mode for adjust tab */
.fpu-editor-modal--wide {
    max-width: 1300px;
}

.fpu-editor-visible .fpu-editor-modal {
    transform: scale(1);
}

/* ── Header ────────────────────────── */

.fpu-editor-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--fpu-ecru);
}

.fpu-editor-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--fpu-charcoal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 0 1 auto;
}

.fpu-editor-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--fpu-ecru);
    color: var(--fpu-charcoal);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--fpu-transition);
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    margin-left: auto;
}

.fpu-editor-close:hover {
    background: var(--fpu-beige-light);
}

/* ── Tabs ──────────────────────────── */

.fpu-editor-tabs {
    display: flex;
    gap: 4px;
    background: var(--fpu-ecru);
    border-radius: var(--fpu-radius-sm);
    padding: 3px;
    flex-shrink: 0;
}

.fpu-editor-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--fpu-beige);
    font-family: var(--fpu-font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--fpu-transition);
    white-space: nowrap;
}

.fpu-editor-tab:hover {
    color: var(--fpu-charcoal);
}

.fpu-editor-tab--active {
    background: var(--fpu-white);
    color: var(--fpu-olive);
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* ── Editor body (shared) ──────────── */

.fpu-editor-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    min-height: 400px;
}

.fpu-editor-canvas {
    width: 100%;
    height: 100%;
    max-height: 72vh;
    position: relative;
    touch-action: none; /* allow Cropper.js pinch-to-zoom on mobile */
}

.fpu-editor-canvas--loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid var(--fpu-ecru);
    border-top-color: var(--fpu-olive);
    border-radius: 50%;
    animation: fpu-spin .8s linear infinite;
    z-index: 10;
}

@keyframes fpu-spin {
    to { transform: rotate(360deg); }
}

/* ── Adjust mode loader ────────── */
.fpu-editor-adjust-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 253, 247, .92);
    z-index: 20;
    border-radius: var(--fpu-radius);
}

/* Camera loader — spinning lens */
.fpu-camera-loader {
    margin-bottom: 16px;
    color: var(--fpu-olive);
}
.fpu-camera-loader__svg {
    display: block;
}
.fpu-camera-loader__lens-inner {
    transform-origin: 32px 35px;
    animation: fpu-lens-spin 1.2s linear infinite;
}
.fpu-camera-loader__lens-outer {
    transform-origin: 32px 35px;
    animation: fpu-lens-pulse 2s ease-in-out infinite;
}
@keyframes fpu-lens-spin {
    to { transform: rotate(360deg); }
}
@keyframes fpu-lens-pulse {
    0%, 100% { r: 12; opacity: 1; }
    50% { r: 10; opacity: .7; }
}

.fpu-editor-adjust-loader__text {
    font-size: 15px;
    font-weight: 600;
    color: var(--fpu-text);
    margin: 0 0 4px;
}

.fpu-editor-adjust-loader__sub {
    font-size: 12px;
    color: var(--fpu-text-muted);
    margin: 0 0 12px;
}

.fpu-editor-adjust-loader__bar {
    width: 200px;
    height: 6px;
    background: var(--fpu-ecru);
    border-radius: 3px;
    overflow: hidden;
}

.fpu-editor-adjust-loader__fill {
    height: 100%;
    width: 0;
    background: var(--fpu-olive);
    border-radius: 3px;
    transition: width .2s ease;
}

.fpu-editor-canvas img {
    display: block;
    max-width: 100%;
    max-height: 72vh;
}

/* ── Adjust mode layout ───────────── */

.fpu-editor-adjust-layout {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 400px;
    position: relative;
}

.fpu-editor-preview-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #1a1a1a;
    padding: 16px;
}

.fpu-editor-preview-canvas {
    max-width: 100%;
    max-height: 72vh;
    border-radius: 4px;
    display: block;
}

/* ── Compare slider (before/after) ── */

.fpu-editor-compare {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 72vh;
    user-select: none;
}

.fpu-editor-compare__orig,
.fpu-editor-compare__edited {
    display: block;
    max-width: 100%;
    max-height: 72vh;
}

.fpu-editor-compare__edited {
    position: absolute;
    top: 0;
    left: 0;
    clip-path: inset(0 0 0 50%);
}

.fpu-editor-compare__slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    cursor: ew-resize;
    z-index: 10;
    touch-action: none;
}

.fpu-editor-compare__line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: rgba(255,255,255,.8);
    box-shadow: 0 0 4px rgba(0,0,0,.4);
}

.fpu-editor-compare__handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--fpu-white);
    color: var(--fpu-charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    cursor: ew-resize;
}

.fpu-editor-compare__label {
    position: absolute;
    top: 8px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,.8);
    background: rgba(0,0,0,.4);
    padding: 2px 8px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 5;
}

.fpu-editor-compare__label--before {
    left: 8px;
}

.fpu-editor-compare__label--after {
    right: 8px;
}

/* ── Sliders panel (right sidebar) ── */

.fpu-editor-sliders-panel {
    width: 280px;
    flex-shrink: 0;
    background: var(--fpu-off-white);
    border-left: 1px solid var(--fpu-ecru);
    overflow-y: auto;
    padding: 0;
}

.fpu-editor-sliders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--fpu-beige);
    border-bottom: 1px solid var(--fpu-ecru);
    position: sticky;
    top: 0;
    background: var(--fpu-off-white);
    z-index: 1;
}

/* ── Presets ──────────────────────── */

.fpu-editor-presets {
    padding: 12px 18px 8px;
    border-bottom: 1px solid var(--fpu-ecru);
}

.fpu-editor-presets__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--fpu-beige);
    margin-bottom: 8px;
}

.fpu-editor-presets__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fpu-editor-preset {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 8px;
    border: 1px solid var(--fpu-ecru);
    border-radius: var(--fpu-radius-sm);
    background: var(--fpu-white);
    cursor: pointer;
    transition: all var(--fpu-transition);
    min-width: 54px;
    font-family: var(--fpu-font);
}

.fpu-editor-preset:hover {
    border-color: var(--fpu-beige-light);
    background: var(--fpu-ecru);
}

.fpu-editor-preset--active {
    border-color: var(--fpu-olive);
    background: var(--fpu-olive);
    color: var(--fpu-white);
}

.fpu-editor-preset--active:hover {
    background: var(--fpu-olive-light);
    border-color: var(--fpu-olive-light);
}

.fpu-editor-preset__icon {
    font-size: 16px;
    line-height: 1;
}

.fpu-editor-preset__name {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
}

.fpu-editor-sliders {
    padding: 12px 18px 18px;
}

/* ── Individual slider row ─────────── */

.fpu-slider-row {
    display: grid;
    grid-template-columns: 80px 1fr 44px;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0,0,0,.04);
}

.fpu-slider-row:last-child {
    border-bottom: none;
}

.fpu-slider-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--fpu-charcoal);
    white-space: nowrap;
    user-select: none;
}

.fpu-slider-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--fpu-olive);
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    user-select: none;
}

/* ── Range slider styling ──────────── */

.fpu-slider-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--fpu-beige-light);
    outline: none;
    cursor: pointer;
    margin: 0;
}

.fpu-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--fpu-olive);
    border: 2px solid var(--fpu-white);
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.fpu-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.fpu-slider-input::-webkit-slider-thumb:active {
    transform: scale(1.1);
    background: var(--fpu-olive-light);
}

.fpu-slider-input::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--fpu-olive);
    border: 2px solid var(--fpu-white);
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    cursor: pointer;
}

.fpu-slider-input::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: var(--fpu-beige-light);
}

/* ── Reset button ──────────────────── */

.fpu-editor-btn--reset {
    padding: 4px 10px;
    font-size: 11px;
    gap: 4px;
    background: transparent;
    color: var(--fpu-beige);
    border: 1px solid var(--fpu-beige-light);
}

.fpu-editor-btn--reset:hover {
    color: var(--fpu-charcoal);
    border-color: var(--fpu-beige);
    background: var(--fpu-ecru);
}

/* ── Toolbar ───────────────────────── */

.fpu-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-top: 1px solid var(--fpu-ecru);
    flex-wrap: wrap;
}

.fpu-editor-toolbar__crop,
.fpu-editor-toolbar__adjust {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fpu-editor-adj-info {
    font-size: 12px;
    color: var(--fpu-beige);
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Crop mode selector */
.fpu-editor-crop-modes {
    display: flex;
    gap: 2px;
    background: var(--fpu-ecru);
    border-radius: var(--fpu-radius-sm);
    padding: 2px;
}

.fpu-editor-crop-mode {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--fpu-charcoal);
    font-family: var(--fpu-font);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--fpu-transition);
    white-space: nowrap;
}

.fpu-editor-crop-mode:hover {
    background: rgba(255,255,255,.6);
}

.fpu-editor-crop-mode--active {
    background: var(--fpu-white);
    box-shadow: var(--fpu-shadow-sm);
    color: var(--fpu-olive);
}

.fpu-editor-crop-mode svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.fpu-editor-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: none;
    border-radius: var(--fpu-radius-sm);
    background: var(--fpu-ecru);
    color: var(--fpu-charcoal);
    font-family: var(--fpu-font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--fpu-transition);
    gap: 6px;
}

.fpu-editor-btn:hover {
    background: var(--fpu-beige-light);
}

.fpu-editor-separator {
    flex: 1;
}

.fpu-editor-btn--cancel {
    background: transparent;
    color: var(--fpu-beige);
}

.fpu-editor-btn--cancel:hover {
    color: var(--fpu-charcoal);
    background: var(--fpu-ecru);
}

.fpu-editor-btn--save {
    background: var(--fpu-olive);
    color: var(--fpu-white);
    font-weight: 600;
    padding: 8px 24px;
}

.fpu-editor-btn--save:hover {
    background: var(--fpu-olive-light);
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  8. LIGHTBOX                                                ║
   ╚══════════════════════════════════════════════════════════════╝ */

.fpu-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.85);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all .2s ease;
    backdrop-filter: blur(6px);
}

.fpu-lightbox--visible {
    opacity: 1;
    visibility: visible;
}

.fpu-lightbox__img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--fpu-radius);
}

.fpu-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--fpu-transition);
}

.fpu-lightbox__nav:hover {
    background: rgba(255,255,255,.3);
}

.fpu-lightbox__nav--prev { left: 24px; }
.fpu-lightbox__nav--next { right: 24px; }

.fpu-lightbox__close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--fpu-transition);
}

.fpu-lightbox__close:hover {
    background: rgba(255,255,255,.3);
}

.fpu-lightbox__edit {
    position: absolute;
    top: 20px;
    left: 24px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 20px;
    background: var(--fpu-olive);
    color: var(--fpu-white);
    border: none;
    cursor: pointer;
    font-family: var(--fpu-font);
    font-size: 14px;
    font-weight: 600;
    transition: all var(--fpu-transition);
}

.fpu-lightbox__edit:hover {
    background: var(--fpu-olive-light);
    box-shadow: var(--fpu-shadow);
}

.fpu-lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.7);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  9. DRAG & DROP SORTING                                    ║
   ╚══════════════════════════════════════════════════════════════╝ */

/* Drag placeholder — shows drop target */
.fpu-photo-card.sortable-ghost {
    opacity: .15;
    background: var(--fpu-olive);
    border: 2px dashed var(--fpu-olive);
    border-radius: var(--fpu-radius);
}

.fpu-photo-card.sortable-ghost * {
    visibility: hidden;
}

/* Dragged card */
.fpu-photo-card.sortable-chosen {
    box-shadow: var(--fpu-shadow-lg), 0 0 0 3px rgba(82,88,60,.25);
    transform: scale(1.05) rotate(1deg);
    z-index: 10;
    transition: none;
}

.fpu-photo-card.sortable-drag {
    opacity: .92;
    cursor: grabbing;
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  10. ANIMATIONS                                             ║
   ╚══════════════════════════════════════════════════════════════╝ */

@keyframes fpu-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fpu-photo-card {
    animation: fpu-fadeIn .3s ease backwards;
}

/* Stagger cards */
.fpu-photo-card:nth-child(5n+1) { animation-delay: 0s; }
.fpu-photo-card:nth-child(5n+2) { animation-delay: .03s; }
.fpu-photo-card:nth-child(5n+3) { animation-delay: .06s; }
.fpu-photo-card:nth-child(5n+4) { animation-delay: .09s; }
.fpu-photo-card:nth-child(5n+5) { animation-delay: .12s; }

/* ╔══════════════════════════════════════════════════════════════╗
   ║  11. RESPONSIVE                                             ║
   ╚══════════════════════════════════════════════════════════════╝ */

/* Large desktop (wide layout) */
@media (min-width: 1200px) {
    .fpu-layout {
        grid-template-columns: 300px 1fr 300px !important;
    }
}

/* Tablet landscape - sidebars narrower */
@media (max-width: 1199px) and (min-width: 1025px) {
    .fpu-layout {
        grid-template-columns: 260px 1fr 260px !important;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .fpu-layout {
        grid-template-columns: 1fr !important;
    }

    /* Mobile order: upload/gallery first → config → summary */
    .fpu-layout__center         { order: 1; }
    .fpu-layout__sidebar--left  { order: 2; position: static; }
    .fpu-layout__sidebar--right { order: 3; position: static; }

    .fpu-photo-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }

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

    .fpu-summary__actions {
        flex-direction: row;
    }

    .fpu-summary__actions .fpu-btn {
        flex: 1;
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .fpu-photo-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .fpu-summary__dl {
        grid-template-columns: 1fr 1fr;
    }

    .fpu-toolbar {
        gap: 12px;
    }

    .fpu-editor-modal {
        width: 95vw;
        max-height: 95vh;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .fpu-wrap {
        padding: 0 12px;
    }

    .fpu-photo-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .fpu-session-config {
        padding: 16px;
    }

    .fpu-summary {
        padding: 16px;
    }

    .fpu-summary__value {
        font-size: 18px;
    }

    .fpu-summary__item--total .fpu-summary__value {
        font-size: 22px;
    }

    .fpu-dropzone {
        padding: 32px 16px;
    }

    .fpu-toolbar {
        padding: 10px 14px;
        gap: 10px;
    }

    .fpu-toolbar__bulk {
        width: 100%;
        order: 1;
    }

    .fpu-editor-toolbar {
        padding: 10px 16px;
    }

    .fpu-editor-header {
        padding: 10px 16px;
        gap: 8px;
    }

    .fpu-editor-tabs {
        order: 10;
        width: 100%;
        justify-content: center;
    }

    .fpu-editor-adjust-layout {
        flex-direction: column;
        min-height: auto;
    }

    .fpu-editor-sliders-panel {
        width: 100%;
        max-height: 220px;
        border-left: none;
        border-top: 1px solid var(--fpu-ecru);
    }

    .fpu-slider-row {
        grid-template-columns: 70px 1fr 40px;
        gap: 6px;
        padding: 5px 0;
    }

    .fpu-editor-adj-info {
        max-width: 200px;
        font-size: 11px;
    }

    .fpu-lightbox__nav {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .fpu-lightbox__nav--prev { left: 10px; }
    .fpu-lightbox__nav--next { right: 10px; }
}

/* Ultra-small phones */
@media (max-width: 380px) {
    .fpu-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px;
    }

    .fpu-toolbar__select-all {
        margin-right: 0;
    }

    .fpu-toolbar__bulk {
        flex-wrap: wrap;
        justify-content: center;
    }

    .fpu-photo-card__name {
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fpu-photo-card__edit-btn span {
        display: none;
    }
}
