﻿/* ============================
   FotoFirst – Global Theme CSS
   ============================ */

/* Reset-ish */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
}

/* Color system */
:root {
    --ff-bg: #f4f6fa;
    --ff-text: #1e2134;
    --ff-muted: #6b7280;
    --ff-primary: #4f46e5; /* indigo */
    --ff-primary-2: #6d58ff;
    --ff-primary-hover: #4338ca;
    --ff-link: #1d8ef7;
    --ff-link-hover: #0c5fb7;
    --ff-border: #e5e7eb;
    --ff-soft: #eef2ff;
}

/* Base */
html, body {
    background: var(--ff-bg);
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 17px;
    color: var(--ff-text);
}

/* Links */
a, .btn-link {
    color: var(--ff-link);
    text-decoration: none;
    transition: color .16s ease;
}

    a:hover, .btn-link:hover {
        color: var(--ff-link-hover);
    }

/* ===== Buttons ===== */
.btn-primary,
.next-btn {
    color: #fff;
    background: linear-gradient(90deg, #1b6ec2 0%, #458df4 100%);
    border: none;
    border-radius: 9px;
    box-shadow: 0 2px 8px #c2dcf9;
    padding: 12px 34px;
    font-size: 1.09rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, box-shadow .18s;
    margin: 6px 0;
    outline: none;
}

    .btn-primary:disabled, .next-btn:disabled {
        background: #a5c5e8;
        color: #f0f4fa;
        cursor: not-allowed;
    }

    .btn-primary:hover:not(:disabled),
    .next-btn:hover:not(:disabled) {
        background: linear-gradient(90deg, #1571be 0%, #3079e0 100%);
        box-shadow: 0 4px 14px #c2dcf9;
    }

.back-btn {
    background: #f4f8fc;
    color: #247a9e;
    border: 1.7px solid #b5d3ef;
    border-radius: 8px;
    padding: 11px 26px;
    font-size: 1rem;
    font-weight: 600;
    transition: background .15s, color .15s, border .15s;
    cursor: pointer;
}

    .back-btn:disabled {
        background: #eaeef4;
        color: #b5b5b5;
        border-color: #e1e8ef;
        cursor: not-allowed;
    }

    .back-btn:hover:not(:disabled) {
        background: #d7e7fa;
        color: #10506c;
    }

.upload-big-btn {
    background: #2b99fd;
    color: #fff;
    font-weight: 700;
    padding: 15px 45px;
    border-radius: 14px;
    font-size: 1.18rem;
    border: none;
    margin: 0 12px;
    box-shadow: 0 2px 10px #b0d4f944;
    cursor: pointer;
    display: inline-block;
    transition: background .17s, box-shadow .17s;
}

    .upload-big-btn:hover {
        background: #257de5;
        box-shadow: 0 4px 16px #82bff944;
    }

    /* Focus */
    .btn:focus, .btn-primary:focus, .next-btn:focus, .back-btn:focus, .upload-big-btn:focus {
        outline: 2px solid #93c9fa;
        box-shadow: 0 0 0 0.17rem #4dabf7;
    }

/* Responsive buttons */
@media (max-width: 650px) {
    .next-btn, .back-btn, .upload-big-btn {
        width: auto;
        font-size: 0.95rem;
        padding: 9px 16px;
        margin: 6px 4px;
        min-width: 120px;
        max-width: 100%;
        border-radius: 8px;
        display: inline-block;
    }
}

/* ===== Validation ===== */
.valid.modified:not([type=checkbox]) {
    outline: 1.8px solid #27b360;
}

.invalid {
    outline: 1.8px solid #e02727;
}

.validation-message {
    color: #e02727;
    font-weight: 500;
    margin: 5px 0 0 2px;
    font-size: 1rem;
}

/* ===== Header ===== */
.ff-header {
    background: #fff;
    border-bottom: 1px solid #e5e9f1;
    width: 100%;
    box-shadow: 0 2px 16px #eaf1fd22;
}

.ff-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1240px;
    margin: 0 auto;
    padding: 12px 26px;
    min-height: 86px;
    gap: 36px;
    flex-wrap: nowrap;
}

.ff-header-left {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.ff-header-right {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
    flex-wrap: nowrap;
}

.ff-logo {
    height: 54px;
    width: auto;
    margin-right: 28px;
    margin-left: 2px;
    flex-shrink: 0;
    transition: transform .13s;
}

    .ff-logo:hover {
        transform: scale(1.08) rotate(-1.5deg);
    }

.ff-nav {
    display: flex;
    gap: 18px;
}

    .ff-nav a {
        color: #214b8b;
        font-weight: 600;
        text-decoration: none;
        font-size: 1.13rem;
        transition: color .16s;
    }

        .ff-nav a:hover, .ff-account:hover {
            color: #1a73e8;
        }

/* Account button */
.ff-account {
    display: flex;
    align-items: center;
    background: #eaf2ff;
    color: #214b8b;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background .2s, color .2s;
}

    .ff-account i {
        margin-right: 8px;
        font-size: 1.1rem;
    }

    .ff-account:hover {
        background: #d6e8ff;
        color: #1a5fc9;
    }

/* Primary CTA */
.ff-btn-primary {
    background: #43b0ff;
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
    padding: 10px 34px;
    font-size: 1.15rem;
    transition: background .18s, box-shadow .18s;
    box-shadow: 0 2px 12px #b1dcfd40;
    text-decoration: none;
    display: inline-block;
    margin-left: 14px;
}

    .ff-btn-primary:hover {
        background: #288ee6;
        color: #fff;
    }

/* Optional header banner */
.ff-header-banner {
    background: linear-gradient(90deg, #1a73e8 0%, #2196f3 80%);
    color: #fff;
    text-align: center;
    font-size: 1.32rem;
    font-weight: 700;
    letter-spacing: 1.1px;
    padding: 10px 0;
    width: 100%;
}

/* Main & footer */
.main-content {
    padding: 40px 20px;
}

.ff-footer {
    background: #1b1c30;
    color: #fff;
    padding: 40px 20px 20px;
    font-family: "Inter", Arial, sans-serif;
}

.ff-footer-top {
    text-align: center;
    margin-bottom: 25px;
}

.ff-footer-logo {
    height: 50px;
}

.ff-footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: left;
}

.ff-footer-col h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #f4f4f8;
}

.ff-footer-col a {
    display: block;
    color: #b5b8d3;
    text-decoration: none;
    margin: 6px 0;
    font-size: 14px;
    transition: color .2s;
}

    .ff-footer-col a:hover {
        color: #fff;
    }

.ff-footer-col img {
    height: 45px;
    margin: 6px 0;
    transition: transform .2s;
}

    .ff-footer-col img:hover {
        transform: scale(1.05);
    }

.ff-footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    text-align: center;
    padding-top: 15px;
    margin-top: 30px;
    font-size: 13px;
    color: #9fa2c3;
}

    .ff-footer-bottom a {
        color: #fff;
        text-decoration: underline;
    }

