/* ===================================================================
   FABRIKA POZIVNICA - STYLE.CSS (v3.7 - Popravke za hibridni skrol)
   =================================================================== */

/* ===== 1. OSNOVNE POSTAVKE I VARIJABLE ===== */
:root {
    --font-body: 'Tenor Sans', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --font-special: 'Lora', serif;
    --color-text: #000000;
    --color-text-light: #555555;
    --color-text-lighter: #888888;
    --color-background: #ffffff;
    --color-border: #eeeeee;
    --color-heart: var(--color-text); /* Crna boja */
    --nav-height: 80px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

html, body { background-color: var(--color-background); }

body { 
    font-family: var(--font-body); 
    color: var(--color-text); 
    line-height: 1.6; 
}

body.js-loaded {
    opacity: 1;
}

body.page-index, body.page-home { overflow: hidden; }


/* ===== 2. NAVIGACIJA ===== */
/* ... (Sav kod navigacije ostaje isti) ... */
nav {
    position: fixed; top: 0; width: 100%;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
    z-index: 1001; padding: 0 clamp(1rem, 5vw, 2.5rem);
    height: var(--nav-height); display: flex; align-items: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

body.js-loaded nav {
    animation: slideDown 0.6s ease-out;
}
.nav-container {
    width: 100%; max-width: 1400px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    gap: 20px;
}
.logo img { height: clamp(38px, 10vw, 50px); width: auto; display: block; }
.logo a:hover img { animation: wiggle 0.5s ease-in-out; }
.nav-menu { display: flex; gap: 30px; align-items: baseline; }
.nav-link { 
    text-decoration: none; color: var(--color-text); font-size: 14px; 
    letter-spacing: 2px; text-transform: uppercase; transition: color 0.3s ease; 
    position: relative; padding-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px; 
}
.nav-link svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
}
.caret {
    margin-left: 4px;
    font-size: 12px;
    transition: transform 0.3s ease;
}
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: var(--color-text); transition: width 0.3s ease; }
.nav-link:hover::after { width: 100%; }

.dropdown { position: relative; }
.dropdown-content { position: absolute; top: 100%; left: 0; background: var(--color-background); min-width: 160px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12); border-radius: 8px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s ease; margin-top: 15px; }

.dropdown.active .dropdown-content { 
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0); 
}
.dropdown.active .caret {
    transform: rotate(180deg);
}
@media (hover: hover) and (pointer: fine) {
    .dropdown:hover .dropdown-content {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .dropdown:hover .caret {
        transform: rotate(180deg);
    }
}

.dropdown-content a { display: block; padding: 12px 20px; text-decoration: none; color: var(--color-text); font-size: 13px; letter-spacing: 1px; transition: all 0.3s ease; }
.dropdown-content a:hover { background: #f8f8f8; padding-left: 25px; }

body.page-slajd .dropdown-content a[href="slajd.html"],
body.page-kapija .dropdown-content a[href="kapija.html"] {
    font-weight: bold;
}

.icon-heart-filled {
    display: none;
    fill: currentColor;
}
body.page-proizvod .icon-heart-outline {
    display: none;
}
body.page-proizvod .icon-heart-filled {
    display: inline-block;
}

body.page-index .nav-menu > a[href="/"]::after { width: 100%; }
body.page-proizvod .nav-menu .dropdown > .nav-link::after { width: 100%; }
body.page-kontakt .nav-menu > a[href="kontakt.html"]::after { width: 100%; }


/* ===== 3. FULL-PAGE KONTROLE I SEKCIJE ===== */
#fullpage-container { 
    height: 100vh; 
}
.fullpage-section {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--nav-height) clamp(1rem, 5vw, 2.5rem) 2rem;
    position: relative;
}
.fullpage-nav { position: fixed; right: 30px; top: 50%; transform: translateY(-50%); z-index: 999; display: flex; flex-direction: column; gap: 15px; }
.fullpage-nav .dot { width: 10px; height: 10px; border: 1px solid var(--color-text); border-radius: 0%; cursor: pointer; transition: background-color 0.4s ease, transform 0.4s ease; }
.fullpage-nav .dot.active { background-color: var(--color-text); transform: scale(1.2); }

