/* AVPro Button - mobile alignment for red Rent button */
@media (max-width: 767px) {
    .avpro-button-wrapper.avpro-button-align-right {
        text-align: left !important;
        justify-content: flex-start !important;
        margin-bottom: 2.5rem !important;
    }

    .page-template-page-full-width-header .entry-content h2 {
        margin-top: 1rem !important;
        margin-bottom: 0 !important;
    }

    .avpro-full-width-container .wp-block-columns {
        margin-bottom: 0 !important;
    }
}

/* Borlabs Cookie - smaller buttons, text & details view */
.brlbs-cmpnt-dialog .brlbs-cmpnt-btn {
    font-size: 14px !important;
    padding: 8px 16px !important;
    line-height: 1.3 !important;
}

.brlbs-cmpnt-dialog-bar-main {
    font-size: 13px !important;
}

.brlbs-cmpnt-dialog-details {
    font-size: 13px !important;
}

.brlbs-cmpnt-dialog-details-header {
    font-size: 18px !important;
}

.brlbs-cmpnt-dialog-details .brlbs-cmpnt-tab {
    font-size: 13px !important;
    padding: 8px 12px !important;
}

.brlbs-cmpnt-dialog-details .brlbs-cmpnt-btn {
    font-size: 13px !important;
    padding: 8px 16px !important;
}

/**
 * Custom CSS for AvPro Theme
 * Based on draft.avpro.at design
 *
 * @package AvPro
 * @since 1.0.0
 */

/* ==========================================
   GLOBAL STYLES
   ========================================== */

body {
    overflow-x: hidden;
}

.site-main {
    background: var(--avpro-white);
}

img:not(.custom-logo) {
    border-radius: var(--avpro-radius-md);
}

.card {
    border-radius: var(--avpro-radius-md) !important;
    border: none;
    box-shadow: var(--avpro-shadow-sm);
}

.card-img,
.card-img-top {
    border-radius: var(--avpro-radius-md) !important;
}

/* ==========================================
   SITE HEADER
   ========================================== */
.site-header {
    background: var(--avpro-white);
    box-shadow: var(--avpro-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .navbar {
    padding: 1rem 0;
}

.site-branding {
    display: flex;
    align-items: center;
    flex-direction: column;
}

@media (min-width: 992px) {
    .site-branding {
        flex-direction: row;
        gap: 1rem;
    }
}

.custom-logo-link {
    display: inline-block;
    line-height: 1;
}

.custom-logo {
    max-height: 60px;
    width: auto;
    height: auto;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--avpro-primary);
    text-decoration: none;
    margin: 0;
}

.navbar-brand:hover {
    color: var(--avpro-primary-dark);
}

.site-description {
    margin: 0;
    font-size: 0.875rem;
}

.entry-title {
    margin-bottom: var(--avpro-spacing-md);
}

.entry-title a {
    color: var(--avpro-text);
    text-decoration: none;
}

.entry-title a:hover {
    color: var(--avpro-primary);
}

.entry-meta {
    margin-bottom: var(--avpro-spacing-md);
}

.entry-meta a {
    color: var(--avpro-text-muted);
}

.entry-meta a:hover {
    color: var(--avpro-primary);
}

.entry-content {
    line-height: 1.8;
}

.entry-content p {
    margin-top: 0 !important;
    margin-bottom: var(--avpro-spacing-md) !important;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--avpro-radius-md);
}

.entry-footer {
    padding-top: var(--avpro-spacing-md);
    border-top: 1px solid var(--avpro-border);
    color: var(--avpro-text-muted);
    font-size: 0.875rem;
}

.entry-footer span {
    margin-right: var(--avpro-spacing-md);
}

.post-thumbnail {
    overflow: hidden;
    border-radius: var(--avpro-radius);
}

.post-thumbnail img {
    transition: transform 0.3s ease;
}

.post-thumbnail:hover img {
    transform: scale(1.05);
}

.widget {
    background: var(--avpro-gray-light);
    padding: var(--avpro-spacing-lg);
    border-radius: var(--avpro-radius);
}

.widget-title {
    color: var(--avpro-text);
    margin-bottom: var(--avpro-spacing-md);
    padding-bottom: var(--avpro-spacing-sm);
    border-bottom: 2px solid var(--avpro-primary);
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--avpro-border);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--avpro-text);
}

.widget a:hover {
    color: var(--avpro-primary);
}

.site-footer {
    background: var(--avpro-footer-bg);
    color: var(--avpro-text);
    padding: 0;
}

.site-footer .footer-content {
    padding: var(--avpro-spacing-xl) 0;
}

.site-footer .widget {
    background: transparent;
    padding: 0;
}

.site-footer .widget-title {
    color: var(--avpro-text);
    font-size: var(--avpro-font-lg);
    font-weight: var(--avpro-font-bold);
    margin-bottom: var(--avpro-spacing-md);
    border-bottom: 2px solid var(--avpro-primary);
    padding-bottom: var(--avpro-spacing-sm);
}

