.photox-spe {
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    padding: 16px;
    margin: 18px 0;
    background: #fafafa;
    font-family: inherit;
}
.photox-spe-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}
.photox-spe-head h3 { margin: 0 0 4px; font-size: 16px; }
.photox-spe-head p { margin: 0; font-size: 13px; color: #666; }
.photox-spe-head span {
    background: #eef6ee;
    color: #2e7d32;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 12px;
    white-space: nowrap;
}

.photox-spe-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 2px dashed #c9c9c9;
    border-radius: 10px;
    padding: 22px 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.photox-spe-drop:hover,
.photox-spe-drop.is-dragging {
    border-color: #2e7d32;
    background: #f2f8f2;
}
.photox-spe-drop strong { font-size: 15px; }
.photox-spe-drop small { color: #888; font-size: 11px; }

.photox-spe-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.photox-spe-status {
    margin-top: 10px;
    font-size: 13px;
    color: #555;
    min-height: 18px;
}

.photox-spe-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.photox-spe-card {
    position: relative;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    overflow: hidden;
}

.photox-spe-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 8px 0;
}
.photox-spe-tab {
    flex: 1;
    border: none;
    background: #f1f1f1;
    color: #666;
    font-size: 11px;
    padding: 6px 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.photox-spe-tab.active {
    background: #2e7d32;
    color: #fff;
}

.photox-spe-orient-row {
    display: flex;
    gap: 4px;
    padding: 6px 8px 0;
}
.photox-spe-orient {
    flex: 1;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #777;
    font-size: 11px;
    padding: 5px 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.photox-spe-orient.active {
    border-color: #2e7d32;
    color: #2e7d32;
    background: #eef6ee;
    font-weight: 600;
}

.photox-spe-remove {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
}
.photox-spe-remove:hover { background: rgba(0,0,0,.8); }

.photox-spe-panel { padding: 10px 10px 0; }
.photox-spe-panel[hidden] { display: none; }

/* ---- Realistic "on the wall" 3D canvas mockup ---- */
.photox-spe-wall {
    position: relative;
    border-radius: 8px;
    padding: 26px 14px 34px;
    background:
        radial-gradient(ellipse at 50% 0%, #f7f4f0 0%, #ece7e0 55%, #ddd6cb 100%);
    display: flex;
    justify-content: center;
    overflow: hidden;
    perspective: 1000px;
    perspective-origin: 50% 30%;
}
.photox-spe-canvas {
    position: relative;
    width: 62%;
    aspect-ratio: var(--ratio, 1);
    transform-style: preserve-3d;
    transform: rotateY(-20deg) rotateX(3deg);
}
.photox-spe-canvas-front,
.photox-spe-canvas-side {
    position: absolute;
    overflow: hidden;
    background: #111;
    backface-visibility: hidden;
}
.photox-spe-canvas-front {
    inset: 0;
    transform: translateZ(0);
    box-shadow: 0 2px 0 rgba(0,0,0,.15) inset;
}
.photox-spe-front-canvas {
    display: block;
    width: 100%;
    height: 100%;
}
/* right/bottom edges: plain shaded strips simulating the wrapped depth of a
   stretched canvas print (Gallery Wrap) — not image content, just a shading
   illusion, rotated into the depth axis about the seam they share with the
   front face so they stay perfectly attached to it. */
.photox-spe-side-right {
    top: 0;
    right: 0;
    height: 100%;
    width: var(--photox-depth, 10px);
    transform-origin: right center;
    transform: rotateY(90deg);
    background: linear-gradient(to left, rgba(0,0,0,.55), rgba(0,0,0,.2));
}
.photox-spe-side-bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--photox-depth, 10px);
    transform-origin: center bottom;
    transform: rotateX(-90deg);
    background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,.25));
}

.photox-spe-canvas-shadow {
    position: absolute;
    inset: 0;
    filter: drop-shadow(10px 16px 12px rgba(0,0,0,.35));
    pointer-events: none;
}

.photox-spe[data-thickness="16"] .photox-spe-card { --photox-depth: 18px; }
.photox-spe[data-thickness="8"] .photox-spe-card  { --photox-depth: 10px; }

.photox-spe-floor {
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: 10px;
    height: 10px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,.18) 0%, rgba(0,0,0,0) 70%);
}

.photox-spe-dimline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 0 2px;
    font-size: 11px;
    color: #888;
}
.photox-spe-dimline i {
    display: block;
    width: 26px;
    height: 0;
    border-top: 1px dashed #bbb;
}
.photox-spe-dimline b { font-weight: 600; color: #555; white-space: nowrap; }

.photox-spe-frame {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #111;
    cursor: grab;
    touch-action: none;
}
.photox-spe-frame.is-dragging { cursor: grabbing; }
.photox-spe-edit-canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    user-select: none;
    touch-action: none;
}

