/* shop/public/css/rent.css */

/* ═══════════════════════════════════════════════════════
   RENT.PHP – Übersichtsseite
   ═══════════════════════════════════════════════════════ */

.rent-hero {
    background: linear-gradient(135deg, #1a3a5c, #2563eb);
    color: #fff;
    padding: 1rem 2rem;
    text-align: center;
}

.rent-hero h1 {
    margin: 0 0 .5rem;
    font-size: 2rem;
}

.rent-hero p {
    margin: 0;
    opacity: .85;
    font-size: 1rem;
}

/* FIX: volle Breite wie .shop-layout – kein max-width, kein seitlicher Rand */
.rent-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
    align-items: start;
    width: 100%;
    padding: 1.2rem 0;
}

.rent-sidebar {
    min-width: 0;
    padding: 0;
    /* bündig am linken Rand */
    align-self: start;
}

.rent-main {
    min-width: 0;
    width: 100%;
    margin-left: 50px;
}

/* ── Suche ────────────────────────────────────────────── */
.rent-search-wrap {
    display: flex;
    gap: .3rem;
    margin-bottom: .6rem;
}

.rent-search-input {
    flex: 1;
    padding: .45rem .6rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: .9rem;
}

.rent-search-btn {
    padding: .45rem .8rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* ── Kategorien-Navigation ────────────────────────────── */
.rent-cat-nav {
    margin-top: 1rem;
}

.rent-cat-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #888;
    margin-bottom: .5rem;
}

.rent-cat-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rent-cat-nav li {
    margin: .1rem 0;
}

.rent-cat-row {
    display: flex;
    align-items: center;
}

.rent-cat-nav a {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .35rem .5rem;
    border-radius: 5px;
    color: #333;
    font-size: .87rem;
    text-decoration: none;
    transition: background .12s;
}

.rent-cat-nav a:hover,
.rent-cat-nav a.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.rent-cat-count {
    font-size: .74rem;
    color: #bbb;
    margin-left: .2rem;
    flex-shrink: 0;
}

.rent-cat-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: .3rem .35rem;
    color: #aaa;
    font-size: .76rem;
    line-height: 1;
    border-radius: 3px;
    flex-shrink: 0;
}

.rent-cat-toggle:hover {
    color: #555;
}

.toggle-icon {
    display: inline-block;
    transition: transform .2s ease;
}

.rent-cat-item.open .toggle-icon {
    transform: rotate(90deg);
}

.rent-subcat {
    padding-left: 0;        /* war: .8rem – Einrückung jetzt auf Link-Ebene */
    margin: .1rem 0 .3rem;
}

.rent-subcat li {
    list-style: none;
}

.rent-subcat li a {
    font-size: .82rem;
    padding-left: 1.35rem;  /* entspricht depth-1 aus Produkt-Baum: 0.5 + 1*0.85rem */
    border-left: 2px solid #e5e7eb;
    border-radius: 0 5px 5px 0;
}

.rent-subcat li a.active {
    border-left-color: #2563eb;
}

/* ── Filter-Info ──────────────────────────────────────── */
.rent-filter-info {
    font-size: .87rem;
    color: #555;
    margin-bottom: 1rem;
    padding: .5rem 0;
    border-bottom: 1px solid #eee;
}

.rent-filter-reset {
    margin-left: .5rem;
    color: #ef4444;
    text-decoration: none;
    font-size: .8rem;
}

.rent-empty {
    text-align: center;
    padding: 3rem;
    color: #888;
}

/* ═══════════════════════════════════════════════════════
   RENT-KARTEN
   FIX: .product-card { overflow:hidden } aus shop.css
        und .product-card h3 { margin:1rem 1rem .3rem }
        werden für Miet-Karten überschrieben.
   ═══════════════════════════════════════════════════════ */

.rent-card {
    position: relative;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
}

/* quick-view Overlay aus shop.css ausblenden */
.rent-card .quick-view {
    display: none !important;
}

/* shop.css: .product-card h3 { margin: 1rem 1rem .3rem } überschreiben */
.rent-card h3.rent-card-title {
    margin: 0 0 .4rem !important;
}

.rent-card-img-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    width: 100%;
    height: 160px;          /* fixe Höhe wie .product-image */
    background: #f5f5f5;
    flex-shrink: 0;
}

.rent-card-img {
    width: 100%;            /* war: 70% */
    height: 100%;
    object-fit: contain;    /* war: cover */
    transition: transform .3s ease;
}

.rent-card:hover .rent-card-img {
    transform: scale(1.04);
}

.rent-badge {
    position: absolute;
    top: .5rem;
    left: .5rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: .75rem;
    font-weight: 600;
    color: #fff;
    z-index: 2;
    pointer-events: none;
}

.rent-badge-out {
    background: #ef4444;
}

.rent-badge-low {
    background: #f59e0b;
}