/* Responsive header */
@media (max-width: 700px) {
    .ff-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 12px;
        flex-wrap: wrap;
    }

    .ff-header-left {
        width: 100%;
        margin-bottom: 6px;
    }

    .ff-header-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
    }

    .ff-logo {
        height: 42px;
        margin-bottom: 4px;
    }

    .ff-nav {
        flex-wrap: wrap;
        gap: 12px;
    }

        .ff-nav a {
            font-size: 1rem;
            margin: 0;
        }

    .ff-account {
        padding: 6px 14px;
        font-size: 1rem;
    }

    .ff-header-banner {
        font-size: 1.05rem;
        padding: 6px 0;
    }
}

/* ===============================
   Payment Success – Polished UI
   =============================== */

.ps-wrap {
    max-width: 840px;
    margin: 48px auto 120px;
    padding: 0 20px;
}

.ps-card {
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(30,33,52,.08);
    padding: 40px 48px;
}

    .ps-card h2 {
        margin: 6px 0 8px;
        font-weight: 800;
        letter-spacing: -.2px;
        font-size: clamp(1.6rem,1.2rem + 1.1vw,2.2rem);
    }

.ps-muted {
    color: var(--ff-muted);
    margin: 4px 0 18px;
}

.ps-anim {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    margin-bottom: 10px;
}

