/* =========================================================
   BAGERI.BA - CLEAN STYLE.CSS
   Preuređena i skraćena verzija bez duplih AD/header blokova
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f2f4f7;
    color: #111827;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

h1, h2, h3, p {
    box-sizing: border-box;
}

/* =========================================================
   HEADER / NAVBAR
   ========================================================= */

.header {
    width: min(1280px, calc(100% - 30px));
    margin: 16px auto 22px;
    background: transparent !important;
    border: none !important;
    outline: 0 !important;
    border-radius: 0;
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: none !important;
    position: relative;
    z-index: 20;
    overflow: visible;
}

.header::before,
.header::after,
.header .top-nav::before,
.header .top-nav::after {
    content: none !important;
    display: none !important;
}

.logo-title {
    position: absolute;
    left: 22px;
    color: #f59e0b;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.logo-title a {
    color: #f59e0b;
    text-decoration: none;
}

.header .top-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.header .top-nav a {
    position: relative;
    color: #111827;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    text-decoration: none;
    font-weight: 900;
    font-size: 15px;
    padding: 10px 14px;
    border-radius: 12px;
    transition: 0.2s ease;
}

.header .top-nav a:hover {
    background: rgba(245, 158, 11, 0.08) !important;
    color: #d97706 !important;
}

.header .dark-toggle {
    position: absolute;
    right: 22px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.10);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 19px;
    transition: 0.18s ease;
    user-select: none;
}

.header .dark-toggle:hover {
    background: #f59e0b;
    color: #111827;
}

.header .hamburger {
    display: none;
}

@media (max-width: 760px) {
    .header {
        justify-content: space-between;
        padding: 14px 16px;
        margin-top: 12px;
        border-radius: 18px;
    }

    .logo-title {
        position: static;
        font-size: 20px;
    }

    .header .hamburger {
        display: flex;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: rgba(255,255,255,0.10);
        color: #fff;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 24px;
        order: 3;
    }

    .header .dark-toggle {
        position: static;
        order: 2;
    }

    .header .top-nav {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        background: #111827 !important;
        border-radius: 18px;
        padding: 12px !important;
        box-shadow: 0 16px 35px rgba(15,23,42,0.22) !important;
    }

    .header .top-nav.show,
    .header .top-nav.is-open {
        display: flex;
    }

    .header .top-nav a {
        width: 100%;
        text-align: center;
        padding: 13px 15px;
    }
}


/* Fallback ako postoji .top-nav direktno u body */
body > .top-nav {
    width: min(1280px, calc(100% - 30px));
    margin: 16px auto 22px;
    padding: 10px 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

body > .top-nav a {
    position: relative;
    color: #111827;
    text-decoration: none;
    font-weight: 900;
    font-size: 15px;
    padding: 10px 14px;
    border-radius: 12px;
    transition: 0.2s ease;
}

body > .top-nav a:hover {
    color: #d97706;
    background: rgba(245, 158, 11, 0.08);
}


@media (max-width: 760px) {
    .header .top-nav a {
        color: #e5e7eb !important;
    }

    .header .top-nav a:hover {
        color: #f59e0b !important;
        background: rgba(245, 158, 11, 0.14) !important;
    }
}

/* =========================================================
   LAYOUT / WRAPPERS
   ========================================================= */

.page-wrap {
    width: min(1200px, calc(100% - 30px));
    margin-left: auto;
    margin-right: auto;
}

.ad-page-wrap,
body:has(.ad-top-layout) .page-wrap {
    width: min(1280px, calc(100% - 30px));
    max-width: 1280px;
}

.page-wrap.profile-page {
    width: min(980px, calc(100% - 30px));
    margin-left: auto;
    margin-right: auto;
}

/* =========================================================
   HERO / LOGO SAJTA
   ========================================================= */

.hero-box,
.form-hero {
    background: linear-gradient(135deg, #1f2937, #374151);
    color: #fff;
    border-radius: 22px;
    padding: 32px;
    margin-bottom: 22px;
}

.hero-box h1,
.form-hero h1 {
    margin: 0 0 8px;
    font-size: 34px;
    color: #fff;
    text-align: left;
}

.hero-box p,
.form-hero p {
    margin: 0;
    color: #d1d5db;
}

.site-main-logo,
.clean-logo-box,
.site-logo-box {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    text-align: center;
    padding: 8px 15px 18px !important;
    margin-bottom: 16px !important;
}

.site-main-logo img,
.clean-logo-box img,
.site-logo-box img {
    max-width: 520px !important;
    width: 100%;
    height: auto;
    display: inline-block;
}

/* =========================================================
   PROIZVOĐAČI / LOGOTIPOVI
   ========================================================= */

.brand-section {
    max-width: 1320px;
    margin: 0 auto 24px;
    padding: 0 20px;
    background: transparent;
}

.section-title {
    margin-bottom: 8px;
}

.section-title h2,
.ads-section-head h2,
.profile-section-head h2 {
    margin: 0 0 5px;
    font-size: 26px;
    color: #111827;
}

.section-title p,
.ads-section-head p,
.profile-section-head p {
    margin: 0;
    color: #6b7280;
}

.brand-slider {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 18px 4px 22px;
    scroll-behavior: smooth;
}

.brand-slider::-webkit-scrollbar {
    height: 8px;
}

.brand-slider::-webkit-scrollbar-track {
    background: #e9edf2;
    border-radius: 20px;
}

.brand-slider::-webkit-scrollbar-thumb {
    background: #b9c1cc;
    border-radius: 20px;
}

.brand-item{
    min-width: 118px;
    width: 118px;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: center;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-logo-circle{
    width: 92px;
    height: 92px;
    border-radius: 50%;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e7ee;
    box-shadow: 0 6px 18px rgba(18, 38, 63, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin: 0 auto 9px;
    flex: 0 0 92px;
}

.brand-logo-circle img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 0;
}

.brand-name{
    display: block;
    width: 100%;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #344054;
    white-space: nowrap;
    line-height: 1.2;
}
.brand-item:hover .brand-logo-circle {
    transform: translateY(-3px);
    border-color: #f59e0b;
    box-shadow: 0 10px 24px rgba(18, 38, 63, 0.14);
}

.brand-item.active .brand-logo-circle {
    border: 3px solid #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.brand-item.active .brand-name {
    color: #111827;
}

/* =========================================================
   SEARCH / FILTER
   ========================================================= */

.power-search-wrap {
    margin: 0 0 30px;
    padding: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.power-search-form {
    display: grid !important;
    grid-template-columns: 1.25fr 1.05fr 1.05fr 0.75fr 0.85fr 0.95fr auto;
    gap: 11px;
    align-items: end;
    background: linear-gradient(135deg, #111827, #1f2937 55%, #2b3445) !important;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 22px;
    padding: 16px !important;
    margin: 0 !important;
    box-shadow: 0 15px 38px rgba(15, 23, 42, 0.20) !important;
}

.power-search-title {
    height: 50px;
    border-radius: 15px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 13px;
}

.power-search-title span {
    color: #d1d5db;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1;
}

.power-search-title strong {
    color: #f59e0b;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.1;
}

.power-field {
    min-width: 0;
}

.power-field label {
    display: block;
    color: #e5e7eb;
    font-weight: 800;
    font-size: 12px;
    margin-bottom: 6px;
}

.power-field input,
.power-field select {
    width: 100%;
    height: 50px;
    min-width: 0 !important;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.18);
    background: #ffffff;
    color: #111827;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
    box-shadow: none;
}

.power-field input:focus,
.power-field select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245,158,11,0.18);
}

.power-actions {
    display: flex;
    gap: 8px;
    align-items: end;
}

.power-actions button,
.power-actions a {
    height: 50px;
    min-width: 0 !important;
    border-radius: 15px;
    padding: 0 15px;
    font-weight: 900;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.power-actions button {
    background: #f59e0b;
    color: #111827;
    border: none;
    cursor: pointer;
}

.power-actions a {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.18);
}

@media (max-width: 1200px) {
    .power-search-form {
        grid-template-columns: repeat(3, 1fr);
    }

    .power-search-title,
    .power-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 650px) {
    .power-search-form {
        grid-template-columns: 1fr;
    }

    .power-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .power-actions button,
    .power-actions a {
        width: 100%;
    }
}

/* =========================================================
   KARTICE OGLASA / INDEX
   ========================================================= */

.ads-section {
    margin-top: 25px;
}

.ads-section-head {
    margin-bottom: 16px;
}

.ads-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    padding: 0;
    max-width: none;
    margin: 0;
}

.ad-card,
.modern-ad-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: #111827;
    box-shadow: 0 8px 25px rgba(0,0,0,0.07);
    transition: 0.22s ease;
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 1px solid #eef0f3;
}