.rent-card-body {
    padding: .85rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.rent-card-cat {
    font-size: .72rem;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .2rem;
}

.rent-card-title {
    margin: 0 0 .35rem !important;
    font-size: .97rem;
    line-height: 1.3;
}

.rent-card-title a {
    color: #111;
    text-decoration: none;
}

.rent-card-title a:hover {
    color: #2563eb;
}

.rent-card-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: .2rem;
}

.rent-card-deposit {
    font-size: .77rem;
    color: #888;
    margin-bottom: .3rem;
}

.rent-card-avail {
    font-size: .8rem;
    margin-bottom: .65rem;
}

.avail-ok {
    color: #16a34a;
}

.avail-out {
    color: #ef4444;
}

.rent-card-actions {
    display: flex;
    gap: .5rem;
    margin-top: auto;
}

.btn-disabled {
    opacity: .45;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════
   RENT-GRID: MAX 5 KARTEN NEBENEINANDER
   ═══════════════════════════════════════════════════════ */

.rent-product-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.1rem;
}

@media (max-width: 1400px) {
    .rent-product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1100px) {
    .rent-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .rent-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 450px) {
    .rent-product-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════
   RENT_DETAIL.PHP
   ═══════════════════════════════════════════════════════ */

.rent-detail-page {
    max-width: 1100px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.rent-not-found {
    padding: 2rem;
    color: #991b1b;
}

.rent-breadcrumb {
    font-size: .87rem;
    color: #888;
    margin-bottom: 1.2rem;
}

.rent-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.rent-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.rent-detail-img {
    width: 40%;
    border-radius: 8px;
    object-fit: cover;
    max-height: 400px;
}

.rent-gallery-main img {
    width: 50%;
    border-radius: 8px;
    object-fit: cover;
    max-height: 380px;
}

.rent-gallery-thumbs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: .6rem;
}

.rent-thumb {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s;
}

.rent-thumb.active,
.rent-thumb:hover {
    border-color: #2563eb;
}

.rent-detail-title {
    margin: 0 0 1rem;
    font-size: 1.6rem;
}

.rent-detail-prices {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: 1rem;
}

.rent-price-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .95rem;
}

.rent-price-val {
    font-weight: 700;
    color: #2563eb;
    font-size: 1.05rem;
}

.rent-price-unit {
    color: #888;
    font-size: .85rem;
}

.rent-price-deposit .rent-price-val {
    color: #888;
}

.rent-detail-avail {
    font-size: .9rem;
    margin-bottom: .8rem;
    font-weight: 600;
}

.rent-detail-desc {
    font-size: .9rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.rent-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1rem 0;
}

.rent-form-group {
    margin-bottom: .9rem;
}

.rent-label {
    display: block;
    font-size: .83rem;
    font-weight: 600;
    margin-bottom: .3rem;
    color: #374151;
}

.rent-input {
    width: 100%;
    padding: .45rem .6rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: .9rem;
    box-sizing: border-box;
}

.rent-date-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .8rem;
}

.rent-time-row {
    margin-top: .4rem;
}

.rent-type-info {
    font-size: .85rem;
    color: #374151;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: .45rem .7rem;
    margin-bottom: .9rem;
}

.rent-calendar-wrap {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    padding: .5rem;
}

.rent-price-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.rent-price-row {
    display: flex;
    justify-content: space-between;
    font-size: .9rem;
    padding: .25rem 0;
    border-bottom: 1px solid #dbeafe;
}

.rent-price-total {
    font-size: 1rem;
    font-weight: 700;
    border-bottom: none;
    margin-top: .3rem;
}

.rent-avail-info {
    font-size: .8rem;
    color: #555;
    margin-top: .5rem;
}

.rent-error-box {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    border-radius: 6px;
    padding: .7rem;
    margin-bottom: .8rem;
    font-size: .87rem;
}

.rent-submit-btn {
    width: 100%;
    padding: .75rem;
    font-size: 1rem;
    margin-top: .3rem;
}

.rent-detail-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
}

.rent-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rent-right {
    position: relative;
}

.rent-sticky {
    position: sticky;
    top: 20px;
}

.rent-sticky form {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

@media (max-width: 900px) {
    .rent-detail-grid {
        grid-template-columns: 1fr;
    }

    .rent-sticky {
        position: static;
    }
}

/* ═══════════════════════════════════════════════════════
   RENT_GUEST + RENT_CHECKOUT
   ═══════════════════════════════════════════════════════ */
.rent-guest-page {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.rent-guest-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: .9rem 1.2rem;
    margin-bottom: 1.5rem;
}

.rent-guest-summary img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.rent-guest-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.rent-guest-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
}

.rent-guest-card h2 {
    margin: 0 0 .5rem;
    font-size: 1.1rem;
}