.ps-anim-fallback {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #e8f7ee;
    color: #16a34a;
    font-size: 64px;
    display: none;
    align-items: center;
    justify-content: center;
}

lottie-player[autoplay] + .ps-anim-fallback {
    display: none;
}

/* Key / value block */
.ps-kv {
    display: grid;
    grid-template-columns: 160px 1fr;
    column-gap: 18px;
    row-gap: 10px;
    margin: 14px auto 10px;
    max-width: 720px;
    text-align: left;
}

    .ps-kv dt {
        color: #4b5563;
        font-weight: 600;
    }

    .ps-kv dd {
        margin: 0;
        font-weight: 600;
        color: #111827;
        word-break: break-all;
        background: #f8fafc;
        border: 1px dashed var(--ff-border);
        border-radius: 10px;
        padding: 8px 10px;
    }

/* CTA row */
.ps-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 20px 0 6px;
}

.ps-btn {
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

    .ps-btn.primary {
        background: var(--ff-primary-2);
        color: #fff;
    }

        .ps-btn.primary:hover {
            background: var(--ff-primary-hover);
        }

    .ps-btn.ghost {
        background: transparent;
        color: var(--ff-primary-2);
    }

        .ps-btn.ghost:hover {
            background: var(--ff-soft);
        }

    .ps-btn.outline {
        background: #fff;
        border-color: #e5e7eb;
        color: #111827;
    }

        .ps-btn.outline:hover {
            border-color: #cfd3d8;
        }

/* Next steps + app badges */
.ps-subgrid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-top: 18px;
    align-items: start;
}

    .ps-subgrid h3 {
        margin: 0 0 8px;
        font-size: 1.05rem;
    }

.ps-next ul {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    color: #4b5563;
}

.ps-next li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 6px 0;
}

    .ps-next li::before {
        content: "•";
        color: var(--ff-primary-2);
        font-weight: 800;
        line-height: 1;
    }

.ps-badges {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

    .ps-badges img {
        height: 44px;
        display: block;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,.08));
    }

        .ps-badges img:hover {
            transform: translateY(-1px);
            transition: transform .15s;
        }

/* States */
.ps-loading, .ps-success, .ps-error {
    text-align: center;
}

    .ps-error .ps-error-msg {
        color: #b91c1c;
    }

/* Responsive tweaks */
@media (max-width: 820px) {
    .ps-wrap {
        margin: 28px auto 80px;
    }

    .ps-card {
        padding: 26px 18px;
    }

    .ps-kv {
        grid-template-columns: 1fr;
    }

    .ps-actions {
        justify-content: stretch;
    }

    .ps-subgrid {
        grid-template-columns: 1fr;
    }

    .ps-badges {
        justify-content: flex-start;
    }
}

/* ===============================
   Product Selection Wizard Styles
   =============================== */

.step-box {
    padding: 30px 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.wizard-step-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    text-align: center;
    color: #1e2134;
    letter-spacing: -0.02em;
}

.wizard-step-desc {
    text-align: center;
    margin-bottom: 40px;
    color: #6b7280;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.images-grid-wrapper {
    margin: 30px 0;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); /* was 320px */
    gap: 34px; /* optional: a touch more spacing */
    padding: 20px;
}

.image-product-card {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: fit-content;
}

    .image-product-card:hover {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
    }

.image-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 20px;
}

