/*
Theme Name:     Dev
Theme URI:      
Description:    Enfold child theme.
Author:         Ameisenhaufen
Author URI:     ameisenhaufen.at
Template:       enfold
Version:        0.1.0
*/

.logo, .logo a {
    overflow: visible !important;
}
#header .logo.avia-svg-logo a svg {
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.2));
}

/* 2-col */
#top #wrap_all .amha-2-col {
    column-count: 2;
    column-gap: 6%;
}
#top #wrap_all .amha-2-col p {
    break-inside: avoid;
}
@media(max-width: 767px) {
    #top #wrap_all .amha-2-col {
        column-count: 1;
        column-gap: 0%;
    }
}

/* Read more */
#top #wrap_all .amha-read-more-button, #top #wrap_all .amha-read-more-button-close {
    display: none;
    background: none;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
}
@media(max-width: 767px) {
    #top #wrap_all .amha-read-more .amha-read-more-button, #top #wrap_all .amha-read-more-button-close {
        display: inline;
        text-decoration: underline;
    }
    #top #wrap_all .amha-read-more {
        position: relative;
        margin-top: -25px;
        margin-bottom: 30px;
    }
    #top #wrap_all .amha-read-more:not(.open):before {
        content: '';
        position: absolute;
        width: 100%;
        height: 60px;
        background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
        bottom: 100%;
    }
    #top #wrap_all .amha-read-more .amha-read-more-content {
        max-height: 0;
        overflow: hidden;
    }
    #top #wrap_all .amha-read-more.open .amha-read-more-content {
        max-height: none;
    }
}