.modern-ad-card:hover,
.ad-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 35px rgba(0,0,0,0.12);
    border-color: #f59e0b;
}

.ad-image-box {
    position: relative;
    width: 100%;
    height: 190px;
    background: #f3f4f6;
    overflow: hidden;
}

.ad-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: 0.25s ease;
}

.modern-ad-card:hover .ad-image-box img,
.ad-card:hover .ad-image-box img {
    transform: scale(1.04);
}

.ad-image-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    background: rgba(17, 24, 39, 0.88);
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.ad-card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.ad-card-top {
    display: flex;
    align-items: center;
    gap: 11px;
}

.ad-brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 46px;
}

.ad-brand-logo img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
}

.ad-title-box h3 {
    margin: 0 0 4px;
    font-size: 17px;
    line-height: 1.25;
    color: #111827;
}

.ad-power,
.ad-description {
    color: #6b7280;
}

.ad-price-row {
    background: #111827;
    color: #fff;
    border-radius: 14px;
    padding: 12px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ad-price-row span {
    font-size: 13px;
    color: #d1d5db;
    font-weight: 700;
}

.ad-price-row strong {
    color: #f59e0b;
    font-size: 18px;
    white-space: nowrap;
}

.ad-simple-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ad-simple-meta span {
    flex: 1;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 13px;
    padding: 10px;
    color: #111827;
    font-weight: 800;
    font-size: 14px;
    text-align: center;
}

.view-ad {
    margin-top: auto;
    background: #f59e0b;
    color: #111827;
    border-radius: 13px;
    padding: 11px 12px;
    text-align: center;
    font-weight: 900;
    font-size: 14px;
}

.no-results {
    grid-column: 1 / -1;
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    color: #6b7280;
    font-weight: 700;
}

@media (max-width: 1150px) {
    .ads-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .ads-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .ads-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .ad-image-box {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .ad-card-body {
        padding: 10px;
        gap: 9px;
    }

    .ad-title-box h3 {
        font-size: 14px;
        line-height: 1.25;
    }

    .ad-price-row {
        padding: 9px 10px;
    }

    .ad-price-row strong {
        font-size: 15px;
    }

    .ad-simple-meta span {
        padding: 7px 6px;
        font-size: 11px;
    }

    .view-ad {
        padding: 9px 8px;
        font-size: 12px;
    }
}

@media (max-width: 390px) {
    .ads-container {
        grid-template-columns: 1fr;
    }

    .ad-image-box {
        aspect-ratio: 4 / 3;
    }
}

/* =========================================================
   FORME / LOGIN / REGISTER / ADD_AD
   ========================================================= */

.login-page {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.22), transparent 35%),
        linear-gradient(135deg, #111827, #1f2937 45%, #374151);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
}

.login-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.register-card {
    max-width: 520px;
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg, #f59e0b, #111827, #f59e0b);
}

.login-logo,
.login-title,
.login-bottom,
.login-back {
    text-align: center;
}

.login-logo img {
    max-width: 330px;
    width: 100%;
    height: auto;
}

.login-title h1 {
    margin: 0 0 8px;
    font-size: 30px;
    color: #111827;
}

.login-title p,
.login-bottom p,
.login-back a {
    color: #6b7280;
}

.login-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 14px;
}

.login-form,
.modern-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.login-field label,
.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 800;
    color: #111827;
    font-size: 14px;
}

