/* Layout type 5: copy of type 4 — zone chrome as type 3; product area is a fixed Rows×Cols grid scaled to fit. */

.pos-layout-type-5 .pos-catalog--zone-detail .pos-product-grid--scaled {
    display: grid;
    grid-template-columns: repeat(var(--pos-tile-cols, 1), minmax(0, 1fr));
    grid-template-rows: repeat(var(--pos-tile-rows, 1), minmax(0, 1fr));
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    align-content: stretch;
    gap: 0.5rem;
    padding-bottom: 0;
}

.pos-layout-type-5 .pos-product-grid--scaled .pos-product-tile {
    min-height: 0;
    height: 100%;
    width: 100%;
    aspect-ratio: auto;
    overflow: hidden;
    padding: 0.4rem;
    gap: 0.1rem;
    justify-content: flex-start;
}

.pos-layout-type-5 .pos-product-grid--scaled .pos-product-tile__image {
    flex: 0 1 auto;
    max-height: 40%;
    min-height: 0;
    width: 100%;
    object-fit: contain;
    margin-bottom: 0.1rem;
}

.pos-layout-type-5 .pos-product-grid--scaled .pos-product-tile--profile {
    padding: 0;
    justify-content: center;
    align-items: center;
}

.pos-layout-type-5 .pos-product-grid--scaled .pos-product-tile--profile .pos-product-tile__image {
    flex: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    margin: 0;
}

.pos-layout-type-5 .pos-product-grid--scaled .pos-product-tile__name {
    font-size: clamp(0.65rem, 1.6vh, 0.95rem);
    line-height: 1.15;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}

.pos-layout-type-5 .pos-product-grid--scaled .pos-product-tile__price,
.pos-layout-type-5 .pos-product-grid--scaled .pos-product-tile__profile-hint {
    font-size: clamp(0.6rem, 1.4vh, 0.85rem);
}

.pos-layout-type-5 .pos-product-grid--scaled .pos-product-tile__pickup {
    font-size: clamp(0.55rem, 1.2vh, 0.75rem);
    margin-top: 0.1rem;
}

.pos-layout-type-5 .pos-product-grid--scaled .pos-product-tile__soldout {
    font-size: clamp(0.55rem, 1.2vh, 0.75rem);
}

.pos-layout-type-5 .pos-product-tile--empty {
    visibility: hidden;
    pointer-events: none;
    border: none;
    background: transparent;
    box-shadow: none;
}

.pos-layout-type-5 .pos-catalog--zone-landing {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow: auto;
}

.pos-layout-type-5 .pos-zone-areas {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    padding: 0.85rem 0.5rem 0.5rem;
    flex: 0 0 auto;
}

.pos-layout-type-5 .pos-zone-area {
    position: relative;
    width: 100%;
    border: 1px solid var(--mem-strand, #d5c7b6);
    background: transparent;
    padding: 0.85rem 0.4rem 0.4rem;
}

.pos-layout-type-5 .pos-zone-area__title {
    position: absolute;
    top: 0;
    left: 1rem;
    transform: translateY(-50%);
    margin: 0;
    padding: 0.15rem 0.55rem;
    border: 1px solid var(--mem-strand, #d5c7b6);
    background: var(--mem-hvid, #ffffff);
    color: var(--mem-sort2025, #3e4241);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.pos-layout-type-5 .pos-zone-area__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(7rem, auto));
    align-items: stretch;
    gap: 0.4rem;
}

.pos-layout-type-5 .pos-zone-v2-btn {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 1px solid var(--mem-strand, #d5c7b6);
    background: var(--mem-hvid, #ffffff);
    color: var(--mem-sort2025, #3e4241);
    text-align: left;
    cursor: pointer;
}

.pos-layout-type-5 .pos-zone-v2-btn__header {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--mem-strand, #d5c7b6);
}

.pos-layout-type-5 .pos-zone-v2-btn__nbr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0.35rem 0.45rem;
    background: var(--zone-color, #3e4241);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
}

.pos-layout-type-5 .pos-zone-v2-btn__header-texts {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.1rem;
    padding: 0.3rem 0.5rem;
    min-width: 0;
    flex: 1 1 auto;
    text-align: right;
}

.pos-layout-type-5 .pos-zone-v2-btn__header-text {
    display: block;
    font-size: 0.8rem;
    line-height: 1.2;
    min-height: 1.2em;
    text-align: right;
}

.pos-layout-type-5 .pos-zone-v2-btn__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.45rem 0.5rem;
    flex: 1 1 auto;
}

.pos-layout-type-5 .pos-zone-v2-btn__name {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
}

.pos-layout-type-5 .pos-zone-v2-btn__group-text {
    font-size: 0.85rem;
    line-height: 1.25;
}

.pos-layout-type-5 .pos-zone-v2-btn__footer {
    padding: 0.3rem 0.5rem;
    background: var(--zone-color, #3e4241);
    color: #ffffff;
    font-size: 0.8rem;
    line-height: 1.2;
    border-top: 1px solid var(--mem-strand, #d5c7b6);
}

.pos-layout-type-5 .pos-zone-back-btn {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.65rem 1.35rem;
    min-height: 2.85rem;
    letter-spacing: 0.02em;
    border-width: 2px;
}
