/* ZÁKLADNÍ NASTAVENÍ */
html {
    scroll-behavior: smooth;
}

.product-item {
    width: 100%;
    font-family: inherit;
}

/* KONFIGURÁTOR SEKCE */
.pi-hero-config {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 60px 5%;
    background: #fff;
}

.pi-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 5rem;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    align-items: center;
}

/* LEVÁ STRANA - OBRÁZEK */
.pi-image-container {
    position: relative;
    width: 100%;
}

.pi-image-container img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
    display: block;
}

.pi-image-label {
    position: absolute;
    bottom: 25px;
    left: 25px;
    background: rgba(255,255,255,0.95);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

/* PRAVÁ STRANA - OVLÁDÁNÍ */
.pi-controls h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

/* --- STARÝ POPISEK (uvnitř pi-controls) --- */
.pi-controls .pi-sub {
    color: #666;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    line-height: 1.5;
}

.control-group {
    margin-bottom: 2.5rem;
}

.control-group h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #999;
    margin-bottom: 1.2rem;
}

/* Tlačítka typů */
.pi-type-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.type-btn {
    padding: 12px 22px;
    border: 1px solid #eee;
    background: #fcfcfc;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.type-btn.active {
    border-color: #ff6600;
    color: #ff6600;
    background: #fff;
    box-shadow: 0 4px 12px rgba(255,102,0,0.1);
}

/* Kolečka barev */
.pi-fabric-quick-select {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.fabric-dot {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fabric-dot:hover { transform: scale(1.1); }
.fabric-dot.active { box-shadow: 0 0 0 2px #ff6600; transform: scale(1.1); }

.fabric-more {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px dashed #aaa;
    background: #fff;
    font-size: 1.4rem;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.fabric-more:hover { border-color: #ff6600; color: #ff6600; background: #fff7f0; }

/* Akční tlačítka */
.pi-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3.5rem;
}

.btn.primary {
    padding: 15px 35px;
    background: #ff6600;
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-scroll {
    padding: 14px 28px;
    border: 2px solid #eee;
    color: #555;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-scroll:hover { border-color: #ff6600; color: #ff6600; background: #fff7f0; }

/* --- NOVÁ SEKCE PRO POPIS (Verze Pergola) --- */
.pi-description-bar {
    padding: 80px 0;
    background: #fdfdfd;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
}

.pi-description-bar .container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Specifický styl pro popisek v barů */
.pi-description-bar #displayDescription {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #333;
    font-weight: 400;
    margin: 0;
    transition: all 0.4s ease-in-out;
}

/* TABULKA */
.pi-section-table {
    padding: 100px 0;
    background: #f9f9f9;
}

.pi-section-table h2 {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 2rem;
}

.pi-table-wrapper {
    width: 75%;
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 45px rgba(0,0,0,0.06);
    border: 1px solid #eee;
}

.pi-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr 1.5fr 1.5fr;
    padding: 22px 30px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.pi-table-row.head {
    background: #1a1a1a;
    color: #fff;
    font-weight: 600;
    border-bottom: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.pi-table-row:last-child { border-bottom: none; }
.main-cell { font-weight: 600; color: #111; }

/* MODAL STYLY */
.pi-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.pi-modal-overlay.is-open { display: flex; }

.pi-modal-window {
    background: #fff;
    width: 90%;
    max-width: 650px;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 100px rgba(0,0,0,0.3);
}

.pi-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

#closeModal {
    background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #aaa;
}

.pi-modal-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.filter-btn {
    background: none; border: none; padding: 8px 15px; cursor: pointer; color: #777; font-weight: 500;
}

.filter-btn.active { color: #ff6600; }

.pi-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 20px;
    max-height: 350px;
    overflow-y: auto;
    padding: 5px;
}

.modal-item {
    aspect-ratio: 1;
    border-radius: 12px;
    cursor: pointer;
    border: 4px solid #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.modal-item.selected { border-color: #ff6600; transform: scale(1.05); }

.pi-modal-footer {
    margin-top: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 25px;
}

/* RESPONSIVITA */
@media (max-width: 1100px) {
    .pi-table-wrapper { width: 92%; }
    .pi-grid { gap: 3rem; }
}

@media (max-width: 900px) {
    .pi-grid { grid-template-columns: 1fr; }
    .pi-hero-config { min-height: auto; padding-top: 120px; }
    .pi-controls h1 { font-size: 2.2rem; text-align: center; }
    .pi-actions { justify-content: center; }
    .pi-table-row { grid-template-columns: 1fr 1fr; padding: 15px; }
    .pi-table-row.head { display: none; }
    .pi-type-selector, .pi-fabric-quick-select { justify-content: center; }
    .control-group h3 { text-align: center; }
}