/* =====================================================
   Klempířství Chýna - Main Styles
   ===================================================== */

:root {
    --primary: #1a5c2e;
    --primary-dark: #14472a;
    --primary-light: #e8f5e9;
    --secondary: #d4a843;
    --accent: #e74c3c;
    --text: #333333;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-alt: #f8f9fa;
    --border: #e5e7eb;
    --shadow: 0 2px 8px rgba(0,0,0,.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,.12);
    --radius: 8px;
    --radius-lg: 12px;
    --container: 1200px;
    --header-height: 72px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font); font-size: 16px; color: var(--text);
    line-height: 1.6; background: var(--bg);
}

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

img { max-width: 100%; height: auto; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---- Header ---- */
.site-header {
    background: var(--bg); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
}
.header-top {
    display: flex; align-items: center; justify-content: space-between;
    max-width: var(--container); margin: 0 auto; padding: 0 20px;
    height: var(--header-height);
}
.header-logo a {
    display: flex; align-items: center; gap: 10px;
    font-size: 20px; font-weight: 700; color: var(--primary); text-decoration: none;
}
.header-logo img { height: 48px; }
.header-logo .logo-placeholder {
    width: 48px; height: 48px; background: var(--primary); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 20px;
}

.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a {
    padding: 8px 14px; border-radius: var(--radius); font-size: 14px;
    font-weight: 500; color: var(--text); text-decoration: none; transition: all .2s;
}
.header-nav a:hover, .header-nav a.active { background: var(--primary-light); color: var(--primary); }
.header-nav a.nav-eshop {
    background: var(--primary); color: #fff; padding: 8px 18px;
}
.header-nav a.nav-eshop:hover { background: var(--primary-dark); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions a {
    display: flex; align-items: center; gap: 4px; font-size: 13px;
    color: var(--text-light); text-decoration: none;
}
.header-actions a:hover { color: var(--primary); }

.cart-icon { position: relative; }
.cart-icon .cart-count {
    position: absolute; top: -6px; right: -8px;
    background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none; background: none; border: none; cursor: pointer;
    padding: 8px; color: var(--text);
}

/* ---- Footer ---- */
.site-footer { background: #1e293b; color: #94a3b8; padding: 60px 0 24px; margin-top: 60px; }
.footer-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px; max-width: var(--container); margin: 0 auto; padding: 0 20px;
}
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-col p, .footer-col a { font-size: 14px; color: #94a3b8; line-height: 2; }
.footer-col a:hover { color: #fff; }
.footer-col ul { list-style: none; }
.footer-col li a { display: block; }
.footer-bottom {
    text-align: center; padding-top: 24px; margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,.1);
    max-width: var(--container); margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px;
    font-size: 13px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 24px; border: none; border-radius: var(--radius);
    font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s;
    text-decoration: none; font-family: var(--font);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 4px; font-size: 14px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 14px; font-family: var(--font);
    transition: border-color .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,92,46,.1);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-error { color: var(--danger); font-size: 13px; margin-top: 4px; }

/* ---- Alerts ---- */
.alert {
    padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px;
    border-left: 4px solid; font-size: 14px;
}
.alert-success { background: #f0fdf4; border-color: var(--success); color: #166534; }
.alert-error { background: #fef2f2; border-color: var(--danger); color: #991b1b; }
.alert-info { background: #eff6ff; border-color: var(--info); color: #1e40af; }

/* ---- Breadcrumb ---- */
.breadcrumb {
    display: flex; flex-wrap: wrap; gap: 4px; padding: 16px 0;
    font-size: 13px; color: var(--text-light);
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .separator { margin: 0 4px; }
.breadcrumb .current { color: var(--text); font-weight: 500; }

/* ---- Pagination ---- */
.pagination { display: flex; gap: 4px; justify-content: center; padding: 24px 0; }
.pagination a, .pagination span {
    padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 14px; text-decoration: none; color: var(--text);
}
.pagination a:hover { background: var(--bg-alt); border-color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- Page Sections ---- */
.page-hero {
    background: var(--primary); color: #fff; padding: 80px 0; text-align: center;
}
.page-hero h1 { font-size: 42px; font-weight: 700; margin-bottom: 16px; }
.page-hero p { font-size: 18px; opacity: .9; max-width: 600px; margin: 0 auto; }

.section { padding: 60px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 32px; font-weight: 700; margin-bottom: 12px; }
.section-subtitle { font-size: 16px; color: var(--text-light); margin-bottom: 40px; }

/* ---- Product Card ---- */
.products-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.product-card {
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
    transition: all .2s; position: relative; display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.product-card .product-image {
    aspect-ratio: 1; overflow: hidden; background: var(--bg-alt); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.product-card .product-image img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.product-card .product-label {
    position: absolute; top: 12px; left: 12px;
    padding: 3px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; color: #fff;
}
.product-card .label-new { background: var(--info); }
.product-card .label-sale { background: var(--accent); }
.product-card .label-bestseller { background: var(--secondary); }
.product-card .label-tip { background: var(--primary); }
.product-card .label-clearance { background: #6b7280; }

.product-card .product-info { padding: 16px; }
.product-card .product-name {
    font-size: 14px; font-weight: 600; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 8px; min-height: 42px;
}
.product-card .product-name a { color: inherit; text-decoration: none; }
.product-card .product-name a:hover { color: var(--primary); }
.product-card .product-sku { font-size: 12px; color: var(--text-light); margin-bottom: 8px; }
.product-card .product-price { font-size: 18px; font-weight: 700; color: var(--primary); }
.product-card .product-price .original { font-size: 14px; color: var(--text-light); text-decoration: line-through; margin-left: 8px; font-weight: 400; }
.product-card .product-price-novat { font-size: 12px; color: var(--text-light); }
.product-card .product-stock { font-size: 12px; margin-top: 6px; }
.product-card .product-actions { padding: 0 16px 16px; display: flex; gap: 8px; }
.product-card .product-actions .btn { flex: 1; font-size: 13px; padding: 8px; }

/* Wishlist & Compare buttons on card */
.product-card .quick-actions {
    position: absolute; top: 12px; right: 12px;
    display: flex; flex-direction: column; gap: 6px; opacity: 0; transition: opacity .2s;
}
.product-card:hover .quick-actions { opacity: 1; }
.quick-actions button {
    width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--bg); cursor: pointer; display: flex; align-items: center;
    justify-content: center; font-size: 14px; transition: all .2s;
}
.quick-actions button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.quick-actions button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- Text helpers ---- */
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
.text-muted { color: var(--text-light); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .header-nav { display: none; }
    .header-nav.open { display: flex; flex-direction: column; position: absolute; top: var(--header-height); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 16px; z-index: 99; }
    .menu-toggle { display: block; }
    .page-hero h1 { font-size: 28px; }
    .page-hero { padding: 48px 0; }
    .section { padding: 40px 0; }
    .section-title { font-size: 24px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}

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