.site-footer a {
    color: var(--avpro-text);
    transition: var(--avpro-transition-base);
}

.site-footer a:hover {
    color: var(--avpro-primary);
}

.site-footer .footer-divider {
    border-color: var(--avpro-border);
    opacity: 1;
    margin: var(--avpro-spacing-xl) 0;
}

.site-footer .site-info {
    padding: var(--avpro-spacing-md) 0;
    font-size: var(--avpro-font-sm);
    color: var(--avpro-text-muted);
}

.site-footer .site-info a {
    color: var(--avpro-text);
    font-weight: var(--avpro-font-bold);
}

.site-footer .site-info a:hover {
    color: var(--avpro-primary);
}

.pagination {
    margin-top: var(--avpro-spacing-xl);
}

.page-item.active .page-link {
    background-color: var(--avpro-primary);
    border-color: var(--avpro-primary);
}

.page-link {
    color: var(--avpro-primary);
}

.page-link:hover {
    color: var(--avpro-primary-dark);
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment-body {
    padding: var(--avpro-spacing-lg);
    margin-bottom: var(--avpro-spacing-md);
    background: var(--avpro-secondary);
    border-radius: var(--avpro-radius);
}

.comment-author {
    font-weight: 600;
    margin-bottom: var(--avpro-spacing-sm);
}

.comment-meta {
    color: var(--avpro-text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--avpro-spacing-sm);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--avpro-form-border);
    border-radius: var(--avpro-radius-sm);
    font-size: var(--avpro-font-size);
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    border-color: var(--avpro-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 124, 168, 0.1);
}

button,
input[type="button"],
input[type="submit"] {
    background-color: var(--avpro-primary);
    color: var(--avpro-white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--avpro-radius-sm);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
    background-color: var(--avpro-primary-dark);
}

.wp-block-group {
    margin-bottom: var(--avpro-spacing-lg);
}

