/* shop/public/css/responsive.css */
@media (max-width: 768px) {

    /* =========================
       BESTEHEND (dein Code)
       ========================= */

    .shop-teasers {
        flex-direction: column;
        gap: 1.5rem;
    }

    .teaser {
        flex: 1 1 100%;
        padding: 1.5rem;
    }

    .shop-overview h1 {
        font-size: 1.6rem;
    }

    .btn-shop {
        width: 100%;
        padding: 0.8rem;
    }

    /* =========================
       SHOP LAYOUT MOBILE
       ========================= */

    .shop-layout {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    /* =========================
       SIDEBAR → OFFCANVAS
       ========================= */

    .category-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;

        background: #fff;
        z-index: 1000;

        overflow-y: auto;
        padding: 1rem;

        transition: left 0.3s ease;
    }

    .category-sidebar.open {
        left: 0;
    }

    /* =========================
       OVERLAY (HINTERGRUND)
       ========================= */

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);

        z-index: 900;

        opacity: 0;
        visibility: hidden;
        transition: 0.3s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* =========================
       BUTTON (KATEGORIEN)
       ========================= */

    .filter-btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
        padding: 0.8rem;

        background: var(--c-primary);
        color: #fff;
        border: none;
        border-radius: 6px;

        font-size: 1rem;
        cursor: pointer;
    }

    .filter-btn:hover {
        background: #005fa3;
    }

    /* =========================
       PRODUCT GRID MOBILE
       ========================= */

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    /* =========================
       PRODUCT DETAIL MOBILE
       ========================= */

    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-image-box img {
        max-height: 260px;
    }
}


/* shop/public/css/search-bar.css */
/* ===========================
   SUCHLEISTE
   =========================== */

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar input {
    width: 220px;
    padding: 7px 12px;
    border: 1px solid var(--c-border);
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    transition: width 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    width: 300px;
}

.search-bar button {
    padding: 7px 14px;
    border: 1px solid #005fb3;
    background: #005fb3;
    color: #fff;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.search-bar button:hover {
    background: #004a8c;
}

/* ===========================
   SUCHERGEBNISSE (Dropdown)
   =========================== */

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--c-border);
    border-top: none;
    z-index: 999;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-results a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    text-decoration: none;
    color: var(--c-text);
    font-size: 14px;
}

.search-results a:hover {
    background: #f5f5f5;
}

.search-results img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.search-no-results {
    padding: 10px;
    font-size: 14px;
    color: var(--c-muted);
}


/* shop/public/css/shop.css */
/* =========================
   SHOP OVERVIEW / START
   ========================= */

.shop-overview {
    padding: 3rem 2rem;
    text-align: center;
    background-color: #fff;
}

.shop-overview h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--c-primary);
}

.shop-teasers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.teaser {
    flex: 1 1 300px;
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    text-align: center;
}


/* =========================
   HOME / HERO
   ========================= */

.home-wrapper {
    padding: 40px;
}

.hero {
    text-align: center;
    margin-bottom: 50px;
}

.hero h1 {
    font-size: 2.4rem;
}


/* =========================
   BUTTONS
   ========================= */

.btn-primary {
    display: inline-block;
    padding: 10px 22px;
    background: var(--c-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    transition: background .2s ease, transform .1s ease;
}

.btn-primary:hover {
    background: #005fa3;
    transform: translateY(-1px);
}

/* =========================
   PRICE MODE BANNER
   ========================= */

.price-banner {
    background: #f2f7ff;
    border: 1px solid #cddfff;
    color: #003366;
    padding: .8rem 1.2rem;
    border-radius: 8px;
    margin: 1rem 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .9rem;
}

.price-banner-b2c {
    background: #f7fff2;
    border-color: #d3eac1;
    color: #2e5a1c;
}

.price-switch {
    background: var(--c-primary);
    color: #fff;
    padding: .35rem .8rem;
    border-radius: 14px;
    text-decoration: none;
    font-size: .8rem;
}

.price-switch:hover {
    background: #005fa3;
}

/* =========================
   SHOP LAYOUT
   ========================= */
.shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;

    padding: 2rem;
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    align-items: start;

}

