/* Model-details page styles - Test-drive panel */
.td-panel-wrap {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 16px;
}
.td-panel {
    background: #FAFAFA;
    border-radius: 16px;
    border: 1px solid #E9E0E1;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}
.td-panel.open { max-height: 900px; opacity: 1; margin-top: 8px; }
.td-panel-inner { padding: 20px; }
.td-panel-title { font-size: 1rem; font-weight: 700; color: #0A0A0A; margin-bottom: 4px; }
.td-panel-sub { font-size: 0.78rem; color: #6A142C; font-weight: 600; margin-bottom: 16px; }
.td-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 8px rgba(0,0,0,0.07); margin-bottom: 10px; }
.td-field-row { display: flex; align-items: center; height: 64px; padding: 0 14px; gap: 10px; }
.td-field-icon { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: #F5F0F1; display: flex; align-items: center; justify-content: center; }
.td-field-icon svg { width: 18px; height: 18px; }
.td-field-body { flex: 1; position: relative; height: 100%; display: flex; align-items: center; }
.td-label { position: absolute; left: 0; top: 50%; transform: translateY(-50%); font-size: 0.82rem; color: #605153; pointer-events: none; transition: all 0.18s ease; transform-origin: left center; }
.td-label.floated { top: 12px; transform: translateY(0) scale(0.78); color: #6A142C; }
.td-input { width: 100%; height: 100%; border: none; outline: none; background: transparent; font-size: 0.82rem; font-family: "Inter", sans-serif; font-weight: 500; color: #0A0A0A; padding-top: 20px; padding-bottom: 0; }
.td-divider { height: 1px; background: #E9E0E1; margin: 0 14px; }
.td-checkbox-row { display: flex; align-items: center; padding: 0 14px; height: 50px; gap: 10px; }
.td-checkbox { width: 17px; height: 17px; accent-color: #6A142C; cursor: pointer; flex-shrink: 0; }
.td-checkbox-label { font-size: 0.82rem; color: #0A0A0A; cursor: pointer; user-select: none; }
.td-date-row { display: flex; align-items: center; height: 50px; padding: 0 14px; gap: 10px; cursor: pointer; position: relative; }
.td-date-display { flex: 1; font-size: 0.82rem; color: #605153; font-weight: 500; }
.td-date-display.has-value { color: #0A0A0A; }
.td-date-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.td-section-label { padding: 8px 14px 3px; font-size: 0.72rem; color: #605153; }
.td-termin-row { display: flex; padding: 0 14px 10px; gap: 8px; }
.td-termin-btn { flex: 1; height: 34px; border-radius: 8px; border: 1.5px solid #E9E0E1; background: transparent; font-size: 0.78rem; font-weight: 500; font-family: "Inter", sans-serif; color: #605153; cursor: pointer; transition: all 0.15s; }
.td-termin-btn.active { background: rgba(106,20,44,0.08); border-color: #6A142C; color: #6A142C; }
.td-policy-row { display: flex; align-items: flex-start; padding: 8px 14px 12px; gap: 8px; }
.td-policy-label { font-size: 0.76rem; color: #0A0A0A; line-height: 1.5; cursor: pointer; }
.td-policy-label a { color: #6A142C; }
.td-submit-btn { width: 100%; height: 48px; background: #6A142C; border: none; border-radius: 10px; color: #fff; font-size: 0.95rem; font-weight: 700; font-family: "Inter", sans-serif; cursor: pointer; transition: background 0.2s, transform 0.15s, box-shadow 0.2s; box-shadow: 0 4px 14px rgba(106,20,44,.3); display: flex; align-items: center; justify-content: center; gap: 8px; }
.td-submit-btn:hover:not(:disabled) { background: #800020; transform: translateY(-1px); }
.td-submit-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.td-alert { border-radius: 8px; padding: 10px 12px; font-size: 0.8rem; margin-bottom: 10px; display: none; line-height: 1.5; }
.td-alert.show { display: block; }
.td-alert.success { background: rgba(22,163,74,.1); border: 1px solid rgba(22,163,74,.25); color: #15803d; }
.td-alert.error { background: rgba(220,38,38,.1); border: 1px solid rgba(220,38,38,.25); color: #b91c1c; }
.td-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-radius: 50%; border-top-color: #fff; animation: tdPanelSpin 0.7s linear infinite; }
@keyframes tdPanelSpin { to { transform: rotate(360deg); } }
.td-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.td-panel-title { margin-bottom: 0 !important; }
.td-close-btn { width: 28px; height: 28px; border: none; background: #F5F0F1; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #6A142C; font-size: 16px; line-height: 1; transition: background 0.15s; flex-shrink: 0; }
.td-close-btn:hover { background: #EDE0E2; }
.td-panel.ponuda-mode #td-schedule-card { display: none; }

/* Model details page layout */
.md-page { max-width: 1280px; margin: 0 auto; padding: 24px 24px 60px; }
.md-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; margin-bottom: 24px; flex-wrap: wrap; }
.md-breadcrumb a { color: #6A142C; text-decoration: none; }
.md-breadcrumb a:hover { text-decoration: underline; }
.md-breadcrumb .sep { color: #6A7282; }
.md-breadcrumb .current { color: #1E2939; font-weight: 600; }
.md-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.md-hero { display: flex; flex-direction: column; gap: 20px; }
.md-hero-top { display: flex; gap: 24px; align-items: flex-start; }
.md-hero-img { width: 342px; flex-shrink: 0; border-radius: 16px; overflow: hidden; background: #101828; }
.md-hero-img img { width: 100%; height: 270px; object-fit: cover; display: block; }
.md-hero-info { flex: 1; display: flex; flex-direction: column; }
.md-hero-brand { font-size: 14px; color: #99A1AF; text-transform: capitalize; margin-bottom: 4px; }
.md-hero-model { font-size: 30px; font-weight: 900; color: #101828; line-height: 1.27; margin-bottom: 4px; }
.md-hero-pkg { font-size: 16px; color: #6A7282; margin-bottom: 8px; }
.md-hero-price { font-size: 36px; font-weight: 900; color: #6A142C; line-height: 1.1; margin: 4px 0 20px; }
.md-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.md-tile { background: #FAFAFA; border: 1px solid #E5E7EB; border-radius: 16px; padding: 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.md-tile__val { font-size: 15px; font-weight: 900; color: #6A142C; line-height: 1.4; }
.md-tile__lbl { font-size: 12px; color: #99A1AF; }
.md-tabs { display: flex; border-bottom: 2px solid #F3F4F6; margin: 0 0 20px; }
.md-tab { padding: 12px 24px; font-size: 14px; font-weight: 700; color: #99A1AF; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; font-family: inherit; }
.md-tab.active { color: #6A142C; border-bottom-color: #6A142C; }
.md-tab-panel { display: none; }
.md-tab-panel.active { display: block; }
.md-spec-card { background: #fff; border: 1px solid #F3F4F6; border-radius: 16px; overflow: hidden; margin-bottom: 20px; }
.md-spec-group-head { background: #F9FAFB; padding: 10px 24px; }
.md-spec-group-head span { font-size: 12px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: #0A0A0A; }
.md-spec-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; font-size: 14px; }
.md-spec-row:nth-child(even) { background: rgba(249,250,251,.4); }
.md-spec-row__label { color: #6A7282; }
.md-spec-row__value { color: #101828; font-weight: 700; text-align: right; }
.md-wip { text-align: center; padding: 48px 24px; color: #99A1AF; font-size: 15px; }
.md-wip strong { display: block; font-size: 22px; color: #1E2939; margin-bottom: 6px; }
.md-sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 80px; }
.md-contact-card { background: #fff; border: 1px solid #E5E7EB; border-radius: 16px; padding: 24px 21px; display: flex; flex-direction: column; gap: 16px; }
.md-contact-card__title { font-size: 16px; font-weight: 900; color: #101828; }
.md-contact-card__sub { font-size: 14px; color: #99A1AF; line-height: 1.6; margin-top: -8px; }
.md-contact-btn-p { width: 100%; height: 44px; background: #6A142C; color: #fff; border: none; border-radius: 16px; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; }
.md-contact-btn-p:hover { background: #800020; }
.md-contact-btn-o { width: 100%; height: 46px; background: transparent; color: #364153; border: 1px solid #E5E7EB; border-radius: 16px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; margin-top: 10px; }
.md-contact-btn-o:hover { border-color: #6A142C; color: #6A142C; }
.md-sidebar-banner-link { display: block; text-decoration: none; }
.md-ad { border: 1px dashed #D1D5DC; border-radius: 16px; height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.md-ad--real { border: none; height: auto; position: relative; overflow: hidden; padding: 0; display: block; border-radius: 16px; }
.md-ad--real img { width: 100%; height: auto; display: block; border-radius: 16px; }
.md-ad-real-badge { position: absolute; bottom: 6px; right: 8px; font-size: 9px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,0.65); }
.md-ad span { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; color: #99A1AF; }
.md-ad strong { font-size: 14px; font-weight: 700; color: #99A1AF; }
.md-similar { background: #fff; border: 1px solid #E5E7EB; border-radius: 16px; overflow: hidden; }
.md-similar__head { display: flex; align-items: center; gap: 8px; padding: 20px 21px 12px; }
.md-similar__head-bar { width: 4px; height: 20px; background: #6A142C; border-radius: 99px; }
.md-similar__head-title { font-size: 16px; font-weight: 900; color: #101828; }
.md-similar-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 21px; border-top: 1px solid #F3F4F6; text-decoration: none; }
.md-similar-item:hover { background: #FAFAFA; }
.md-similar-thumb { width: 64px; height: 44px; border-radius: 12px; background: #F3F4F6; object-fit: contain; flex-shrink: 0; }
.md-similar-info { display: flex; flex-direction: column; gap: 2px; }
.md-similar-name { font-size: 12px; font-weight: 700; color: #1E2939; line-height: 1.3; }
.md-similar-pkg { font-size: 12px; color: #99A1AF; }
.md-similar-price { font-size: 12px; font-weight: 900; color: #6A142C; }
.md-mobile-cta { display: none; }

/* Ad card content */
.md-ad-card-content { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.md-ad-card-pretitle { font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.5); }
.md-ad-card-title { font-size: 16px; font-weight: 800; color: #fff; line-height: 1.3; }
.md-ad-card-desc { font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.5; }
.md-ad-card-btn { display: inline-block; margin-top: 4px; padding: 7px 14px; background: rgba(255,255,255,.15); border-radius: 8px; font-size: 12px; font-weight: 700; color: #fff; }
.md-ad--light .md-ad-card-pretitle { color: rgba(30,30,30,.45); }
.md-ad--light .md-ad-card-title { color: #1E2939; }
.md-ad--light .md-ad-card-desc { color: rgba(30,30,30,.65); }
.md-ad--light .md-ad-card-btn { background: rgba(30,30,30,.09); color: #1E2939; }

@media (max-width: 1024px) {
    .md-layout { grid-template-columns: 1fr; }
    .md-sidebar { position: static; }
    .md-mobile-cta { display: flex; gap: 12px; margin-top: 16px; margin-bottom: 4px; }
    .md-mobile-cta .md-contact-btn-p { flex: 1; height: 46px; border-radius: 16px; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; background: #6A142C; color: #fff; border: none; }
    .md-mobile-cta .md-contact-btn-o { flex: 1; height: 46px; border-radius: 16px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; background: transparent; color: #364153; border: 1px solid #D1D5DC; margin-top: 0; }
    .md-sidebar-cta-hide { display: none; }
}

/* ── LEASING MODUL (sidebar) ── */
.md-leasing-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 20px 18px 18px;
}
.md-leasing-card__title {
    font-size: 15px;
    font-weight: 900;
    color: #101828;
    margin-bottom: 4px;
}
.md-leasing-card__sub {
    font-size: 13px;
    color: #99A1AF;
    line-height: 1.5;
    margin-bottom: 14px;
}
.md-leasing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.md-leasing-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 6px;
    aspect-ratio: 1;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s;
    text-decoration: none;
    overflow: hidden;
}
.md-leasing-icon:hover {
    border-color: #6A142C;
    box-shadow: 0 2px 12px rgba(106,20,44,0.15);
    transform: translateY(-2px);
}
.md-leasing-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}
@media (max-width: 1024px) {
    .md-leasing-card { display: none; }
}
