/*
Theme Name: AHE Katalog (2026)
Theme URI: https://www.kaeding-anderson.de
Author: Kaeding Anderson
Author URI: https://wordpress.org/
Description: Theme für ahe-holding.de (2026). 
Version: 1.0
Text Domain: ahe
*/

/* VARIABLES */

:root {
    --red: #da0030;
    --redhover: #bb2d3b;
    --darkgrey: #404040;
    --lightgrey: #f8f8f8;
    --middlegrey: #737373;
    --white: #FFFFFF;
    --black: #000000;
    --black-transparent: rgba(0, 0, 0, 0.8);
}

/* ############################################ */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 50px;
}

/* Typo */

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 600;
    letter-spacing: .02rem;
}

.has-hero-font-size {
    line-height: 1.1;
    hyphens: auto;
    -webkit-hyphens: auto;
    -webkit-hyphenate-limit-chars: 10 5 5;
    hyphenate-limit-chars: 10 5 5;
    font-weight: 600;
}

.has-intro-font-size strong {
    font-weight: 600;
}

.has-h-1-font-size, .has-h-2-font-size, .has-h-3-font-size, .has-h-4-font-size {
    line-height: 1.2;
    font-weight: 600;
    text-transform: uppercase;
}

.h1, .has-h-1-font-size {
    font-size: clamp(1.75rem, calc(1.375rem + 1.5vw), 3rem) !important;
}

.h2, .has-h-2-font-size {
    font-size: clamp(1.5rem, calc(1.325rem + .9vw), 2.2rem) !important;
}

.h3, .has-h-3-font-size {
    font-size: clamp(1.3rem, calc(1.3rem + .6vw), 1.8rem) !important;
}

.h4, .has-h-4-font-size {
    font-size: clamp(1.15rem, calc(1.15rem + .6vw), 1.4rem) !important;
}

h1+h2, h2+h3, h3+h4, h1+.has-h-1-font-size, h2+.has-h-2-font-size, h3+.has-h-3-font-size {
    margin-top: 0;
}

/* Links */

a {
    color: inherit;
    text-underline-offset: 3px;
    transition: all ease .3s;
}

a:hover {
    color: inherit;
}

/* Header */

#header {
    z-index: 2000;
    transition: all ease .5s;
}

#header .logo.navbar-brand {
    width: 100px;
    height: auto;
    transition: width ease 0.3s;
}

/* Footer */

#footer {
    color: var(--darkgrey);
    margin-top: 4rem;
}

#footer a {
    text-decoration: none;
}

#footer a:hover {
    color: var(--red);
    text-decoration: underline;
}

#footer_legal_nav a {
    --bs-nav-link-padding-x: .5rem;
    --bs-nav-link-padding-y: 0;
}

/* Blocks */

.entry-content > .wp-block-cover:first-child + .wp-block-group {
    margin-top: 0;
}

.wp-block-cover + .wp-block-group.alignfull {
    margin-top: 0;
}

.entry-content > .wp-block-group:last-of-type:not(.alignfull) {
    margin-bottom: 4rem;
}

.wp-block-media-text.has-media-on-the-right .wp-block-media-text__content {
    padding-left: 0;
}

.wp-block-column.has-background {
    padding: 1.5rem;
}

.wp-block-columns .wp-block-column.has-white-background-color {
    padding-left: 0;
}

.entry-content > .wp-block-group.alignwide:not(.has-background) {
    padding-left: 0;
    padding-right: 0;
}

.wp-block-group.alignfull + .wp-block-group.alignfull {
    margin-top: 0;
}

.wp-block-group.alignfull:not(.has-background) + .wp-block-group.alignfull:not(.has-background) {
    padding-top: 0;
}

:where(body .is-layout-flow) > form {
    margin-top: 0;
}

.entry-content .yoast-breadcrumbs + h1 {
    margin-top: .7rem;
}

/* Products */

.single-product .product-main-img {
    max-height: 450px;
}

.single-product .product-gallery-img {
    min-height: 253px;
}

.single-product .product-category-label {
    display: block;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    font-weight: 600;
    letter-spacing: 0.1rem;
    text-shadow: 1px 1px 3px var(--black-transparent);
}

.single-product .product-title {
    text-shadow: 1px 1px 3px var(--black-transparent);
}

.single-product .product-dimension-item {
    height: 120px;
}

.single-product .product-dimension-svg {
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block;
}

.single-product .color-label-text {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 1px 1px 3px var(--black-transparent);
    letter-spacing: 0.03rem;
}