.login-field input,
.login-field select,
.login-field textarea,
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 0 14px;
    font-size: 15px;
    outline: none;
    transition: 0.2s ease;
    background: #f9fafb;
}

.login-field input,
.login-field select,
.form-group input,
.form-group select {
    height: 48px;
}

.login-field textarea,
.form-group textarea {
    min-height: 110px;
    padding-top: 14px;
    resize: vertical;
}

.login-field input:focus,
.login-field select:focus,
.login-field textarea:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #f59e0b;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.login-btn,
.form-actions button {
    height: 50px;
    border: none;
    border-radius: 14px;
    background: #f59e0b;
    color: #111827;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    padding: 0 22px;
}

.login-bottom {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

.login-bottom a,
.form-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #111827;
    color: #fff;
    text-decoration: none;
    padding: 11px 18px;
    border-radius: 12px;
    font-weight: 800;
}

.modern-form-card,
.profile-panel,
.profile-ads-box {
    background: #fff;
    border-radius: 22px;
    padding: 26px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.form-section-title {
    margin: 10px 0 0;
    padding: 18px;
    background: #111827;
    color: #fff;
    border-radius: 16px;
}

.form-section-title h2 {
    margin: 0 0 5px;
    font-size: 22px;
    color: #fff;
}

.form-section-title p {
    margin: 0;
    color: #d1d5db;
    font-size: 14px;
}

.company-fields {
    margin-top: 16px;
    padding: 16px;
    border-radius: 18px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.company-fields h3 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 20px;
}

.current-company-logo {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.current-company-logo img {
    max-width: 160px;
    max-height: 80px;
    object-fit: contain;
}

/* =========================================================
   PROFILE
   ========================================================= */

.profile-page {
    padding-top: 10px;
    padding-bottom: 35px;
}

.profile-user-box {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f59e0b;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 900;
    flex: 0 0 64px;
}

.profile-user-info h1 {
    margin: 0 0 4px;
    font-size: 26px;
    color: #111827;
}

.profile-user-info p {
    margin: 0;
    color: #6b7280;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.profile-info-item,
.stat-box {
    background: #f9fafb;
    border-radius: 14px;
    padding: 13px 14px;
    border: 1px solid #e5e7eb;
}

.profile-info-item span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 5px;
}

.profile-info-item strong {
    display: block;
    color: #111827;
    font-size: 15px;
}

.profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-primary-btn,
.profile-secondary-btn,
.profile-edit-btn,
.profil-main-btn,
.profil-secondary-btn {
    height: 43px;
    border-radius: 13px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 900;
    font-size: 14px;
}

.profile-primary-btn,
.profil-main-btn,
.profile-edit-btn {
    background: #f59e0b;
    color: #111827;
}

.profile-secondary-btn,
.profil-secondary-btn {
    background: #111827;
    color: #fff;
}

.profile-ad-row {
    display: grid;
    grid-template-columns: 54px 1fr auto auto;
    align-items: center;
    gap: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px;
    text-decoration: none;
    color: #111827;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    margin-top: 45px;
    background: #111827;
    color: #d1d5db;
    padding: 28px 15px 18px;
}

.footer-inner,
.footer-bottom {
    width: min(1200px, calc(100% - 30px));
    margin-left: auto;
    margin-right: auto;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-brand strong {
    color: #f59e0b;
    font-size: 20px;
}

.footer-brand span,
.footer-bottom {
    color: #d1d5db;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #e5e7eb;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.footer-links a:hover {
    color: #f59e0b;
}

.footer-bottom {
    margin-top: 15px;
    text-align: center;
    color: #9ca3af;
}

@media (max-width: 700px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

/* =========================================================
   DARK MODE
   ========================================================= */

body.dark {
    background: #151922;
    color: #e5e7eb;
}

body.dark .header {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.dark .header .top-nav,
body.dark .header .top-nav.show {
    background: transparent !important;
}

body.dark .header .top-nav a,
body.dark > .top-nav a {
    color: #e5e7eb !important;
}

@media (max-width: 760px) {
    body.dark .header .top-nav {
        background: #1f2937 !important;
    }
}

body.dark .hero-box,
body.dark .form-hero {
    background: linear-gradient(135deg, #111827, #253044);
}

body.dark .section-title h2,
body.dark .ads-section-head h2,
body.dark .profile-section-head h2,
body.dark .profile-user-info h1,
body.dark .form-hero h1,
body.dark .ad-title-main h1,
body.dark .ad-basic-item strong,
body.dark .ad-spec-item strong,
body.dark .ad-description-section h3,
body.dark .seller-mini-head h2,
body.dark .seller-mini-info strong {
    color: #ffffff;
}

body.dark .section-title p,
body.dark .ads-section-head p,
body.dark .profile-section-head p,
body.dark .profile-user-info p,
body.dark .ad-title-main p,
body.dark .ad-title-main span,
body.dark .ad-basic-item span,
body.dark .ad-spec-item span,
body.dark .seller-mini-head span,
body.dark .seller-mini-info span,
body.dark .ad-spec-head p {
    color: #aeb7c6;
}

body.dark .modern-ad-card,
body.dark .ad-card,
body.dark .modern-form-card,
body.dark .profile-panel,
body.dark .profile-ads-box,
body.dark .ad-main-gallery,
body.dark .seller-side-card,
body.dark .ad-title-price-full,
body.dark .ad-basic-section,
body.dark .ad-spec-section,
body.dark .ad-description-section,
body.dark .login-card,
body.dark .company-fields,
body.dark .current-company-logo {
    background: #1f2937;
    color: #e5e7eb;
    border-color: rgba(255,255,255,0.08);
}

body.dark .ad-card-body {
    background: #1f2937;
}

body.dark .ad-price-row,
body.dark .ad-title-price,
body.dark .ad-big-slider,
body.dark .ad-main-gallery .slider-container,
body.dark .seller-mini-info div,
body.dark .ad-title-logo,
body.dark .ad-basic-item,
body.dark .ad-spec-item,
body.dark input,
body.dark select,
body.dark textarea,
body.dark .login-field input,
body.dark .login-field select,
body.dark .login-field textarea,
body.dark .form-group input,
body.dark .form-group select,
body.dark .form-group textarea {
    background: #111827;
    color: #ffffff;
    border-color: rgba(255,255,255,0.12);
}

body.dark .brand-logo-circle {
    background: #ffffff;
    border-color: #e5e7eb;
}

body.dark .brand-name {
    color: #e5e7eb;
}

body.dark .site-footer {
    background: #0f172a;
    color: #aeb7c6;
}

/* ================= PROFILE.PHP - MODERNI OGLASI FIRME ================= */

.profile-ads-modern {
    background: #ffffff;
    border-radius: 26px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    border: 1px solid #eef0f3;
}

.profile-ads-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.profile-ads-head h2 {
    margin: 0 0 5px;
    color: #111827;
    font-size: 28px;
}

.profile-ads-head p {
    margin: 0;
    color: #6b7280;
    font-weight: 700;
}

.profile-add-ad-btn {
    height: 46px;
    border-radius: 14px;
    padding: 0 18px;
    background: #f59e0b;
    color: #111827;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    white-space: nowrap;
}

.profile-add-ad-btn:hover {
    background: #d97706;
}

.profile-ad-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.profile-modern-ad-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    overflow: hidden;
    text-decoration: none;
    color: #111827;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
    transition: 0.22s ease;
    display: flex;
    flex-direction: column;
}

.profile-modern-ad-card:hover {
    transform: translateY(-4px);
    border-color: #f59e0b;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.13);
}

.profile-ad-image {
    position: relative;
    height: 190px;
    background: #f3f4f6;
    overflow: hidden;
}

.profile-ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: 0.25s ease;
}

.profile-modern-ad-card:hover .profile-ad-image img {
    transform: scale(1.04);
}

.profile-ad-image span {
    position: absolute;
    left: 12px;
    top: 12px;
    background: rgba(17, 24, 39, 0.88);
    color: #ffffff;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 900;
}

.profile-ad-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 13px;
    flex: 1;
}

.profile-ad-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-ad-brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 48px;
}

.profile-ad-brand-logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
}

.profile-ad-title-row h3 {
    margin: 0 0 4px;
    font-size: 18px;
    color: #111827;
    line-height: 1.25;
}

.profile-ad-title-row p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
}

