/* ==========================================================================
   SITTEC - ARCHITEKTONICKÁ OPTIMALIZACE A FACELIFT ŠABLONY CLASSIC (V9.0 - ELEGANTNÍ RED BORDER)
   ========================================================================== */

:root {
    /* Abstrakce designových konstant pro snadnou udržitelnost */
    --sittec-border-radius-sm: 4px;
    --sittec-border-radius-md: 6px; 
    
    /* Využití pokročilého z-axis vrstvení pro elevaci prvků */
    --sittec-shadow-header: 0 4px 15px rgba(0, 0, 0, 0.05);
    --sittec-shadow-card-hover: 0 10px 25px rgba(0, 0, 0, 0.08);
    --sittec-shadow-btn-hover: 0 4px 10px rgba(230, 43, 76, 0.3); 
    
    /* Globální GPU-akcelerovaný přechodový efekt */
    --sittec-transition-smooth: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Kontextové proměnné pro izolaci patičky a sjednocení barev */
    --sittec-footer-bg: #2e342d;
    --sittec-footer-text: #f8f9fa;
    --sittec-footer-link-hover: #e62b4c;
    
    /* PŘESNÁ FIREMNÍ KARMÍNOVÁ (vytaženo přímo z menu) */
    --sittec-brand-red: #e62b4c;
    --sittec-brand-red-dark: #c9203e; 
}

/* --------------------------------------------------------------------------
   1. PLOVOUCÍ HLAVIČKA
   -------------------------------------------------------------------------- */
.cb-sticky-header {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1010 !important; 
    background-color: #ffffff; 
    box-shadow: var(--sittec-shadow-header);
    transform: translateY(-100%);
    animation: sittec-slide-down 0.35s ease-out forwards;
}

@keyframes sittec-slide-down {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.cb-sticky-header.navigation-in,
.cb-sticky-header.header-inner,
.cb-sticky-header.row,
.cb-sticky-header.cart-widget,
.cb-sticky-header.cart-widget-inner {
    overflow: visible !important;
}

@media (max-width: 768px) {
   .cb-sticky-header {
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }
}

/* --------------------------------------------------------------------------
   2. TLAČÍTKA A FORMULÁŘE
   -------------------------------------------------------------------------- */
.btn, button, .form-control,
.cart-widget-inner, .navigation-in,
.banner-wrapper img, .img-wrap img {
    border-radius: var(--sittec-border-radius-md) !important;
}

/* Hlavní červená konverzní tlačítka */
.add-to-cart-button,
.btn.btn-primary,
.product .btn.btn-success,
.product-card .btn.btn-success {
    background-color: var(--sittec-brand-red) !important;
    border-color: var(--sittec-brand-red) !important;
    color: #ffffff !important;
    border-radius: var(--sittec-border-radius-md) !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--sittec-transition-smooth) !important;
    border: none !important;
}

.add-to-cart-button:hover,
.btn.btn-primary:hover,
.product .btn.btn-success:hover {
    background-color: var(--sittec-brand-red-dark) !important;
    transform: translateY(-2px);
    box-shadow: var(--sittec-shadow-btn-hover) !important;
}

/* Tlačítko Detail */
.product .btn.btn-default,
.product-card .btn.btn-default {
    background-color: #f8f9fa !important;
    color: #333333 !important;
    border: 1px solid #ced4da !important;
    border-radius: var(--sittec-border-radius-md) !important;
    font-weight: 500 !important;
}

.product .btn.btn-default:hover,
.product-card .btn.btn-default:hover {
    background-color: #e9ecef !important;
    border-color: var(--sittec-brand-red) !important;
    color: var(--sittec-brand-red) !important;
}

/* --------------------------------------------------------------------------
   3. PRODUKTOVÉ KARTY A PROSTOR
   -------------------------------------------------------------------------- */
.product,
.product-card {
    border: 1px solid rgba(0,0,0,0.03) !important; 
    border-radius: var(--sittec-border-radius-md) !important;
    transition: var(--sittec-transition-smooth) !important;
    background: #ffffff;
    padding-bottom: 15px; 
}

