/* =========================================================
   Intresseportalen – Public Styles
   Version: 1.1.0
   ========================================================= */

/* --- VARIABLES --- */
:root {
    --ip-primary: #2c3e50;       /* Mörkblå/Grå */
    --ip-accent: #28a745;        /* Grön (Knappar) */
    --ip-accent-hover: #218838;  /* Mörkare grön */
    --ip-bg-light: #f8f9fa;      /* Ljus bakgrund */
    --ip-text: #333;             /* Textfärg */
    --ip-border: #e9ecef;        /* Grå ram */
    --ip-radius: 8px;            /* Hörnradie */
    --ip-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* =========================================================
   1. GLOBAL / RESET-ISH
   ========================================================= */
.ip-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ip-text);
    box-sizing: border-box;
}

.ip-container * {
    box-sizing: border-box;
}

.ip-no-scroll {
    overflow: hidden;
}

.ip-container a {
    color: inherit;
}

/* --- Breadcrumb --- */
.ip-breadcrumb {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.ip-breadcrumb a {
    color: #666;
    text-decoration: none;
}

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

/* =========================================================
   2. SINGLE OBJEKT - GALLERY & HEADER
   ========================================================= */

/* --- Gallery Grid --- */
.ip-gallery-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 250px 250px;
    gap: 10px;
    margin-bottom: 30px;
    border-radius: var(--ip-radius);
    overflow: hidden;
    position: relative;
}

.ip-gallery-item {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #eee;
    cursor: pointer;
    transition: filter .15s ease, transform .15s ease;
}

.ip-gallery-item:hover {
    filter: brightness(0.95);
}

.ip-main-img {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

/* Single-image gallery variant */
.ip-gallery-grid.ip-gallery-grid--single {
    grid-template-columns: 1fr;
    grid-template-rows: 420px;
}

.ip-gallery-grid.ip-gallery-grid--single .ip-main-img {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

/* "Visa alla bilder" knapp */
.ip-view-all-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #fff;
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: transform 0.1s ease;
}

.ip-view-all-btn:hover {
    transform: scale(1.02);
}

/* --- Share Button (Overlay på bild) --- */
.ip-share-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    backdrop-filter: blur(6px);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.ip-share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.22);
}

.ip-share-btn:active {
    transform: scale(0.98);
}

.ip-share-btn__icon svg {
    display: block;
    fill: #222;
}

/* Share Tooltip */
.ip-share-btn__tip {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    background: rgba(20,20,20,0.92);
    color: #fff;
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 10px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity .14s ease, transform .14s ease;
}

.ip-share-btn__tip::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 14px;
    width: 10px;
    height: 10px;
    background: rgba(20,20,20,0.92);
    transform: rotate(45deg);
}

.ip-share-btn.is-show-tip .ip-share-btn__tip {
    opacity: 1;
    transform: translateY(0);
}

@keyframes ipSharePop {
    0% { transform: scale(1); }
    40% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.ip-share-btn.is-success {
    animation: ipSharePop .22s ease;
}

@media (max-width: 480px) {
    .ip-share-btn {
        top: 12px;
        left: 12px;
    }
}

/* =========================================================
   3. SINGLE OBJEKT - CONTENT & SIDEBAR
   ========================================================= */

.ip-objekt-content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.ip-main-content {
    flex: 2;
    min-width: 0;
}

.ip-sidebar {
    flex: 1;
    min-width: 300px;
}

/* --- Text & Info --- */
.ip-title {
    margin: 0 0 10px 0;
    color: var(--ip-primary);
    font-size: 2rem;
    line-height: 1.2;
}

.ip-address-row {
    font-size: 1.05rem;
    color: #666;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ip-map-link {
    color: #666;
    text-decoration: none;
    border-bottom: 1px dotted #999;
}

.ip-map-link:hover {
    color: var(--ip-primary);
    border-bottom: 1px solid var(--ip-primary);
}

.ip-ingress {
    margin: 0 0 18px 0;
    color: #555;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* --- Quick Facts --- */
.ip-quick-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 0 0 18px 0;
    padding: 0;
}

.ip-fact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--ip-bg-light);
    border: 1px solid var(--ip-border);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.95rem;
    color: #444;
}

/* --- Description Box --- */
.ip-description-section {
    background: #fff;
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius);
    padding: 18px;
    box-shadow: var(--ip-shadow);
}

