:root {
    --primary: #006aa1;
    --primary-hover: #005682;
    --text-dark: #222222;
    --text-gray: #555555;
    --text-light: #888888;
    --bg-main: #ffffff;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #eaeaea;
    --font-main: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --spacing: 30px;
    --radius: 0px;
    /* Pilanawood ustavuje rovnější ostré hrany, žádné 16px border-radius */
    --shadow-soft: 0 4px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 40px rgba(0, 106, 161, 0.12);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.pilana-theme {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* Layout Framework */
#main {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-areas:
        "header header"
        "sidebar content"
        "footer footer";
    gap: 50px;
    padding: 0 40px;
}

#hlavicka-null {
    grid-area: header;
}

#menu-box {
    display: none;
    /* Moved into JS */
}

#vpravo-null {
    grid-area: content;
    padding-top: 10px;
    min-width: 0;
}

#vlevo-null {
    grid-area: sidebar;
    padding-top: 20px;
}

#paticka-null {
    grid-area: footer;
}

@media (max-width: 1100px) {
    #main {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "content"
            "sidebar"
            "footer";
        padding: 0 20px;
        gap: 30px;
    }
}

/* Header */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    background: var(--bg-main);
    border-bottom: 2px solid var(--border-color);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pilana-logo {
    font-size: 32px;
    font-weight: 900;
    display: flex;
    align-items: center;
}

.pilana-logo .pila {
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: -1px;
}

.pilana-logo .metal {
    color: var(--text-dark);
    font-weight: 300;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.nav-menu-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

#menu {
    display: flex;
    list-style: none;
    gap: 36px;
}

#menu li a {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    transition: var(--transition);
    position: relative;
    padding: 10px 0;
}

#menu li a:hover {
    color: var(--primary);
}

#menu li a:after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s ease;
}

#menu li a:hover:after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-circle:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 106, 161, 0.25);
}


.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
}

@media (max-width: 1100px) {
    .nav-menu-wrapper {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow-soft);
        flex-direction: column;
        display: none;
        z-index: 1000;
    }

    .nav-menu-wrapper.active {
        display: flex;
    }

    #menu {
        flex-direction: column;
        gap: 0;
        padding: 20px;
    }

    #menu li a {
        display: block;
        border-bottom: 1px solid var(--border-color);
        padding: 15px 0;
    }

    #menu li a:after {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
        margin-left: auto;
    }

    .nav-actions {
        display: none;
    }

    .nav-container {
        border-bottom: none;
        padding-bottom: 15px;
    }
}

/* Hero Banner */
.hero-section {
    display: flex;
    min-height: 480px;
    margin-bottom: 80px;
    position: relative;
    background: var(--bg-main);
}

.hero-left {
    flex: 1;
    padding: 80px 60px 80px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

.hero-left h1 {
    font-size: 54px;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 30px;
    line-height: 1.15;
    letter-spacing: -1.5px;
}

.hero-text {
    font-size: 18px;
    color: var(--text-gray);
    font-weight: 400;
    margin-bottom: 24px;
    max-width: 600px;
}

.hero-btn {
    align-self: flex-start;
    margin-top: 30px;
}

.hero-right {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-blue-shape {
    position: absolute;
    top: 0;
    bottom: 0;
    right: -40px;
    left: -100px;
    /* Extends past edge */
    background: var(--primary);
    clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
    display: flex;
    align-items: center;
    padding-left: 20%;
    padding-right: 40px;
    color: var(--white);
}

.hero-shape-content h2 {
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: 900;
    color: var(--white);
    letter-spacing: -1px;
}

.hero-shape-content p {
    font-size: 20px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

@media (max-width: 900px) {
    .hero-section {
        flex-direction: column;
    }

    .hero-left {
        padding: 40px 0;
    }

    .hero-blue-shape {
        clip-path: none;
        left: -20px;
        right: -20px;
        padding: 50px 20px;
        position: relative;
    }
}

/* Generic Content */
.info-kat {
    font-size: 18px;
    color: var(--text-gray);
    margin-bottom: 40px;
    max-width: 800px;
}

.obsah h2,
.doporucujeme h2 {
    font-size: 36px;
    color: var(--text-dark);
    font-weight: 900;
    margin: 80px 0 40px;
    letter-spacing: -1px;
}

.obsah p {
    font-size: 16px;
    color: var(--text-gray);
    margin-bottom: 20px;
    max-width: 900px;
}

/* Products Card Framework */
.pilana-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.pilana-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    /* Very subtle gray border */
    padding: 40px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.pilana-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: transparent;
    transform: translateY(-5px);
}

.card-image-wrap {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.card-img-link img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.4s ease;
}

.pilana-card:hover .card-img-link img {
    transform: scale(1.08);
    /* slight zoom on hover */
}

.pilana-card h2,
.pilana-card h3 {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 1.2;
}

.pilana-card p {
    font-size: 15px;
    color: var(--text-gray);
    margin-bottom: 30px;
    line-height: 1.6;
    flex-grow: 1;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--primary);
    color: var(--white) !important;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    transition: var(--transition);
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--primary) !important;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    justify-content: flex-start;
}