@media(max-width: 767px) {
    #top .ba-footerone:before {
        transform: translatey(-96%);
        right: unset;
        left: 25%;
        width: 110vw;
        height: 20vw;
        background-repeat: no-repeat;
        background-size: cover;
        background-position: left bottom;
    }


    /* Header allgemein */
    #header .av-logo-container {
        padding-left: 20px !important;
    }
    .responsive #top #header .logo.avia-svg-logo, .responsive #top #header .logo.avia-svg-logo a, .responsive #top #header .logo.avia-svg-logo a svg {
        height: 90px !important;
        max-height: 90px !important;
    }
    .responsive #top #header .logo.avia-svg-logo, .responsive #top #header .logo.avia-svg-logo a, .responsive #top #header .logo.avia-svg-logo a svg {
        margin-top: -18px;
    }
    .responsive #top .av-main-nav .menu-item-avia-special {
        margin-top: 12px;
    }


    /* Produktseite */
    .responsive #top.is-amha-product-page #wrap_all .ba-makestrongred strong {
        font-family: 'inter-thin';
    }

    /** Containers **/
    .responsive #top.is-amha-product-page #wrap_all .ba-gridcontainer {
        padding: 0;
    }
    .responsive #top.is-amha-product-page #wrap_all .av-flex-cells .no_margin {
        padding-left: 31px !important;
        padding-right: 31px !important;
    }
    
    /** Produktbild **/
    #top.is-amha-product-page #wrap_all .ba-bigbeerimg {
        margin: 0 auto;
        float: none;
    }
    #top.is-amha-product-page #wrap_all .ba-bigbeerimg .avia-image-overlay-wrap {
        text-align: center;
    }
    #top.is-amha-product-page #wrap_all .ba-bigbeerimg .avia-image-overlay-wrap .avia_image {
        display: inline-block;
    }
    #top.is-amha-product-page #wrap_all .ba-bigbeerimg img {
        max-height: calc(83vh - 150px);
        margin-top: 20px;
    }
    #top.is-amha-product-page #wrap_all .amha-image-cell {
        padding-bottom: 0;
    }

    /** Titel **/
    #top.is-amha-product-page #wrap_all .amha-info-cell {
        padding-top: 0;
        margin-top: -15px;
    }
    #top.is-amha-product-page #wrap_all .amha-info-cell h2 {
        font-size: 42px;
    }
    #top.is-amha-product-page #wrap_all .amha-info-cell .ba-makestrongbig strong {
        font-family: 'inter-thin';
        font-weight: bold;
        line-height: 1.2;
        letter-spacing: -0.5px;
    }
    
    /** Badges **/
    #top.is-amha-product-page #wrap_all .amha-info-cell .amha_product__badges {
        margin-top: 48px;
    }

    /** Spacer **/
    #top.is-amha-product-page #wrap_all .amha-info-cell .ba-sortimentspace {
        margin: 20px 0;
    }
    #top.is-amha-product-page #wrap_all .amha-info-cell .ba-sortimentspace:after {
        width: 36px;
        height: 36px;
    }

    /** Bullet Points (Alkoholgehalt, Stammwürze, Zutaten, ...) **/
    #top.is-amha-product-page #wrap_all .amha-info-cell .ba-descone p {
        margin-top: 0.25em;
        margin-bottom: 0.25em;
    }
    #top.is-amha-product-page #wrap_all .amha-info-cell .ba-descone {
        margin-bottom: 10rpx;
    }
    
    /** Scales (Alkohol, Aromatik, Bittere) **/
    #top.is-amha-product-page #wrap_all .amha-info-cell .amha_product__scales p {
        margin-top: 2.8em;
        margin-bottom: 2.8em;
    }
    #top.is-amha-product-page #wrap_all .amha-info-cell .amha_product__scales p:last-child {
        margin-bottom: 0;
    }
    
    /** YT Video **/
    .responsive #top.is-amha-product-page #wrap_all .amha-youtube-video-container {
        margin-bottom: 0;
    }
    .responsive #top.is-amha-product-page #wrap_all .amha-youtube-video-container .ba-sortimentspace {
        margin-bottom: 40px;
    }

    /** Containers **/
    .responsive #top.is-amha-product-page #wrap_all .ba-sizeelement .ba-sizecontainer {
        min-width: 33%;
        width: 33%;
        margin-bottom: 10px;
    }
    .responsive #top.is-amha-product-page #wrap_all .containers-container {
        margin-bottom: 0 !important;
    }
    .responsive #top.is-amha-product-page #wrap_all .no-bottom-margin-mobile {
        margin-bottom: 0;
    }

    /** Nutrion Information **/
    .responsive #top.is-amha-product-page #wrap_all .ba-producttable,
    .responsive #top.is-amha-product-page #wrap_all .ba-producttable td {
        font-size: 14px;
    }
}

@media(max-width: 1024px) and (min-width: 768px) {
    #top.is-amha-product-page #wrap_all .amha-info-cell .flex_column {
        width: 100%;
        margin: 0;
    }
    #top.is-amha-product-page #wrap_all .amha-info-cell .amha_product__badges {
        margin-top: 30px;
    }
}



/* Sortiment Mobil */

/** Containers **/
@media (max-width: 767px) {
    .responsive #top.is-amha-product-page #wrap_all .ba-gridcontainer {
        padding: 0;
    }
    .responsive #top.is-amha-product-page #wrap_all .av-flex-cells .no_margin {
        padding-left: 31px !important;
        padding-right: 31px !important;
    }
}

/** Video Section **/
@media(max-width: 767px) {
    #top.amha-sortiment #wrap_all #main .ba-halfvideocontainer {
        --video-multiplier: 2.5;
        height: calc(56.25vw * 2) !important;
        height: calc(56.25vw * var(--video-multiplier)) !important;
    }
    #top.amha-sortiment #wrap_all #main .ba-halfvideocontainer .avia-video {
        height: calc(56.25vw * 2) !important;
        height: calc(56.25vw * var(--video-multiplier)) !important;
    }
    #top.amha-sortiment #wrap_all #main .ba-halfvideocontainer .avia-video iframe {
        width: 200% !important;
        max-width: 200% !important;

        width: calc(100% * var(--video-multiplier)) !important;
        max-width: calc(100% * var(--video-multiplier)) !important;

        left: 50%;
        transform: translateX(-50%);
    }

    #top.amha-sortiment .ba-markheading {
        bottom: 13vh;
    }

    #top.amha-sortiment .ba-markheading h1 {
        font-size: 40px;
    }
}