.wp-block-button__link {
    background-color: var(--avpro-primary);
    color: var(--avpro-white);
    border-radius: var(--avpro-radius-sm);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.wp-block-button__link:hover {
    background-color: var(--avpro-primary-dark);
    color: var(--avpro-white);
}

.wp-block-quote {
    border-left: 4px solid var(--avpro-primary);
    padding-left: var(--avpro-spacing-lg);
    font-style: italic;
    color: var(--avpro-text-light);
}

.wp-block-pullquote {
    border-top: 4px solid var(--avpro-primary);
    border-bottom: 4px solid var(--avpro-primary);
    padding: var(--avpro-spacing-lg) 0;
}

.wp-block-cover {
    border-radius: var(--avpro-radius);
}

.wp-block-table {
    border-collapse: collapse;
    width: 100%;
}

.wp-block-table td,
.wp-block-table th {
    border: 1px solid var(--avpro-border);
    padding: var(--avpro-spacing-sm);
}

.wp-block-table th {
    background-color: transparent;
    font-weight: 600;
}

p.form-row input.timepicki-input {
    font-size: 15px;
    width: 85% !important;
}

#primary-menu .nav-link,
.navbar-nav .nav-link {
    font-weight: 500;
}

.navbar-nav .nav-item.current-menu-item > .nav-link,
.navbar-nav .nav-item.current_page_item > .nav-link,
.navbar-nav .nav-item.current-menu-ancestor > .nav-link {
    font-weight: 700 !important;
    color: var(--avpro-primary) !important;
}

/* ==========================================
   MOBILE HEADER ADJUSTMENTS
   ========================================== */

.mobile-header-icons {
    gap: 0.75rem;
    margin-left: auto;
    margin-right: 0.75rem;
}

.mobile-icon-link {
    color: #212529;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    padding: 0.25rem;
}

.mobile-icon-link:hover {
    color: #000;
}

.mobile-icon-link .badge {
    font-size: 0.55rem;
    min-width: 16px;
    height: 16px;
    padding: 0.2rem 0.3rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-header-icons .dropdown-menu {
    background-color: #343a40;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 150px;
}

.mobile-header-icons .dropdown-item {
    color: #fff;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.mobile-header-icons .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.mobile-header-icons .dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffc107;
}

@media (max-width: 991px) {
    .top-menu-bar {
        padding: 0 !important;
        overflow: hidden;
        height: 3px;
        min-height: 3px;
    }

    .top-menu-bar .container,
    .top-menu-bar .container > div {
        display: none !important;
    }

    .custom-logo-link {
        overflow: hidden;
        width: 50px;
        height: 50px;
        display: block;
        flex-shrink: 0;
    }

    .custom-logo-link .custom-logo {
        max-height: 50px;
        width: auto;
        height: 50px;
        object-fit: cover;
        object-position: left center;
    }

    .site-branding {
        flex-direction: row;
        align-items: center;
    }

    .site-header .navbar {
        padding: 0.5rem 0;
    }

    .site-header .navbar .container {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }

    .site-header {
        transition: transform 0.3s ease;
    }

    .site-header.header-hidden {
        transform: translateY(-100%);
    }

    .site-header.header-visible {
        transform: translateY(0);
    }

    .navbar-nav .dropdown-menu {
        display: block;
        padding: 0;
        margin: 0 0 0 20px;
        border: 0;
        box-shadow: none;
        background: transparent;
    }
}



/* ==========================================
   BREADCRUMB - HORIZONTAL SCROLL
   ========================================== */
.avpro-breadcrumb .breadcrumb {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.avpro-breadcrumb .breadcrumb::-webkit-scrollbar {
    display: none;
}

.avpro-breadcrumb .breadcrumb-item {
    flex-shrink: 0;
}

/* ==========================================
   BLOG ARCHIVE - MOBILE IMAGE ABOVE TEXT
   ========================================== */
@media (max-width: 767px) {
    .blog-archive-mobile-image {
        display: block;
    }

    .blog-archive-mobile-image img {
        border-radius: 8px 8px 0 0;
        object-fit: cover;
        max-height: 220px;
    }

    .blog-archive-item.container {
        padding-left: 0;
        padding-right: 0;
        margin-left: 12px;
        margin-right: 12px;
        width: auto;
        overflow: hidden;
    }

    .blog-archive-row-with-bg {
        background-image: none !important;
        border-radius: 0;
        --bs-gutter-x: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .blog-archive-row-with-bg::before {
        right: 0;
        background: rgba(242, 242, 247, 0.95);
    }
}

/* ==========================================
   TERMINE - MOBILE FIX
   ========================================== */
@media screen and (max-width: 768px) {
    .avpro-termine-table td {
        padding-left: 0 !important;
        position: static !important;
    }

    .avpro-termine-table td::before {
        position: static !important;
        display: block !important;
        width: auto !important;
        margin-bottom: 0.15rem;
    }
}

/* ========================================
   PRODUKTBILD - Leerraum fix
   ======================================== */
@media (min-width: 768px) {
    .woocommerce div.product .woocommerce-product-gallery {
        align-self: start !important;
        grid-column: 1 / 7 !important;
    }
}

/* ========================================
   ÄHNLICHE PRODUKTE - Gleichmäßige Karten
   ======================================== */

/* Überschrift mit Linie bündig zu Tabs */
.upsells.products > h2,
.related.products > h2 {
    padding-top: 2rem !important;
    border-top: 2px solid #e5e5e5 !important;
    margin-top: 0 !important;
}

/* Grid 4 Spalten */
.upsells.products ul.products,
.related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1rem !important;
    align-items: start !important;
}

/* Karte - fixe Höhe */
body.single-product section.up-sells li.product,
body.single-product section.upsells li.product,
body.single-product section.related li.product {
    height: 260px !important;
    max-height: 260px !important;
    min-height: 260px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-self: start !important;
}

/* Bild */
body.single-product section.up-sells li.product img,
body.single-product section.upsells li.product img,
body.single-product section.related li.product img {
    height: 130px !important;
    min-height: 130px !important;
    max-height: 130px !important;
    width: 100% !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    margin-bottom: 6px !important;
}

/* Titel - max 2 Zeilen */
body.single-product section.up-sells li.product .woocommerce-loop-product__title,
body.single-product section.upsells li.product .woocommerce-loop-product__title,
body.single-product section.related li.product .woocommerce-loop-product__title {
    font-size: 0.75rem !important;
    line-height: 1.3 !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    margin: 0 0 4px !important;
    min-height: unset !important;
    flex-shrink: 0 !important;
}

/* Preis */
body.single-product section.up-sells li.product .price,
body.single-product section.upsells li.product .price,
body.single-product section.related li.product .price {
    font-size: 0.85rem !important;
    margin: 0 0 4px !important;
    flex-shrink: 0 !important;
}

/* Button */
body.single-product section.up-sells li.product .button,
body.single-product section.up-sells li.product .yith-ywraq-add-button,
body.single-product section.upsells li.product .button,
body.single-product section.upsells li.product .yith-ywraq-add-button,
body.single-product section.related li.product .button,
body.single-product section.related li.product .yith-ywraq-add-button {
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
    margin-top: auto !important;
}

@media (max-width: 767px) {
    .upsells.products ul.products,
    .related.products ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ==========================================
   AVPRO /// LIST BULLETS
   ========================================== */
.entry-content ul li {
    list-style: none;
    display: flex;
    gap: 8px;
    padding-left: 0;
}

.entry-content ul li::before {
    content: '///';
    color: #DA291C;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
    padding-top: 3px;
}
