/* ==========================================================================
   MODEL DETAILS PAGE STYLES - WITH FULL TEST-DRIVE & OFFER FORM SUPPORT
   ========================================================================== */

/* ── 1. TEST-DRIVE & OFFER PANEL (td-panel) ── */
.td-panel-wrap {
    width: 100%;
    margin-top: 20px;
    z-index: 10;
}

.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: 950px;
    opacity: 1;
    margin-top: 10px;
}

.td-panel-inner {
    padding: 24px;
}

.td-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.td-panel-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0A0A0A;
    margin: 0;
}

.td-panel-sub {
    font-size: 0.85rem;
    color: #6A142C;
    font-weight: 700;
    margin: 0 0 16px;
}

.td-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #F5F0F1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6A142C;
    font-size: 18px;
    line-height: 1;
    transition: background 0.15s;
    flex-shrink: 0;
}

.td-close-btn:hover {
    background: #EDE0E2;
}

.td-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #E9E0E1;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
    margin-bottom: 12px;
}

.td-field-row {
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 16px;
    gap: 12px;
}

.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.84rem;
    color: #605153;
    pointer-events: none;
    transition: all 0.18s ease;
    transform-origin: left center;
}

.td-label.floated {
    top: 10px;
    transform: translateY(0) scale(0.78);
    color: #6A142C;
    font-weight: 700;
}

.td-input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.86rem;
    font-family: inherit;
    font-weight: 500;
    color: #0A0A0A;
    padding-top: 16px;
    padding-bottom: 0;
    box-sizing: border-box;
}

.td-divider {
    height: 1px;
    background: #F0E6E7;
    margin: 0 16px;
}

.td-checkbox-row {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 48px;
    gap: 10px;
}

.td-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #6A142C;
    cursor: pointer;
    flex-shrink: 0;
}

.td-checkbox-label {
    font-size: 0.84rem;
    color: #0A0A0A;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}

.td-date-row {
    display: flex;
    align-items: center;
    height: 50px;
    padding: 0 16px;
    gap: 12px;
    cursor: pointer;
    position: relative;
}

.td-date-display {
    flex: 1;
    font-size: 0.84rem;
    color: #605153;
    font-weight: 500;
}

.td-date-display.has-value {
    color: #0A0A0A;
    font-weight: 600;
}

.td-date-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.td-section-label {
    padding: 8px 16px 4px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #605153;
    margin: 0;
}

.td-termin-row {
    display: flex;
    padding: 0 16px 12px;
    gap: 10px;
}

.td-termin-btn {
    flex: 1;
    height: 38px;
    border-radius: 8px;
    border: 1.5px solid #E9E0E1;
    background: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    color: #605153;
    cursor: pointer;
    transition: all 0.15s;
}

.td-termin-btn.active {
    background: rgba(106, 20, 44, 0.08);
    border-color: #6A142C;
    color: #6A142C;
    font-weight: 700;
}

.td-policy-row {
    display: flex;
    align-items: flex-start;
    padding: 10px 16px 14px;
    gap: 10px;
}

.td-policy-label {
    font-size: 0.78rem;
    color: #4B5563;
    line-height: 1.5;
    cursor: pointer;
}

.td-policy-label a {
    color: #6A142C;
    text-decoration: underline;
}

.td-submit-btn {
    width: 100%;
    height: 48px;
    background: #6A142C;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(106, 20, 44, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.td-submit-btn:hover:not(:disabled) {
    background: #800020;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(106, 20, 44, 0.35);
}

.td-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.td-alert {
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.84rem;
    margin-bottom: 12px;
    display: none;
    line-height: 1.5;
    font-weight: 500;
}

.td-alert.show {
    display: block;
}

.td-alert.success {
    background: rgba(22, 163, 74, 0.12);
    border: 1px solid rgba(22, 163, 74, 0.3);
    color: #15803d;
}

.td-alert.error {
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #b91c1c;
}

.td-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #fff;
    animation: tdPanelSpin 0.7s linear infinite;
}

@keyframes tdPanelSpin {
    to { transform: rotate(360deg); }
}

/* When in 'Zatraži ponudu' mode, hide date & termin picker */
.td-panel.ponuda-mode #td-schedule-card {
    display: none;
}


/* ==========================================================================
   IMAGE OPTIMIZATION: SHIMMER SKELETON & BLUR-UP
   ========================================================================== */