/* Lokalna strelica (samo za mobilni) */
/* Sakrivena na desktopu (display: none), prikazana na mobilnom (vidi @media) */
.scroll-down-arrow { 
    position: absolute; 
    bottom: 40px; 
    left: 50%; 
    transform: translateX(-50%); 
    display: none; /* Sakriveno na desktopu */
}
.scroll-down-arrow a { 
    display: inline-block; 
    animation: bobbing-down 2s ease-in-out infinite; 
}
.scroll-down-arrow svg { 
    width: 30px; 
    height: 30px; 
    stroke: #333; 
    transition: stroke 0.3s ease; 
}
.scroll-down-arrow a:hover svg { stroke: var(--color-text); }

/* Globalne strelice (samo za desktop) */
.fullpage-arrow-up, .fullpage-arrow-down {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s 0.4s;
    display: block; /* Prikazano na desktopu */
}
.fullpage-arrow-up {
    top: calc(var(--nav-height) + 20px); /* Pozicija na vrhu */
}
.fullpage-arrow-down {
    bottom: 40px; /* Pozicija na dnu */
}

.fullpage-arrow-up.visible, .fullpage-arrow-down.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease;
}
.fullpage-arrow-up.visible {
    animation: bobbing-up 2s ease-in-out infinite;
}
.fullpage-arrow-down.visible {
    animation: bobbing-down 2s ease-in-out infinite;
}

.fullpage-arrow-up svg, .fullpage-arrow-down svg {
    width: 30px; 
    height: 30px; 
    stroke: #333; 
    transition: stroke 0.3s ease;
}
.fullpage-arrow-up:hover svg, .fullpage-arrow-down:hover svg {
    stroke: var(--color-text);
}


/* ===== 4. SADRŽAJ SEKCIJA (HERO, PRODUCT...) ===== */
.hero-section { text-align: center; }
.hero-section h1 { font-family: var(--font-special); font-size: clamp(2rem, 1.5rem + 3vw, 3.6rem); font-weight: 700; line-height: 1.4; }
.hero-line { display: block; opacity: 0; animation: fadeInUp 1s ease-out forwards; }
.line-1 { animation-delay: 0.2s; } .line-2 { animation-delay: 0.6s; } .line-3 { animation-delay: 1.0s; }
.heart { color: var(--color-heart); } /* Nema više animacije */

