﻿/* Hlavní obsah stránky */
main {
    display: flex;
    flex-direction: column; /* Horizontální rozložení pro nav-bar a hlavní obsah */
    flex: 1; /* Zabírá zbývající prostor */
    background: transparent;
    position: relative; /* Umožňuje absolutní pozicování v rámci hlavního obsahu */
}

/* Produktový seznam */
.product-list {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    flex-wrap: nowrap;
    width: 100%;
    padding: 0;
    position: relative; /* Důležité pro správné chování potomků */
}


/* Responzivní úpravy */
@media screen and (max-width: 1020px) {
    main {
        flex-direction: column; /* Vertikální rozložení pro menší obrazovky */
    }

    .product-list {
        padding-left: 0; /* Odstranění odsazení pro menší obrazovky */
    }
}



.product-list-a1,
.product-list-toolbar {
    width: 100%;
    max-width: none;
    min-height: 0;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    background-color: var(--secondaryGlass2-color);
    border-radius: 0 0 16px 16px;
    display: grid;
    grid-template-columns: minmax(140px, 1.1fr) minmax(200px, 1.6fr) auto;
    grid-template-areas: "path brands controls";
    align-items: center;
    column-gap: 1rem;
    row-gap: 0.65rem;
    padding: 12px 18px;
    margin: 0 0 18px 0;
    box-sizing: border-box;
    position: relative;
}

.toolbar-path {
    grid-area: path;
    min-width: 0;
}
.toolbar-path h3 {
    font-size: 15px;
    line-height: 1.35;
    margin: 0;
    padding: 0;
    font-weight: 600;
    color: var(--text2-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toolbar-brands,
.product-list-supplier-filter {
    grid-area: brands;
    flex: unset;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    padding: 0;
    margin: 0;
    border-bottom: none;
}

.product-list-supplier-filter-label {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text2-color);
    margin-right: 0.15rem;
}
.product-list-supplier-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--background-color);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.product-list-supplier-chip:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 1px var(--secondaryGlass-color);
}
.product-list-supplier-chip:has(input:checked) {
    border-color: var(--link-color);
    box-shadow: 0 0 0 1px var(--secondary-color);
}
.product-list-supplier-chip input {
    margin: 0;
    flex-shrink: 0;
}
.product-list-supplier-chip img {
    height: 20px;
    width: auto;
    max-width: 72px;
    object-fit: contain;
    vertical-align: middle;
    border-radius: 3px;
    display: block;
}

.toolbar-sort,
.product-list-a1b {
    grid-area: unset;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin: 0;
    overflow: visible;
    position: relative;
}
.toolbar-controls {
    grid-area: controls;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem 0.85rem;
    min-width: 0;
}
.toolbar-sort label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text2-color);
    white-space: nowrap;
}

.product-list-a1a{
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: relative;
}
.product-list-a1a h3{
    font-size: 15px;
    height: auto;
    margin: 0;
    padding: 0;
}
.description {
    height: 30px;
    margin: 0;
    padding: 0;
}

#sortOrder {
    z-index: 20;
    width: auto;
    min-width: 150px;
    max-width: 200px;
    height: 34px;
    margin: 0;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--input-background);
    color: var(--text2-color);
    cursor: pointer;
    font-size: 0.95rem;
}
#sortOrder:hover {
    border-color: var(--secondary-color);
}
#sortOrder:focus {
    z-index: 30;
    outline: 2px solid var(--secondary-color);
    outline-offset: 1px;
}

@media screen and (max-width: 1100px) {
    .product-list-toolbar {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "path controls"
            "brands brands";
    }
}

@media screen and (max-width: 700px) {
    .product-list-toolbar {
        grid-template-columns: 1fr;
        grid-template-areas:
            "path"
            "brands"
            "controls";
        padding: 12px 12px 14px;
        border-radius: 0 0 12px 12px;
    }
    .toolbar-path h3 {
        white-space: normal;
        font-size: 14px;
    }
    .toolbar-controls {
        justify-content: stretch;
        flex-direction: column;
        align-items: stretch;
    }
    .toolbar-sort {
        justify-content: stretch;
        width: 100%;
    }
    .toolbar-sort label {
        flex: 0 0 auto;
    }
    #sortOrder {
        flex: 1 1 auto;
        max-width: none;
        width: 100%;
    }
    .product-pagination-toolbar {
        justify-content: center;
        width: 100%;
    }
}

