:root { --primary: #e68a5c; --dark: #1a1a1a; --border: #f0f0f0; --light: #fdfdfd; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background: var(--light);
    color: #2d3436;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.2px;
}
h1, h2, h3, .product-card h3 {
    font-weight: 600;
    line-height: 1.3;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* HEADER */
.header { background: var(--dark); padding: 10px 0; border-bottom: 4px solid var(--primary); position: sticky; top: 0; z-index: 1000; }
.nav { display: flex; justify-content: space-between; align-items: center; }
.logo { color: white; text-decoration: none; font-size: 1.45rem; font-weight: 800; }
.logo span { color: var(--primary); }
.header nav a { color: rgba(255,255,255,0.8); text-decoration: none; margin-left: 16px; font-weight: 600; font-size: 13px; }
.header nav a.active { color: var(--primary); }
.mobile-menu-btn { display: none; background: transparent; border: 0; width: 40px; height: 34px; cursor: pointer; padding: 4px; }
.mobile-menu-btn span { display: block; height: 3px; background: #fff; margin: 6px 0; border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }

/* HERO */
.hero { background: var(--dark); color: white; padding: 42px 0; text-align: center; }
.hero h1 { font-size: 2.1rem; font-weight: 800; margin-bottom: 18px; }
.hero .section-lead {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin: 0 auto 18px;
}
.search-container { max-width: 600px; margin: 0 auto; position: relative; }
.search-input { width: 100%; padding: 14px 22px; border-radius: 50px; border: none; font-size: 0.96rem; }
.search-btn { position: absolute; right: 4px; top: 4px; bottom: 4px; background: #b45309; color: #ffffff; border: none; padding: 0 24px; border-radius: 50px; font-weight: 800; cursor: pointer; }
.search-btn:hover,
.search-btn:focus-visible { background: #9a4608; }

/* MAIN CATEGORY GRID */
.main-cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 25px; margin: 40px 0; }
.main-cat-card { background: white; border-radius: 20px; border: 1px solid var(--border); text-decoration: none; overflow: hidden; transition: 0.3s; text-align: center; }
.main-cat-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.cat-card-img { width: 100%; height: 150px; background: #f9f9f9; overflow: hidden; }
.cat-card-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-card-title { padding: 15px; font-weight: 800; text-transform: uppercase; color: var(--dark); font-size: 0.9rem; }

/* LAYOUT & SIDEBAR */
.layout-wrapper { display: flex; gap: 30px; margin: 40px 0; align-items: flex-start; }
.sidebar { width: 250px; flex-shrink: 0; position: sticky; top: 100px; }
.sidebar-inner { background: #f5f5f5; border: 1px solid #e0e0e0; padding: 25px; border-radius: 20px; }
.sidebar-section { margin-bottom: 10px; }
.sidebar-root-link { display: block; padding: 10px 10px; font-weight: 700; color: #333; text-decoration: none; border-radius: 10px; transition: background 0.2s ease, color 0.2s ease; }
.sidebar-root-link:hover { background: #eaeaea; }
.sidebar-root-link.active { color: var(--primary); background: #fff3ed; }
.sidebar-tree { margin-top: 6px; }
.sidebar-details { border-bottom: 1px solid #e0e0e0; padding: 8px 0; }
.sidebar-details:last-child { border-bottom: none; }
.sidebar-summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 8px; border-radius: 10px; transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
.sidebar-summary::-webkit-details-marker { display: none; }
.sidebar-summary:hover { background: #ececec; box-shadow: inset 0 0 0 1px #e0e0e0; }
.sidebar-summary a { color: #333; text-decoration: none; font-weight: 600; flex: 1; }
.sidebar-caret { color: #888; transition: transform 0.2s ease, color 0.2s ease; font-size: 14px; }
.sidebar-summary:hover .sidebar-caret { color: #555; }
.sidebar-details[open] > .sidebar-summary .sidebar-caret { transform: rotate(180deg); color: var(--primary); }
.sidebar-summary.active { background: #fff3ed; box-shadow: inset 0 0 0 1px #ffd7c2; }
.sidebar-summary.active a { color: var(--primary); }
.sidebar-details[open] > .sidebar-summary { background: #f7f7f7; }
.sidebar-children { margin-left: 10px; padding-left: 12px; border-left: 2px solid #dcdcdc; }
.sidebar-empty { display: block; padding: 6px 0; color: #aaa; font-size: 0.85rem; }
.layout-wrapper.no-sidebar { display: block; }
.heureka-search-wrap {
    padding: 8px;
    margin: 0 auto;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #ececec;
    text-align: center;
    min-height: 112px;
    overflow: visible;
    position: relative;
    z-index: 2;
}
.heureka-search-wrap .heureka-affiliate-searchpanel {
    margin: 0 auto;
    min-height: 96px;
}
.heureka-search-wrap iframe {
    max-width: 100% !important;
    border: 0;
}
.sidebar.sidebar-heureka {
    width: 320px;
}
.tip-latest-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tip-latest-link {
    color: #333;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f7f7f7;
    border: 1px solid #ececec;
    font-weight: 500;
}
.tip-latest-link:hover {
    background: #fff3ed;
    border-color: #ffd7c2;
    color: #d4642f;
}
.main-content { flex: 1; min-width: 0; }
.main-content.full-width { width: 100%; }

.offcanvas-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); opacity: 0; pointer-events: none; transition: opacity 0.2s ease; z-index: 2000; }
.offcanvas { position: fixed; top: 0; left: 0; height: 100%; width: 85%; max-width: 320px; background: #fff; transform: translateX(-100%); transition: transform 0.25s ease; z-index: 2001; box-shadow: 8px 0 20px rgba(0,0,0,0.2); display: flex; flex-direction: column; }
.offcanvas-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid #eee; }
.offcanvas-close { background: transparent; border: 0; font-size: 28px; line-height: 1; cursor: pointer; }
.offcanvas-body { padding: 12px 16px 20px; overflow: auto; }
.offcanvas-section { margin-bottom: 16px; }
.offcanvas-root { display: block; font-weight: 700; color: #222; text-decoration: none; padding: 6px 6px; border-radius: 8px; }
.offcanvas-root:hover { background: #f2f2f2; }
.menu-open .offcanvas { transform: translateX(0); }
.menu-open .offcanvas-overlay { opacity: 1; pointer-events: auto; }
.menu-open { overflow: hidden; }
 
.load-more-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 25px 0 10px; }
.load-more { width: auto; min-width: 220px; }
.load-more-info { color: #777; font-size: 13px; }

/* PRODUCT GRID */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 25px; }
.section-title { font-size: 1.4rem; font-weight: 800; margin: 20px 0 12px; color: var(--dark); }
.section-count { font-size: 0.9rem; color: #777; font-weight: 600; }
.section-subtitle { font-size: 1.05rem; font-weight: 700; margin: 16px 0 8px; color: #444; }
.section-title.section-title-big { font-size: 2rem; margin-top: 10px; }
.section-lead { font-size: 1rem; color: #555; line-height: 1.7; max-width: 900px; margin: 0 0 18px; }
.lead-highlight { font-weight: 800; color: var(--dark); }
.home-message { margin: 10px auto 30px; max-width: 900px; font-size: 1rem; line-height: 1.8; color: #555; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px 22px; text-align: center; }
.home-tips-section { margin: 8px 0 24px; }
.home-tips-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.home-tip-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.home-tip-card:hover { transform: translateY(-3px); border-color: #f1d0bf; box-shadow: 0 10px 24px rgba(0,0,0,0.06); }
.home-tip-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.home-tip-body { padding: 14px 14px 16px; text-align: left; }
.home-tip-body h3 { font-size: 1.02rem; margin-bottom: 8px; color: #222; line-height: 1.35; }
.home-tip-body p { color: #555; font-size: 0.94rem; line-height: 1.6; margin-bottom: 8px; }
.home-tips-more { margin-top: 14px; display: flex; justify-content: center; }
.product-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.product-card { position: relative; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 12px 24px rgba(0,0,0,0.1); border-color: #f1d0bf; }
.product-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; z-index: 2; }
.badge { font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 999px; text-transform: uppercase; }
.badge-top { background: #ffe9d9; color: #7a3412; }
.badge-hit { background: #e6f6ff; color: #2b6fb4; }
.badge-sale { background: #ffe3e3; color: #b4342b; }
.product-card img { width: 100%; height: 200px; object-fit: contain; padding: 20px; }
.product-card-body { padding: 20px; }
.price { font-size: 1.5rem; color: #a34710; font-weight: 800; margin-bottom: 15px; }
.old-price { font-size: 0.9rem; color: #5f5f5f; text-decoration: line-through; margin-left: 6px; font-weight: 600; }
.btn { display: block; background: var(--primary); color: white !important; text-decoration: none; padding: 12px; border-radius: 12px; font-weight: 600; text-transform: uppercase; text-align: center; border: none; width: 100%; cursor: pointer; }
.btn-light { background: #f0f0f0; color: #444 !important; }
.product-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #555; margin-bottom: 12px; }
.product-meta .source { font-weight: 600; }
.product-meta .stock.in { color: #1f7a3f; font-weight: 700; }
.product-meta .stock.out { color: #9a4608; font-weight: 700; }
.product-perex { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: #555; min-height: 38px; text-align: left; }
.detail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.2;
    color: #444;
    text-decoration: none;
    border-radius: 8px;
}
.detail-link:hover,
.detail-link:focus-visible {
    color: #b45309;
    background: rgba(180, 83, 9, 0.08);
    outline: none;
}

/* Tipy na nakup: modern link styles */
.article-link {
    color: #e67e22;
    text-decoration: none;
    border-bottom: 1px solid rgba(230, 126, 34, 0.55);
    cursor: pointer;
    transition: color 0.22s ease, border-color 0.22s ease;
}

.article-link:hover,
.article-link:focus-visible {
    color: #cc6a17;
    border-bottom-color: rgba(204, 106, 23, 0.85);
}

.affiliate-button {
    display: inline-block;
    background: var(--primary);
    color: #fff !important;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.2;
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(230, 138, 92, 0.28);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.affiliate-button:hover,
.affiliate-button:focus-visible {
    background: #d97846;
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(217, 120, 70, 0.34);
}
.faq { margin-top: 30px; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.faq-q { font-weight: 800; color: var(--dark); margin-bottom: 6px; }
.faq-a { color: #555; line-height: 1.7; }
.product-detail { margin: 30px 0; }
.product-detail-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; align-items: start; }
.product-detail-img { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; text-align: center; }
.product-detail-img img { width: 100%; max-height: 420px; object-fit: contain; }
.product-detail-info h1 { font-size: 1.8rem; margin-bottom: 10px; color: var(--dark); }
.breadcrumbs { font-size: 13px; color: #777; margin-bottom: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.breadcrumbs a { color: #777; text-decoration: none; }
.product-desc { margin-top: 18px; color: #444; line-height: 1.7; }
.product-reviews { margin-top: 18px; }
.review-item { background: #f9f9f9; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-top: 8px; color: #555; }

.admin-panel { margin-top: 12px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: #fafafa; display: grid; gap: 8px; text-align: left; }
.admin-panel label { font-size: 12px; color: #444; display: flex; gap: 6px; align-items: center; }
.admin-panel select { padding: 6px 8px; border-radius: 8px; border: 1px solid #ddd; }
.admin-panel .btn { padding: 10px; font-size: 12px; }

.filter-bar { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.filter-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.filter-group { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #444; }
.filter-group select { padding: 6px 8px; border-radius: 8px; border: 1px solid #ddd; }
.filter-group.checks { gap: 14px; }
.filter-group.checks label { display: flex; gap: 6px; align-items: center; }
.filter-apply { width: auto; padding: 10px 16px; }
.filter-apply { background: #b45309; color: #ffffff !important; }
.filter-apply:hover,
.filter-apply:focus-visible { background: #9a4608; }
.filter-info { display: flex; justify-content: space-between; font-size: 13px; color: #666; }
.filter-clear { color: var(--primary); text-decoration: none; font-weight: 700; }

/* MODAL - OPRAVENÝ */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); overflow-y: auto; }
.modal-content { background: white; margin: 2% auto; padding: 40px; width: 95%; max-width: 1000px; border-radius: 25px; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.modal-flex { display: flex; gap: 40px; align-items: flex-start; }
.modal-img-box { flex: 1; max-width: 450px; text-align: center; background: #f9f9f9; border-radius: 15px; padding: 20px; }
.modal-img-box img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; border-radius: 10px; }
.modal-info-box { flex: 1.2; padding: 0 10px; min-width: 0; text-align: left; }
#modalTitle { font-size: 1.8rem; margin-bottom: 15px; line-height: 1.2; font-weight: 800; }
#modalDesc { margin: 20px 0; color: #444; line-height: 1.6; font-size: 1rem; word-wrap: break-word; }
.close { position: absolute; right: 25px; top: 20px; font-size: 35px; cursor: pointer; color: #bbb; transition: 0.3s; }
.close:hover { color: var(--primary); }

/* BENEFITS */
.benefits { background: #f9f9f9; padding: 60px 0; border-top: 1px solid var(--border); margin-top: 40px; }
.benefit-grid { display: flex; justify-content: space-between; gap: 30px; text-align: center; }
.benefit-grid > div { flex: 1; padding: 20px; }
.benefit-grid .icon { font-size: 45px; margin-bottom: 20px; display: block; }

/* FOOTER */
.footer { background: var(--dark); color: white; padding: 60px 0; text-align: center; margin-top: auto; }
.footer-nav { margin-bottom: 25px; }
.footer-nav a { color: white; text-decoration: none; margin: 0 15px; font-weight: 600; }
.footer-credits { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 40px; }
.operator { font-size: 13px; opacity: 0.6; margin-bottom: 10px; }
.footer-disclaimer { font-size: 11px; opacity: 0.5; max-width: 850px; margin: 0 auto; line-height: 1.8; }
.footer-contact { margin: 0 auto 24px; max-width: 520px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 16px; }
.footer-contact h4 { margin-bottom: 8px; font-size: 1rem; }
.footer-contact p { margin: 4px 0; }
.footer-contact a { color: #fff; text-decoration: none; font-weight: 600; }
.footer-contact a:hover { color: var(--primary); }
.footer-contact span { opacity: 0.6; margin: 0 8px; }

.contact-page { max-width: 820px; margin: 24px auto; }
.contact-links { margin: 14px 0 20px; display: grid; gap: 8px; }
.contact-links a { color: var(--primary); text-decoration: none; font-weight: 700; }
.contact-form { display: grid; gap: 10px; margin-top: 14px; }
.contact-form label { font-weight: 600; color: #333; font-size: 14px; }
.contact-form input, .contact-form textarea { width: 100%; border: 1px solid #ddd; border-radius: 10px; padding: 12px; font-size: 14px; }
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-alert { border-radius: 10px; padding: 12px 14px; margin: 10px 0; font-size: 14px; }
.contact-alert.success { background: #e9f9ef; border: 1px solid #a6e3bd; color: #146c2e; }
.contact-alert.error { background: #fff0f0; border: 1px solid #f1b4b4; color: #9d1d1d; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Higher-specificity link styles for article detail content */
.info-box .info-text a.article-link {
    color: #e67e22 !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(230, 126, 34, 0.6) !important;
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.info-box .info-text a.article-link:hover,
.info-box .info-text a.article-link:focus-visible {
    color: #cc6a17 !important;
    border-bottom-color: rgba(204, 106, 23, 0.9) !important;
    background: rgba(230, 126, 34, 0.12);
}

.info-box .info-text a.affiliate-button {
    display: inline-block !important;
    padding: 8px 14px !important;
    margin: 4px 0 !important;
    border-radius: 10px !important;
    background: var(--primary) !important;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 8px 16px rgba(230, 138, 92, 0.28);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.info-box .info-text a.affiliate-button:hover,
.info-box .info-text a.affiliate-button:focus-visible {
    background: #d97846 !important;
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(217, 120, 70, 0.35);
}

#backToTop { display: none; position: fixed; bottom: 30px; right: 30px; z-index: 99; background: var(--primary); color: white; border: none; padding: 15px 20px; border-radius: 50px; font-size: 20px; cursor: pointer; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }

@media (max-width: 1100px) {
    .modal-flex { flex-direction: column; }
    .modal-img-box { max-width: 100%; }
    .layout-wrapper, .benefit-grid { flex-direction: column; }
    .sidebar { width: 100%; position: static; }
    .sidebar.sidebar-heureka { width: 100%; }
    .product-detail-grid { grid-template-columns: 1fr; }
    .header .nav { align-items: center; }
    .header .nav > nav { display: none; }
    .mobile-menu-btn { display: block; }
}

@media (max-width: 600px) {
    .hero h1 { font-size: 1.45rem; line-height: 1.25; }
    .hero { padding: 30px 0; }
    .search-input { padding: 12px 18px; font-size: 0.93rem; }
    .search-btn { padding: 0 16px; font-size: 12px; }
    .home-tips-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .home-tips-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .home-tips-grid { grid-template-columns: 1fr; }
}