/** Category Slider **/
#top.amha-sortiment .amha-mobile-sortiment-slider .flex_cell:first-child .flex_cell_inner .mobile-slider-only {
    display: none;
}
@media (max-width: 767px) {
    #top.amha-sortiment .amha-mobile-sortiment-slider .flex_cell:first-child .flex_cell_inner .mobile-slider-only {
        display: block;
    }
    #top.amha-sortiment .amha-mobile-sortiment-slider .flex_cell:first-child .flex_cell_inner .slick-slide {
        float: left;
        clear: none;
    }
    .responsive #top.amha-sortiment #wrap_all .amha-mobile-sortiment-slider .flex_cell:last-child {
        display: none;
    }
    #top.amha-sortiment .amha-mobile-sortiment-slider .flex_cell:first-child .flex_cell_inner .slick-slide .ba-beerrowimg + section + .avia-image-container {
        display: none;
    }
    #top.amha-sortiment .amha-mobile-sortiment-slider .flex_cell:first-child .slick-dots {
        display: flex;
        width: 100%;
        justify-content: center;
        list-style: none;
        margin: 0;
        top: -135px;
        position: relative;
    }
    #top.amha-sortiment .amha-mobile-sortiment-slider .flex_cell:first-child .slick-dots li {
        width: 22px;
        height: 4px;
        background: black;
        opacity: 0.15;
        margin: 0 4px;
        padding: 0;
    }
    #top.amha-sortiment .amha-mobile-sortiment-slider .flex_cell:first-child .slick-dots li.slick-active {
        opacity: 0.45;
    }
    #top.amha-sortiment .amha-mobile-sortiment-slider .flex_cell:first-child .slick-dots li * {
        display: none;
    }
    #top.amha-sortiment .amha-mobile-sortiment-slider .flex_cell:first-child .flex_cell_inner .slick-slide .ba-beerrowimg + section.av_textblock_section p {
        font-size: 20px;
        margin-top: -20px;
    }
    #top.amha-sortiment .amha-mobile-sortiment-slider {
        margin-bottom: -80px;
    }
}

/** Big Beer Section **/
@media (max-width: 767px) {
    #top.amha-sortiment #wrap_all .amha-big-beer-section {
        padding-top: 0;
    }
    #top.amha-sortiment #wrap_all .amha-big-beer-section .big-beer-image {
        float: none;
        max-width: 42%;
        margin: 0 auto;
    }
    #top.amha-sortiment #wrap_all .amha-big-beer-section .flex_cell:first-child {
        padding-bottom: 0;
        position: relative;
    }
    #top.amha-sortiment #wrap_all .amha-big-beer-section .flex_cell:last-child {
        padding-top: 0;
        position: relative;
        overflow: visible;
    }
    #top.amha-sortiment #wrap_all .amha-big-beer-section .flex_cell:last-child .flex_column {
        overflow: visible;
    }
    #top.amha-sortiment #wrap_all .amha-big-beer-section .flex_cell:last-child .amha-big-beer-heading {
        margin-top: -18%;
    }
    #top.amha-sortiment #wrap_all .amha-big-beer-section .amha-big-beer-buttons .avia-button {
        margin-top: 0;
    }
}