.category-sidebar {
    position: sticky;
    top: 120px;
    /* Höhe deines Headers anpassen */
    align-self: start;

    /* max-height: calc(100vh - 140px); */
    overflow-y: auto;
    width: 260px;
    max-width: 260px;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: 6px;
    padding: 1rem;
}

.product-area {
    min-height: 400px;
    min-width: 0;
    max-width: 80%;
    margin-left: 50px;
    padding-left: 0;
}


/* =========================
   PRODUCT GRID (Katalog)
   ========================= */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.6rem;
    margin-top: 1rem;
    /* Abstand zur Sidebar / Kategorieüberschrift */
}

.product-card {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform .15s ease, box-shadow .15s ease;
    display: flex;
    flex-direction: column;
}

/* Hover */
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.10);
}

/* =========================
   Bildbereich mit Hover & Quick View
   ========================= */

.product-image {
    position: relative;
    width: 100%;
    height: 160px;
    background: #fff;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity .25s ease, transform .25s ease;
}

.product-image img.hover {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.product-card:hover .product-image img.hover {
    opacity: 1;
}

.product-card:hover .product-image img:first-child {
    opacity: 0;
}

/* Quick View Overlay */
.quick-view {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: .85rem;
    padding: 6px 14px;
    border-radius: 20px;
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}

.product-card:hover .quick-view {
    opacity: 1;
}

/* =========================
   Textbereich
   ========================= */

.product-card h3 {
    font-size: 1.05rem;
    margin: 1rem 1rem .3rem;
    line-height: 1.3;
}

.product-card h3 a {
    color: #003366;
    text-decoration: none;
}

.product-card h3 a:hover {
    text-decoration: underline;
}

.product-card .sku {
    font-size: .8rem;
    color: var(--c-muted);
    margin: 0 1rem .3rem;
}

.product-card .price {
    margin: .6rem 1rem 1.2rem;
    font-weight: bold;
    font-size: 1.15rem;
    color: #000;
}

.shipping-note {
    font-size: .75rem;
    color: #666;
    margin: .2rem 1rem 1.1rem;
}

.shipping-note a {
    color: var(--c-primary);
    text-decoration: none;
}

.shipping-note a:hover {
    text-decoration: underline;
}

/* =========================
   PRODUCT DETAIL (Einzelseite)
   ========================= */

.product-detail-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 2.5rem;
    align-items: flex-start;
}

.product-image-box {
    border: 1px solid #e3e3e3;
    border-radius: 12px;
    padding: 1.2rem;
    background: #fff;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.product-image-box img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
}

.product-detail h2 {
    font-size: 1.9rem;
    margin-bottom: 1rem;
    color: #003366;
}

.product-detail p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.product-detail .price {
    font-size: 1.6rem;
    font-weight: bold;
    color: #000;
    margin-top: 1.5rem;
}

.product-detail .price-sub {
    font-size: 1rem;
    margin-top: .2rem;
}


/* Bruttopreis unter Nettopreis im Detail */

.price-sub {
    font-size: .95rem;
    color: var(--c-muted);
    margin-top: .2rem;
}


/* =========================
   BREADCRUMBS
   ========================= */

.breadcrumbs {
    font-size: .9rem;
    margin: 0 0 1.2rem;
    color: #666;
}