.photox-spe-zoom-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 13px;
    color: #999;
}
.photox-spe-zoom-row input[type="range"] { flex: 1; }

.photox-spe-edit-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 10px 6px;
}
.photox-spe-crophint {
    font-size: 11px;
    color: #888;
}
.photox-spe-crophint b { color: #444; }
.photox-spe-reset {
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}
.photox-spe-reset:hover { border-color: #bbb; color: #222; }

.photox-spe-quality { margin-top: 6px; }
.photox-spe-quality-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 999px;
}
.photox-spe-quality-badge.great { background: #e8f4ff; color: #0d5ca8; }
.photox-spe-quality-badge.good  { background: #eef6ee; color: #2e7d32; }
.photox-spe-quality-badge.warn  { background: #fff7e6; color: #b26a00; }
.photox-spe-quality-badge.bad   { background: #fdecea; color: #c62828; }

.photox-spe-details {
    margin-top: 6px;
    font-size: 11px;
    color: #777;
}
.photox-spe-details summary {
    cursor: pointer;
    color: #888;
    user-select: none;
}
.photox-spe-details summary:hover { color: #555; }
.photox-spe-details-body {
    margin-top: 6px;
    padding: 8px;
    background: #f7f7f7;
    border-radius: 6px;
    display: grid;
    gap: 3px;
}
.photox-spe-details-body b { color: #444; }
.photox-spe-details-note { color: #b26a00; }

.photox-spe-upload-note {
    margin-top: 6px;
    font-size: 11px;
    color: #b26a00;
}
.photox-spe-upload-note.is-error { color: #c62828; }

.photox-spe-info { padding: 8px 10px 10px; }
.photox-spe-info strong {
    display: block;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.photox-spe-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 6px;
    font-size: 11px;
    color: #777;
    margin-bottom: 6px;
}
.photox-spe-grid b { color: #333; text-align: left; }

.photox-spe-badge {
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 11px;
}
.photox-spe-badge b { display: block; margin-bottom: 1px; }
.photox-spe-badge.good { background: #eef6ee; color: #2e7d32; }
.photox-spe-badge.warn { background: #fff7e6; color: #b26a00; }
.photox-spe-badge.bad  { background: #fdecea; color: #c62828; }
.photox-spe-badge.great { background: #e8f4ff; color: #0d5ca8; }

/* ---- Cart / checkout / mini-cart: photo thumbnails (3.2.0) ---- */
.photox-cart-thumb-wrap { position: relative; display: inline-block; }
.photox-cart-main-thumb {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
}
.photox-cart-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #2e7d32;
    color: #fff;
    font-size: 11px;
    line-height: 20px;
    text-align: center;
}
.photox-cart-qty { font-weight: 600; }

.photox-cart-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.photox-cart-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: #666;
}
.photox-cart-photo-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e3e3e3;
}
.photox-cart-photo-actions { display: flex; gap: 8px; }
.photox-cart-photo-actions a { font-size: 11px; text-decoration: underline; cursor: pointer; }
.photox-cart-remove { color: #c62828; }
.photox-cart-edit { color: #2e7d32; }

.photox-spe-card.is-in-cart { border-color: #cfe6cf; }

/* ---- Multi-photo picker: one big editor + a thumbnail strip (3.3.0) ---- */
/* Scoped under .is-multi only, so a single photo renders exactly as before. */
.photox-spe-list.is-multi .photox-spe-status-line,
.photox-spe-list.is-multi .photox-spe-thumbstrip,
.photox-spe-list.is-multi .photox-spe-card {
    grid-column: 1 / -1;
}

.photox-spe-status-line {
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.photox-spe-thumbstrip {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}
.photox-spe-thumb {
    position: relative;
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #eee;
}
.photox-spe-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.photox-spe-thumb.active { border-color: #2e7d32; }
.photox-spe-thumb-edit {
    position: absolute;
    bottom: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    font-size: 10px;
    text-align: center;
    background: rgba(0,0,0,.55);
    color: #fff;
    border-radius: 50%;
}
.photox-spe-thumb-spinner {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.6);
}
.photox-spe-thumb-error {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    font-size: 11px;
    text-align: center;
    background: #c62828;
    color: #fff;
    border-radius: 50%;
}
.photox-spe-thumb-add {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    background: #fafafa;
    color: #888;
    font-size: 10px;
    cursor: pointer;
    white-space: normal;
    line-height: 1.2;
}
.photox-spe-thumb-add:hover { border-color: #2e7d32; color: #2e7d32; }
