/*
Theme Name: brandideon
Author: Brandideon | Michal Halaj
Author URI: https://brandideon.com/
Version: 1.1.0
*/

/*
 * Google Fonts @import and Tailwind @theme tokens are output dynamically
 * by inc/dynamic-styles.php based on the "Nastavenia obchodu" settings.
 */

/* ── Base ────────────────────────────────────────────────────────────── */
html, body {
    margin: 0;
    color: var(--color-black-text, #555);
    overflow-x: hidden;
    font-family: var(--bd-font-body, "Cabin", sans-serif);
    font-weight: 400;
    font-optical-sizing: auto;
}
a { text-decoration: none; }

/* ── Primary button ──────────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: var(--bd-primary-text);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    font-family: var(--bd-font-body, inherit);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.2;
}
.btn-primary:hover          { opacity: 0.88; }
.btn-primary:active         { transform: scale(0.98); }
.btn-primary.loading,
.btn-primary:disabled       { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ── White button (slider overlay) ──────────────────────────────────── */
.button-type-white {
    background: white;
    color: var(--color-black);
    font-weight: 600;
    border-radius: 10px;
}
.button-type-white:hover {
    background: white;
    color: var(--color-primary);
    font-weight: 600;
    border-radius: 10px;
}
.button-for-primary {
    font-weight: 600;
    border-radius: 10px;
}
.button-for-primary:hover {
    font-weight: 600;
    border-radius: 10px;
}

/* ── Hamburger toggle ────────────────────────────────────────────────── */
.toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}
.line-toggle {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-black);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}
.toggle.activate .line-toggle:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.toggle.activate .line-toggle:nth-child(2) { opacity: 0; }
.toggle.activate .line-toggle:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobilná navigácia ───────────────────────────────────────────────── */
.m-nav {
    display: none;
    background: var(--color-black);
    padding: 1em 2em;
}
.m-nav.on { display: block; }
.m-nav ul, .m-nav .primary { display: flex; flex-direction: column; gap: 0; }
.m-nav li { border-bottom: 1px solid rgba(255,255,255,0.08); }
.m-nav a {
    display: block;
    color: #fff;
    padding: 0.8em 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.m-nav a:hover { color: var(--color-primary); }

/* ── Vyhľadávací panel ───────────────────────────────────────────────── */
.search-wrapper {
    display: none;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.search-wrapper.on { display: block; }


/* ── Účet dropdown ───────────────────────────────────────────────────── */
.ucet-dropdown {
    display: none; position: absolute; top: calc(100% + 8px); right: 0;
    background: #fff; border: 1px solid #e5e5e5; border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10); min-width: 180px; z-index: 500; overflow: hidden;
}
.ucet-dropdown.otvoreny { display: block; }
.ucet-dropdown-item {
    display: flex; align-items: center; gap: 10px; padding: 0.75em 1.1em;
    color: var(--color-black); transition: background 0.15s;
    border-bottom: 1px solid #f5f5f5;
}
.ucet-dropdown-item:last-child { border-bottom: none; }
.ucet-dropdown-item:hover { background: #f5f5f5; color: var(--color-black); }
.ucet-dropdown-item .fa { width: 16px; text-align: center; color: #888; }
@media (max-width: 1023px) { .ucet-dropdown { right: 0; left: auto; } }

/* ── Cena bez DPH ────────────────────────────────────────────────────── */
.bd-bez-dph { display: block; color: #888; font-weight: 400; margin-top: 2px; }

/* ── WooCommerce overrides ───────────────────────────────────────────── */
.woocommerce-message, .woocommerce-info, .woocommerce-error { margin: 1em 0; }
.woocommerce ul.products li.product .price { color: var(--color-black); font-weight: 600; }
.woocommerce .woocommerce-ordering select,
.woocommerce-page .woocommerce-ordering select { border: 1px solid #ddd; padding: 0.4em 0.8em; }
a.added_to_cart { display: none !important; }

/* cenový slider */
.ui-slider-horizontal { height: 4px; background: #ddd; border-radius: 2px; }
.ui-slider-horizontal .ui-slider-handle { width: 16px; height: 16px; background: var(--color-primary); border-radius: 50%; border: none; top: -6px; cursor: pointer; }
.ui-slider-horizontal .ui-slider-range { background: var(--color-primary); }

/* ── Filter panel ────────────────────────────────────────────────────── */
.flex-form-filter { display: none; }
.flex-form-filter.on { display: flex; }

/* Pagination */
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; border-radius: 8px; font-weight: 500; color: var(--color-black-text, #444); text-decoration: none; transition: background 0.15s, color 0.15s; padding: 0 6px; margin: 0 2px; }
.page-numbers:hover { background: #f5f5f5; }
.page-numbers.current { background: var(--color-primary); color: var(--bd-primary-text); font-weight: 700; }
.page-numbers.dots { background: none; }

/* ── Značky lišta ────────────────────────────────────────────────────── */
.brands-menu-list { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 0 2em; scrollbar-width: none; }
.brands-menu-list::-webkit-scrollbar { display: none; }
.brands-menu-list li { flex-shrink: 0; }
.brand-item { display: block; padding: 0.3em 0.6em; }
.brand-item__thumb { width: auto; height: 28px; object-fit: contain; }

/* ── Sticky header ───────────────────────────────────────────────────── */
header[role="banner"] { position: sticky; top: 0; z-index: 500; transition: box-shadow 0.25s; }
header[role="banner"].bd-sticky { box-shadow: 0 2px 16px rgba(0,0,0,0.08); }
header[role="banner"].bd-sticky .brands { max-height: 0; overflow: hidden; padding: 0; }
.brands { max-height: 100px; transition: max-height 0.3s ease; overflow: hidden; }

/* ── Back to top ─────────────────────────────────────────────────────── */
#bd-back-top {
    position: fixed; bottom: 2rem; right: 1.5rem; width: 42px; height: 42px;
    border-radius: 50%; background: var(--color-black); color: #fff; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    z-index: 400; opacity: 0; transform: translateY(12px);
    transition: opacity 0.25s, transform 0.25s; pointer-events: none;
}
#bd-back-top.viditelny { opacity: 1; transform: translateY(0); pointer-events: auto; }
#bd-back-top:hover { background: var(--color-primary); color: var(--bd-primary-text); }

/* ── Toast ───────────────────────────────────────────────────────────── */
#bd-toast-container { position: fixed; bottom: 5rem; right: 1.5rem; z-index: 9998; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.bd-toast {
    background: var(--color-black); color: #fff; padding: 0.75em 1.2em; border-radius: 8px;
    display: flex; align-items: center; gap: 8px;
    opacity: 0; transform: translateX(20px); transition: opacity 0.3s, transform 0.3s;
    pointer-events: none; box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.bd-toast .fa { color: var(--color-primary); }
.bd-toast.viditelny { opacity: 1; transform: translateX(0); }
.bd-toast--error { background: #dc2626; }
.bd-toast--error .fa { color: #fca5a5; }

/* ── Sticky add-to-cart bar (mobile) ─────────────────────────────────── */
.sticky-kosik-bar {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff; border-top: 1px solid #e5e5e5; padding: 0.75em 1.25em;
    z-index: 300; align-items: center; justify-content: space-between; gap: 1em;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
@media (max-width: 1023px) { .sticky-kosik-bar.viditelny { display: flex; } }
.sticky-kosik-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sticky-kosik-nazov { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-kosik-cena  { font-weight: 700; }
.sticky-kosik-btn {
    background: var(--color-black); color: #fff; border: none; border-radius: 6px;
    padding: 0.7em 1.4em; font-weight: 600; cursor: pointer;
    white-space: nowrap; flex-shrink: 0; transition: background 0.2s;
}
.sticky-kosik-btn:hover { background: var(--color-primary); color: var(--bd-primary-text); }

/* ── Promo slider ────────────────────────────────────────────────────── */
.bd-ps-slide[data-href] { cursor: pointer; }

/* ═══════════════════════════════════════════════════════════════════════
   PRODUCT DETAIL PAGE
   ═══════════════════════════════════════════════════════════════════════ */

/* Gallery */
.bd-gallery { outline: none; }
.bd-gal-main { position: relative; background: #fff; border-radius: 20px; overflow: hidden; cursor: grab; user-select: none; aspect-ratio: 1/1; }
.bd-gal-main:active { cursor: grabbing; }
.bd-gal-track { display: flex; width: 100%; height: 100%; will-change: transform; }
.bd-gal-slide { flex: 0 0 100%; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.bd-gal-slide img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; padding: 24px; pointer-events: none; }

/* Arrows */
.bd-gal-prev, .bd-gal-next {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0.92); border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); display: flex; align-items: center;
    justify-content: center; cursor: pointer; color: var(--color-black); padding: 0;
    transition: background 0.2s, box-shadow 0.2s;
}
.bd-gal-prev { left: 12px; }
.bd-gal-next { right: 12px; }
.bd-gal-prev:hover, .bd-gal-next:hover { background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,0.15); }

/* Counter */
.bd-gal-counter { position: absolute; bottom: 12px; right: 12px; background: rgba(0,0,0,0.38); color: #fff; font-weight: 600; padding: 3px 9px; border-radius: 999px; line-height: 1.6; pointer-events: none; }

/* Thumbnails */
.bd-gal-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin-top: 12px; }
.bd-gal-thumbs::-webkit-scrollbar { display: none; }
.bd-gal-thumb { flex-shrink: 0; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: #fff; cursor: pointer; transition: border-color 0.18s; padding: 0; }
.bd-gal-thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; display: block; }
.bd-gal-thumb:hover { border-color: #ccc; }
.bd-thumb-active { border-color: var(--color-primary) !important; }

/* Variation buttons — selected state */
.bd-var-btn.bd-var-selected {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--bd-primary-text);
    font-weight: 700;
}

/* Tabs */
.bd-tab-btn {
    flex-shrink: 0; background: none; border: none;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    padding: 14px 22px; font-weight: 600; color: #999;
    cursor: pointer; transition: color 0.18s, border-color 0.18s;
    white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--bd-font-body, inherit);
}
.bd-tab-btn:hover { color: var(--color-black); }
.bd-tab-active    { color: var(--color-black) !important; border-bottom-color: var(--color-primary) !important; }
.bd-tab-badge { background: var(--color-primary); color: var(--bd-primary-text); font-weight: 700; padding: 1px 6px; border-radius: 999px; line-height: 1.6; }
.bd-tab-panel        { display: none; }
.bd-tab-panel-active { display: block; }

/* Content prose */
.bd-prose { line-height: 1.8; color: var(--color-black-text, #444); }
.bd-prose p  { margin: 0 0 12px; }
.bd-prose h2 { font-weight: 700; margin: 20px 0 8px; color: var(--color-black); font-family: var(--bd-font-heading, inherit); }
.bd-prose h3 { font-weight: 600; margin: 16px 0 6px; color: var(--color-black); font-family: var(--bd-font-heading, inherit); }
.bd-prose ul { list-style: disc; padding-left: 20px; margin: 0 0 12px; }
.bd-prose li { margin-bottom: 4px; }

/* Specs grid */
.bd-specs-grid { display: grid; grid-template-columns: 1fr; border: 1px solid #efefef; border-radius: 14px; overflow: hidden; }
@media (min-width: 640px) { .bd-specs-grid { grid-template-columns: 1fr 1fr; } }
.bd-spec-row { display: flex; align-items: stretch; border-bottom: 1px solid #f5f5f5; }
.bd-spec-row:last-child { border-bottom: none; }
.bd-spec-dt { flex: 0 0 44%; background: #fafafa; font-weight: 600; color: var(--color-black-text, #555); padding: 12px 16px; border-right: 1px solid #f0f0f0; }
.bd-spec-dd { flex: 1; color: var(--color-black); padding: 12px 16px; margin: 0; }

/* WC Reviews */
.woocommerce-Reviews h2, .comment-reply-title { font-weight: 700 !important; color: var(--color-black) !important; margin-bottom: 16px !important; font-family: var(--bd-font-heading, inherit) !important; }
.woocommerce-Reviews .comment-form textarea,
.woocommerce-Reviews .comment-form input[type="text"],
.woocommerce-Reviews .comment-form input[type="email"] { width: 100%; border: 1px solid #e0e0e0; border-radius: 10px; padding: 10px 14px; outline: none; transition: border-color 0.2s; font-family: var(--bd-font-body, inherit); box-sizing: border-box; }
.woocommerce-Reviews .comment-form textarea:focus,
.woocommerce-Reviews .comment-form input:focus { border-color: var(--color-primary); }
.woocommerce-Reviews .form-submit input[type="submit"] { background: var(--color-primary); color: var(--bd-primary-text); border: none; border-radius: 12px; padding: 12px 28px; font-weight: 700; cursor: pointer; transition: opacity 0.2s; font-family: var(--bd-font-body, inherit); }
.woocommerce-Reviews .form-submit input[type="submit"]:hover { opacity: 0.85; }

/* Gallery column sticky (desktop) */
@media (min-width: 768px) {
    .bd-gallery-col, .bd-gallery { position: sticky; top: 80px; align-self: start; }
}
