/* 
=========================================
         Instalatérství Suchomel
========================================= 
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* === ZÁKLADNÍ RESETOVÁNÍ A NASTAVENÍ === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Barvy */
    --primary-color: #37BAF7;
    --primary-dark: #2096CC;
    --secondary-color: #012348;
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #6b6b6b;
    --border-color: #e5e5e5;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-dark);
    background: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === TYPOGRAFIE === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-medium);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* === ALERT BARY === */
.alert-bar {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-bar.info {
    background: #d1ecf1;
    color: #0c5460;
    border-bottom: 2px solid #bee5eb;
}

.alert-bar.warning {
    background: #fff3cd;
    color: #856404;
    border-bottom: 2px solid #ffeaa7;
}

.alert-bar.danger {
    background: #f8d7da;
    color: #721c24;
    border-bottom: 2px solid #f5c6cb;
}

/* === HEADER === */
.site-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    position: relative;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, rgba(255,255,255,0), rgb(55, 186, 247), rgba(255,255,255,0));
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xl);
}

.logo-section {
    flex-shrink: 0;
}

.logo {
    height: 100px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* === NAVIGACE === */
.main-navigation {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.nav-link {
    padding: var(--spacing-xs) var(--spacing-md);
    color: var(--text-medium);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(55, 186, 247, 0.08);
}

.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 30%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Košík badge */
.cart-badge {
    display: inline-block;
    background: var(--danger);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
}

/* === HLAVNÍ OBSAH === */
.main-content {
    min-height: calc(100vh - 300px);
    padding: var(--spacing-xl) var(--spacing-lg);
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.page-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xxl);
    box-shadow: var(--shadow-sm);
}

.page-title {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
}

.page-body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.page-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--spacing-md) 0;
}

/* === SLIDER === */
.main-slider-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto var(--spacing-xl);
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.slider-wrapper {
    display: flex;
    width: 100%;
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
    min-width: 100%;
    max-width: 100%;
    position: relative;
    display: block;
    height: 400px;
}

.slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.slide img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

/* Šipky slideru */
.slider-prev, 
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    border: none;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-prev { 
    left: 20px;
}

.slider-next { 
    right: 20px;
}

.slider-prev:hover, 
.slider-next:hover { 
    background: var(--white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-md);
}

/* Tečky slideru */
.slider-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.9);
}

.dot.active { 
    background: var(--white);
    transform: scale(1.3);
    border-color: var(--primary-color);
}

/* === E-SHOP === */
.eshop-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
}

.eshop-container {
    display: flex;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-lg);
}

/* Sidebar */
.eshop-sidebar {
    flex: 0 0 280px;
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    align-self: flex-start;
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

.cat-list {
    list-style: none;
}

.cat-list li {
    margin-bottom: var(--spacing-xs);
}

.cat-list a {
    display: block;
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--text-medium);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-weight: 500;
}

.cat-list a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    transform: translateX(4px);
}

.cat-list a.active {
    background: rgba(55, 186, 247, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.cat-sub {
    margin-left: var(--spacing-md);
    font-size: 0.9em;
    border-left: 2px solid var(--border-color);
    padding-left: var(--spacing-sm);
    margin-top: var(--spacing-xs);
}

/* Obsah e-shopu */
.eshop-content {
    flex: 1;
    min-width: 0;
}

.category-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 3px solid var(--primary-color);
}

/* Grid produktů */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--spacing-lg);
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    margin-bottom: var(--spacing-md);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
}

.grid-no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    height: 220px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.product-title {
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
    font-size: 1.1rem;
    line-height: 1.4;
}

.product-stock {
    font-size: 0.85rem;
    color: var(--success);
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.product-price {
    color: var(--danger);
    font-weight: 700;
    font-size: 1.4rem;
    margin-top: auto;
    margin-bottom: var(--spacing-sm);
}

.btn-detail {
    display: block;
    text-align: center;
    background: var(--primary-color);
    color: var(--white);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-detail:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* === DETAIL PRODUKTU === */
.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
}

.back-link {
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
    font-weight: 500;
}

.back-link:hover {
    color: var(--primary-color);
}

.product-detail-wrap {
    display: flex;
    gap: var(--spacing-xxl);
    background: var(--white);
    padding: var(--spacing-xxl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.detail-left {
    flex: 1;
    min-width: 300px;
}

.detail-right {
    flex: 1;
    min-width: 300px;
}

.detail-img,
.detail-main-img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.detail-img:hover,
.detail-main-img:hover {
    transform: scale(1.02);
}

.no-image-placeholder {
    width: 100%;
    height: 400px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    color: var(--text-light);
    font-size: 1.2rem;
}

/* Galerie miniatur */
.gallery-wrapper,
.product-gallery-thumbnails {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}

.gallery-thumb-container a,
.product-gallery-thumbnails a {
    display: block;
    text-decoration: none;
}

.thumb-img,
.product-gallery-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.thumb-img:hover,
.product-gallery-thumbnails img:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.thumb-img.active-thumb {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* Info produktu */
.detail-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

.detail-code {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
}

.detail-price {
    font-size: 2.5rem;
    color: var(--danger);
    font-weight: 700;
    margin: var(--spacing-lg) 0;
}

.stock-status {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
}

.in-stock {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
}

.out-stock {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

.detail-description {
    margin: var(--spacing-lg) 0;
    line-height: 1.8;
    color: var(--text-medium);
}

/* Formulář košíku */
.add-to-cart-form {
    background: var(--bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    margin-top: var(--spacing-lg);
}

.qty-input {
    width: 80px;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-right: var(--spacing-sm);
    transition: border-color 0.2s ease;
}

.qty-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-buy {
    background: var(--success);
    color: var(--white);
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-buy:hover {
    background: #219a52;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-continue {
    display: inline-block;
    background: var(--text-medium);
    color: var(--white);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-continue:hover {
    background: var(--text-dark);
}

/* === FOOTER === */
.site-footer {
    background: var(--secondary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--spacing-xl) var(--spacing-lg);
    margin-top: var(--spacing-xxl);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* === WELCOME MODAL === */
.welcome-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.welcome-modal-content {
    background: var(--white);
    padding: var(--spacing-xxl);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.welcome-modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s ease;
    line-height: 1;
}

.welcome-modal-close:hover {
    color: var(--text-dark);
}

.welcome-modal-body {
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
}

.welcome-modal-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: var(--spacing-sm) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.welcome-modal-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .header-container {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .main-navigation {
        width: 100%;
        justify-content: center;
    }
    
    .eshop-container {
        flex-direction: column;
    }
    
    .eshop-sidebar {
        position: static;
        flex: 1;
    }
    
    .product-detail-wrap {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-xl: 2rem;
        --spacing-xxl: 2.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .page-content {
        padding: var(--spacing-lg);
    }
    
    .slide {
        height: 250px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: var(--spacing-md);
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .logo {
        height: 75px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .main-navigation {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .slider-prev,
    .slider-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}