.profile-ad-price-box {
    background: #111827;
    color: #ffffff;
    border-radius: 15px;
    padding: 13px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-ad-price-box span {
    color: #d1d5db;
    font-size: 13px;
    font-weight: 800;
}

.profile-ad-price-box strong {
    color: #f59e0b;
    font-size: 19px;
    white-space: nowrap;
}

.profile-ad-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 11px;
}

.profile-ad-meta-grid div {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 11px;
}

.profile-ad-meta-grid span {
    display: block;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 5px;
}

.profile-ad-meta-grid strong {
    display: block;
    color: #111827;
    font-size: 14px;
}

.profile-ad-footer {
    margin-top: auto;
    background: #f59e0b;
    color: #111827;
    border-radius: 14px;
    padding: 12px;
    text-align: center;
    font-weight: 900;
}

.profile-modern-ad-card:hover .profile-ad-footer {
    background: #d97706;
}

.profile-empty-modern {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 20px;
    padding: 34px;
    text-align: center;
}

.profile-empty-modern h3 {
    margin: 0 0 8px;
    color: #111827;
}

.profile-empty-modern p {
    margin: 0 0 16px;
    color: #6b7280;
    font-weight: 700;
}

.profile-empty-modern a {
    display: inline-flex;
    height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    background: #111827;
    color: #ffffff;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 900;
}

/* Dark mode */
body.dark .profile-ads-modern,
body.dark .profile-modern-ad-card {
    background: #1f2937;
    border-color: rgba(255,255,255,0.08);
}

body.dark .profile-ads-head h2,
body.dark .profile-ad-title-row h3,
body.dark .profile-ad-meta-grid strong,
body.dark .profile-empty-modern h3 {
    color: #e5e7eb;
}

body.dark .profile-ads-head p,
body.dark .profile-ad-title-row p,
body.dark .profile-ad-meta-grid span,
body.dark .profile-empty-modern p {
    color: #9ca3af;
}

body.dark .profile-ad-brand-logo,
body.dark .profile-ad-meta-grid div,
body.dark .profile-empty-modern {
    background: #111827;
    border-color: rgba(255,255,255,0.08);
}

/* Responsive */
@media (max-width: 1100px) {
    .profile-ad-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .profile-ads-head {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-add-ad-btn {
        width: 100%;
    }

    .profile-ad-grid {
        grid-template-columns: 1fr;
    }

    .profile-ad-image {
        height: 220px;
    }
}

/* Bijela pozadina slike na karticama oglasa */
.ad-image-box {
    background: #ffffff !important;
}

.ad-image-box img {
    background: #ffffff !important;
}

/* ================= DUGME UREDI OGLAS NA AD.PHP ================= */

.ad-title-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.edit-ad-btn {
    height: 46px;
    border-radius: 15px;
    background: #f59e0b;
    color: #111827;
    text-decoration: none;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    transition: 0.2s ease;
    white-space: nowrap;
}

.edit-ad-btn:hover {
    background: #d97706;
    color: #111827;
    transform: translateY(-1px);
}

/* ako je cijena u novom wrapperu */
.ad-title-actions .ad-title-price {
    margin: 0;
}

/* dark mode */
body.dark .edit-ad-btn {
    background: #f59e0b;
    color: #111827;
}

body.dark .edit-ad-btn:hover {
    background: #d97706;
}

/* mobile */
@media (max-width: 750px) {
    .ad-title-actions {
        width: 100%;
    }

    .edit-ad-btn {
        width: 100%;
    }
}

/* ================= BAGERI.BA - INDUSTRIJSKI AD.PHP ================= */

.bager-detail-wrap {
    width: min(1280px, calc(100% - 30px));
    margin: 0 auto 46px;
}

.bager-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: stretch;
}

.bager-gallery-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 30px;
    padding: 18px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.10);
    min-width: 0;
}

