/* ============================================================
   PUICIK.MD - ASSEMBLY.CSS
   Stiluri pentru paginile de instrucțiuni de asamblare.
   Se încarcă DUPĂ shared.css și product-page.css.
   Folosește exclusiv design tokens din shared.css.
   ============================================================ */

/* ===== HERO (reutilizează structura hero-card din product-page.css) ===== */
/* ===== HERO — foaia printabilă în loc de foto de produs ===== */
.assembly-hero .hero-media {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sheet-hero-link {
    display: block;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-xs);
}

.assembly-hero .hero-main-image.sheet-hero {
    aspect-ratio: 1280/900;
    object-fit: contain;
    object-position: center center;
    background: #fff;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 24px;
    cursor: zoom-in;
    display: block;
}

.sheet-hero-link:hover { box-shadow: var(--shadow-sm); }

.assembly-hero .hero-media .sheet-badge {
    display: block;
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 700;
    text-align: center;
}

.quick-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 4px 0 6px;
}

.quick-fact {
    background: var(--cream);
    border: 1px solid var(--peach-light);
    border-radius: var(--radius-md, 14px);
    padding: 12px 10px;
    text-align: center;
}

.quick-fact .qf-num {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--coral-deep);
    line-height: 1.1;
}

.quick-fact .qf-label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-body);
    line-height: 1.3;
}

/* ===== PAȘII DE ASAMBLARE ===== */
.steps-grid {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.step-card {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 18px;
    align-items: start;
    background: var(--cream);
    border: 1px solid var(--peach-light);
    border-left: 5px solid var(--coral);
    border-radius: var(--radius-lg, 20px);
    padding: 20px 22px;
}

.step-num {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--coral-deep), var(--coral));
    color: #fff;
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-coral);
}

.step-body h3 {
    margin: 0 0 8px;
    font-size: 21px;
    color: var(--text-dark);
}

.step-body p {
    margin: 0 0 8px;
    color: var(--text-body);
    line-height: 1.7;
}

.step-body p:last-child { margin-bottom: 0; }

.step-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0;
}

.step-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    border: 1px solid var(--peach);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--coral-deep);
}

/* ===== PIESELE SETULUI ===== */
.parts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 20px;
}

.part-item {
    background: var(--sky-light);
    border-radius: 18px;
    padding: 16px 16px 14px;
}

.part-item .part-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 10px;
    background: var(--coral);
    color: #fff;
    font-weight: 900;
    font-size: 15px;
    margin-bottom: 10px;
}

.part-item strong {
    display: block;
    color: var(--text-dark);
    font-size: 15.5px;
    margin-bottom: 4px;
}

.part-item span {
    display: block;
    color: var(--text-body);
    font-size: 13.5px;
    line-height: 1.5;
}

/* ===== CALLOUT-URI ===== */
.callout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border-radius: var(--radius-md, 14px);
    padding: 16px 18px;
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-body);
}

.callout .callout-icon { font-size: 24px; line-height: 1; flex-shrink: 0; }
.callout strong { color: var(--text-dark); }

.callout-info {
    background: var(--sky-light);
    border: 1.5px solid var(--sky);
}

.callout-warn {
    background: #FFF3D6;
    border: 1.5px solid #FFD966;
    color: #6B4E00;
}

.callout-warn strong { color: #7A2E00; }

/* Buton în interiorul unui callout */
.callout-text { margin: 0; }

.callout-cta {
    display: inline-flex;
    margin-top: 12px;
    align-items: center;
    gap: 8px;
}

.callout { flex-wrap: wrap; }
.callout > div { min-width: 220px; flex: 1 1 260px; }

.callout-eco {
    background: var(--mint-light);
    border: 1.5px solid var(--mint);
}

/* ===== FOAIE ORIGINALĂ / ZOOM ===== */
.sheet-figure {
    margin: 22px 0 0;
}

.sheet-zoom {
    display: block;
    border: 1px solid var(--peach-light);
    border-radius: var(--radius-md, 14px);
    overflow: hidden;
    background: var(--white);
    cursor: zoom-in;
}

.sheet-zoom img {
    width: 100%;
    height: auto;
    display: block;
}

.sheet-figure figcaption {
    margin-top: 10px;
    font-size: 13.5px;
    color: var(--text-muted);
    text-align: center;
}

.sheet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(20, 16, 12, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 24px;
    overflow: auto;
}

.lightbox.open { display: flex; }

.lightbox img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    background: #fff;
}

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 22px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #2A2521;
    font-size: 22px;
    cursor: pointer;
    font-weight: 700;
}

/* ===== TABEL SPECIFICAȚII ===== */
.asm-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
}

.asm-table th,
.asm-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--peach-light);
    font-size: 15px;
}