.img-shimmer {
    position: relative;
    overflow: hidden;
    background-color: #F1F3F6;
}

.img-shimmer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(240, 242, 245, 0) 0%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(240, 242, 245, 0) 100%
    );
    background-size: 200% 100%;
    animation: imgShimmer 1.5s infinite linear;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.img-shimmer.img-loaded::before {
    opacity: 0;
    animation: none;
}

@keyframes imgShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.lazy-smooth-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: blur(8px);
    transform: scale(1.03);
    transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                filter 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: block;
}

.lazy-smooth-img.loaded,
.lazy-smooth-img.is-loaded {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}


/* ── 2. PAGE LAYOUT ── */
.md-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 24px 80px;
}

.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;
    transition: color 0.15s;
}

.md-breadcrumb a:hover {
    text-decoration: underline;
}

.md-breadcrumb .sep {
    color: #9CA3AF;
}

.md-breadcrumb .current {
    color: #1E2939;
    font-weight: 600;
}

.md-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

.md-main-col {
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-width: 0;
}


/* ── 3. HERO SECTION ── */
.md-hero {
    background: #ffffff;
    border: 1px solid #E9E0E1;
    border-radius: 20px;
    padding: 28px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.md-hero-badges {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 8px;
    z-index: 5;
    flex-wrap: wrap;
}

.md-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.md-hero-badge--action {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    color: #ffffff;
}

.md-hero-badge--new {
    background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
    color: #ffffff;
}

.md-hero-badge--custom {
    background: rgba(17, 24, 39, 0.9);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.md-hero-badge--ev {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
}

.md-hero-top {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.md-hero-left {
    width: 380px;
    min-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.md-hero-img-wrap {
    width: 100%;
    min-width: 100%;
    height: 250px;
    border-radius: 16px;
    overflow: hidden;
    background: #F7F2F3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #EAE1E2;
}

.md-hero-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.md-hero-img-wrap:hover img {
    transform: scale(1.03);
}

.md-hero-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding-top: 4px;
}

.md-hero-header-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.md-hero-brand {
    font-size: 13px;
    font-weight: 700;
    color: #6A7282;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.md-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    background: #F9FAFB;
    font-size: 12px;
    font-weight: 600;
    color: #6A142C;
    text-decoration: none;
    transition: all 0.15s ease;
}

.md-pdf-btn svg {
    width: 14px;
    height: 14px;
}

.md-pdf-btn:hover {
    background: #6A142C;
    color: #ffffff;
    border-color: #6A142C;
}

.md-hero-model {
    font-size: 34px;
    font-weight: 900;
    color: #0A0A0A;
    line-height: 1.2;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.md-hero-pkg {
    font-size: 16px;
    color: #4B5563;
    font-weight: 600;
    margin: 0 0 20px;
}

.md-hero-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 0;
    padding: 16px 18px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    flex-wrap: wrap;
}

.md-hero-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.md-hero-old-price {
    font-size: 18px;
    color: #9CA3AF;
    text-decoration: line-through;
    font-weight: 600;
}

.md-hero-price {
    font-size: 32px;
    font-weight: 900;
    color: #6A142C;
    line-height: 1;
    letter-spacing: -0.02em;
}

.md-hero-price--action {
    color: #DC2626;
}

.md-hero-lease-hint {
    font-size: 12px;
    color: #6B7280;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    padding: 6px 12px;
    border-radius: 8px;
}

.md-hero-lease-hint strong {
    color: #111827;
    margin-left: 4px;
}

.md-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
}

.md-tile {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 9px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
}

.md-tile__val {
    font-size: 13.5px;
    font-weight: 800;
    color: #0A0A0A;
    line-height: 1.25;
}

.md-tile__lbl {
    font-size: 10.5px;
    color: #6B7280;
    font-weight: 500;
}


/* ── 4. INTERACTIVE VARIANT SWITCHER ── */
.md-variant-switcher-section {
    background: #F9F6F7;
    border: 1px solid #EDE4E5;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.md-variant-switcher-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.md-variant-switcher-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #6A142C;
}

.md-variant-switcher-title svg {
    width: 16px;
    height: 16px;
}

.md-variant-pills-wrap {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.md-variant-pill {
    background: #ffffff;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    padding: 9px 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
    text-align: left;
    min-width: 150px;
    flex-shrink: 0;
}

.md-variant-pill:hover {
    border-color: #6A142C;
    transform: translateY(-1px);
}

.md-variant-pill.active {
    border-color: #6A142C;
    background: #6A142C;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(106, 20, 44, 0.2);
}

.md-variant-pill__engine {
    font-size: 12.5px;
    font-weight: 800;
    color: inherit;
    line-height: 1.2;
}

.md-variant-pill__meta {
    font-size: 11px;
    color: #6B7280;
}

.md-variant-pill.active .md-variant-pill__meta {
    color: rgba(255, 255, 255, 0.8);
}

.md-variant-pill__price {
    font-size: 12px;
    font-weight: 700;
    color: #6A142C;
    margin-top: 2px;
}

.md-variant-pill.active .md-variant-pill__price {
    color: #ffffff;
}

.md-hero-cta-row {
    display: flex;
    gap: 12px;
}

.md-hero-cta-row .md-contact-btn-p,
.md-hero-cta-row .md-contact-btn-o {
    flex: 1;
    height: 46px;
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
}

.md-hero-cta-row svg {
    width: 16px;
    height: 16px;
}


/* ── 5. TABS & SPECIFICATIONS ── */
.md-tabs {
    display: flex;
    border-bottom: 2px solid #F3F4F6;
    margin: 0;
    gap: 4px;
}

.md-tab {
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 700;
    color: #6B7280;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.md-tab:hover {
    color: #6A142C;
}

.md-tab.active {
    color: #6A142C;
    border-bottom-color: #6A142C;
}

.md-tab-panel {
    display: none;
    padding-top: 24px;
}

.md-tab-panel.active {
    display: block;
}

.md-section-subtitle {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 14px;
}

.md-dimensions-block {
    background: #ffffff;
    border: 1px solid #E9E0E1;
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 24px;
}

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

.md-dim-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 12px 16px;
}

.md-dim-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6A142C;
    flex-shrink: 0;
    border: 1px solid #EDE4E5;
}

.md-dim-icon svg {
    width: 20px;
    height: 20px;
}

.md-dim-content {
    display: flex;
    flex-direction: column;
}

.md-dim-label {
    font-size: 11.5px;
    color: #6B7280;
    font-weight: 500;
}

.md-dim-value {
    font-size: 14px;
    font-weight: 800;
    color: #111827;
    margin-top: 2px;
}

.md-spec-group-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.md-spec-card {
    background: #ffffff;
    border: 1px solid #E9E0E1;
    border-radius: 16px;
    overflow: hidden;
}

.md-spec-group-head {
    background: #F9FAFB;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #E5E7EB;
}

.md-spec-group-head svg {
    width: 16px;
    height: 16px;
    color: #6A142C;
}

.md-spec-group-head span {
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #111827;
}

.md-spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    font-size: 13.5px;
    border-bottom: 1px solid #F3F4F6;
}