.icon-btn {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .icon-btn:hover {
        background-color: #f1f5f9;
        border-color: #d1d5db;
        transform: scale(1.05);
    }

.image-preview-container {
    width: 100%;
    margin-bottom: 20px;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    background: #fafbfc;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

    .product-thumb.resized {
        object-fit: cover;
    }

.card-product-name {
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
    font-size: 1.2rem;
    color: #1e2134;
    line-height: 1.3;
}

/* Category toggle - modern rounded style */
.category-toggle {
    display: flex;
    gap: 8px;
    width: 100%;
    margin: 16px 0;
    background: #f7f7fb;
    border: 1px solid #e3e5ea;
    border-radius: 12px;
    padding: 6px;
}

    .category-toggle .seg {
        appearance: none;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 10px 16px;
        border-radius: 8px;
        font-weight: 600;
        line-height: 1;
        font-size: 0.95rem;
        transition: all 0.2s ease;
        flex: 1;
        text-align: center;
    }

        .category-toggle .seg:hover {
            background: #eef0f6;
        }

        .category-toggle .seg.active {
            background: #1e2134;
            color: #fff;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

.product-dropdown {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s ease;
}

    .product-dropdown:focus {
        outline: none;
        border-color: #4f46e5;
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }

.size-info {
    text-align: center;
    margin-bottom: 16px;
    padding: 12px;
    background-color: #f0f9ff;
    border: 1px solid #e0f2fe;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #0369a1;
    font-weight: 600;
}

.qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .qty-btn:hover:not(:disabled) {
        background-color: #4f46e5;
        color: white;
        border-color: #4f46e5;
    }

    .qty-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        background: #f3f4f6;
    }

.qty-value {
    font-weight: 700;
    min-width: 40px;
    text-align: center;
    font-size: 1.1rem;
    color: #1e2134;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 40px 0;
    padding: 20px;
}

.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #f1f5f9;
}

.back-btn, .next-btn {
    padding: 14px 32px;
    border: 2px solid #4f46e5;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 140px;
}

.back-btn {
    background: white;
    color: #4f46e5;
}

    .back-btn:hover:not(:disabled) {
        background: #4f46e5;
        color: white;
        transform: translateY(-1px);
    }

.next-btn {
    background: #4f46e5;
    color: white;
}

    .next-btn:hover:not(:disabled) {
        background: #4338ca;
        border-color: #4338ca;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    }

    .next-btn:disabled {
        background-color: #9ca3af;
        border-color: #9ca3af;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.warning-text {
    color: #dc2626;
    font-size: 0.9rem;
    display: block;
    margin-top: 6px;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
    .step-box {
        padding: 20px 15px;
    }

    .wizard-step-title {
        font-size: 1.8rem;
    }

    .wizard-step-desc {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
        padding: 10px;
    }

    .image-product-card {
        padding: 20px;
    }

    .step-actions {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .back-btn, .next-btn {
        width: 100%;
        max-width: 300px;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .images-grid {
        grid-template-columns: 1fr;
    }

    .category-toggle {
        flex-direction: column;
        gap: 4px;
    }

    .image-card-actions {
        justify-content: center;
    }
}


/* End of PhotoFirst – Global Theme CSS */

/*New global theme css*/

/* ===== FotoFirst – Wizard Wide Overrides (FINAL) ===== */
/* Wrap your page with: <div class="step-box ff-wizard-wide">… */

.ff-wizard-wide {
    max-width: 1500px !important;
}

    /* Cards wide enough to show everything, but not crazy-wide */
    .ff-wizard-wide .images-grid {
        grid-template-columns: repeat(auto-fill,minmax(560px,1fr)) !important;
        gap: 24px !important;
    }

    /* Card basics */
    .ff-wizard-wide .image-product-card {
        padding: 26px !important;
        overflow: hidden;
    }

    /* ---------- SINGLE-ROW TOOLBAR (GRID) ----------
   Lanes:  [ Title | Standard/Canvas | Dropdown | Size chip ]      */
    .ff-wizard-wide .product-toolbar {
        display: grid !important;
        grid-template-columns: 1fr 220px 320px 220px;
        gap: 12px;
        align-items: center;
        width: 100%;
        margin: 12px 0 8px;
        overflow: visible;
    }

        /* Title grows, truncates if long */
        .ff-wizard-wide .product-toolbar .card-product-name {
            margin: 0;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            text-align: left;
            font-size: 1.1rem;
        }

        /* Pills: override global “width:100%” to keep them compact */
        .ff-wizard-wide .product-toolbar .category-toggle {
            width: auto !important;
            background: transparent;
            border: 0;
            padding: 0;
            display: inline-flex;
            gap: 6px;
            margin: 0;
        }

            .ff-wizard-wide .product-toolbar .category-toggle .seg {
                padding: 8px 12px;
                font-size: .92rem;
            }

        /* Dropdown fills its grid lane */
        .ff-wizard-wide .product-toolbar .product-dropdown {
            width: 100% !important;
            margin: 0;
        }

    /* Size chip stays flush right */
    .ff-wizard-wide .size-chip {
        justify-self: end;
        display: inline-flex;
        gap: 6px;
        padding: 8px 10px;
        border-radius: 10px;
        background: #f0f9ff;
        border: 1px solid #e0f2fe;
        color: #0369a1;
        font-weight: 600;
    }

    /* Quantity row as a clean footer */
    .ff-wizard-wide .qty-bar {
        margin-top: 14px;
        border-top: 1px solid #f1f5f9;
        padding-top: 12px;
    }

        .ff-wizard-wide .qty-bar .qty-controls {
            margin: 0;
            background: #f8fafc;
            border-radius: 10px;
            padding: 10px;
        }

/* ---------- Responsive tweaks ---------- */
@media (max-width:1100px) {
    .ff-wizard-wide .images-grid {
        grid-template-columns: repeat(auto-fill,minmax(520px,1fr)) !important;
    }
    /* Stack the toolbar into two rows neatly */
    .ff-wizard-wide .product-toolbar {
        grid-template-columns: 1fr 1fr; /* [Title | Pills]  then [Dropdown] [Size] */
        grid-auto-rows: auto;
    }

        .ff-wizard-wide .product-toolbar .product-dropdown {
            grid-column: 1 / -1;
        }
    /* full row */
    .ff-wizard-wide .size-chip {
        justify-self: start;
    }
}

@media (max-width:600px) {
    .ff-wizard-wide .images-grid {
        grid-template-columns: 1fr !important;
    }
}
/* --- Preview should not control card height --- */
.ff-wizard-wide .image-preview {
    height: 260px; /* visual cap */
    max-height: 28vh; /* responsive upper bound */
    min-height: 180px; /* keeps it usable on small screens */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafbfc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
}

    .ff-wizard-wide .image-preview img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain; /* never stretches or crops */
    }

/* Make cards a touch narrower so everything fits without feeling huge */
.ff-wizard-wide {
    max-width: 1320px !important;
}

    .ff-wizard-wide .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)) !important;
        gap: 22px !important;
    }

    /* Keep the single-row toolbar but with tighter lanes */
    .ff-wizard-wide .product-toolbar {
        display: grid !important;
        grid-template-columns: 1fr 200px 280px 200px; /* Title | Pills | Dropdown | Size */
        gap: 12px;
        align-items: center;
    }

