/* custom.css — OpenCart OCB Theme Anpassungen
   Einbinden in header.tpl nach stylesheet.css
   Generiert aus vqmod footer.tpl CSS-Blöcken
   ─────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════
   Cart Dropdown Mobile
   Source: ocb_cart_dropdown_mobile.xml
   ═══════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    #cart .dropdown-menu { max-height: 70vh; overflow-y: auto; }
}

/* ═══════════════════════════════════════════════════════
   Cart Totals Layout
   Source: ocb_cart_totals_layout.xml
   ═══════════════════════════════════════════════════════ */
/* Cart-Dropdown Totals: Titel links, Betrag rechts, gleiche Höhe */
.cart-totals > li { display:flex !important; justify-content:space-between; align-items:center; }
.cart-totals > li > span { float:none !important; }

/* ═══════════════════════════════════════════════════════
   Header Logout
   Source: ocb_header_logout.xml
   ═══════════════════════════════════════════════════════ */
#topbar li.dropdown .dropdown-menu { min-width: 150px; }
#topbar li.dropdown .dropdown-menu > li > a { padding: 6px 14px; font-size: 13px; }
#topbar li.dropdown .dropdown-menu .glyphicon { margin-right: 5px; font-size: 12px; color: #888; }

/* ═══════════════════════════════════════════════════════
   Hide Listview
   Source: ocb_hide_listview.xml
   ═══════════════════════════════════════════════════════ */
/* Listenansicht: gesamten Toggle-Bereich ausblenden */
/* betrifft category, manufacturer, designer, search, special, asearch */
div.display { display: none !important; }

/* Falls Listenansicht per Cookie aktiv ist: als Grid rendern */
.product-list {
    display: flex !important;
    flex-wrap: wrap !important;
}
.product-list > div {
    width: 25% !important;
    box-sizing: border-box !important;
    padding: 0 10px 20px !important;
}
@media (max-width: 991px) {
    .product-list > div { width: 33.33% !important; }
}
@media (max-width: 767px) {
    .product-list > div { width: 50% !important; }
}

/* ═══════════════════════════════════════════════════════
   Magnific Popup
   Source: ocb_magnific_popup.xml
   ═══════════════════════════════════════════════════════ */
/* Magnific Popup: Bildgrösse responsiv */
        .mfp-img { max-height: 90vh !important; }
        .mfp-figure figure { margin: 0; }
        .mfp-counter { color: #ccc; font-size: 13px; }
        /* Touch-Geste Hinweis ausblenden */
        .mfp-bottom-bar { margin-top: -30px; }

/* ═══════════════════════════════════════════════════════
   Mobile Grid Equal Width
   Source: ocb_mobile_grid_equal_width.xml
   ═══════════════════════════════════════════════════════ */
@media (max-width: 767px) {

    /* Einheitliche Spaltenbreite im Produktgrid */
    .product-grid .col-xs-6,
    .product-grid [class*="col-xs-"] {
        box-sizing: border-box !important;
        min-width: 0 !important;
        max-width: 50% !important;
    }

    /* Langer Text bricht um statt Breite zu dehnen */
    .product-grid .name,
    .product-grid .name a,
    .product-grid .name b,
    .product-grid .caption .name {
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
    }

    /* Bilder: nie breiter als Spalte */
    .product-grid .image img,
    .product-grid img.img-responsive {
        max-width: 100% !important;
        width: auto !important;
        height: auto !important;
    }

    /* product-inner: kein min-width */
    .product-grid .product-inner,
    .product-grid .product-thumb {
        min-width: 0 !important;
        width: 100% !important;
    }

}

/* ── Touch-Geräte: Tablet + Phone (pointer:coarse = kein Maus) ── */
/* Deckt alle Touch-Auflösungen ab: 768px, 1024px (iPad), 1280px etc. */
@media (hover: none) and (pointer: coarse) and (min-width: 768px) {

    /* Filter: Toggle-Button + Slide-In wie auf Phone */
    #filter-module-toggle,
    .filter-module .hide-button {
        display: block !important;
    }
    .filter-module {
        display: none;
        box-shadow: 0 2px 5px #888;
        position: absolute;
        top: 0;
        left: 2%;
        width: 96%;
        z-index: 9999;
    }

    /* Produktgrid: einheitliche Breite */
    .product-grid [class*="col-"] {
        box-sizing: border-box !important;
        min-width: 0 !important;
    }
    .product-grid .product-inner,
    .product-grid .product-thumb {
        min-width: 0 !important;
        width: 100% !important;
    }
    .product-grid .name,
    .product-grid .name a,
    .product-grid .name b {
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    .product-grid .image img,
    .product-grid img.img-responsive {
        max-width: 100% !important;
        width: auto !important;
        height: auto !important;
    }

}

/* ═══════════════════════════════════════════════════════
   Pagination Style
   Source: ocb_pagination_style.xml
   ═══════════════════════════════════════════════════════ */
/* ── Pagination ─────────────────────────────────────────── */
div.pagination { text-align: center; margin: 12px 0; }

div.pagination ul,
.pagination ul {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
    list-style: none;
    padding: 0;
    margin: 0;
}

div.pagination ul li a,
div.pagination ul li span,
.pagination li a,
.pagination li span {
    display: inline-block;
    min-width: 30px;
    height: 30px;
    line-height: 28px;
    padding: 0 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #5a7fa8;
    background: #f5f7fa;
    border: 1px solid #d0dae6;
    border-radius: 4px;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}

div.pagination ul li a:hover,
.pagination li a:hover {
    background: #5a7fa8;
    color: #fff;
    border-color: #5a7fa8;
    text-decoration: none;
}

div.pagination ul li.active a,
div.pagination ul li.active span,
.pagination li.active a,
.pagination li.active span {
    background: #5a7fa8;
    color: #fff;
    border-color: #5a7fa8;
    cursor: default;
    font-weight: 700;
}

div.pagination ul li.disabled a,
div.pagination ul li.disabled span,
.pagination li.disabled a,
.pagination li.disabled span {
    color: #bbb;
    background: #f5f7fa;
    border-color: #e0e6ed;
    cursor: default;
    pointer-events: none;
}

/* Seitenzahl-Info rechts neben Pagination */
div.pagination + p,
div.pagination ~ .pagination-results {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════
   Product Tabs Style
   Source: ocb_product_tabs_style.xml
   ═══════════════════════════════════════════════════════ */
/* ── Produkt-Tabs ───────────────────────────────────────── */

/* Tab-Leiste */
#tabs.nav-tabs {
    border-bottom: 2px solid #cccccc;
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

/* Einzelner Tab */
#tabs.nav-tabs > li > a {
    border: 1px solid #d0dae6;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    background: #f0f4f8;
    color: #5a7a9a;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 18px;
    margin-right: 0;
    transition: background .15s, color .15s;
}

#tabs.nav-tabs > li > a:hover {
    background: #dce8f5;
    color: #2a5a8a;
    border-color: #b0c8e0;
}

/* Aktiver Tab */
#tabs.nav-tabs > li.active > a,
#tabs.nav-tabs > li.active > a:focus,
#tabs.nav-tabs > li.active > a:hover {
    background: #3a7abf;
    color: #ffffff;
    border-color: #cccccc;
    border-bottom-color: #cccccc;
    font-weight: 600;
    cursor: default;
}