.md-spec-row:last-child {
    border-bottom: none;
}

.md-spec-row:nth-child(even) {
    background: #FAFBFD;
}

.md-spec-row__label {
    color: #6B7280;
    font-weight: 500;
}

.md-spec-row__value {
    color: #111827;
    font-weight: 700;
    text-align: right;
}


/* ── 6. EQUIPMENT TAB ── */
.md-eq-container {
    background: #ffffff;
    border: 1px solid #E9E0E1;
    border-radius: 16px;
    padding: 22px;
}

.md-eq-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #F3F4F6;
    flex-wrap: wrap;
}

.md-eq-title-group {
    display: flex;
    flex-direction: column;
}

.md-eq-badge {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6A142C;
}

.md-eq-name {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    margin: 2px 0 0;
}

.md-eq-search-wrap {
    position: relative;
    flex: 1;
    max-width: 300px;
    min-width: 180px;
}

.md-eq-search-wrap svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: #9CA3AF;
}

.md-eq-search-wrap input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px 7px 30px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 12.5px;
    font-family: inherit;
    outline: none;
}

.md-eq-search-wrap input:focus {
    border-color: #6A142C;
    background: #fff;
}

.md-eq-total {
    font-size: 12px;
    font-weight: 700;
    background: #F3F4F6;
    color: #4B5563;
    padding: 4px 10px;
    border-radius: 6px;
}

.md-eq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.md-eq-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: #F9FAFB;
    border-radius: 8px;
    border: 1px solid #F0F2F5;
    font-size: 13px;
    color: #374151;
    line-height: 1.4;
}