/* Šířka ≥ 700px: horní lišta bez rozostření (strom je trvale vlevo) */
@media screen and (min-width: 700px) {
    body.page-product-list .product-list-a1,
    body.page-with-category-nav .product-list-a1 {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

#sortOrder option {
    padding: 5px;
    background: var(--input-background);
}

.product-list-a2{
    max-width: 1900px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    justify-content: center;
    align-items: stretch;
    background: transparent;
    animation: fadeIn 1.3s ease-in-out forwards;
    opacity: 0;
    box-sizing: border-box;
    padding: 0 8px 8px;
}

.product-list-a2 > .product-link {
    display: block;
    min-width: 0;
    height: 100%;
}

.product-item {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    background-color: var(--secondaryGlass2-color);
    width: 100%;
    max-width: none;
    height: 100%;
    border: 2px solid var(--tertiary-color);
    border-radius: 40px 10px 70px 10px;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

@media screen and (max-width: 1400px) {
    .product-list-a2 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media screen and (max-width: 1000px) {
    .product-list-a2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 600px) {
    .product-list-a2 {
        grid-template-columns: 1fr;
        padding: 0 4px 8px;
    }
}

/* Stránkování produktů */
.product-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.7rem;
    margin: 0;
    padding: 0;
}

.product-pagination-info {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text2-color);
    white-space: nowrap;
}

.product-pagination-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
}

.product-pagination-list li {
    margin: 0;
    padding: 0;
}

.product-pagination-link,
.product-pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.45rem;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--background-color);
    color: var(--text2-color);
    font-weight: 600;
    font-size: 0.95rem;
    box-sizing: border-box;
}

a.product-pagination-link:hover {
    border-color: var(--secondary-color);
    background: var(--primary-color);
}

.product-pagination-link.current {
    background: var(--secondary-color);
    border-color: var(--link-color);
    cursor: default;
}

.product-pagination-link.disabled {
    opacity: 0.45;
    cursor: default;
    background: var(--secondary-background-color);
}

.product-pagination-ellipsis {
    border: none;
    background: transparent;
    min-width: 1.25rem;
}

.product-pagination-bottom-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 18px 12px 10px;
    box-sizing: border-box;
}

.product-pagination-bottom {
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--secondaryGlass2-color);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}


.product-item h3 {
    margin-top: 0;
    border-bottom: 2px solid var(--secondary-color);
    min-height: 48px;
    height: auto;
    text-shadow: 0 0 2px var(--secondary-color);
    width: 100%;
    font-size: 18px;
    text-align: center; /* Vycentrování názvu */
    padding-bottom: 0;
    margin-bottom: 0;
}
.product-image-frame {
    position: relative;
    width: 100%;
    height: 225px;
    overflow: hidden;
    border-radius: 20px 10px 40px 10px;
    margin: 0 auto 10px;
    box-shadow: 0 0 5px var(--text1-color);
    background-color: var(--background-color);
}
.product-supplier-logo {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 12;
    max-height: 30px;
    max-width: min(42%, 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    border-radius: 5px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.product-image {
    width: 100%;
    height: 225px;
    margin: 0 auto 10px;
    overflow: hidden;
    border-radius: 20px 10px 40px 10px;
    box-shadow: 0 0 5px var(--text1-color);
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.product-image-frame .product-image-slider {
    margin: 0;
    box-shadow: none;
    border-radius: 0;
}
.product-image-slider {
    position: relative;
    width: 100%;
    height: 225px;
    overflow: hidden;
}

.product-image-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    z-index: 1;
}

.product-image-slider img:first-child {
    opacity: 1;
    z-index: 2;
}




.product-price {
    text-align: right;

}

.product-price p {
    margin: 0px 0;
    font-size: 17px;
    color: var(--text2-color); /* Definujte si vlastní proměnnou nebo použijte pevnou barvu */
}

.product-price .vip-price-badge {
    font-weight: 700;
    color: var(--link-color);
}

.product-price .old-price {
    text-decoration: line-through;
    color: #999;
}

.product-price .sale-percentage {
    color: #d9534f;
    font-weight: 600;
}


/* Styl pro klikací produkty */
.product-link {
    text-decoration: none; /* Odstraní podtržení */
    color: inherit; /* Dědí barvu textu */
    display: block; /* Umožní kliknutí na celý blok */
}

/* Zvýraznění najetého produktu */
.product-link:hover .product-item {
    
    box-shadow: 0 0 15px var(--primary-color); /* Zvýraznění při najetí myší */
    transform: scale(1.03); /* Lehké zvětšení při najetí */
    transition: transform 0.3s, box-shadow 0.3s; /* Plynulý přechod */
}

/* Ztmavení všech ostatních produktů, když je jeden produkt v hover stavu */
.product-list-a2:hover .product-item {
    opacity: 0.93; /* Ztmavení všech produktů */
    transition: opacity 0.3s; /* Plynulý přechod */
}

/* Vrácení opacity na 1 u produktu, na který je najeto myší */
.product-link:hover .product-item {
    opacity: 1 !important; /* Plná viditelnost aktivního produktu */
    transition: opacity 0.3s; /* Plynulý přechod */
}



.product-list-c1 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    grid-column: 1 / -1;
    width: 100%;
    max-width: 560px;
    justify-self: center;
    border: 2px solid var(--tertiary-color);
    border-radius: 30px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    background-color: var(--secondaryGlass2-color);
    margin-top: 30px;
    padding: 0;
    box-sizing: border-box;
}
.product-list-c1 p{
    font-size: 20px;
    padding: 20px;
    animation: alert 1s alternate infinite;
}