.ip-description-section h2 {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    color: var(--ip-primary);
}

.ip-description-section h3 {
    margin: 18px 0 10px 0;
    font-size: 1.05rem;
    color: var(--ip-primary);
}

.ip-description-body {
    color: #444;
    line-height: 1.75;
    font-size: 1rem;
}

.ip-description-body p {
    margin: 0 0 12px 0;
}

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

/* --- Highlights (Icons) --- */
.ip-highlights-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    margin-top: 14px;
}

.ip-highlight-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--ip-border);
    background: var(--ip-bg-light);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: #333;
}

.ip-highlight-item .dashicons {
    font-size: 18px;
    line-height: 1;
}

.ip-highlight-item .ip-icon-heat::before {
    content: "♨️";
    font-size: 18px;
    line-height: 1;
    display: inline-block;
}

.ip-highlight-item .ip-icon-sun::before {
    content: "☀️";
    font-size: 18px;
    line-height: 1;
    display: inline-block;
}

/* --- Links (Planritning etc) --- */
.ip-section-box {
    border: 1px solid var(--ip-border);
    background: #fff;
    border-radius: 12px;
    padding: 14px 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin: 16px 0 0 0;
    text-decoration: none;
    color: inherit;
    display: block; /* Ensure it behaves as block */
}

.ip-plan-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}

.ip-plan-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.ip-plan-link p {
    margin: 6px 0 0 0;
    color: #666;
    font-size: 0.95rem;
}

.ip-map-placeholder {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #666;
    border: 1px dashed #cfcfcf;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fafafa;
}

.ip-map-placeholder:hover {
    color: var(--ip-primary);
    border-color: #bbb;
    background: #f7f7f7;
}

/* =========================================================
   4. SIDEBAR WIDGETS
   ========================================================= */
.ip-summary-box {
    position: sticky;
    top: 20px;
    background: #fff;
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius);
    padding: 18px;
    box-shadow: var(--ip-shadow);
}

.ip-price-tag {
    font-size: 1.8rem;
    font-weight: 800;
    color: #111;
    margin: 0 0 6px 0;
    line-height: 1.1;
}

.ip-price-tag span {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    margin-left: 6px;
}

.ip-price-sub {
    display: block;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 14px;
}

.ip-status-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid var(--ip-border);
    background: var(--ip-bg-light);
    margin-bottom: 14px;
    color: #444;
}

.ip-status-green {
    border-color: rgba(40,167,69,0.35);
    background: rgba(40,167,69,0.08);
}

/* Micro copy under buttons */
.ip-micro-copy {
    margin-top: 8px;
    color: #666;
    font-size: 0.9rem;
}

/* Secondary Actions (Tipsa & Fråga) */
.ip-secondary-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: #444;
    text-decoration: none;
    padding: 10px 10px;
    border-radius: 10px;
    border: 1px solid var(--ip-border);
    background: #fff;
}

.ip-secondary-cta:hover {
    background: var(--ip-bg-light);
}

/* FIX: Gör så att share-knappen (button) ser ut som en länk */
button.ip-secondary-cta {
    width: 100%; 
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    text-align: left;
    color: #444;
}

/* Sidebar List */
.ip-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0 0;
    border-top: 1px solid var(--ip-border);
}

.ip-sidebar-list li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ip-border);
    font-size: 0.95rem;
    color: #444;
}

.ip-val-bold {
    font-weight: 700;
    color: #111;
    text-align: right;
}

/* Other facilities tags */
.ip-other-facilities-block {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--ip-border);
}

.ip-other-facilities-title {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #222;
}

.ip-other-facilities-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ip-facility-tag {
    background: #f4f6f8;
    border: 1px solid #e1e4e8;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.85rem;
    color: #333;
    line-height: 1.2;
    white-space: nowrap;
}

/* Landlord */
.ip-landlord-profile {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ip-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--ip-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.ip-landlord-name {
    font-weight: 800;
    color: #111;
}

.ip-landlord-sub {
    font-size: 0.9rem;
    color: #666;
}

/* =========================================================
   5. GALLERY MODAL
   ========================================================= */
.ip-gallery-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.ip-gallery-modal.is-open {
    display: block;
}

.ip-gallery-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}

