/* =========================================
   1. GLOBÁLNÍ NASTAVENÍ A SPOLEČNÉ PRVKY
   ========================================= */

/* --- Reset a základ --- */
.stranka-bez-mezer {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Pozadí sekcí --- */
.metal-hero-sekce {
    width: 100%;
    background: linear-gradient(135deg, #bdc3c7 0%, #dee4e7 50%, #95a5a6 100%);
    padding: 60px 0;
    display: flex;
    justify-content: center;
}

/* --- Typografie: Nadpisy --- */
.metal-hero-sekce h1, 
.kontaktni-sekce-bila h1,
.video-nadpis-box h1 {
    color: #0a192f;
    border-bottom: 3px solid #007bff;
    display: table;
    margin: 0 auto 40px auto;
    font-size: 2.5rem;
}

.text-vnitrek h1 {
    font-size: 3rem;
    color: #0a192f;
    margin: 0 0 15px 0;
    border-bottom: 3px solid #007bff;
    display: block; 
}

.text-vnitrek p {
    font-size: 1.15rem;
    display: block;
    color: #333;
}

/* --- Komponenta: Tlačítko ZPĚT --- */
.tlacitko-zpet {
    position: absolute;
    top: 140px; 
    left: 40px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: white;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #ddd;
}

.tlacitko-zpet:hover {
    background-color: #0a192f;
    color: white;
    border-color: #0a192f;
    transform: translateY(-2px);
}

/* --- Komponenta: Galerie --- */
.galerie-box {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.hlavni-media-vystup {
    background: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
    aspect-ratio: 4 / 3;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin: 0 auto;
}

.hlavni-media-vystup img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #fff;
}

.seznam-nahledu {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.seznam-nahledu img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid white;
    border-radius: 4px;
    transition: 0.2s;
}

.seznam-nahledu img.active {
    border-color: #007bff;
}

/* --- Komponenta: Karty --- */
.metal-obsah-wrapper-karty .karty-flex-stred {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    width: 100%;
}

.karty-flex-stred .staticka-karta {
    background: white;
    padding: 30px;
    border-radius: 4px;
    border: 1px solid #dce8f5;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    flex: 0 1 calc(33.333% - 40px);
    min-width: 300px;
    box-sizing: border-box;
}

.karty-flex-stred .staticka-karta h3 { 
    color: #0a192f; 
    margin: 15px 0; 
    font-size: 1.3rem; 
}

/* --- Komponenta: Video --- */
.video-prehravac-box.mobilni-format {
    width: 100%;
    max-width: 450px;
    background: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 0 auto;
    border: 1px solid #dce8f5;
}

.video-fixni-ramec-uzky {
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}
.video-fixni-ramec-uzky video { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

/* --- Komponenta: Tabulka --- */
.tabulka-kontejner {
    width: 100%;
    background: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #dce8f5;
}

.specifikace-tabulka { 
    width: 100%; 
    border-collapse: collapse; 
    text-align: left; 
}

.specifikace-tabulka thead tr.radek-serie th { 
    background-color: #0a192f; 
    color: white; 
    padding: 18px 20px; 
    font-size: 1.4rem; 
    text-align: center; 
    border-radius: 4px 4px 0 0; 
}

.specifikace-tabulka thead tr.radek-hlavicka th { 
    background-color: #0a192f; 
    color: #dee4e7; 
    padding: 12px 20px; 
    font-size: 1rem; 
    border-bottom: 2px solid #007bff; 
}

.specifikace-tabulka tbody td { 
    padding: 15px 20px; 
    border-bottom: 1px solid #e0e6e9; 
    color: #333; 
}

.specifikace-tabulka tbody td:first-child { 
    font-weight: bold; 
    color: #0a192f; 
    width: 40%; 
}

/* --- Komponenta: Hero Widget (Servis a Příslušenství) --- */
/* Toto je ten kód, který chyběl */
.hero-widget-foto {
    flex: 0 0 450px;
    max-width: 450px;
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.hero-widget-foto:hover {
    transform: translateY(-2px);
}

.hero-widget-foto img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-widget-text h2 {
    color: #0a192f;
    font-size: 2rem;
    margin-bottom: 20px;
}


/* =========================================
   2. ROZLOŽENÍ STRÁNKY (Wrappery)
   ========================================= */

/* Společné pro všechny wrappery */
.metal-obsah-wrapper,
.metal-obsah-wrapper-video,
.metal-obsah-wrapper-karty,
.metal-obsah-wrapper-tabulka,
.hero-widget-flex {
    display: flex;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Wrappery co jdou pod sebe (sloupec) */
.metal-obsah-wrapper-video,
.metal-obsah-wrapper-karty,
.metal-obsah-wrapper-tabulka {
    flex-direction: column;
    align-items: center;
    width: 95%;
}

/* Wrappery co jdou vedle sebe (na PC) */
.metal-obsah-wrapper,
.hero-widget-flex {
    align-items: center;
    justify-content: center;
    gap: 50px;
}
.hero-widget-flex {
    padding: 60px 0; /* Padding specifický pro hero widget */
}

.info-stred-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.text-vnitrek {
    max-width: 850px;
}

.text-vnitrek > div {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


/* =========================================
   3. PC VERZE (Desktop nad 850px)
   ========================================= */
@media (min-width: 851px) {
    /* Hlavní grid vedle sebe */
    .metal-obsah-wrapper {
        flex-direction: row;
    }

    /* Sloupce 50:50 */
    .metal-obsah-wrapper > .galerie-box,
    .metal-obsah-wrapper > .info-stred-box {
        flex: 1;
        width: 50%;
        min-width: 300px;
    }

    /* Pořadí: Galerie vlevo, Text vpravo */
    .galerie-box { order: 1; }
    .info-stred-box { order: 2; }
}


/* =========================================
   4. MOBILNÍ VERZE (Pod 850px)
   ========================================= */
@media (max-width: 850px) {
    
    /* --- A) Layout a Struktura --- */
    
    /* Hlavní obsah pod sebe */
    .metal-obsah-wrapper,
    .hero-widget-flex {
        flex-direction: column;
        gap: 30px;
    }
    
    .hero-widget-flex {
        padding: 30px 0;
    }

    /* Pořadí: Obrázek první, Text druhý */
    .galerie-box {
        order: 1;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    .info-stred-box {
        order: 2;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        padding: 0 10px;
    }
    
    /* Úprava Hero Widgetu na mobilu */
    .hero-widget-foto {
        width: 100%;
        max-width: 400px;
        flex: none; /* Zrušení fixní šířky z PC */
    }

    /* Vycentrování tlačítek */
    .info-stred-box .text-vnitrek > div {
        justify-content: center;
    }

    /* Karty na plnou šířku */
    .karty-flex-stred .staticka-karta {
        flex: 1 1 100%;
        max-width: 450px;
    }

    /* --- B) Typografie (Změna velikosti nadpisů) --- */
    
    /* Hlavní nadpis produktu */
    .info-stred-box .text-vnitrek h1 {
        font-size: 1.8rem;
        text-align: center;
        margin: 10px auto 20px auto;
        display: table;
        line-height: 1.2;
    }
    
    /* Ostatní nadpisy sekcí */
    .metal-hero-sekce h1, 
    .video-nadpis-box h1,
    .hero-widget-text h2 {
        font-size: 1.8rem;
    }

    /* Text do bloku a větší čitelnost */
    .info-stred-box .text-vnitrek p {
        font-size: 1.25rem;
        line-height: 1.6;
        text-align: justify;
        hyphens: auto;
        margin-bottom: 20px;
    }

    /* --- C) Tlačítko Zpět --- */
    .tlacitko-zpet {
        padding: 8px 12px;
        font-size: 14px;
        gap: 5px;
        top: 160px;
        left: 20px;
    }

    /* --- D) Tabulka Parametrů (Úprava pro mobil) --- */
    
    /* Roztáhnout wrappery */
    .metal-obsah-wrapper-tabulka,
    .tabulka-kontejner {
        width: 100%;
        padding: 0;
        box-shadow: none;
        border: none;
        border-radius: 0;
    }
    
    /* Zajištění viditelnosti */
    #technicke-specifikace {
        display: block;
    }
    
    /* Zmenšení paddingu uvnitř tabulky */
    .tabulka-kontejner {
        padding: 5px;
    }

    .specifikace-tabulka th,
    .specifikace-tabulka td {
        padding: 8px 4px;
        font-size: 0.85rem;
    }

    /* První sloupec bez zalamování */
    .specifikace-tabulka tbody td:first-child {
        width: auto;
        white-space: nowrap;
        padding-right: 10px;
    }
}