.product:hover,
.product-card:hover {
    box-shadow: var(--sittec-shadow-card-hover) !important;
    border-color: transparent !important;
    transform: translateY(-3px); 
}

.products-block,
.content-wrapper,
.categories-block {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
}

.p-detail-inner {
    padding: 2.5rem 2rem !important;
    background: #ffffff;
    border-radius: var(--sittec-border-radius-md);
    box-shadow: var(--sittec-shadow-header); 
}

.product-prices { margin-bottom: 1.5rem; }
.price-final { font-weight: 700; font-size: 1.35rem; }

/* --------------------------------------------------------------------------
   4. DETAIL PRODUKTU A KATEGORIE: ARCHITEKTURA MNOŽSTVÍ A TLAČÍTEK
   -------------------------------------------------------------------------- */
.product .btn-wrap,
.product-card .btn-wrap,
.product .p-tools,
.product-card .p-tools {
    margin-top: 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important; 
    width: 100% !important;
    min-height: 40px !important;
}

.product .btn-wrap form,
.product-card .btn-wrap form,
.product .p-tools form,
.product-card .p-tools form {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important; 
    gap: 8px !important; 
    width: auto !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.product .btn-wrap > a.btn,
.product-card .btn-wrap > a.btn,
.product .p-tools > a.btn,
.product-card .p-tools > a.btn {
    width: auto !important;
    min-width: 110px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 16px !important;
    margin: 0 !important;
}

.product .btn-wrap form > *,
.product-card .btn-wrap form > *,
.product .p-tools form > *,
.product-card .p-tools form > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.product .btn-wrap .quantity,
.product-card .btn-wrap .quantity,
.product .p-tools .quantity,
.product-card .p-tools .quantity {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important; 
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.product .btn-wrap .quantity input.amount,
.product-card .btn-wrap .quantity input.amount,
.product .p-tools .quantity input.amount,
.product-card .p-tools .quantity input.amount {
    width: 45px !important;
    height: 36px !important;
    border-radius: 4px !important;
    border: 1px solid #ced4da !important;
    text-align: center !important;
    padding: 0 5px !important;
    margin: 0 !important;
}

.product .btn-wrap .unit,
.product-card .btn-wrap .unit,
.product .p-tools .unit,
.product-card .p-tools .unit,
.product .unit,
.product-card .unit {
    display: flex !important;
    align-items: center !important;
    font-weight: 700 !important;
    font-size: 16px !important; 
    color: #333 !important;
    height: 100% !important; 
    line-height: normal !important; 
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

.product .btn-wrap form .btn,
.product-card .btn-wrap form .btn,
.product .p-tools form .btn,
.product-card .p-tools form .btn {
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
}

.product .btn-wrap .quantity .increase,
.product .btn-wrap .quantity .decrease,
.product-card .btn-wrap .quantity .increase,
.product-card .btn-wrap .quantity .decrease,
.product .p-tools .quantity .increase,
.product .p-tools .quantity .decrease,
.product-card .p-tools .quantity .increase,
.product-card .p-tools .quantity .decrease {
    display: none !important;
}

.p-detail-inner .add-to-cart,
.p-detail-inner form.pr-action,
.p-detail-inner .cart-widget-inner {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-top: 15px !important;
}

.p-detail-inner .quantity input.amount::-webkit-outer-spin-button,
.p-detail-inner .quantity input.amount::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.p-detail-inner .quantity input.amount { -moz-appearance: textfield; }

.p-detail-inner .quantity {
    position: relative !important;
    display: inline-block !important;
    width: 90px !important; 
    height: 46px !important; 
    margin: 0 !important; 
    border: none !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

.p-detail-inner .quantity input.amount {
    width: 100% !important;
    height: 46px !important; 
    padding: 0 32px 0 10px !important; 
    text-align: center !important;
    border: 1px solid #ced4da !important;
    border-radius: var(--sittec-border-radius-md) !important;
    font-weight: 700;
    font-size: 1.2rem;
    box-sizing: border-box;
    margin: 0 !important;
}

.p-detail-inner .quantity .increase,
.p-detail-inner .quantity .decrease {
    position: absolute !important;
    right: 0 !important;
    left: auto !important;
    width: 30px !important;
    height: 23px !important; 
    background-color: var(--sittec-brand-red) !important;
    color: #ffffff !important;
    border: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.p-detail-inner .quantity .increase {
    top: 0 !important;
    border-radius: 0 var(--sittec-border-radius-md) 0 0 !important;
}

.p-detail-inner .quantity .decrease {
    bottom: 0 !important;
    border-radius: 0 0 var(--sittec-border-radius-md) 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important; 
}

.p-detail-inner .quantity .increase:hover,
.p-detail-inner .quantity .decrease:hover {
    background-color: var(--sittec-brand-red-dark) !important;
}

.p-detail-inner .quantity .increase::before,
.p-detail-inner .quantity .decrease::before {
    color: #ffffff !important;
    font-size: 11px !important;
}

.p-detail-inner .unit {
    display: inline-block !important;
    font-size: 1.4rem !important; 
    font-weight: 800 !important;
    color: #333 !important;
    margin: 0 0 0 8px !important;
    line-height: 46px !important; 
    vertical-align: middle !important;
}

.p-detail-inner .st-quantity-modern {
    display: inline-flex !important; 
    align-items: center !important;
    width: auto !important; 
    height: auto !important;
}

.p-detail-inner .st-quantity-modern input.amount {
    width: 90px !important; 
    padding: 0 10px !important; 
}

.p-detail-inner .st-quantity-modern .increase,
.p-detail-inner .st-quantity-modern .decrease {
    display: none !important;
}

.p-detail-inner .st-quantity-modern .st-native-unit {
    display: inline-block !important;
    font-size: 1.4rem !important; 
    font-weight: 800 !important;
    color: #111 !important;
    margin-left: 12px !important;
    line-height: 1 !important;
}

.advanced-parameter,
.split-parameters,
.p-info-wrapper .parameters {
    width: 100% !important;
    max-width: 100% !important;
}

.advanced-parameter .parameter-values,
.split-parameters .split-parameter-values,
ul.split-parameter-values {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
}

.advanced-parameter .parameter-value,
.split-parameters .split-parameter-value,
li.split-parameter-value {
    width: 100% !important;
    margin: 0 !important;
}

.split-parameter-value label {
    border-radius: 8px !important;
    transition: var(--sittec-transition-smooth) !important;
    height: 100%;
}

.split-parameter-value input:checked + label {
    border-color: var(--sittec-brand-red) !important;
    box-shadow: inset 0 0 0 1px var(--sittec-brand-red) !important;
}

/* --------------------------------------------------------------------------
   5. PATIČKA
   -------------------------------------------------------------------------- */
#footer, #footer .footer-top, #footer .footer-bottom, .custom-footer {
    background-color: var(--sittec-footer-bg) !important;
    color: var(--sittec-footer-text);
}

#footer h1, #footer h2, #footer h3, #footer h4, #footer h5, #footer h6,
#footer p, #footer span, #footer div, #footer li, #footer .footer-title,
.custom-footer p {
    color: var(--sittec-footer-text) !important;
}

#footer a, .custom-footer a {
    color: var(--sittec-footer-text) !important;
    text-decoration: none;
    transition: var(--sittec-transition-smooth);
}

#footer a:hover, .custom-footer a:hover {
    color: var(--sittec-footer-link-hover) !important;
    text-decoration: none !important;
}

#footer input,
#footer select,
#footer textarea {
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #ced4da;
    border-radius: var(--sittec-border-radius-sm);
}

#footer input::placeholder {
    color: #6c757d;
}