/* === STIL ZA CUSTOM DESIGN SEKCIJU === */
.custom-design-section {
    text-align: center;
}
.custom-design-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}
.custom-design-description {
    font-family: var(--font-special);
    font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
    animation-delay: 0.2s; 
}
.steps-container {
    display: flex;
    justify-content: space-around;
    gap: 2.5rem; 
    width: 100%;
    margin-top: 3rem; 
}
.step-item {
    flex-basis: 30%; 
    max-width: 320px; 
    text-align: center;
    opacity: 0; 
    animation: fadeInUp 1s ease-out forwards; 
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.step-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--color-text);
}
.step-item h4 {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.step-item p {
    font-size: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
    color: var(--color-text-light);
    line-height: 1.5;
}
.step-1 { animation-delay: 0.4s; }
.step-2 { animation-delay: 0.6s; }
.step-3 { animation-delay: 0.8s; }
/* === KRAJ STILA ZA CUSTOM SEKCIJU === */

.product-section .product-list-item { display: flex; align-items: center; gap: clamp(2rem, 5vw, 4rem); width: 100%; max-width: 1200px; }
.product-section .product-list-item.reverse { flex-direction: row-reverse; }
/* ... (ostatak product-section ostaje isti) ... */
.product-section .product-list-image-wrapper { aspect-ratio: 4 / 3; }
.product-section .product-photo { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.product-title { font-family: var(--font-heading); font-size: clamp(2.2rem, 1.5rem + 3.5vw, 4rem); font-weight: 700; line-height: 1.2; margin-bottom: 1.5rem; text-transform: uppercase; position: relative; display: inline-block; padding-bottom: 5px; }
.product-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--color-text); transition: width 0.4s ease; }
.product-title.title-underline::after { width: 100%; }
.product-description { font-size: clamp(1rem, 0.9rem + 0.5vw, 1.1rem); color: var(--color-text-light); margin-bottom: 2rem; max-width: 450px; }
.product-price { font-family: var(--font-special); font-size: clamp(1.1rem, 1rem + 0.5vw, 1.25rem); font-weight: 700; color: var(--color-text); margin-bottom: 2.5rem; }
.info-footer-section .content-wrapper { text-align: center; }
.free-text { font-family: var(--font-heading); font-size: clamp(1.1rem, 1rem + 1vw, 1.5rem); color: #333; max-width: 500px; margin-bottom: 2rem; }
.free-text span { font-style: italic; color: var(--color-text-lighter); }

/* ===== 5. FOOTER ===== */
/* ... (Sav kod footera ostaje isti) ... */
footer { position: fixed; bottom: 0; width: 100%; padding: 15px clamp(1rem, 5vw, 2.5rem); background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); z-index: 1000; border-top: 1px solid var(--color-border); transform: translateY(100%); opacity: 0; visibility: hidden; transition: transform 0.6s ease-out, opacity 0.6s ease-out, visibility 0s 0.6s; }
footer.visible { transform: translateY(0); opacity: 1; visibility: visible; transition: transform 0.6s ease-out 0.4s, opacity 0.6s ease-out 0.4s, visibility 0s; }
.footer-container { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 1400px; margin: 0 auto; }
.copyright-text { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.footer-socials { display: flex; align-items: center; gap: 25px; }
.social-link { color: var(--color-text-light); text-decoration: none; display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; position: relative; }
.social-link:hover { color: var(--color-text); }
.social-link svg { width: 20px; height: 20px; stroke: currentColor; transition: color 0.3s ease; }

/* ===== 6. ANIMACIJE ===== */
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25%, 75% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

@keyframes bobbing-down { 
    0%, 100% { transform: translateY(0) translateX(-50%); } 
    50% { transform: translateY(10px) translateX(-50%); } 
}
@keyframes bobbing-up {
    0%, 100% { transform: translateY(0) translateX(-50%); }
    50% { transform: translateY(-10px) translateX(-50%); }
}


/* ===================================================================
   7. RESPONZIVNA PRAVILA (HIBRIDNI MODEL + "BALANSIRANI" RASPORED)
   =================================================================== */
@media (max-width: 900px), ((min-width: 901px) and (max-height: 650px)) {
    html, body { overflow-y: auto; overflow-x: hidden; }
    #fullpage-container { height: auto; transform: none !important; }
    
    .fullpage-section {
        height: auto;
        min-height: 0; 
        padding-top: 4rem; 
        padding-bottom: 4rem; 
        /* POPRAVKA 1: Rešava problem skrolovanja iza navigacije */
        scroll-margin-top: var(--nav-height);
    }

    .fullpage-section#hero {
        min-height: 90vh; 
        padding-top: calc(var(--nav-height) + 4rem); 
        padding-bottom: 4rem;
        /* POPRAVKA 1b: Posebno za hero sekciju */
        scroll-margin-top: 0; /* Hero sekciji ne treba margina */
    }
    .fullpage-section#custom-design {
        min-height: 90vh;
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .hero-section { min-height: 90vh; }
    
    /* Sakriva tačke i GLOBALNE strelice */
    .fullpage-nav, .fullpage-arrow-up, .fullpage-arrow-down { 
        display: none !important; 
    }
    
    /* POPRAVKA 2: .scroll-down-arrow je UKLONJEN odavde.
       Sada se kontroliše samo sa (max-width: 900px) dole.
       Ovo sprečava da se prikazuje na "kratkim" ekranima.
    */
    
    footer { 
        position: relative; 
        transform: none; 
        opacity: 1; 
        visibility: visible; 
        margin-top: 4rem; 
        transition: none; 
    }

    /* Osigurava da su elementi vidljivi na mobilnom */
    .custom-design-description,
    .step-item {
        opacity: 1;
        transform: translateY(0);
        animation: none;
    }
}