/* Tab-Inhalt */
.tab-content {
    border: 1px solid #cccccc;
    border-top: none;
    border-radius: 0 0 5px 5px;
    padding: 18px 20px;
    background: #fff;
}

/* Mobile: Tabs scrollen horizontal */
@media (max-width: 767px) {
    #tabs.nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    #tabs.nav-tabs > li > a {
        padding: 7px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
}

/* ═══════════════════════════════════════════════════════
   Quickcheckout Login Mobile
   Source: ocb_quickcheckout_login_mobile.xml
   ═══════════════════════════════════════════════════════ */
/* ── Quickcheckout Login: Mobile-Fix ─────────────────────── */

/* Button: OCB-Styling für alle Viewports */
#login #button-login {
    background: #5a8ab8;
    color: #fff;
    border: 1px solid #4a7aaa;
    border-radius: 4px;
    padding: 5px 14px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
#login #button-login:hover {
    background: #4a7aaa;
}

/* Inputs: Bootstrap-Optik */
#login input[type="text"],
#login input[type="password"] {
    border: 1px solid #ccd5db;
    border-radius: 4px;
    padding: 4px 7px;
    font-size: 13px;
}

@media (max-width: 767px) {

    /* Felder untereinander stapeln */
    #login > div {
        width: 100% !important;
        float: none !important;
        text-align: left !important;
        margin-bottom: 8px;
        box-sizing: border-box;
    }

    /* Inputs volle Breite */
    #login input[type="text"],
    #login input[type="password"] {
        width: 100%;
        box-sizing: border-box;
        margin-top: 3px;
    }

    /* Button zentriert und volle Breite */
    #login > div:last-child {
        text-align: center !important;
        margin-bottom: 0;
    }
    #login #button-login {
        width: 100%;
        padding: 7px 14px;
    }

}

/* ═══════════════════════════════════════════════════════
   Prozent-Badge (Rabatt-Anzeige)
   Verwendung: <span class="badge-percent">-15%</span>
   ═══════════════════════════════════════════════════════ */
.badge-percent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8391e;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 7px;
    border-radius: 5px;
    min-width: 36px;
    min-height: 36px;
    box-sizing: border-box;
    letter-spacing: 0.3px;
}

.badge-percent::before {
    content: '%';
    font-size: 15px;
    font-weight: 900;
    margin-right: 2px;
    opacity: 0.9;
}


/* ═══════════════════════════════════════════════════════
   Quickcheckout - Einheitliches Button-Styling
   Betrifft: #button-login, #button-payment-method,
             #button-coupon, #button-voucher, #button-reward,
             .button (Back-Link in confirm.tpl)
   ═══════════════════════════════════════════════════════ */

/* Basis-Styling für alle Quickcheckout-Buttons */
#login #button-login,
#button-payment-method,
#button-coupon,
#button-voucher,
#button-reward,
.quickcheckoutmid .button,
#checkout .button {
    background: #5a8ab8;
    color: #fff;
    border: 1px solid #4a7aaa;
    border-radius: 4px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    line-height: 1.5;
    transition: background .15s, border-color .15s;
}

#login #button-login:hover,
#button-payment-method:hover,
#button-coupon:hover,
#button-voucher:hover,
#button-reward:hover,
.quickcheckoutmid .button:hover,
#checkout .button:hover {
    background: #4a7aaa;
    border-color: #3a6a9a;
    color: #fff;
    text-decoration: none;
}

/* Weiter-Button (payment-method) etwas prominenter */
#button-payment-method {
    padding: 7px 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Mobile: volle Breite für alle Buttons */
@media (max-width: 767px) {
    #button-payment-method,
    #button-coupon,
    #button-voucher,
    #button-reward {
        width: 100%;
        text-align: center;
        padding: 7px 14px;
    }
}