.btn-outline:hover {
    color: var(--primary-hover) !important;
    border-bottom: 2px solid var(--primary-hover);
    gap: 16px;
    /* Arrow moves subtly right */
}

/* Sidebar Sections */
.blok {
    background: var(--bg-light);
    border: none;
    padding: 30px;
    margin-bottom: 30px;
}

.blok h3 {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pilana-sidebar-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.pilana-sidebar-item:last-child {
    border-bottom: none;
}

.pilana-sidebar-item a {
    color: var(--text-gray);
    font-size: 15px;
    font-weight: 500;
    display: block;
    transition: var(--transition);
}

.pilana-sidebar-item a:hover {
    color: var(--primary);
}

.sidebar-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 8px;
    line-height: 1.5;
}

/* Pager */
.pilana-pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.page-link,
.page-current {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    border-radius: 50%;
}

.page-link {
    background: transparent;
    color: var(--text-gray);
    border: 2px solid transparent;
}

.page-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-current {
    background: var(--primary);
    color: var(--white);
    pointer-events: none;
}

.page-label {
    align-self: center;
    margin-right: 15px;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 15px;
    text-transform: uppercase;
}

/* Footer */
#paticka {
    background: var(--bg-light);
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

#paticka p {
    color: var(--text-gray);
    font-size: 15px;
}

#paticka a {
    color: var(--text-dark);
    font-weight: 700;
    margin: 0 15px;
    text-transform: uppercase;
    transition: auto;
}

#paticka a:hover {
    color: var(--primary);
}

/* Subtle Hover Reveal System */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Lightbox pro fotky produktu */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.lightbox-overlay.active {
    opacity: 1;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background: var(--white);
    padding: 20px;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--white);
    font-size: 50px;
    background: none;
    line-height: 1;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--primary);
}

/* Specifikační Tabulky u produktů */
table[id*="dlRezneVlastnosti"] table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 40px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

table[id*="dlRezneVlastnosti"] table tr td {
    padding: 18px 25px;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
}

table[id*="dlRezneVlastnosti"] table tr {
    transition: background-color 0.2s ease;
}

table[id*="dlRezneVlastnosti"] table tr:hover {
    background-color: var(--bg-light);
}

table[id*="dlRezneVlastnosti"] table tr td[class*="tab-nazev"] {
    font-weight: 700;
    color: var(--text-dark);
    width: 35%;
    text-transform: uppercase;
}

table[id*="dlRezneVlastnosti"] table tr td[class*="tab-text"],
table[id*="dlRezneVlastnosti"] table tr td[class*="capacity-text"] {
    color: var(--text-gray);
    font-weight: 400;
}

/* Podtabulka s ikonkami v Capacity */
td.capacity-text table {
    box-shadow: none;
    margin-top: 0;
}

td.capacity-text table td {
    padding: 0;
    border: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

td.capacity-text table td img {
    margin: 0;
}

table[id*="dlRezneVlastnosti"] table tr:nth-child(even) {
    background-color: rgba(0, 106, 161, 0.02);
    /* jemný blue tón pro střídání řádků */
}

/* Skrýt starý ošklivý odkaz - otevírat v novém okně */
a[id*="hpNoveOkno"] {
    display: none !important;
}

/* Styling pro alternativní/dekódované tabulky v popisu produktu */
.tabulkaprodukt {
    width: 100% !important;
    border-collapse: collapse;
    margin: 40px 0;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    border: none !important;
}

.tabulkaprodukt td {
    padding: 16px 24px !important;
    border: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.5;
}

.tabulkaprodukt thead td,
.tabulkaprodukt tr:first-child td[colspan],
.tabulkaprodukt b {
    background: var(--bg-light);
    color: var(--text-dark) !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tabulkaprodukt tr:hover {
    background-color: rgba(0, 106, 161, 0.03);
}

.tabulkaprodukt tr:nth-child(even) {
    background-color: rgba(0, 106, 161, 0.01);
}

/* Fix pro obrázky v dekódovaných tabulkách (ikonky capacity) */
.tabulkaprodukt img {
    vertical-align: middle;
    margin-right: 8px;
}