.asm-table th {
    background: var(--sky-light);
    border-bottom: 2px solid var(--peach-light);
}

.asm-table tr:nth-child(even) td { background: var(--cream); }

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
    .parts-grid { grid-template-columns: 1fr; }
    .quick-facts { grid-template-columns: 1fr; }
    .step-card { grid-template-columns: 1fr; gap: 12px; padding: 18px; }
    .step-num { width: 52px; height: 52px; font-size: 26px; }
    .asm-table th, .asm-table td { padding: 10px 8px; font-size: 14px; }
}

/* ===== GHID INTERACTIV (piese + pași, slider cu imagine în stânga) ===== */
.guide-slider {
    margin-top: 22px;
    scroll-margin-top: 110px;
}

.guide-viewport {
    position: relative;
    touch-action: pan-y;
    overscroll-behavior-x: contain;
}

.guide-slide {
    display: none;
    /* jumătate pentru desen, jumătate pentru text */
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: center;
    background: var(--cream);
    border: 1px solid var(--peach-light);
    border-radius: var(--radius-lg, 20px);
    padding: 26px;
}

.guide-slide.is-active {
    display: grid;
    animation: guideFade .3s ease;
}

@keyframes guideFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.guide-media {
    position: relative;
    background: #fff;
    border: 1px solid var(--peach-light);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;   /* chenar pătrat: desenul se încadrează întreg */
    max-height: 520px;
}

.guide-media img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;   /* încadrat, nu tăiat, nu deformat */
    display: block;
    border-radius: 10px;
}

/* desenul se deschide mărit (lightbox) — util pe telefon, unde banda e mică */
.guide-zoom {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    line-height: 0;
    border-radius: 10px;
    cursor: zoom-in;
    -webkit-tap-highlight-color: transparent;
}

.guide-zoom::after {
    content: "🔍";
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--peach-light);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
    pointer-events: none;
}

.guide-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--coral-deep);
    background: var(--peach-light);
    border-radius: 999px;
    padding: 5px 12px;
    margin-bottom: 10px;
}

.guide-body h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: var(--text-dark);
}

.guide-body p {
    margin: 0 0 12px;
    color: var(--text-body);
    line-height: 1.7;
}

.guide-list {
    margin: 0 0 12px;
    padding-left: 0;
    list-style: none;
}

.guide-list li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 8px;
    color: var(--text-body);
    line-height: 1.6;
    font-size: 15px;
}

.guide-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--coral);
    font-weight: 900;
}

.guide-list li strong { color: var(--text-dark); }

.guide-note {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* casetă de ATENȚIONARE (scule electrice, șuruburi forțate) */
.guide-warn {
    background: #FFF4E5;
    border: 1px solid #F0B27A;
    border-left: 4px solid #E67E22;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #7A4A00;
}

.guide-warn > strong { color: #B34700; font-size: 15px; }
.guide-warn-list { margin: 6px 0 0; padding-left: 18px; }
.guide-warn-list li { margin-bottom: 4px; }

.guide-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    row-gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.guide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid var(--peach-dark);
    background: rgba(255, 255, 255, .96);
    color: var(--text-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, transform .2s ease;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .14);
}

.guide-nav:hover { border-color: var(--coral); color: var(--coral); transform: translateY(-50%) scale(1.06); }
.guide-nav svg { width: 20px; height: 20px; }

/* stânga / dreapta, lipite de marginile chenarului cu desen */
.guide-nav-prev { left: 10px; }
.guide-nav-next { left: calc(50% - 56px); }

.guide-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.guide-dot {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--peach);
    background: var(--white);
    color: var(--text-body);
    font-weight: 800;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s ease;
    -webkit-tap-highlight-color: transparent;
}

.guide-dot:hover { border-color: var(--coral); color: var(--coral); }

.guide-dot[aria-current="true"] {
    background: linear-gradient(135deg, var(--coral-deep), var(--coral));
    border-color: transparent;
    color: #fff;
    box-shadow: var(--shadow-coral);
}

.guide-counter {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-muted);
    min-width: 44px;
    text-align: center;
}