/* --- Pravila za "BALANSIRANU" VERZIJU --- */
@media (max-width: 900px) {
    /* POPRAVKA 2: Prikazuje lokalnu strelicu samo na <900px */
    .scroll-down-arrow {
        display: inline-block;
    }
    .fullpage-section#hero .scroll-down-arrow {
        bottom: 60px; /* Zadržava poziciju od 60px ("manje dole") */
    }

    .steps-container {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
        margin-top: 3rem;
    }
    .step-item {
        flex-basis: 100%; 
        max-width: 400px; 
    }

    .product-section .product-list-item,
    .product-section .product-list-item.reverse { 
        flex-direction: column; 
        text-align: center; 
        gap: 2.5rem; 
    }
    /* ... (ostatak media query-ja ostaje isti) ... */
    .product-description { margin-left: auto; margin-right: auto; }
    .product-title {
        font-size: clamp(2rem, 7vw, 2.8rem);
        margin-bottom: 1.5rem; 
    }
    .product-description {
        font-size: clamp(0.9rem, 2.5vw, 1rem);
        margin-bottom: 2rem; 
    }
    .product-price {
        font-size: clamp(1.1rem, 3vw, 1.2rem);
        margin-bottom: 2.5rem; 
    }
}

@media (max-width: 768px) {
    .footer-container { flex-direction: column; gap: 1.5rem; } 
}
@media (max-width: 600px) {
    .nav-menu { gap: 15px; }
    .nav-link { font-size: 11px; gap: 5px; letter-spacing: 1px; }
    .nav-link svg { width: 16px; height: 16px; }
}
@media (max-width: 500px) {
    .form-row { flex-direction: column; gap: 0; }
    .form-row .form-group { margin-bottom: 1.5rem; }
}
@media (max-width: 440px) {
    nav { padding: 0 1rem; }
    .nav-container { gap: 15px; }
    .nav-menu { gap: 10px; }
    .nav-link { letter-spacing: 0.5px; gap: 4px; }
    
    .product-section .product-list-item {
        gap: 2rem; 
    }
    .product-title { margin-bottom: 1rem; } 
    .product-description { margin-bottom: 1.5rem; } 
    .product-price { margin-bottom: 2rem; } 
    .steps-container {
        gap: 1.5rem;
    }
    .step-item {
        padding: 1.25rem;
    }
}


/* ===================================================================
   8. PODESAVANJA PO POZIVNICAMA (OPTIMIZOVANO)
   =================================================================== */
/* ... (Ovaj deo ostaje isti) ... */
#slajd,
#kapija {
    --desktop-width: 55%;
    --tablet-max-width: 500px;
    --mobile-max-width: 100%;
}
#slajd .product-list-image-wrapper,
#kapija .product-list-image-wrapper {
    flex-basis: var(--desktop-width);
}
#slajd .product-list-details,
#kapija .product-list-details {
    flex-basis: calc(100% - var(--desktop-width) - 4rem);
}
@media (max-width: 900px) {
    #slajd .product-list-image-wrapper,
    #kapija .product-list-image-wrapper {
        max-width: var(--tablet-max-width);
    }
}
@media (max-width: 480px) {
    #slajd .product-list-image-wrapper,
    #kapija .product-list-image-wrapper {
        max-width: var(--mobile-max-width);
    }
}

/* ===================================================================
   9. GLOBALNI STILOVI FORME (NOVO)
   =================================================================== */
/* ... (Ovaj deo ostaje isti) ... */
.order-button { 
    display: inline-block; background-color: transparent; color: var(--color-text); 
    border: 1px solid var(--color-text); padding: 14px 40px; text-decoration: none; 
    text-transform: uppercase; font-size: 12px; letter-spacing: 2px; 
    transition: all 0.3s ease; 
    font-family: var(--font-body);
    cursor: pointer;
}
.order-button:hover { 
    background-color: var(--color-text); color: var(--color-background); 
    transform: translateY(-2px); 
}
.form-row { display: flex; gap: 1.5rem; }
.form-row .form-group { flex-basis: 50%; }
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block; font-family: var(--font-body); text-transform: uppercase;
    font-size: 0.75rem; letter-spacing: 1.5px; color: var(--color-text-lighter); margin-bottom: 0.75rem;
}
.form-group input, .form-group textarea {
    width: 100%; resize: none; font-size: 1rem; font-family: var(--font-body);
    padding: 14px; border: 1px solid #e5e5e5; border-radius: 5px;
    background-color: #fdfdfd; transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: var(--color-text); box-shadow: 0 0 8px rgba(0,0,0,0.07);
}
.form-group input.is-invalid, 
.form-group textarea.is-invalid {
    border-color: #D32F2F;
}
.error-message {
    color: #D32F2F;
    font-size: 0.8rem;
    margin-top: 5px;
    height: 1em;
    display: block;
}