.md-eq-icon {
    width: 18px;
    height: 18px;
    color: #16A34A;
    flex-shrink: 0;
    margin-top: 1px;
}

.md-eq-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #9CA3AF;
}

.md-empty-card {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    background: #FAFAFB;
    border: 1px dashed #E5E7EB;
    border-radius: 14px;
    margin: 4px 0;
}

.md-empty-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #FFF1F3;
    color: #6A142C;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(106, 20, 44, 0.06);
}

.md-empty-icon svg {
    width: 26px;
    height: 26px;
    stroke: #6A142C;
}

.md-empty-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px 0;
}

.md-empty-card p {
    font-size: 13.5px;
    color: #6B7280;
    max-width: 440px;
    margin: 0 auto;
    line-height: 1.5;
}


/* ── 7. GALLERY TAB & LIGHTBOX ── */
.md-gallery-wrap {
    background: #ffffff;
    border: 1px solid #E9E0E1;
    border-radius: 16px;
    padding: 22px;
}

.md-gallery-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.md-gallery-count {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.md-gallery-hint {
    font-size: 12px;
    color: #6B7280;
}

.md-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.md-gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #F3F4F6;
    cursor: pointer;
}

.md-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.md-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.md-gallery-item:hover .md-gallery-overlay {
    opacity: 1;
}

.md-gallery-item:hover img {
    transform: scale(1.06);
}

.md-gallery-zoom-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
}

.md-gallery-zoom-icon svg {
    width: 18px;
    height: 18px;
}

.md-gallery-num {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.md-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.md-lightbox.is-open {
    display: flex;
}

.md-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
}

.md-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 34px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
}

.md-lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    font-size: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.md-lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.md-lightbox-arrow--prev { left: 24px; }
.md-lightbox-arrow--next { right: 24px; }

.md-lightbox-counter {
    position: absolute;
    bottom: 20px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}


/* ── 8. SIDEBAR & MINI LEASING CALCULATOR ── */
.md-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 90px;
}

.md-contact-card {
    background: #ffffff;
    border: 1px solid #E9E0E1;
    border-radius: 16px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.md-contact-card__title {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    margin: 0;
}

.md-contact-card__sub {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.5;
    margin: 0;
}

.md-contact-btn-p {
    width: 100%;
    height: 44px;
    background: #6A142C;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.md-contact-btn-p:hover {
    background: #800020;
}

.md-contact-btn-o {
    width: 100%;
    height: 44px;
    background: transparent;
    color: #374151;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.md-contact-btn-o:hover {
    border-color: #6A142C;
    color: #6A142C;
}

.md-leasing-card {
    background: #ffffff;
    border: 1px solid #E9E0E1;
    border-radius: 16px;
    padding: 22px;
}

.md-leasing-header {
    margin-bottom: 14px;
}

.md-leasing-badge {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6A142C;
    margin-bottom: 2px;
}

.md-leasing-title {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
    margin: 0;
}

.md-calc-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 14px;
}

.md-calc-field-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #4B5563;
    margin-bottom: 4px;
}

.md-calc-field-labels strong {
    color: #111827;
}

.md-range-slider {
    width: 100%;
    accent-color: #6A142C;
    cursor: pointer;
}

.md-calc-result-box {
    background: #ffffff;
    border: 1px solid #E9E0E1;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    margin-top: 4px;
}

.md-calc-result-label {
    font-size: 11px;
    color: #6B7280;
    display: block;
}

.md-calc-result-value {
    font-size: 16px;
    font-weight: 900;
    color: #6A142C;
}

.md-leasing-card__sub {
    font-size: 12px;
    color: #6B7280;
    margin: 0 0 10px;
}

.md-leasing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.md-leasing-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 6px;
    aspect-ratio: 16/10;
    transition: all 0.15s;
    text-decoration: none;
}

.md-leasing-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.md-leasing-icon:hover {
    border-color: #6A142C;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.md-similar {
    background: #ffffff;
    border: 1px solid #E9E0E1;
    border-radius: 16px;
    padding: 20px;
}

.md-similar__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.md-similar__head-bar {
    width: 3px;
    height: 16px;
    background: #6A142C;
    border-radius: 2px;
}

.md-similar__head-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.md-similar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #F3F4F6;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s;
}