.breadcrumbs a {
    color: var(--c-primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* ===== Login Modal ===== */

.login-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    /* WICHTIG: standardmäßig versteckt – nur mit .open sichtbar.
       Ohne display:none öffnete sich das Modal bei jedem Seitenladen. */
    display: none;
    align-items: center;
    justify-content: center;
}
.login-modal-overlay.open {
    display: flex;
}

.login-modal {
    background: #fff;
    width: 100%;
    max-width: 420px;
    padding: 24px 28px 28px;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideDown 0.25s ease-out;
}

@keyframes modalSlideDown {
    from {
        transform: translateY(-40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-modal h2 {
    margin: 0 0 18px;
    text-align: center;
}

.login-modal .form-group {
    margin-bottom: 14px;
}

.login-modal label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.login-modal input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--c-border);
}

.login-submit {
    width: 100%;
    margin-top: 10px;
    padding: 11px 14px;
    border: none;
    border-radius: 6px;
    background: #222;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.login-submit:hover {
    background: #000;
}

.login-modal-footer {
    margin-top: 18px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.login-modal-footer a {
    color: #0066cc;
    text-decoration: none;
}

.login-modal-footer a:hover {
    text-decoration: underline;
}

.login-modal-close {
    position: absolute;
    right: 10px;
    top: 8px;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
}


/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 900px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .category-sidebar {
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .product-area {
        padding-left: 0;
    }

    .product-grid {
        margin-top: 1rem;
    }
}

/* ============================================================
   MOBIL-NACHBESSERUNG (Punkt 2)
   Zentrale, defensive Regeln – greifen shopweit, da responsive.css
   als letzte CSS-Datei geladen wird.
   ============================================================ */

@media (max-width: 768px) {

    /* 1) Lange Inhalte nie das Layout sprengen lassen */
    body { overflow-x: hidden; }
    img, video, iframe, table { max-width: 100%; }
    p, h1, h2, h3, li, td, a, span { overflow-wrap: anywhere; word-break: break-word; }

    /* 2) Tabellen: horizontal scrollbar statt abgeschnitten.
       Wir umschließen sie per CSS-Container, wo möglich, und lassen
       ansonsten die Tabelle selbst scrollen. */
    .account-table,
    .review-table,
    .order-success-table,
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-collapse: collapse;
    }
    .account-table thead,
    .review-table thead,
    .order-success-table thead {
        /* Kopf bleibt sichtbar; falls zu breit, scrollt die Tabelle */
    }
    .account-table th, .account-table td,
    .review-table th, .review-table td,
    .order-success-table th, .order-success-table td {
        white-space: nowrap;
        padding: .5rem .6rem;
        font-size: .88rem;
    }

    /* 3) Feste Modal-Breite flexibel machen */
    .rent-modal-box {
        width: 100% !important;
        max-width: 600px;
    }

    /* 4) Buttons/Formulare: volle Breite, kein Überlauf */
    .btn, button, input[type="submit"] { max-width: 100%; }
    .checkout-btn-row, .cart-actions, .payment-actions, .form-actions {
        flex-wrap: wrap;
        gap: .5rem;
    }
    input, select, textarea { max-width: 100%; }

    /* 5) Zwei-Spalten-Grids auf schmalen Displays einspaltig */
    .product-grid, .rent-product-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* 6) Konkrete Layout-Container, die sonst überlaufen, umbrechen lassen */
    .checkout-progress {
        flex-wrap: wrap;
        gap: .5rem;
        row-gap: .75rem;
    }
    .payment-methods-list,
    .shipping-methods-list {
        flex-direction: column;
        flex-wrap: wrap;
    }
    .product-filterbar {
        flex-wrap: wrap;
        gap: .6rem;
    }
    .pf-search { width: 100%; }
    .pf-price-inputs { flex-wrap: wrap; }
    .cart-cards { flex-wrap: wrap; }

    /* Zahlungs-/Versandkarten volle Breite, damit sie nicht quetschen */
    .payment-method-card,
    .shipping-method-card {
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* Sehr schmale Displays: Produktraster einspaltig */
    .product-grid, .rent-product-grid {
        grid-template-columns: 1fr;
    }
    /* Überschriften etwas kleiner */
    h1 { font-size: 1.4rem; }
    h2 { font-size: 1.2rem; }
}