.ip-gallery-modal__panel {
    position: relative;
    background: #fff;
    width: min(1100px, 94vw);
    max-height: 88vh;
    overflow: auto;
    margin: 5vh auto;
    border-radius: var(--ip-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    padding: 16px;
}

.ip-gallery-modal__close {
    position: sticky;
    top: 0;
    float: right;
    background: #fff;
    border: 1px solid var(--ip-border);
    border-radius: 999px;
    padding: 8px 10px;
    cursor: pointer;
    z-index: 2;
}

.ip-gallery-modal__stage {
    clear: both;
    margin-top: 8px;
    border-radius: 10px;
    overflow: hidden;
    background: #111;
    position: relative;
}

.ip-gallery-modal__main {
    width: 100%;
    height: min(70vh, 620px);
    object-fit: contain;
    display: block;
}

.ip-gallery-modal__thumbs {
    display: flex;
    gap: 10px;
    overflow: auto;
    padding: 12px 4px 2px;
    margin-top: 8px;
}

.ip-gallery-modal__thumb {
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0;
    background: transparent;
    cursor: pointer;
    flex: 0 0 auto;
    width: 110px;
    height: 78px;
    overflow: hidden;
}

.ip-gallery-modal__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ip-gallery-modal__thumb.is-active {
    border-color: var(--ip-primary);
}

/* Gallery Arrows */
.ip-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ip-gallery-nav.prev { left: 10px; }
.ip-gallery-nav.next { right: 10px; }

@media (min-width: 769px) {
    .ip-gallery-nav { display: none; }
}

/* =========================================================
   6. ARCHIVE / CARDS
   ========================================================= */
.ip-archive-header h1 {
    margin: 0 0 20px 0;
    color: var(--ip-primary);
    font-size: 2rem;
    line-height: 1.2;
}

.ip-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.ip-objekt-card {
    background: #fff;
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius);
    overflow: hidden;
    box-shadow: var(--ip-shadow);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    position: relative; /* For status badge */
}

.ip-objekt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.10);
}

.ip-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.ip-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ip-card-image .no-img {
    font-size: 0.9rem;
    color: #777;
    padding: 10px 14px;
    border: 1px dashed #ccc;
    border-radius: 999px;
    background: #fff;
}

.ip-card-body {
    padding: 14px 14px 16px;
}

.ip-card-title {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    color: var(--ip-primary);
}

.ip-card-location {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.95rem;
}

.ip-card-meta {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.ip-card-price {
    font-weight: 800;
    color: #111;
    margin-bottom: 8px;
}

.ip-card-date {
    font-size: 0.9rem;
    color: #666;
}

.ip-pagination {
    margin-top: 25px;
}

/* =========================================================
   7. FORM STYLES
   ========================================================= */
.ip-form-container {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
}

.ip-message-success {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #c3e6cb;
    margin-bottom: 20px;
}

.ip-message-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
    margin-bottom: 20px;
}

.ip-form-group {
    margin-bottom: 15px;
}

.ip-form-row {
    display: flex;
    gap: 15px;
}

.ip-form-row .ip-form-group {
    flex: 1;
}

.ip-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 0.9rem;
}

.ip-form-group input[type="text"],
.ip-form-group input[type="email"],
.ip-form-group input[type="tel"],
.ip-form-group input[type="number"],
.ip-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.ip-form-group input:focus,
.ip-form-group textarea:focus {
    border-color: var(--ip-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.2);
}

.ip-checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.ip-gdpr-text {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.ip-form-actions {
    margin-top: 20px;
}

/* DEN VIKTIGA KNAPPEN: .ip-btn-submit */
.ip-btn-submit { 
    width: 100%;
    padding: 12px;
    background-color: var(--ip-accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.ip-btn-submit:hover {
    background-color: var(--ip-accent-hover);
}

@media (max-width: 600px) {
    .ip-form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* =========================================================
   8. STATUS BADGE
   ========================================================= */
.ip-status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
}

.ip-status-badge.rented {
    background-color: #dc3545;
    color: #fff;
    border: 1px solid #c82333;
}

.ip-single-status-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
}

/* =========================================================
   9. FILTER PANEL
   ========================================================= */
.ip-filter-panel {
    background: #f4f6f8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e1e4e8;
}

.ip-filter-row-top {
    margin-bottom: 20px;
}

.ip-search-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 1.1rem;
    border: 1px solid #ccc;
    border-radius: 25px;
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat 98% center;
}

.ip-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.ip-filter-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
}