.md-similar-item:last-child {
    border-bottom: none;
}

.md-similar-item:hover {
    transform: translateX(4px);
}

.md-similar-thumb-wrap {
    width: 60px;
    height: 42px;
    aspect-ratio: 16/10;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
}

.md-similar-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.md-similar-info {
    display: flex;
    flex-direction: column;
}

.md-similar-name {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

.md-similar-price {
    font-size: 12px;
    font-weight: 700;
    color: #6A142C;
}


/* ── 9. PARTNER AD CARD ── */
.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-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, 0.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, 0.7);
    line-height: 1.5;
}

.md-ad--light .md-ad-card-pretitle { color: rgba(30, 30, 30, 0.45); }
.md-ad--light .md-ad-card-title { color: #1E2939; }
.md-ad--light .md-ad-card-desc { color: rgba(30, 30, 30, 0.65); }
.md-ad--dark { background: #111827; }


/* ── 10. RELATED NEWS SECTION ── */
.md-related-news-section {
    background: #ffffff;
    border: 1px solid #E9E0E1;
    border-radius: 18px;
    padding: 24px;
    margin-top: 10px;
}

.md-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.md-section-head-bar {
    width: 4px;
    height: 18px;
    background: #6A142C;
    border-radius: 2px;
}

.md-section-head-title {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    margin: 0;
}

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

.md-news-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #E5E7EB;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.md-news-card:hover {
    border-color: #6A142C;
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.md-news-card__img-wrap {
    position: relative;
    aspect-ratio: 16/10;
    background: #111827;
}

.md-news-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.md-news-card__cat {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #6A142C;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
}

.md-news-card__body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.md-news-card__title {
    font-size: 13.5px;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.md-news-card__date {
    font-size: 11px;
    color: #9CA3AF;
}


/* ── 11. STICKY CTA FLOATING BOTTOM BAR ── */
.md-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #E5E7EB;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 12px 24px;
    z-index: 999;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.md-sticky-bar.visible {
    transform: translateY(0);
    opacity: 1;
}

.md-sticky-bar__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.md-sticky-bar__car {
    display: flex;
    align-items: center;
    gap: 12px;
}

.md-sticky-bar__thumb {
    width: 50px;
    height: 35px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #E5E7EB;
}

.md-sticky-bar__brand {
    font-size: 11px;
    color: #6B7280;
    text-transform: uppercase;
    display: block;
}

.md-sticky-bar__name {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
}

.md-sticky-bar__price-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: auto;
}

.md-sticky-bar__price-lbl {
    font-size: 10px;
    color: #9CA3AF;
    text-transform: uppercase;
}

.md-sticky-bar__price {
    font-size: 18px;
    font-weight: 900;
    color: #6A142C;
}

.md-sticky-bar__actions {
    display: flex;
    gap: 8px;
}

.md-sticky-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.md-sticky-btn--primary {
    background: #6A142C;
    color: #ffffff;
    border: none;
}

.md-sticky-btn--primary:hover {
    background: #800020;
}

.md-sticky-btn--outline {
    background: transparent;
    color: #374151;
    border: 1px solid #D1D5DB;
}

.md-sticky-btn--outline:hover {
    border-color: #6A142C;
    color: #6A142C;
}


/* ── 12. RESPONSIVE QUERIES ── */
@media (max-width: 1024px) {
    .md-layout {
        grid-template-columns: 1fr;
    }

    .md-sidebar {
        position: static;
    }

    .md-hero-img-wrap {
        width: 320px;
        min-width: 320px;
    }
}

@media (max-width: 768px) {
    .md-hero-top {
        flex-direction: column;
    }

    .md-hero-img-wrap {
        width: 100%;
        min-width: 100%;
        height: 220px;
    }

    .md-tiles {
        grid-template-columns: repeat(2, 1fr);
    }

    .md-dimensions-grid {
        grid-template-columns: 1fr;
    }

    .md-eq-grid {
        grid-template-columns: 1fr;
    }

    .md-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .md-related-news-grid {
        grid-template-columns: 1fr;
    }

    .md-sticky-bar__price-col {
        display: none;
    }
}

@media (max-width: 540px) {
    .md-hero-cta-row {
        flex-direction: column;
    }

    .md-sticky-bar__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .md-sticky-bar__actions {
        width: 100%;
    }

    .md-sticky-btn {
        flex: 1;
        text-align: center;
    }
}