/* On tablets stack neatly */
@media (max-width:1100px) {
    .ff-wizard-wide .product-toolbar {
        grid-template-columns: 1fr 1fr;
    }

        .ff-wizard-wide .product-toolbar .product-dropdown {
            grid-column: 1 / -1;
        }

    .ff-wizard-wide .size-chip {
        justify-self: start;
    }
}
/* ===== FotoFirst – Wizard Wide Overrides (3 Columns Layout) ===== */
.ff-wizard-wide {
    max-width: 1500px !important;
}

    /* ✅ At least 3 cards per row on desktop */
    .ff-wizard-wide .images-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr) !important; /* exactly 3 per row */
        gap: 22px !important;
        justify-content: center;
    }

    /* Card layout */
    .ff-wizard-wide .image-product-card {
        padding: 24px !important;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        background: #fff;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
        transition: transform 0.2s ease;
    }

        .ff-wizard-wide .image-product-card:hover {
            transform: translateY(-3px);
        }

    /* --- Preview image area (fixed height, image scales inside) --- */
    .ff-wizard-wide .image-preview {
        height: 220px;
        max-height: 28vh;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fafbfc;
        border: 1px solid #f1f5f9;
        border-radius: 10px;
        overflow: hidden;
        margin-bottom: 10px;
    }

        .ff-wizard-wide .image-preview img {
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            object-fit: contain;
        }

    /* --- Horizontal toolbar: title | Standard/Canvas | dropdown | size --- */
    .ff-wizard-wide .product-toolbar {
        display: grid !important;
        grid-template-columns: 1fr 180px 260px 200px;
        gap: 10px;
        align-items: center;
        width: 100%;
        margin: 12px 0 8px;
    }

        .ff-wizard-wide .product-toolbar .card-product-name {
            margin: 0;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            font-size: 1rem;
            text-align: left;
        }

        .ff-wizard-wide .product-toolbar .category-toggle {
            display: inline-flex;
            gap: 6px;
            background: transparent;
            border: 0;
            padding: 0;
        }

            .ff-wizard-wide .product-toolbar .category-toggle .seg {
                padding: 8px 12px;
                font-size: 0.9rem;
            }

        .ff-wizard-wide .product-toolbar .product-dropdown {
            width: 100%;
            margin: 0;
        }

    .ff-wizard-wide .size-chip {
        justify-self: end;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 10px;
        border-radius: 8px;
        background: #f0f9ff;
        border: 1px solid #e0f2fe;
        color: #0369a1;
        font-weight: 600;
    }

    /* --- Quantity row footer --- */
    .ff-wizard-wide .qty-bar {
        margin-top: 10px;
        border-top: 1px solid #f1f5f9;
        padding-top: 8px;
    }