/* --------------------------------------------------------------------------
   6. DETAIL PRODUKTU - POPIS A TABY
   -------------------------------------------------------------------------- */
.p-detail-tabs-wrapper .nav-tabs {
    border-bottom: none !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 25px;
}

.p-detail-tabs-wrapper .nav-tabs > li {
    margin: 0 !important;
    float: none !important;
}

.p-detail-tabs-wrapper .nav-tabs > li > a {
    background: #f8f9fa !important;
    color: #333333 !important;
    border: 1px solid #e9ecef !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
    padding: 12px 28px !important;
    transition: var(--sittec-transition-smooth) !important;
}

.p-detail-tabs-wrapper .nav-tabs > li.active > a,
.p-detail-tabs-wrapper .nav-tabs > li > a:hover {
    background: var(--sittec-brand-red) !important;
    color: #ffffff !important;
    border-color: var(--sittec-brand-red) !important;
    box-shadow: 0 4px 10px rgba(230, 43, 76, 0.2);
}

.p-detail-tabs-wrapper .tab-content {
    background: #ffffff;
    padding: 40px !important;
    border-radius: var(--sittec-border-radius-md);
    box-shadow: var(--sittec-shadow-header);
    border: 1px solid rgba(0,0,0,0.03);
    font-size: 16px;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .p-detail-tabs-wrapper .tab-content {
        padding: 20px !important;
    }
}