.bager-main-gallery {
    position: relative;
    height: 560px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid #eef0f3;
    overflow: hidden;
}

.bager-slider-track {
    height: 100%;
    display: flex;
    transition: transform 0.35s ease;
}

.bager-slider-track img {
    width: 100%;
    min-width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
    display: block;
}

.bager-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(17, 24, 39, 0.85);
    color: #ffffff;
    font-size: 34px;
    z-index: 5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bager-gallery-arrow.left {
    left: 16px;
}

.bager-gallery-arrow.right {
    right: 16px;
}

.bager-gallery-arrow:hover {
    background: #f59e0b;
    color: #111827;
}

.bager-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.bager-thumbs img {
    width: 94px;
    height: 68px;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid transparent;
    cursor: pointer;
    background: #ffffff;
    flex: 0 0 auto;
    transition: 0.18s ease;
}

.bager-thumbs img:hover {
    border-color: #f59e0b;
    transform: translateY(-2px);
}

.bager-side-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bager-price-panel {
    background: #111827;
    border-radius: 26px;
    padding: 24px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.bager-price-panel span {
    display: block;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.bager-price-panel strong {
    display: block;
    color: #f59e0b;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 950;
    white-space: nowrap;
}

.bager-seller-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 26px;
    padding: 18px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.09);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.bager-seller-logo {
    height: 118px;
    border-radius: 18px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 14px;
}

.bager-seller-logo img {
    max-width: 82%;
    max-height: 88px;
    object-fit: contain;
}

.bager-seller-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f59e0b;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 950;
}

.bager-seller-title {
    text-align: center;
    margin-bottom: 15px;
}

.bager-seller-title span {
    display: block;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.bager-seller-title h2 {
    margin: 0 0 4px;
    color: #111827;
    font-size: 22px;
    line-height: 1.2;
}

.bager-seller-title p {
    margin: 0;
    color: #f59e0b;
    font-weight: 900;
    font-size: 13px;
}

.bager-seller-info {
    display: grid;
    gap: 9px;
    margin-bottom: 14px;
}

.bager-seller-info div {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 11px;
}

.bager-seller-info span {
    display: block;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 4px;
}

.bager-seller-info strong {
    display: block;
    color: #111827;
    font-size: 14px;
    word-break: break-word;
}

.bager-call-btn,
.bager-edit-btn {
    min-height: 46px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 950;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.bager-call-btn {
    background: #111827;
    color: #ffffff;
    margin-top: auto;
}

.bager-call-btn:hover {
    background: #f59e0b;
    color: #111827;
}

.bager-edit-btn {
    background: #f59e0b;
    color: #111827;
    margin-top: 10px;
}

.bager-edit-btn:hover {
    background: #d97706;
    color: #111827;
}

/* ================= INDUSTRIJSKI DONJI DIO ================= */

.machine-identity-bar {
    margin-top: 26px;
    background: #111827;
    border-radius: 28px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
    border-left: 8px solid #f59e0b;
}

.machine-identity-bar span {
    display: block;
    color: #f59e0b;
    font-size: 13px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 7px;
}

.machine-identity-bar h1 {
    margin: 0 0 7px;
    color: #ffffff;
    font-size: 42px;
    line-height: 1.08;
}

.machine-identity-bar p {
    margin: 0;
    color: #cbd5e1;
    font-weight: 800;
}

.machine-identity-logo {
    width: 92px;
    height: 92px;
    border-radius: 24px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 92px;
}

.machine-identity-logo img {
    max-width: 74px;
    max-height: 74px;
    object-fit: contain;
}

.machine-tech-dashboard {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1.05fr 1fr 1fr;
    gap: 18px;
}

.machine-tech-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    padding: 22px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
}

.machine-tech-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 22px;
    right: 22px;
    height: 5px;
    border-radius: 999px;
    background: #111827;
}

.machine-tech-panel.accent-yellow::before {
    background: #f59e0b;
}

.machine-panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.machine-panel-head span {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #111827;
    color: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    font-size: 14px;
}

.machine-tech-panel.accent-yellow .machine-panel-head span {
    background: #f59e0b;
    color: #111827;
}

.machine-panel-head h2 {
    margin: 0;
    color: #111827;
    font-size: 23px;
    line-height: 1.15;
}

.machine-data-list {
    display: grid;
    gap: 10px;
}

.machine-data-list div {
    padding: 13px 0;
    border-bottom: 1px solid #eef0f3;
    display: grid;
    grid-template-columns: 145px 1fr;
    gap: 12px;
    align-items: start;
}

.machine-data-list div:last-child {
    border-bottom: none;
}