/** Produkt Slider **/
@media (max-width: 767px) {
    #top.amha-sortiment #wrap_all .ba-sortimentcontainer .avia_image {
        height: auto;
        width: 100%;
    }
    #top.amha-sortiment #wrap_all .ba-sortimentcontainer .slick-list {
        transform: scale(1.3);
        margin-top: 15%;
    }
    #top.amha-sortiment #wrap_all .ba-sortimentcontainer .slick-dots {
        z-index: 1;
        position: relative;
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
        list-style: none;
        margin: 0;
        top: -25px;
        position: relative;
    }
    #top.amha-sortiment #wrap_all .ba-sortimentcontainer .slick-dots li {
        width: 20px;
        height: 4px;
        background: black;
        opacity: 0.15;
        margin: 0 2px;
        padding: 0;
    }
    #top.amha-sortiment #wrap_all .ba-sortimentcontainer .slick-dots li:first-of-type,
    #top.amha-sortiment #wrap_all .ba-sortimentcontainer .slick-dots li:last-of-type {
        display: none;
    }
    #top.amha-sortiment #wrap_all .ba-sortimentcontainer .slick-dots li.slick-active {
        opacity: 0.45;
    }
    #top.amha-sortiment #wrap_all .ba-sortimentcontainer .slick-dots li * {
        display: none;
    }
    #top.amha-sortiment #wrap_all .ba-sortimentcontainer .avia-image-container:hover {
        transform: none;
    }
    #top .ba-sortimentcontainer .avia-image-container:hover .ba-beershadow {
        transform: scaleY(-1) translateY(38px);
    }
    #top.amha-sortiment #wrap_all .ba-sortimentcontainer .ba-sortimentdescription {
        margin-top: 0;
    }
    #top.amha-sortiment #wrap_all .ba-sortimentcontainer .ba-sortimentdescription .ba-sorttitle {
        line-height: 1.2;
    }
    #top.amha-sortiment #wrap_all .ba-sortimentcontainer .slick-slide {
        opacity: 0.5;
        transition: opacity 0.1s;
    }
    #top.amha-sortiment #wrap_all .ba-sortimentcontainer .slick-slide.slick-current {
        opacity: 1;
    }
}
@media(min-width: 768px) {
    #top.amha-sortiment #wrap_all .slider-ph-image {
        display: none;
    }
}

/* Section Fold */
#top #wrap_all .avia-section.section-fold-open > .container {
    max-height: none !important;
}

#top #wrap_all .avia-section .section-fold-toggle {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(0deg, rgb(255, 255, 255) 30%, rgba(255,255,255,0) 100%);
    text-decoration: underline;
    z-index: 1;
    height: 70px;
    display: flex;
    align-items: flex-end;
    font-size: inherit;
    font-family: inherit;
}


/* 1. Der Wrapper schmiegt sich jetzt lückenlos an das Bild */
[data-ai], 
[data-ai-bg] {
  position: relative;
  display: inline-flex; /* Sorgt dafür, dass der Container exakt so groß ist wie das Bild */
  max-width: 100%;
}
[data-ai] .avia-slide-wrap,
[data-ai-bg] {
    width: 100%;
}
/* Verhindert Lücken unter dem Bild und übernimmt eventuelle Bricks-Rundungen */
[data-ai] img, 
[data-ai] video {
  max-width: 100%;
  height: auto;
  display: block; 
  border-radius: inherit; 
}

/* 2. Standard-Label (Kleines "AI" unten rechts) */
[data-ai]::after,
[data-ai-bg]::after {
  content: "";
  position: absolute;
  bottom: 12px;
  right: 12px;
  background-color: rgba(255,255,255,0.6); 
  color: #000;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;  
  height: 34px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  z-index: 99;
  pointer-events: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
[data-ai="1"]::after,
[data-ai-bg="1"]::after {
  content: "AI GENERATED";
  width: 125px;
}
[data-ai="2"]::after,
[data-ai-bg="2"]::after,
.brxe-video[data-ai="2"]::after {
  content: "AI";
  width: 34px;
}

.ai-zero-size::after,
.ai-zero-size::after {
  display: none !important;
}
.av-section-color-overlay[style*="ai-generated.svg"] {
    background-repeat: no-repeat !important;
    background-position: right 15px bottom 15px !important;
}
.av-section-color-overlay[style*="ai.svg"] {
    background-repeat: no-repeat !important;
    background-position: right 15px bottom 15px !important;
}