@media (max-width: 860px) {
    /* ---- MOBIL ----
       Card cu înălțime fixă, ca toate slide-urile să fie egale (fără sărituri de layout):
       desen sus, instrucțiuni jos (cu scroll intern), bara de pași rămâne lipită sub card,
       deci pasul se schimbă fără să derulezi pagina. */
    .guide-slider { margin-top: 16px; scroll-margin-top: 92px; }

    .guide-slider { --media-h: clamp(190px, 34svh, 270px); }

    .guide-slide {
        grid-template-columns: 1fr;            /* aceeași structură, dar pe verticală */
        grid-template-rows: auto minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
        align-items: stretch;
        /* 100svh = cea mai mică înălțime de viewport (fără bara de adrese),
           minus header (~91px) și bara de pași (~56px) → încape fără scroll */
        height: min(calc(100svh - 180px), 660px);
        min-height: 300px;
        box-shadow: 0 2px 14px rgba(0, 0, 0, .05);
    }

    .guide-media {
        aspect-ratio: auto;
        height: var(--media-h);
        max-height: none;
        min-height: 0;
        padding: 6px;
        border-radius: 12px;
    }

    .guide-media img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        object-fit: contain;
        border-radius: 8px;
    }

    .guide-zoom::after { width: 26px; height: 26px; font-size: 12px; right: 4px; bottom: 4px; }

    .guide-body {
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 0 2px 2px 0;
    }

    .guide-kicker { font-size: 11px; padding: 4px 10px; margin-bottom: 8px; }
    .guide-body h3 { font-size: 19px; margin-bottom: 8px; }
    .guide-body p { font-size: 13.5px; line-height: 1.5; margin-bottom: 7px; }
    .guide-list { margin-bottom: 7px; }
    .guide-list li { font-size: 13.5px; line-height: 1.45; margin-bottom: 5px; padding-left: 20px; }
    .step-tags { margin-top: 2px; }
    .step-tag { font-size: 11.5px; padding: 4px 9px; }

    /* estompare la baza coloanei cât timp mai este text de citit */
    .guide-body.has-more {
        -webkit-mask-image: linear-gradient(#000 calc(100% - 22px), transparent);
        mask-image: linear-gradient(#000 calc(100% - 22px), transparent);
    }
    .guide-note { font-size: 12px; }
    .guide-warn { font-size: 12.5px; padding: 8px 10px; margin-bottom: 8px; }
    .guide-warn > strong { font-size: 13.5px; }
    .guide-warn-list { margin-top: 4px; padding-left: 16px; }

    /* bara de pași: segmente late, țintă de atingere de 40px înălțime */
    .guide-controls { gap: 8px; row-gap: 0; margin-top: 12px; flex-wrap: nowrap; }
    .guide-slide { padding: 12px; }
    .guide-nav { width: 44px; height: 44px; border-width: 1.5px; }
    .guide-nav svg { width: 18px; height: 18px; }
    /* săgețile rămân pe centrul desenului și pe verticală */
    .guide-nav { top: calc(12px + var(--media-h) / 2); }
    .guide-nav-prev { left: 8px; }
    .guide-nav-next { left: auto; right: 8px; }

    .guide-dots { flex: 1 1 auto; gap: 6px; flex-wrap: nowrap; min-width: 0; }

    .guide-dot {
        flex: 1 1 0;
        min-width: 0;
        height: 40px;
        padding: 0;
        border: none;
        border-radius: 8px;
        background: linear-gradient(var(--peach-dark), var(--peach-dark)) center / 100% 6px no-repeat;
        opacity: .42;
        box-shadow: none;
    }

    .guide-dot[aria-current="true"] {
        opacity: 1;
        border: none;
        box-shadow: none;
        background: linear-gradient(135deg, var(--coral-deep), var(--coral)) center / 100% 6px no-repeat;
    }

    .guide-dot .dot-text { display: none; }
    .guide-dot:focus-visible { outline: 3px solid var(--coral-deep); outline-offset: 2px; }
    .guide-counter { display: none; }
}

/* ecrane foarte scurte (telefon întors, ferestre mici): textul curge, nimic nu se taie */
@media (max-width: 860px) and (max-height: 620px) {
    .guide-slide { height: calc(100svh - 165px); min-height: 260px; }
    .guide-media { max-height: 40%; }
}

/* ===== PRINT (foaie de instrucțiuni la imprimantă) ===== */
@media print {
    .header, .footer, .gdpr-banner, .mobile-back-btn, .float-msg,
    .cta-row, .sheet-actions, .lightbox, .share-menu, nav { display: none !important; }
    body { opacity: 1 !important; background: #fff !important; }
    .section-card, .step-card, .part-item, .callout {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        page-break-inside: avoid;
    }
    html { background: #fff !important; }
}

/* lista de modele compatibile (cluster intern) */
.guide-models {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 16px 0 4px;
}

.guide-models li { margin: 0; }

.guide-models a {
    display: inline-block;
    padding: 9px 14px;
    border: 1.5px solid var(--peach-dark, #f0d9c8);
    border-radius: 999px;
    background: var(--white, #fff);
    color: var(--text-dark, #2b2b2b);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.guide-models a:hover { border-color: var(--coral, #ff6b6b); color: var(--coral, #ff6b6b); }