.single-product .area-icon-box {
    width: 30px;
    height: 30px;
    overflow: hidden;
}

.single-product .area-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.single-product .area-text-list {
    font-size: 0.7rem;
    letter-spacing: 0.05rem;
}

.single-product .surface-badge {
    font-size: 0.7rem;
}

.single-product .pattern-item-wrapper {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
}

.single-product .pattern-box-dynamic {
    height: 270px;
    width: fit-content;
    display: flex;
    border: 1px solid #dee2e6;
    background-color: #fff;
    overflow: hidden;
}

.single-product .pattern-img {
    height: 100%;
    width: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

.single-product .pattern-notice-text {
    width: 0;
    min-width: 100%;
    max-width: 100%;
    display: block;
    word-wrap: break-word;
}

.single-product .sticky-sidebar.sticky-lg-top {
    top: 50px;
}

.single-product .spec-icon {
    width: 45px;
    height: 45px;
}

.single-product .spec-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bg-gradient-dark-top {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
}

/* Buttons */

.btn {
    font-weight: 600;
    border-radius: 2rem;
    border-width: 2px;
    --bs-btn-padding-x: 1rem;
}

.wp-block-button__link {
    transition: all ease .3s;
}

/* erecht24 */

#impressum p:first-child {
    margin-top: 0 !important;
}

#impressum p:first-child::first-line {
    font-weight: bolder !important;
}

#impressum h2 {
    font-size: clamp(1rem, calc(1rem + .05vw), 1.1rem) !important;
    font-weight: bolder !important;
}

#datenschutz h2:not(:first-child) {
    margin: 2.5rem 0 !important;
}

#datenschutz h3, #datenschutz h4 {
    margin: 1.5rem 0 !important;
}

#datenschutz p, #impressum p {
    margin-block-start: 1rem !important;
}

/* Utilities */

.bg-transparent {
    background: transparent;
}

.cursor-pointer {
    cursor: pointer;
}

.hyphens {
    hyphens: auto;
    -webkit-hyphenate-limit-before: 3;
    -webkit-hyphenate-limit-after: 4;
}

#btn-to-top {
    width: 45px;
    height: 45px;
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background-color: var(--white);
    border: 1px solid var(--lightgrey);
    color: var(--black);
    transition: all 0.3s ease;
}

#btn-to-top:hover {
    background-color: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.aspect-ratio img.card-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.aspect-ratio-1-1 { aspect-ratio: 1 / 1; }
.aspect-ratio-2-1 { aspect-ratio: 2 / 1; }
.aspect-ratio-3-1 { aspect-ratio: 3 / 1; }
.aspect-ratio-3-2 { aspect-ratio: 3 / 2; }
.aspect-ratio-4-3 { aspect-ratio: 4 / 3; }
.aspect-ratio-3-4 { aspect-ratio: 3 / 4; }

hr {
    border-top: 1px solid var(--lightgrey);
    margin: 2rem 0;
    opacity: 1;
}

:focus-visible {
    outline: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Fade In Lazeloaded Content */

img[data-src] {
    opacity: 0;
}

img.lazyloaded {
    transition: opacity .15s linear 0.1s;
    opacity: 1;
}

/* Responsive Styles */

@media screen and (max-width: 575px) {

    .wp-block-group {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .wp-block-media-text .wp-block-media-text__content {
        padding: 1rem 0;
    }

}

@media screen and (min-width: 768px) {

    .container {
        max-width: calc(100% - 2rem);
    }

}

@media screen and (max-width: 767px) {

    .container {
        max-width: calc(100% - .5rem);
    }

}

@media screen and (min-width: 992px) {

    #header .logo.navbar-brand {
        width: 140px;
    }

    .single-product .product-header-row {
        height: 530px;
    }

    .single-product .product-main-img {
        height: 100% !important;
        min-height: 100% !important;
    }

    .single-product .product-gallery-col {
        height: 100%;
    }

}

@media screen and (max-width: 991px) {

    .sticky-sidebar.sticky-lg-top {
        top: 0;
    }

}

@media screen and (min-width: 1200px) {

    body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
    .wp-block-cover__inner-container > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
        max-width: var(--wp--style--global--content-size);
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body .is-layout-constrained > .alignwide,
    .wp-block-cover__inner-container > .alignwide {
        max-width: var(--wp--style--global--wide-size);
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
}

@media screen and (min-width: 1352px) {

    .container {
        max-width: 1320px;
    }

}

@media screen and (min-width: 1600px) {

    :root :where(.wp-block-group) {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
    
}