/* ✅ Responsive: switch to 2 and 1 columns on smaller screens */
@media (max-width: 1200px) {
    .ff-wizard-wide .images-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .ff-wizard-wide .images-grid {
        grid-template-columns: 1fr !important;
    }
}
/* --- Fix: don't clip toolbar / select --- */
.ff-wizard-wide .image-product-card {
    overflow: visible !important; /* was hidden */
}

/* --- Replace the grid toolbar with a flexible row --- */
.ff-wizard-wide .product-toolbar {
    display: flex !important;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap; /* allows wrapping instead of overflow */
    white-space: normal !important; /* permit wrapping */
}

    /* Name (left) grows but truncates */
    .ff-wizard-wide .product-toolbar .card-product-name {
        flex: 1 1 160px;
        min-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0;
        text-align: left;
    }

    /* Standard/Canvas pills stay compact */
    .ff-wizard-wide .product-toolbar .category-toggle {
        flex: 0 0 auto;
        background: transparent;
        border: 0;
        padding: 0;
        gap: 6px;
        margin: 0;
    }

        .ff-wizard-wide .product-toolbar .category-toggle .seg {
            padding: 8px 12px;
            font-size: .92rem;
        }

    /* Select takes remaining space but never exceeds the card */
    .ff-wizard-wide .product-toolbar .product-dropdown {
        flex: 1 1 280px; /* grows and shrinks */
        min-width: 200px; /* prevents collapsing too small */
        max-width: 100%;
        margin: 0;
    }

/* Size chip hugs the right, but can wrap to next line if needed */
.ff-wizard-wide .size-chip {
    flex: 0 0 auto;
    margin-left: auto; /* pushes it right when on same line */
}

/* Keep 3 columns on desktop (unchanged) */
.ff-wizard-wide .images-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 22px !important;
}

/* Responsive fallbacks */
@media (max-width: 1200px) {
    .ff-wizard-wide .images-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .ff-wizard-wide .images-grid {
        grid-template-columns: 1fr !important;
    }

    .ff-wizard-wide .product-toolbar .product-dropdown {
        flex: 1 1 100%;
        min-width: 0;
    }

    .ff-wizard-wide .size-chip {
        margin-left: 0;
    }
}