.machine-data-list span {
    color: #6b7280;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}

.machine-data-list strong {
    color: #111827;
    font-size: 15px;
    line-height: 1.35;
    word-break: break-word;
}

.machine-all-specs {
    margin-top: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.machine-all-specs-head {
    margin-bottom: 18px;
}

.machine-all-specs-head span {
    display: block;
    color: #f59e0b;
    font-size: 13px;
    font-weight: 950;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.machine-all-specs-head h2 {
    margin: 0;
    color: #111827;
    font-size: 28px;
}

.machine-all-specs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.machine-all-specs-grid div {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
}

.machine-all-specs-grid span {
    display: block;
    color: #6b7280;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.machine-all-specs-grid strong {
    color: #111827;
    font-size: 15px;
}

.machine-description-industrial {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    padding: 26px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.machine-description-title {
    background: #f59e0b;
    border-radius: 22px;
    padding: 22px;
    color: #111827;
}

.machine-description-title span {
    display: block;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.machine-description-title h2 {
    margin: 0;
    font-size: 27px;
    line-height: 1.15;
}

.machine-description-text {
    color: #374151;
    line-height: 1.75;
    font-size: 16px;
    background: #f9fafb;
    border-radius: 22px;
    padding: 22px;
    border: 1px solid #eef0f3;
}

.machine-description-text p {
    margin: 0;
}

.machine-contact-strip {
    margin-top: 24px;
    background: linear-gradient(135deg, #111827, #1f2937);
    border-radius: 26px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    box-shadow: 0 16px 38px rgba(15,23,42,.18);
}

.machine-contact-strip span {
    display: block;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 5px;
}

.machine-contact-strip strong {
    display: block;
    color: #ffffff;
    font-size: 24px;
}

.machine-contact-strip a {
    min-height: 48px;
    padding: 0 24px;
    border-radius: 15px;
    background: #f59e0b;
    color: #111827;
    text-decoration: none;
    font-weight: 950;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.machine-contact-strip a:hover {
    background: #d97706;
}

/* DARK MODE */
body.dark .bager-gallery-card,
body.dark .bager-seller-card,
body.dark .machine-tech-panel,
body.dark .machine-all-specs,
body.dark .machine-description-industrial {
    background: #1f2937;
    border-color: rgba(255,255,255,.08);
}

body.dark .bager-main-gallery,
body.dark .bager-slider-track img,
body.dark .bager-thumbs img,
body.dark .bager-seller-logo,
body.dark .machine-description-text,
body.dark .machine-all-specs-grid div {
    background: #111827;
    border-color: rgba(255,255,255,.08);
}

body.dark .bager-seller-info div {
    background: #111827;
    border-color: rgba(255,255,255,.08);
}

body.dark .bager-seller-title h2,
body.dark .bager-seller-info strong,
body.dark .machine-panel-head h2,
body.dark .machine-data-list strong,
body.dark .machine-all-specs-head h2,
body.dark .machine-all-specs-grid strong {
    color: #e5e7eb;
}

body.dark .bager-seller-title span,
body.dark .bager-seller-info span,
body.dark .machine-data-list span,
body.dark .machine-all-specs-grid span,
body.dark .machine-description-text {
    color: #9ca3af;
}

body.dark .machine-data-list div {
    border-color: rgba(255,255,255,.08);
}

/* RESPONSIVE */
@media (max-width: 1120px) {
    .bager-hero-layout {
        grid-template-columns: 1fr;
    }

    .bager-side-panel {
        display: grid;
        grid-template-columns: 1fr 1.4fr;
    }

    .machine-tech-dashboard {
        grid-template-columns: 1fr;
    }

    .machine-all-specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .machine-description-industrial {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .bager-main-gallery {
        height: 330px;
    }

    .bager-side-panel {
        display: flex;
    }

    .bager-price-panel strong {
        font-size: 28px;
    }

    .machine-identity-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .machine-identity-bar h1 {
        font-size: 30px;
    }

    .machine-data-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .machine-all-specs-grid {
        grid-template-columns: 1fr;
    }

    .machine-contact-strip {
        flex-direction: column;
        align-items: stretch;
    }

    .machine-contact-strip a {
        width: 100%;
    }
}

.ad-image-box{
    position: relative;
}

.save-heart{
    position: absolute;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.94);
    color: #111827;
    font-size: 28px;
    font-weight: 900;
    line-height: 42px;
    text-align: center;
    cursor: pointer;
    z-index: 8;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    transition: 0.18s ease;
    user-select: none;
}

.save-heart:hover{
    transform: scale(1.08);
    color: #dc2626;
}

.save-heart.saved{
    background: #dc2626;
    color: #ffffff;
}

.save-heart.saved:hover{
    background: #b91c1c;
    color: #ffffff;
}

.ad-simple-meta{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.ad-simple-meta span{
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 13px;
    padding: 9px 8px;
    color: #111827;
    font-weight: 800;
    font-size: 13px;
    text-align: center;
}

.profile-modern-ad-card{
    position: relative;
}

.remove-saved-x{
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.88);
    color: #ffffff;
    font-size: 28px;
    font-weight: 900;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    z-index: 50;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    transition: 0.18s ease;
}

.remove-saved-x:hover{
    background: #dc2626;
    transform: scale(1.08);
}

/* ================= PROFILE.PHP - ŠIRI PANEL FIRME ================= */

.page-wrap.profile-page{
    width: min(1380px, calc(100% - 30px)) !important;
    max-width: 1380px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.profile-panel{
    padding: 30px !important;
    border-radius: 30px !important;
}

.profile-info-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
}

.profile-ad-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
}

@media (max-width: 1200px){
    .profile-info-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .profile-ad-grid{
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 900px){
    .profile-ad-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px){
    .page-wrap.profile-page{
        width: calc(100% - 18px) !important;
    }

    .profile-info-grid,
    .profile-ad-grid{
        grid-template-columns: 1fr !important;
    }
}

.rent-btn{
    background: #f59e0b !important;
    color: #111827 !important;
    border-radius: 999px !important;
    padding: 10px 18px !important;
    font-weight: 950 !important;
    box-shadow: 0 6px 16px rgba(245,158,11,.35) !important;
}

.rent-btn:hover{
    background: #d97706 !important;
    color: #111827 !important;
}

/* ================= IZNAJMI BAGER ================= */

.rent-page{
    padding-bottom: 45px;
}

.rent-hero{
    background:
        radial-gradient(circle at top left, rgba(245,158,11,.26), transparent 36%),
        linear-gradient(135deg, #111827, #1f2937 58%, #374151);
    border-radius: 30px;
    padding: 42px;
    color: #ffffff;
    margin-bottom: 24px;
    box-shadow: 0 16px 42px rgba(15,23,42,.18);
}

.rent-hero span{
    display: inline-flex;
    background: rgba(245,158,11,.16);
    color: #fbbf24;
    border: 1px solid rgba(245,158,11,.35);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 950;
    margin-bottom: 12px;
}

.rent-hero h1{
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 44px;
}

.rent-hero p{
    margin: 0;
    color: #d1d5db;
    font-size: 17px;
    max-width: 720px;
    line-height: 1.6;
}

.rent-layout{
    display: grid;
    grid-template-columns: 0.9fr 1.25fr;
    gap: 22px;
    align-items: start;
}

.rent-info-card,
.rent-form-card{
    background: #ffffff;
    border: 1px solid #eef0f3;
    border-radius: 26px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15,23,42,.07);
}

.rent-info-card h2,
.rent-form-card h2{
    margin: 0 0 14px;
    color: #111827;
    font-size: 28px;
}

.rent-form-card > p{
    margin: -6px 0 18px;
    color: #6b7280;
    font-weight: 700;
}

.rent-step{
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #eef0f3;
}

.rent-step:last-child{
    border-bottom: 0;
}

.rent-step > strong{
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f59e0b;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    flex: 0 0 42px;
}

.rent-step h3{
    margin: 0 0 5px;
    color: #111827;
}

.rent-step p{
    margin: 0;
    color: #6b7280;
    font-weight: 700;
    line-height: 1.5;
}

.rent-form{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.rent-field.full{
    grid-column: 1 / -1;
}

.rent-field label{
    display: block;
    margin-bottom: 7px;
    color: #111827;
    font-size: 14px;
    font-weight: 900;
}

.rent-field input,
.rent-field select,
.rent-field textarea{
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 15px;
    background: #f9fafb;
    color: #111827;
    font-size: 15px;
    outline: none;
}

.rent-field input,
.rent-field select{
    height: 50px;
    padding: 0 14px;
}

.rent-field textarea{
    min-height: 130px;
    padding: 14px;
    resize: vertical;
}

.rent-field input:focus,
.rent-field select:focus,
.rent-field textarea:focus{
    background: #ffffff;
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245,158,11,.16);
}

.rent-form button{
    grid-column: 1 / -1;
    height: 52px;
    border: 0;
    border-radius: 16px;
    background: #f59e0b;
    color: #111827;
    font-size: 16px;
    font-weight: 950;
    cursor: pointer;
}

.rent-form button:hover{
    background: #d97706;
}

.rent-success,
.rent-error{
    border-radius: 15px;
    padding: 13px 15px;
    font-weight: 900;
    margin-bottom: 16px;
}

.rent-success{
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.rent-error{
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

@media (max-width: 900px){
    .rent-layout{
        grid-template-columns: 1fr;
    }

    .rent-hero{
        padding: 30px;
    }

    .rent-hero h1{
        font-size: 34px;
    }
}

@media (max-width: 600px){
    .rent-form{
        grid-template-columns: 1fr;
    }
}

.profile-company-logo-box{
    width: 86px;
    height: 86px;
border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 86px;
    box-shadow: 0 8px 22px rgba(15,23,42,.08);
}

.profile-company-logo-box img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    background: #ffffff;
}

.profile-company-logo-box{
    width: 86px;
    height: 86px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 86px;
    box-shadow: 0 8px 22px rgba(15,23,42,.08);
}

.profile-company-logo-box img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    background: #ffffff;
    display: block;
}

.profile-company-logo-box{
    width: 96px;
    height: 96px;
    border-radius: 50px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 96px;
    box-shadow: 0 8px 22px rgba(15,23,42,.08);
    -webkit-border-radius: 50px;
    -moz-border-radius: 50px;
    -ms-border-radius: 50px;
    -o-border-radius: 50px;
}

.profile-company-logo-box img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    background: #ffffff;
    display: block;
}

.profile-company-logo-box img{
    border-radius: 50%;
}

select option:disabled{
    font-weight: 900;
    color: #111827;
    background: #f3f4f6;
}

/* ================= INDEX FILTER - FINALNO UJEDNAČENO ================= */

.page-wrap{
    width: min(1380px, calc(100% - 30px));
}

.power-search-form{
    display: flex !important;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px !important;
}

/* osnovna polja */
.power-search-form .power-field{
    min-width: 0 !important;
}

/* Vrsta mašine, proizvođač i model */
.power-search-form .power-field:has(#machine_type_id),
.power-search-form .power-field:has(#manufacturer_id),
.power-search-form .power-field:has(#model){
    flex: 1 1 190px;
}

/* Snaga od i Snaga do — iste širine */
.power-search-form .power-field:has(#power),
.power-search-form .power-field:has(#power_to){
    flex: 0 0 125px;
}

/* Cijena od i Cijena do — iste širine */
.power-search-form .power-field:has(#price_from),
.power-search-form .power-field:has(#price){
    flex: 0 0 145px;
}

/* Grad */
.power-search-form .power-field:has(#city){
    flex: 1 1 155px;
}

.power-search-form .power-field input,
.power-search-form .power-field select{
    width: 100% !important;
    min-width: 0 !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    font-size: 13px !important;
}

.power-actions{
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
}

.power-actions button,
.power-actions a{
    height: 50px;
    padding-left: 13px !important;
    padding-right: 13px !important;
    font-size: 13px !important;
}

/* glavna pretraga ispod logoa */
.main-search-bar{
    width: min(920px, calc(100% - 30px));
    margin: 0 auto 22px;
}

.main-search-form{
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #eef0f3;
    border-radius: 22px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(15,23,42,.07);
}

.main-search-form input[type="text"]{
    width: 100%;
    height: 54px;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    padding: 0 18px;
    font-size: 16px;
    font-weight: 700;
    outline: none;
    background: #f9fafb;
    color: #111827;
}

.main-search-form input[type="text"]:focus{
    background: #ffffff;
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245,158,11,.16);
}

.main-search-form button{
    height: 54px;
    border: 0;
    border-radius: 16px;
    padding: 0 24px;
    background: #f59e0b;
    color: #111827;
    font-weight: 950;
    cursor: pointer;
}

.main-search-form button:hover{
    background: #d97706;
}

@media (max-width: 900px){
    .power-search-form .power-field:has(#machine_type_id),
    .power-search-form .power-field:has(#manufacturer_id),
    .power-search-form .power-field:has(#model),
    .power-search-form .power-field:has(#city){
        flex: 1 1 220px;
    }

    .power-search-form .power-field:has(#power),
    .power-search-form .power-field:has(#power_to),
    .power-search-form .power-field:has(#price_from),
    .power-search-form .power-field:has(#price){
        flex: 1 1 140px;
    }

    .power-actions{
        flex: 1 1 100%;
    }
}

@media (max-width: 650px){
    .power-search-form{
        flex-direction: column;
        align-items: stretch;
    }

    .power-search-form .power-field,
    .power-actions{
        flex: 1 1 auto !important;
        width: 100%;
    }

    .power-actions{
        flex-direction: column;
    }

    .power-actions button,
    .power-actions a{
        width: 100%;
    }

    .main-search-form{
        grid-template-columns: 1fr;
    }

    .main-search-form button{
        width: 100%;
    }
}

.site-header{
    background: #111827;
    color: #fff;
    position: relative;
    z-index: 1000;
}

.header-inner{
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo{
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    text-decoration: none;
}

.top-nav{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.top-nav a{
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    padding: 9px 12px;
    border-radius: 10px;
    white-space: nowrap;
}

.top-nav a:hover{
    background: rgba(255,255,255,0.12);
}

.top-nav .rent-btn{
    background: #f59e0b;
    color: #111827;
}

.top-nav .rent-btn:hover{
    background: #fbbf24;
}

.footer-socials{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    margin-top:16px;
}

.footer-socials a{
    width:42px;
    height:42px;
    border-radius:50%;
    background:#111827;
    color:#ffffff;
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    transition:.18s ease;
    border:1px solid rgba(255,255,255,.12);
}

.footer-socials a svg{
    width:21px;
    height:21px;
    fill:currentColor;
    display:block;
}

.footer-socials a:hover{
    background:#f59e0b;
    color:#111827;
    transform:translateY(-2px);
}

.home-ad-banner{
    width:100%;
    max-width:900px;
    height:105px;
    margin:18px auto;
    border-radius:18px;
    overflow:hidden;
    background:#ffffff;
    box-shadow:0 8px 20px rgba(15,23,42,.08);
    border:1px solid #e5e7eb;
}

.home-ad-banner-middle{
    grid-column:1 / -1;
}

.home-ad-banner a{
    width:100%;
    height:100%;
    display:block;
    text-decoration:none;
}

.home-ad-banner img{
    width:100%;
    height:100%;
object-fit: fill;
    object-position:center;
    display:block;
    background:#ffffff;
}

.home-ad-banner:hover{
    box-shadow:0 12px 28px rgba(15,23,42,.12);
    transform:translateY(-2px);
    transition:.18s ease;
}

@media(max-width:768px){
    .home-ad-banner{
        max-width:100%;
        height:80px;
        margin:14px 0;
        border-radius:14px;
    }

    .home-ad-banner img{
        width:100%;
        height:100%;
        object-fit:contain;
        object-position:center;
    }
}

/* MOBILNI PRIKAZ AD.PHP - PRODAVAC PREKO CIJELE ŠIRINE */
@media (max-width: 991px){

    .bager-detail-wrap .bager-hero-layout{
        display:block !important;
        grid-template-columns:1fr !important;
        width:100% !important;
        max-width:100% !important;
    }

    .bager-detail-wrap .bager-gallery-card{
        display:block !important;
        width:100% !important;
        max-width:100% !important;
        margin-bottom:16px !important;
    }

    .bager-detail-wrap .bager-side-panel{
        display:block !important;
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
        margin:0 !important;
    }

    .bager-detail-wrap .bager-seller-card{
        display:block !important;
        width:100% !important;
        max-width:100% !important;
        min-width:0 !important;
        margin:0 !important;
        box-sizing:border-box !important;
    }

    .bager-detail-wrap .bager-seller-card-compact{
        width:100% !important;
        max-width:100% !important;
        box-sizing:border-box !important;
    }

    .bager-detail-wrap .bager-seller-compact-actions{
        width:100% !important;
        display:grid !important;
        grid-template-columns:1fr !important;
        gap:9px !important;
    }

    .bager-detail-wrap .bager-call-btn,
    .bager-detail-wrap .bager-edit-btn{
        width:100% !important;
        max-width:100% !important;
        box-sizing:border-box !important;
    }
}

.brand-slider-wrap{
    position:relative;
    width:100%;
    padding:0 52px;
    box-sizing:border-box;
}

.brand-slider{
    display:flex;
    gap:14px;
    overflow-x:auto;
    scroll-behavior:smooth;
    scrollbar-width:none;
    -ms-overflow-style:none;
    padding:6px 0;
}

.brand-slider::-webkit-scrollbar{
    display:none;
}

.brand-arrow{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:42px;
    height:42px;
    border:0;
    border-radius:50%;
    background:#ffffff;
    color:#111827;
    box-shadow:0 6px 18px rgba(15,23,42,.20);
    cursor:pointer;
    font-size:22px;
    font-weight:900;
    z-index:20;
    display:flex;
    align-items:center;
    justify-content:center;
}

.brand-arrow:hover{
    background:#f59e0b;
    color:#111827;
}

.brand-arrow-left{
    left:0;
}

.brand-arrow-right{
    right:0;
}

@media(max-width:768px){
    .brand-slider-wrap{
        padding:0 42px;
    }

    .brand-arrow{
        width:34px;
        height:34px;
        font-size:18px;
    }

    .brand-arrow-left{
        left:0;
    }

    .brand-arrow-right{
        right:0;
    }
}

/* MOBILNI HAMBURGER - BAGERI.BA */
@media (max-width: 760px) {
    .header .hamburger {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 44px !important;
        height: 44px !important;

        background: #f59e0b !important;
        color: #111827 !important;

        border: 2px solid #111827 !important;
        border-radius: 10px !important;

        font-size: 26px !important;
        font-weight: 900 !important;
        line-height: 1 !important;

        cursor: pointer !important;
        box-shadow: 0 3px 10px rgba(0,0,0,.22) !important;
    }

    .header .hamburger:hover,
    .header .hamburger:active {
        background: #ff8c00 !important;
        color: #000 !important;
    }
}

#machine_type_id option.machine-subgroup-title {
    font-weight: 700;
    color: #111827;
    background: #f3f4f6;
}

#machine_type_id option.machine-subgroup-child {
    font-weight: 400;
}
.footer-email {
    display: inline-block;
    margin-top: 8px;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.footer-email:hover {
    color: #f59e0b;
    text-decoration: underline;
}