/* --- Global Preview UI Overrides (SSOT Enforcement) --- */
#master-preview .canvas-body .btn-primary,
.canvas-body .btn-primary {
    background: var(--live-primary);
    border-radius: var(--live-radius);
    color: white;
    padding: 0.4rem 1.2rem;
    font-weight: 700;
    border: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.canvas-body .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(var(--live-primary-rgb), 0.3);
    filter: brightness(1.1);
}

#master-preview .canvas-body .btn-outline,
.canvas-body .btn-outline {
    border: 2px solid var(--live-secondary);
    color: var(--live-secondary);
    border-radius: var(--live-radius);
    background: transparent;
    padding: 0.4rem 1.2rem;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
}

.canvas-body .btn-outline:hover {
    transform: translateY(-3px);
    background: rgba(var(--live-secondary-rgb), 0.05) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* --- Palette Swatches (Step 1) --- */
.palette-demo-row {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 2rem;
}

.palette-btn-demo {
    display: flex;
    justify-content: flex-end; /* Pushes to Left in RTL */
    gap: 1rem;
    margin-top: 1.5rem;
}

.palette-chip {
    padding: 6px 15px;
    border-radius: var(--live-radius);
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.palette-chip.primary {
    background: var(--live-primary);
}

.palette-chip.secondary {
    background: var(--live-secondary);
}

/* --- Step 3: Skillset Real-View --- */
#skillset-preview {
    width: 100%;
    max-width: var(--cb-max-width);
    margin: 0 auto;
}

.section-title-centered {
    text-align: center;
    font-size: calc(var(--live-font-size) * 1.2) !important;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--live-text);
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title-centered::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--live-primary);
    border-radius: 10px;
}

.wf-skills-grid {
    display: grid;
    gap: 1.5rem;
    width: 100%;
}

/* 1. Iconic Grid Mode */
.wf-sl-grid .wf-skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    transition: 0.3s;
}

.wf-sl-grid .wf-skill-icon,
.wf-sl-grid .wf-skill-img {
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(var(--live-secondary-rgb), 0.1);
    border: 1px solid rgba(var(--live-secondary-rgb), 0.2);
    border-radius: var(--live-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--live-secondary);
    background-size: cover;
    background-position: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.wf-sl-grid .wf-skill-item span {
    font-size: calc(var(--live-font-size) * 0.85) !important;
    font-weight: 700;
    color: var(--live-text);
}

/* 2. Progress Bars Mode */
.wf-sl-bars .wf-skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wf-sl-bars .wf-skill-label {
    font-size: calc(var(--live-font-size) * 0.85) !important;
    font-weight: 700;
    color: var(--live-text);
}

.wf-sl-bars .wf-skill-progress {
    height: 8px;
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
    overflow: hidden;
}

.wf-sl-bars .wf-skill-progress-fill {
    height: 100%;
    background: var(--live-primary);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(var(--live-primary-rgb), 0.3);
}

/* 3. Clean List Mode */
.wf-sl-list .wf-skill-item-list {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.4);
    border-radius: var(--live-radius);
    border: 1px solid rgba(0,0,0,0.03);
}

.wf-sl-list .wf-skill-icon-sm,
.wf-sl-list .wf-skill-img-sm {
    font-size: 1.2rem;
    color: var(--live-primary);
    width: 24px;
    height: 24px;
    background-size: cover;
    background-position: center;
}

.wf-sl-list span {
    font-size: calc(var(--live-font-size) * 0.9) !important;
    font-weight: 600;
    color: var(--live-text);
}

/* --- Step 4: Portfolio Real-View --- */
.portfolio-grid-view {
    display: grid;
    gap: 1.5rem;
}

.portfolio-item-card {
    position: relative;
    aspect-ratio: 4/3;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--live-radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.p-card-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item-card:hover .p-card-img {
    transform: scale(1.08);
}

.p-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(var(--live-primary-rgb), 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
    color: white;
    font-size: 2rem;
}

.portfolio-item-card:hover .p-card-overlay {
    opacity: 1;
}

/* Slider View */
.portfolio-slider-view {
    position: relative;
    overflow: hidden;
    padding: 10px 0;
}

.p-slider-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 20px;
}

.p-slider-track::-webkit-scrollbar { display: none; }

.p-slide-item {
    flex: 0 0 280px;
    aspect-ratio: 16/10;
    border-radius: var(--live-radius);
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.slider-hint {
    text-align: center;
    font-size: 0.7rem;
    color: var(--live-text);
    opacity: 0.5;
    margin-top: 10px;
}

.canvas-empty-placeholder {
    padding: 3rem;
    background: rgba(0,0,0,0.03);
    border: 2px dashed rgba(0,0,0,0.05);
    border-radius: var(--live-radius);
    text-align: center;
    color: var(--live-text);
    opacity: 0.4;
}

.canvas-empty-placeholder i { font-size: 2rem; margin-bottom: 10px; display: block; }

/* ── Mobile: Swiper touch fixes ─────────────────────────────────────
   touch-action: pan-y  tells iOS Safari that the swiper handles
   horizontal swipes only, so vertical page scrolling is never blocked.
   Without this, swiping up/down on a slider freezes the page scroll.
──────────────────────────────────────────────────────────────────── */
.swiper,
.p-slider-view,
.p-slide-item {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}