.rent-checkout-page {
    max-width: 680px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.checkout-error-box {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.checkout-error-box h2 {
    color: #991b1b;
    margin: 0 0 .8rem;
}

.checkout-error-box ul {
    margin: .5rem 0 1rem 1.2rem;
    color: #7f1d1d;
}

.checkout-success-box {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 1.5rem;
}

.checkout-success-icon {
    font-size: 3rem;
    margin-bottom: .5rem;
}

.checkout-success-box h2 {
    margin: 0 0 .5rem;
    color: #15803d;
}

.checkout-success-box p {
    color: #555;
}

.checkout-summary-card {
    display: flex;
    gap: 1.2rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.checkout-summary-img img {
    width: 140px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
}

.checkout-summary-details {
    flex: 1;
}

.checkout-summary-details h3 {
    margin: 0 0 .8rem;
    font-size: 1.1rem;
}

.checkout-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.checkout-table td {
    padding: .35rem .5rem;
    border-bottom: 1px solid #e5e7eb;
}

.checkout-table td:first-child {
    color: #888;
    width: 45%;
}

.checkout-total-row td {
    font-weight: 600;
    color: #111;
    border-top: 2px solid #e5e7eb;
}

.checkout-actions {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════
   MIET-MODAL
   ═══════════════════════════════════════════════════════ */

.rent-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.rent-modal-overlay[hidden] {
    display: none !important;
}

.rent-modal-box {
    background: #fff;
    border-radius: 12px;
    width: 600px;
    max-width: 98vw;
    max-height: 97vh;
    overflow: hidden;
    /* statt overflow-y: auto */
    box-shadow: 0 16px 48px rgba(0, 0, 0, .25);
    display: flex;
    flex-direction: column;
    resize: both;
    /* NEU: resizable */
    min-width: 380px;
    min-height: 400px;
    position: relative;
}

.rent-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
}

.rent-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 0 .3rem;
}

.rent-modal-close:hover {
    color: #333;
}

.rent-modal-body {
    padding: 1.2rem;
    flex: 1;
}

.rent-modal-body {
    padding: 1.2rem;
    flex: 1;
    overflow-y: auto;
    /* Scroll im Body, nicht auf der Box */
}

.rent-modal-body .fc-popover {
    z-index: 99;
}

/* Verfügbarkeits-Legende im Kalender */
.rent-cal-legend {
    display: flex;
    gap: .8rem;
    font-size: .78rem;
    margin-bottom: .5rem;
    flex-wrap: wrap;
}

.rent-cal-legend-item {
    display: flex;
    align-items: center;
    gap: .3rem;
}

.rent-cal-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .rent-layout {
        grid-template-columns: 1fr;
        padding: .8rem 0;
    }

    .rent-detail-grid {
        grid-template-columns: 1fr;
    }

    .rent-guest-grid {
        grid-template-columns: 1fr;
    }

    .rent-date-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .checkout-summary-card {
        flex-direction: column;
    }

    .checkout-summary-img img {
        width: 100%;
        height: 180px;
    }
}

/* =========================
   PRODUKT-/MIET-FILTERLEISTE (identisch zur Produktseite)
   ========================= */
.product-filterbar {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin: 0 0 1.5rem;
    padding: 1.1rem 1.2rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.product-filterbar .pf-search {
    display: flex;
    gap: 0.5rem;
}
.product-filterbar .pf-search input {
    flex: 1;
    padding: 0.6rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1f2933;
    background: #fff;
}
.product-filterbar .pf-search input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.product-filterbar .pf-search button {
    padding: 0 1rem;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}
.product-filterbar .pf-search button:hover { background: #1d4ed8; }

.product-filterbar .pf-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.9rem;
}
.product-filterbar .pf-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.78rem;
    color: #6b7280;
}
.product-filterbar .pf-field select,
.product-filterbar .pf-field input {
    padding: 0.45rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: 0.9rem;
    color: #1f2933;
    background: #fff;
    min-width: 140px;
}
.product-filterbar .pf-field select:focus,
.product-filterbar .pf-field input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.product-filterbar .pf-price-inputs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.product-filterbar .pf-price-inputs input {
    width: 90px;
    min-width: 0;
}
.product-filterbar .pf-dash { color: #9ca3af; }

.product-filterbar .pf-apply {
    padding: 0.5rem 1.1rem;
    border: none;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}
.product-filterbar .pf-apply:hover { background: #1f2937; }

.product-filterbar .pf-reset {
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: none;
    align-self: center;
}
.product-filterbar .pf-reset:hover { color: #dc2626; text-decoration: underline; }

@media (max-width: 640px) {
    .product-filterbar .pf-controls { gap: 0.7rem; }
    .product-filterbar .pf-field,
    .product-filterbar .pf-field select,
    .product-filterbar .pf-field input { min-width: 0; width: 100%; }
    .product-filterbar .pf-field.pf-price { width: 100%; }
}