.ip-filter-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}

.ip-filter-row-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.ip-sort-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
}

.ip-sort-wrapper label {
    font-weight: 700;
}

.ip-sort-link {
    color: #666;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
}

.ip-sort-link:hover {
    color: #000;
}

.ip-sort-link.active {
    color: #D95A13; /* Brand color */
    border-bottom-color: #D95A13;
    font-weight: 600;
}

.ip-reset-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ip-reset-btn:hover {
    color: #d00;
}

/* =========================================================
   10. CONTACT MODAL (Generic)
   ========================================================= */
.ip-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ip-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
}

.ip-modal__panel {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    padding: 25px;
    z-index: 2;
    animation: ipFadeIn 0.2s ease-out;
}

@keyframes ipFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ip-modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

.ip-modal__close:hover {
    color: #000;
}

.ip-modal__close .dashicons {
    font-size: 24px;
}

.ip-modal__header {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.ip-modal__header h3 {
    margin: 0 0 5px 0;
    color: var(--ip-primary);
}

.ip-modal__header p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.ip-contact-success {
    color: #155724;
    background: #d4edda;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.ip-contact-error {
    color: #721c24;
    background: #f8d7da;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

/* =========================================================
   11. RESPONSIVE BREAKPOINTS
   ========================================================= */
@media (max-width: 900px) {
    .ip-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ip-filter-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 84px; /* Space for sticky bar */
    }
    .ip-gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 250px;
    }
    .ip-gallery-item {
        display: none;
    }
    .ip-main-img {
        display: block;
        grid-row: 1;
        grid-column: 1;
    }
    .ip-view-all-btn {
        bottom: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .ip-objekt-content-wrapper {
        flex-direction: column;
    }
    .ip-sidebar {
        width: 100%;
        min-width: 0;
    }
    .ip-summary-box {
        position: static;
    }
    .ip-highlights-grid {
        grid-template-columns: 1fr;
    }
    .ip-quick-facts {
        gap: 12px;
    }
    .ip-gallery-modal__panel {
        width: 96vw;
        margin: 3vh auto;
        max-height: 92vh;
        padding: 12px;
    }
    .ip-gallery-modal__stage {
        background: #000;
        max-height: 70vh;
        overflow: hidden;
        border-radius: 10px;
    }
    .ip-gallery-modal__main {
        width: 100%;
        height: 70vh;
        object-fit: cover;
    }
    .ip-gallery-modal__thumbs {
        position: sticky;
        bottom: 0;
        background: #fff;
        padding: 8px 6px;
        border-top: 1px solid var(--ip-border);
        margin-top: 8px;
    }
    .ip-gallery-modal__thumb {
        width: 72px;
        height: 54px;
    }
    /* Mobile Sticky Bar */
    .ip-mobile-sticky-bar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9998;
        padding: 10px 12px;
        gap: 10px;
        align-items: center;
        justify-content: space-between;
        background: rgba(255,255,255,0.95);
        border-top: 1px solid var(--ip-border);
        box-shadow: 0 -8px 24px rgba(0,0,0,0.08);
        backdrop-filter: blur(6px);
        transition: transform .18s ease;
    }
    .ip-msb-info {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }
    .ip-msb-price {
        font-weight: 800;
        color: #111;
        font-size: 0.98rem;
        line-height: 1.1;
        white-space: nowrap;
    }
    .ip-msb-meta {
        font-size: 0.85rem;
        color: #666;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 64vw;
    }
    .ip-msb-apply {
        border: none;
        background: var(--ip-accent);
        color: #fff;
        font-weight: 800;
        padding: 10px 14px;
        border-radius: 12px;
        cursor: pointer;
        font-size: 0.95rem;
        white-space: nowrap;
    }
    .ip-msb-apply:hover {
        background: var(--ip-accent-hover);
    }
}

@media (max-width: 600px) {
    .ip-archive-grid {
        grid-template-columns: 1fr;
    }
    .ip-card-image {
        height: 220px;
    }
    .ip-filter-grid {
        grid-template-columns: 1fr;
    }
    .ip-filter-row-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .ip-sort-wrapper {
        flex-wrap: wrap;
    }
}
