/* ========================================
   Forest Profi Technik - Modern Professional E-shop Styles
   Keeps original orange/dark color scheme while adding polish
   ======================================== */

:root {
    --color-orange: #FF6B00;
    --color-orange-dark: #D64C00;
    --color-orange-light: #FF8534;
    --color-dark: #191b1e;
    --color-dark-2: #23272b;
    --color-gray: #2d3238;
    --color-gray-mid: #6b7280;
    --color-gray-light: #e5e7eb;
    --color-white: #ffffff;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.18);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

/* ---- Global Improvements ---- */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-feature-settings: "kern" 1, "tnum" 1;
}

/* Content container polish */
body:not(.home-page) .content-container {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-top: 1rem;
}

/* ---- Hero Improvements ---- */
.hero {
    background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.45)),
                url('/static/images/hero-bg.png') center/cover;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 5rem 2rem;
    margin: -2rem -2rem 2.5rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.25));
    pointer-events: none;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 620px;
    margin: 0 auto;
}

/* ---- Professional Sidebar Filters (Category Page) ---- */
.products-section {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .products-section {
        grid-template-columns: 1fr;
    }
}

.filters-sidebar {
    background: #f8f9fa;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid #eee;
    position: sticky;
    top: 90px;
    box-shadow: var(--shadow-sm);
}

.filters-sidebar h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-gray);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-orange);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filters-sidebar h3 i {
    color: var(--color-orange);
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-gray-mid);
    margin-bottom: 0.5rem;
}

.filter-select,
.price-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: white;
    transition: var(--transition-smooth);
}

.filter-select:focus,
.price-input:focus {
    border-color: var(--color-orange);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.price-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: center;
}

.price-range span {
    color: var(--color-gray-mid);
    font-size: 0.85rem;
}

/* Tag chips in sidebar */
.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--color-gray);
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
}

.tag-chip:hover {
    border-color: var(--color-orange);
    color: var(--color-orange-dark);
}

.tag-chip.active {
    background: var(--color-orange);
    color: white;
    border-color: var(--color-orange);
}

.tag-chip.active:hover {
    background: var(--color-orange-dark);
}

/* Active filters summary */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--color-orange);
    color: white;
    padding: 0.25rem 0.65rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
}

.filter-pill .remove {
    cursor: pointer;
    opacity: 0.8;
}

.filter-pill .remove:hover {
    opacity: 1;
}

/* ---- Enhanced Product Cards ---- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f0f0f0;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: #e5e5e5;
}

.product-image-container {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    aspect-ratio: 4 / 3;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image {
    transform: scale(1.06);
}

.product-info {
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-gray);
    margin: 0 0 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-info p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.45;
    margin: 0 0 0.75rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price & Tags */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
    margin-bottom: 0.75rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    background: #f3f4f6;
    color: var(--color-gray-mid);
    white-space: nowrap;
}

.tag.price {
    background: #fff3eb;
    color: var(--color-orange-dark);
    font-weight: 600;
}

.sale-original {
    text-decoration: line-through;
    opacity: 0.55;
    background: #eee !important;
    color: #888 !important;
}

.sale-badge {
    background: #e74c3c !important;
    color: white !important;
    font-weight: 700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Add to cart button */
.add-to-cart {
    width: 100%;
    padding: 0.7rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: var(--color-orange);
    transition: var(--transition-smooth);
}

.add-to-cart:hover {
    background: var(--color-orange-dark);
    transform: translateY(-1px);
}

/* ---- Katalog (Category Grid) Improvements ---- */
.katalog-section {
    max-width: 1100px;
    margin: 0 auto;
}

.katalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.katalog-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    text-decoration: none;
    color: var(--color-gray);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    border: 1px solid #f0f0f0;
}

.katalog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-orange);
}

.katalog-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #fff3eb, #ffe8d6);
    color: var(--color-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    transition: var(--transition-smooth);
}

.katalog-card:hover .katalog-icon {
    background: var(--color-orange);
    color: white;
    transform: scale(1.05);
}

.katalog-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
}

.katalog-count {
    font-size: 0.85rem;
    color: var(--color-gray-mid);
}

.katalog-arrow {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    opacity: 0.3;
    transition: var(--transition-smooth);
}

.katalog-card:hover .katalog-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* ---- Home Page Polish ---- */
.home-hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.45)),
                url('/static/images/hero-bg.png') center/cover;
    border-radius: var(--radius-lg);
    padding: 6rem 2rem;
    text-align: center;
    color: white;
    margin-bottom: 3rem;
}

.home-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.home-hero-subtitle {
    font-size: 1.35rem;
    opacity: 0.95;
    margin-bottom: 0.35rem;
}

.home-hero-tagline {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 2rem;
}

.home-hero-btn {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 14px rgba(255,107,0,0.35);
}

.home-hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255,107,0,0.45);
}

/* Services */
.home-services h2,
.home-section h2 {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    border: 1px solid #f5f5f5;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.service-icon {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, #fff3eb, #ffe8d6);
    color: var(--color-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    margin: 0 auto 1rem;
}

/* Akce / Promotions */
.akce-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.akce-card {
    min-height: 220px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: flex-end;
    color: white;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-md);
}

.akce-card:hover {
    transform: scale(1.015);
    box-shadow: var(--shadow-lg);
}

.akce-content {
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    width: 100%;
}

.akce-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

/* Category grid on home */
.home-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.home-cat-card {
    background: white;
    padding: 1.5rem 1rem;
    border-radius: var(--radius-lg);
    text-align: center;
    text-decoration: none;
    color: var(--color-gray);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    border: 1px solid #f0f0f0;
}

.home-cat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-orange);
}

.home-cat-icon {
    font-size: 2rem;
    color: var(--color-orange);
    margin-bottom: 0.75rem;
}

/* ---- Cart Page Improvements ---- */
.cart-section {
    max-width: 1000px;
    margin: 0 auto;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    gap: 1.25rem;
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid #eee;
}

.cart-item img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    background: #f9f9f9;
    border-radius: var(--radius-sm);
    padding: 0.5rem;
}

.cart-item-details {
    flex: 1;
}

.cart-summary {
    background: #f8f9fa;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    margin-top: 2rem;
    border: 1px solid #eee;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 50px;
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .home-hero h1 { font-size: 2.25rem; }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .filters-sidebar {
        position: static;
    }
}

/* ---- Utility: Empty States ---- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-gray-mid);
}

.empty-state i {
    font-size: 3.5rem;
    color: #ddd;
    margin-bottom: 1rem;
}