.tab-content .tab-pane {
    color: #444444 !important; 
}

.tab-content .tab-pane p {
    margin-bottom: 1.2em;
}

.tab-content .tab-pane h2,
.tab-content .tab-pane h3,
.tab-content .tab-pane h4 {
    color: #222222 !important; 
    font-weight: 700 !important;
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.3;
    clear: both;
}

.tab-content .tab-pane h2 { font-size: 2.2rem !important; }
.tab-content .tab-pane h3 { font-size: 1.8rem !important; }
.tab-content .tab-pane h4 { font-size: 1.5rem !important; }

.tab-content .tab-pane ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 1.8em 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 8px 40px; 
}

.tab-content .tab-pane ul li {
    position: relative;
    padding: 12px 0 12px 32px !important;
    margin: 0 !important;
    border-bottom: 1px solid #f2f2f2;
    color: #333333;
    line-height: 1.5;
    background: transparent !important;
    box-shadow: none !important;
}

.tab-content .tab-pane ul li:last-child {
    border-bottom: none;
}

.tab-content .tab-pane ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 15px; 
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e62b4c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* --------------------------------------------------------------------------
   7. INTELIGENTNÍ PRODUKTOVÉ BLOKY (ŠACHOVNICE) - CSS GRID + ELEGANTNÍ RED BORDER
   -------------------------------------------------------------------------- */

/* 1. ZAVEDENÍ STRIKTNÍ MŘÍŽKY (CSS GRID) PRO CELOU ZÁLOŽKU */
/* Tímto rozdělíme prostor na dva bezpečné "jízdní pruhy", které se nikdy nesrazí */
.tab-content .tab-pane .description-inner {
    display: grid !important;
    grid-template-columns: 1fr 320px !important; /* Levý pruh zbytek místa, Pravý pruh přesně 320px */
    gap: 40px; /* Mezera mezi popisem a parametry */
    align-items: start; /* Parametry zůstanou hezky přilepené nahoře */
}

/* Umístění parametrů striktně do pravého pruhu */
.tab-content .tab-pane .description-inner > div:not(.basic-description),
.tab-content .tab-pane .description-inner > table {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    grid-column: 2 !important; /* Vynucení do 2. sloupce */
}

/* Umístění popisu (a šachovnice) striktně do levého pruhu */
.tab-content .tab-pane .description-inner .basic-description {
    grid-column: 1 !important; 
}


/* 2. HLAVNÍ KONTEJNER ŠACHOVNICE */
.tab-content .tab-pane .snpt-chess {
    display: flex;
    flex-direction: column;
    gap: 35px; /* Decentní mezera mezi bloky */
    margin: 1em 0 2em 0;
    width: 100% !important;
    clear: none !important; /* Odstraněno, aby neutíkaly pod parametry */
}

/* 3. HLAVNÍ ELEGANTNÍ OBAL BOXU */
.tab-content .tab-pane .snpt-chess-item {
    display: flex !important; 
    flex-direction: row; 
    align-items: center; 
    justify-content: space-between;
    background: #ffffff; 
    border: 1px solid var(--sittec-brand-red); 
    border-radius: var(--sittec-border-radius-md);
    box-shadow: 0 4px 15px rgba(230, 43, 76, 0.05); 
    transition: var(--sittec-transition-smooth);
    
    /* ZLATÁ STŘEDNÍ CESTA: Boxy zaberou 90% svého "jízdního pruhu" */
    width: 90% !important; 
    
    box-sizing: border-box;
    float: none !important; 
    padding: 30px; 
}

