.advent-calendar-wrapper {
    --door-min-size: calc(25% - 15px);
    padding-left: 15px;
}

@media only screen and (max-width: 1024px) {
    .advent-calendar-wrapper {
        --door-min-size: calc(33.333% - 15px);
        padding-left: 0;
    }
}

@media only screen and (max-width: 769px) {
    .advent-calendar-wrapper {
        --door-min-size: calc(25% - 15px);
    }
}

@media only screen and (max-width: 768px) {
    .advent-calendar-wrapper {
        --door-min-size: calc(25% - 15px);
    }

    .wc-block-product-template__responsive.columns-3 {
        grid-template-columns:repeat(auto-fit, minmax(100%, 1fr))
    }

    .wc-block-product-template__responsive.columns-3 li.wc-block-product {
        margin-bottom: 45px
    }
}

@media only screen and (max-width: 480px) {
    .advent-calendar-wrapper {
        --door-min-size: calc(33.333% - 15px)
    }

    .ac-modal-wrapper .wp-block-columns {
        flex-direction: column;
    }

    .ac-modal-wrapper .wp-block-columns .wp-block-column {
        flex-basis: 100% !important;
    }

}

@media only screen and (max-width: 390px) {
    .advent-calendar-wrapper {
        --door-min-size: calc(50% - 15px)
    }
}

body.ac-modal-open {
    overflow: hidden;
    scroll-behavior: unset;
}

.advent-calendar-wrapper {
    width: 100%
}

.advent-calendar-row {
    display: grid !important;
    gap: 15px;
    grid-template-columns:repeat(auto-fit, minmax(var(--door-min-size), 1fr));
    padding: 20px 0;
    width: 100%
}

.ac-item {
    align-items: center;
    aspect-ratio: 1/.618;
    background: #ae9a63;
    border: 2px solid #ae9a63;
    border-radius: 3px;
    font-family: Merriweather, serif;
    position: relative;
    transition: transform .2s, box-shadow .2s
}

.ac-item, .ac-item div {
    display: flex;
    justify-content: center
}

.ac-item div {
    flex-direction: column;
    height: 100%;
    width: 100%
}

.ac-item.unlocked {
    cursor: pointer;
}

.ac-item.unlocked:hover {
    border-color: #fff;
    box-shadow: 0 6px 10px rgba(0, 0, 0, .3);
    transform: translateY(-3px)
}

.ac-item.unlocked:hover a {
    color: #fff !important
}

.ac-item .ac-door-link {
    align-items: center;
    color: #ffffff;
    display: flex;
    font-size: 42px;
    font-weight: 300;
    height: 100%;
    justify-content: center;
    text-decoration: none;
    width: 100%
}

.ac-item.locked {
    background: rgba(0, 0, 0, .859);
    opacity: .7;
    pointer-events: none
}

.ac-item .ac-door-locked {
    align-items: center;
    color: #ae9a63;
    display: flex;
    flex-direction: column;
    font-size: 25px;
    line-height: 1 !important;
    height: 100%;
    justify-content: center;
    text-align: center;
    width: 100%
}

.ac-item .ac-door-locked svg {
    display: block;
    width: 20px;
    height: 20px;
    margin-top: 5px;
}

.ac-modal {
    align-items: center;
    background-color: rgba(0, 0, 0, .8);
    display: flex;
    height: 100%;
    justify-content: center;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999
}

.ac-modal-wrapper {
    background: #fff !important;
    border: 5px solid #ae9a63;
    border-radius: 10px;
    max-height: 90vh;
    max-width: 990px;
    overflow-y: auto;
    position: relative;
    width: 96%;
}

.ac-modal-wrapper .ac-modal-header {
    display: flex;
    justify-content: space-between;
    position: sticky;
    top: 0;
    padding: 15px 30px;
    background: #fff;
    z-index: 9;
}

.ac-modal-wrapper .ac-modal-header h3 {
    color: #ae9a63 !important;
    font-family: Merriweather, serif !important;
    font-size: 26px !important;
    font-weight: 500 !important;
    margin: 0
}

.ac-modal .ac-close-modal {
    background-color: transparent !important;
    border: none !important;
    color: #ae9a63 !important;
    cursor: pointer;
    font-weight: 700;
}

.ac-modal .ac-close-modal svg {
    height: 25px;
    width: 25px
}

.ac-modal .ac-close-modal:hover {
    color: #202020
}

.ac-modal-wrapper::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.ac-modal-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.ac-modal-wrapper::-webkit-scrollbar-thumb {
    background-color: #ae9a63;
    border-radius: 10px;
}

.ac-modal-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #ae9a63;
}

.ac-modal-wrapper .ac-modal-content {
    padding: 0 20px 15px;
}

.ac-modal-wrapper p {
    font-family: Open Sans, Helvetica, Arial, sans-serif !important;
    font-size: 18px;
    margin-bottom: 15px
}

.ac-modal-wrapper .has-text-align-center {
    text-align: center;
}

.ac-modal-wrapper .has-text-align-left {
    text-align: left;
}

.ac-modal-wrapper .has-text-align-right {
    text-align: right;
}

.ac-modal-wrapper a {
    text-decoration: none !important
}


.ac-modal-wrapper h4 {
    color: #202020 !important;
    font-family: Open Sans, Helvetica, Arial, sans-serif !important;
    font-size: 22px !important;
    margin-bottom: 15px;
    margin-top: 30px;
    width: 100%
}

.ac-modal-wrapper .wp-block-columns {
    align-items: stretch;
    display: flex;
}

.ac-modal-wrapper .wp-block-columns .wp-block-column {
    display: flex;
    flex-direction: column;
}

.ac-modal-wrapper .wp-block-columns .wp-block-column .wc-block-product-template {
    max-width: 360px;
    margin: 0 auto;
}

.ac-modal-wrapper .wp-block-columns .wp-block-column .wp-block-woocommerce-product-collection {
    display: flex;
    flex-basis: 100%;
}

.ac-modal-wrapper .wc-block-product-template__responsive {
}

.ac-modal-wrapper .wc-block-components-product-image .attachment-woocommerce_thumbnail {
    height: auto;
    width: 100%;
    max-width: 200px;
}

.ac-modal-wrapper .wc-block-product-template__responsive .wc-block-product {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.ac-modal-wrapper .wc-block-product-template__responsive .wc-block-product h4 {
    color: #ae9a63 !important;
    font-family: Merriweather, serif !important;
    font-size: 22px !important;
    width: 100%
}

.ac-modal-wrapper .wc-block-product-template__responsive .wc-block-product h4 a {
    text-decoration: none
}

.ac-modal-wrapper .wc-block-product-template__responsive .wp-block-button {
    margin-top: auto;
}

.ac-modal-wrapper .wc-block-product-template__responsive .wp-block-button__link {
    background-color: #fff;
    border: 2px solid #ae9a63 !important;
    border-radius: 0;
    color: #ae9a63;
    font-size: 16px !important;
    font-weight: 500;
    padding: 7px 20px;
    text-transform: uppercase;
    transition: all .2s;
}

.ac-modal-wrapper .wc-block-product-template__responsive .wp-block-button__link:hover {
    background-color: #ae9a63;
    color: #fff
}
