:root {
    /*--detail-width: calc(100% - 270px);*/ /* Original version with unlimited width */
    --detail-width: min(calc(100% - 270px), 900px); /* Alternate Version with limited width */

}

.detail-holder {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100vw;
    height: 100vh;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: calc(135px - 75px);
    padding-bottom: 135px;
    overflow-y: scroll;
}

/* Prevent store detail panels from shrinking in the flex column */
#store-detail-holder .content-block,
#field-detail-holder .content-block {
    flex: 0 0 auto;
}

.studierzone-promo-panel {
    position: relative;
    display: block;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
}

.studierzone-promo-panel::before {
    content: "";
    display: block;
    padding-top: 20%;
}

.studierzone-promo-panel > * {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Mirror edit_store image styling */
.image-wrapper {
    position: relative;
    height: 100%;
    cursor: default;
    transition: transform 120ms ease, opacity 120ms ease;
    overflow: hidden;
}

.new-store-image {
    height: 100%;
    width: auto;
    background-size: cover;
    background-repeat: no-repeat;
    display: block;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
}

.product {
    position: relative;
    width: 150px;
    height: 200px;
    margin-right: 0px;
    border: none;
    perspective: 1200px;
    cursor: pointer;
}

.product-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 280ms ease;
}

.product.is-flipped .product-inner {
    transform: rotateY(180deg);
}

.product-face {
    position: absolute;
    inset: 0;
    padding: 5px;
    box-sizing: border-box;
    border-radius: 15px;
    background-color: var(--primary-color);
    color: var(--secondary-color-light);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-face-limited {
    /*background-color: var(--yellow-color);*/
    background-image: linear-gradient(to bottom, var(--yellow-color), var(--primary-color) 50%);
    /*color: var(--primary-color);*/
}

.product-face-sold {
    /*background-color: var(--red-color);*/
    background-image: linear-gradient(to bottom, var(--red-color), var(--primary-color) 50%);
    /*color: var(--primary-color);*/
}

.product-front {
    justify-content: flex-start;
}

.product-back {
    transform: rotateY(180deg);
    justify-content: stretch;
    align-items: stretch;
}

.product-picture {
    width: 100%;
    height: 130px;
    border-radius: 10px;
    background-color: var(--secondary-color);
    position: relative;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.store-detail-product-organic-badge {
    position: absolute;
    top: 2.5px;
    left: 2.5px;
    padding: 4px;
    border-radius: 7.5px;
    background-color: var(--primary-color);
    font-size: 8px;
    font-weight: bold;
    color: var(--secondary-color-light);
}

.product-back .description-container {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background-color: var(--primary-color-light);
    color: var(--secondary-color-light);
    font-size: 12px;
    padding: 10px;
    overflow-y: auto;
    box-sizing: border-box;
}

.product-action-button {
    position: absolute;
    height: 22px;
    width: 22px;
    border-radius: 5px;
    border: none;
    background-color: var(--primary-color);
    background-size: 60%;
    background-position: center center;
    background-repeat: no-repeat;
    cursor: pointer;
    box-shadow: var(--shadow);
    padding: 0px;
}

.store-detail-info-block {
    width: 45px;
    height: 45px;
    background-color: var(--secondary-color-dark);
    border-radius: 15px;
    background-size: 60%;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    cursor: help;
}

.store-detail-info-block::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translate(-50%, 6px);
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    white-space: nowrap;
    font-size: 11px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 5;
}

.store-detail-info-block:hover::after {
    opacity: 1;
    transform: translate(-50%, 0);
    transition-delay: 0.5s;
}

.store-detail-cash-indicator {
    background-image: url('../icons/dark/V2/dollar-sign.svg');
}

.store-detail-card-indicator {
    background-image: url('../icons/dark/V2/credit-card.svg');
}

.store-map-holder {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
    background-color: var(--secondary-color);
    isolation: isolate;
    z-index: 0;
}

.map-navigation-trigger {
    cursor: pointer;
}

.map-navigation-trigger:focus-visible {
    outline: 2px solid var(--red-color);
    outline-offset: 2px;
}

#store-map {
    position: absolute;
    inset: 0;
}

.map-navigation-hint,
.map-navigation-meta {
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: var(--primary-color-light);
}

.map-navigation-hint {
    margin-top: 5px;
}

.map-navigation-meta {
    margin-top: 3px;
}

.map-crosshair {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, calc(-50% - 20px));
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-image: url('../icons/dark/V2/map-pin-red-full.svg');
    pointer-events: none;
}

.favorite-icon {
    background-image: url('../icons/dark/V2/star.svg');
}

.favorite-toggle.is-favorite .favorite-icon {
    background-image: url('../icons/dark/V2/star-filled.svg');
}

.detail-lowest {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 15px;
}

.detail-lowest-left {
    width: 30%;
    display: flex;
    flex-direction: column;
}

.detail-lowest-right {
    width: 70%;
    display: flex;
    flex-direction: column;
}

.opening-time {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: var(--secondary-color-dark);
    border-radius: 5px;
    padding: 5px;
}

.lowest-opening-time {
    border-bottom-left-radius: 15px;
}

/* --------------------------------------------------------------------------------- */
/* Size Changes */
/* --------------------------------------------------------------------------------- */

@media (max-width: 900px) {
    :root {
        --detail-width: calc(100% - 120px);
    }

    .detail-holder {
        padding-top: 60px;
        padding-bottom: 60px;
    }
}

@media (max-width: 800px) {
    .detail-lowest {
        flex-direction: column;
    }

    .detail-lowest-left {
        width: 100%;
    }

    .detail-lowest-right {
        width: 100%;
    }

    .store-map-holder {
        height: none;
        aspect-ratio: 6 / 3;
    }

    .lowest-opening-time {
        border-bottom-left-radius: 5px;
    }
}

@media (max-width: 670px) {
    :root {
        --detail-width: calc(100% - 60px);
    }

    .detail-holder {
        padding-top: 30px;
        padding-bottom: 30px;
    }
}