.tab-content .tab-pane .snpt-chess-item:hover {
    box-shadow: 0 8px 25px rgba(230, 43, 76, 0.12);
    transform: translateY(-2px);
}

/* OBRANNÝ ŠTÍT PROTI SHOPTET CLEARFIXU */
.tab-content .tab-pane .snpt-chess-item::before,
.tab-content .tab-pane .snpt-chess-item::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* --- EXTERNÍ POSUN BLOKŮ A VNITŘNÍ CIK-CAK --- */
/* Bloky se posouvají pouze v rámci svého levého sloupce, nikdy nezasáhnou parametry vpravo */

.tab-content .tab-pane .snpt-chess-item--text-left {
    flex-direction: row !important;
    align-self: flex-start !important; 
}

.tab-content .tab-pane .snpt-chess-item--text-right {
    flex-direction: row-reverse !important; 
    align-self: flex-end !important; 
}

/* SYMETRICKÁ DISTRIBUCE PROSTORU UVNITŘ BLOKU */
.tab-content .tab-pane .snpt-chess-item__text,
.tab-content .tab-pane .snpt-chess-item__img {
    flex: 1 1 50%; 
    max-width: 50%; 
    box-sizing: border-box;
    margin: 0 !important; 
    padding: 0 20px !important; 
}

.tab-content .tab-pane .snpt-chess-item__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tab-content .tab-pane .snpt-chess-item__text h3 {
    font-size: 1.6rem !important;
    margin: 0 0 15px !important;
    color: var(--sittec-brand-red) !important;
    font-weight: 700 !important;
    line-height: 1.3;
    border: none !important; 
}

.tab-content .tab-pane .snpt-chess-item__text p,
.tab-content .tab-pane .snpt-chess-item__text ul {
    font-size: 16px !important;
    line-height: 1.6;
    color: #444444;
    margin: 0;
    display: block; 
}

.tab-content .tab-pane .snpt-chess-item__text ul {
    padding-left: 20px !important;
}

.tab-content .tab-pane .snpt-chess-item__text ul li {
    padding: 0 0 5px 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.tab-content .tab-pane .snpt-chess-item__text ul li::before {
    display: none !important; 
}

/* RESPONZIVNÍ FOTOGRAFIE BEZ OŘEZU */
.tab-content .tab-pane .snpt-chess-item__img {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; 
}

.tab-content .tab-pane .snpt-chess-item__img img {
    position: relative !important; 
    display: block;
    width: 100%;
    height: auto !important; 
    max-height: 450px; 
    object-fit: contain; 
    border-radius: 4px; 
    margin: 0 !important; 
    padding: 0 !important;
}

/* MOBILNÍ ZOBRAZENÍ - Sloučení mřížky do jednoho sloupce */
@media screen and (max-width: 992px) {
    /* Mřížka se na mobilu seřadí pod sebe (popis -> parametry) */
    .tab-content .tab-pane .description-inner {
        grid-template-columns: 1fr !important; 
        gap: 20px;
    }
    
    .tab-content .tab-pane .description-inner > div:not(.basic-description),
    .tab-content .tab-pane .description-inner > table {
        grid-column: 1 !important; 
    }

    .tab-content .tab-pane .snpt-chess-item,
    .tab-content .tab-pane .snpt-chess-item--text-left,
    .tab-content .tab-pane .snpt-chess-item--text-right {
        flex-direction: column !important;
        align-self: center !important; 
        width: 100% !important; /* Na mobilu opět plná šířka */
        gap: 1.5rem;
        padding: 20px;
    }
    
    .tab-content .tab-pane .snpt-chess-item__text,
    .tab-content .tab-pane .snpt-chess-item__img {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
        padding: 0 !important;
    }

    .tab-content .tab-pane .snpt-chess-item__img {
        order: 1 !important; 
    }
    
    .tab-content .tab-pane .snpt-chess-item__text {
        order: 2 !important;
        text-align: center; 
    }

    .tab-content .tab-pane .snpt-chess-item__img img {
        max-height: none;
    }
}