/**
 * NEJRÁMY Produkty - Frontend Styles
 *
 * @version 4.4.6
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    --nejramy-produkty-primary: #0D4689;
    --nejramy-produkty-primary-hover: #2c5282;
    --nejramy-produkty-text: #2d3748;
    --nejramy-produkty-text-light: #718096;
    --nejramy-produkty-border: #e2e8f0;
    --nejramy-produkty-bg-light: #f7fafc;
    --nejramy-produkty-white: #ffffff;
    --nejramy-produkty-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --nejramy-produkty-shadow-hover: 0 4px 15px rgba(0, 0, 0, 0.15);
    --nejramy-produkty-radius: 10px;
    --nejramy-produkty-gap: 1.5rem;
}

/* ==========================================================================
   Wrapper
   ========================================================================== */

.nejramy-produkty-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Taxonomy pages don't have Elementor container, need own padding */
body.tax-product_cat .nejramy-produkty-wrapper,
body.tax-product_brand .nejramy-produkty-wrapper {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 1.5rem !important;
}

/* ==========================================================================
   Grid Layout
   ========================================================================== */

.nejramy-produkty-grid {
    display: grid;
    gap: var(--nejramy-produkty-gap);
    grid-template-columns: repeat(3, 1fr) !important;
}

/* Ensure all grid children respect column width */
.nejramy-produkty-grid > * {
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.nejramy-produkty-grid--cols-1 {
    grid-template-columns: 1fr !important;
}

.nejramy-produkty-grid--cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.nejramy-produkty-grid--cols-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.nejramy-produkty-grid--cols-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

.nejramy-produkty-grid--cols-5 {
    grid-template-columns: repeat(5, 1fr) !important;
}

.nejramy-produkty-grid--cols-6 {
    grid-template-columns: repeat(6, 1fr) !important;
}

/* ==========================================================================
   Product Card
   ========================================================================== */

.nejramy-produkty-card {
    display: block;
    background: var(--nejramy-produkty-white);
    border: 1px solid var(--nejramy-produkty-border);
    border-radius: var(--nejramy-produkty-radius);
    box-shadow: var(--nejramy-produkty-shadow);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
    .nejramy-produkty-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--nejramy-produkty-shadow-hover);
    }
}

.nejramy-produkty-card:hover {
    text-decoration: none;
    color: inherit;
}

/* Card Image */
.nejramy-produkty-card__image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--nejramy-produkty-bg-light);
}

.nejramy-produkty-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

@media (hover: hover) {
    .nejramy-produkty-card:hover .nejramy-produkty-card__image img {
        transform: scale(1.05);
    }
}

/* Card Content */
.nejramy-produkty-card__content {
    padding: 1rem;
}

.nejramy-produkty-card__title {
    /* Inherit from WordPress/Elementor H2 settings */
    font-weight: 500;
    color: var(--nejramy-produkty-primary);
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.nejramy-produkty-card__brand {
    font-size: 0.8rem;
    color: var(--nejramy-produkty-text-light);
    margin: 0;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.nejramy-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Archivo Narrow', sans-serif;
    font-size: 0.875rem;
    color: var(--nejramy-produkty-text-light);
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.nejramy-breadcrumbs a {
    color: var(--nejramy-produkty-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nejramy-breadcrumbs a:hover {
    color: var(--nejramy-produkty-primary-hover);
    text-decoration: underline;
}

.nejramy-breadcrumbs .separator {
    color: var(--nejramy-produkty-text-light);
    font-size: 0.75rem;
}

.nejramy-breadcrumbs .current {
    color: var(--nejramy-produkty-text);
    font-weight: 500;
}

/* Brand breadcrumb alias for FluentSnippets compatibility */
.brand-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.brand-breadcrumb .sep {
    color: var(--nejramy-produkty-text-light);
    margin: 0 0.25rem;
}

/* ==========================================================================
   Archive Header (H1 Title)
   ========================================================================== */

.nejramy-archive-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--nejramy-produkty-border);
}

.nejramy-archive-title {
    font-size: clamp(1.25rem, 3vw + 0.5rem, 1.75rem);
    font-weight: 600;
    color: var(--nejramy-produkty-primary);
    margin: 0;
    line-height: 1.3;
}

/* ==========================================================================
   Brand/Model Filter
   ========================================================================== */

.nejramy-brand-filter,
.nejramy-model-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0;
}

.nejramy-filter-label {
    font-weight: 500;
    color: var(--nejramy-produkty-text);
    font-size: 0.9rem;
}

.nejramy-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem; /* Reduced by 20% from 0.5rem */
}

.nejramy-filter-btn {
    display: inline-block !important;
    padding: 0.25rem 0.5rem !important; /* Reduced by 50% for compact tags */
    font-family: 'Archivo Narrow', sans-serif !important;
    font-size: 0.96rem !important; /* 10% larger */
    font-weight: 500 !important;
    color: var(--nejramy-produkty-primary) !important;
    background: transparent !important;
    border: 1px solid var(--nejramy-produkty-primary) !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.nejramy-filter-btn:hover {
    background: var(--nejramy-produkty-primary) !important;
    color: var(--nejramy-produkty-white) !important;
}

.nejramy-filter-btn.active {
    background: var(--nejramy-produkty-primary) !important;
    color: var(--nejramy-produkty-white) !important;
}

.nejramy-model-filter-container {
    /* Container for dynamically loaded model filter */
}

.nejramy-generation-filter-container {
    /* Container for dynamically loaded generation filter */
}

.nejramy-generation-filter {
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Product Counts - Light Gray Color
   ========================================================================== */

.nejramy-filter-btn .product-count,
.nejramy-category-menu a .product-count,
.nejramy-brand-category-btn .product-count {
    display: none !important;
}

/* Product counts are hidden via display:none above */

/* ==========================================================================
   Brand Filter - Mobile Collapse
   ========================================================================== */

/* Show all brands button - hidden by default */
.nejramy-show-all-brands {
    display: none !important;
    padding: 0.45rem 0.9rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #fff !important;
    background: var(--nejramy-produkty-primary) !important;
    border: 1px solid var(--nejramy-produkty-primary) !important;
    border-radius: var(--nejramy-produkty-radius) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.nejramy-show-all-brands:hover {
    background: var(--nejramy-produkty-primary-hover) !important;
    border-color: var(--nejramy-produkty-primary-hover) !important;
}

/* Mobile collapse styles - only on mobile (≤991px) */
@media (max-width: 991px) {
    /* Hide brands after 21st button (1 "Všechny" + 20 brands = 21 visible) */
    .nejramy-brand-filter--collapsible .nejramy-filter-buttons > .nejramy-filter-btn:nth-child(n+22) {
        display: none !important;
    }

    /* Show the "show all brands" button */
    .nejramy-brand-filter--collapsible .nejramy-show-all-brands {
        display: inline-block !important;
    }

    /* When expanded - show all brands */
    .nejramy-brand-filter--collapsible.expanded .nejramy-filter-buttons > .nejramy-filter-btn {
        display: inline-block !important;
    }

    /* When expanded - hide the button */
    .nejramy-brand-filter--collapsible.expanded .nejramy-show-all-brands {
        display: none !important;
    }
}

/* Desktop - always show all, hide button */
@media (min-width: 992px) {
    .nejramy-show-all-brands {
        display: none !important;
    }

    .nejramy-brand-filter--collapsible .nejramy-filter-buttons > .nejramy-filter-btn {
        display: inline-block !important;
    }
}

/* ==========================================================================
   Sidebar Layout
   ========================================================================== */

.nejramy-produkty-layout {
    display: flex;
    gap: 2rem;
}

.nejramy-produkty-sidebar {
    width: 280px;
    min-width: 280px;
    flex-shrink: 0;
}

.nejramy-produkty-content {
    flex: 1;
    min-width: 0;
}

/* Category Menu */
.nejramy-category-menu {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

.nejramy-category-menu ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
}

.nejramy-category-menu li {
    margin-bottom: 0 !important;
    background: #ffffff !important;
}

.nejramy-category-btn {
    display: block !important;
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    text-align: left !important;
    font-size: 0.9rem !important;
    color: #2d3748 !important;
    background: #ffffff !important;
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    text-decoration: none !important;
}

.nejramy-category-menu li:last-child .nejramy-category-btn {
    border-bottom: none !important;
}

.nejramy-category-btn:hover {
    background: #f7fafc !important;
    color: #0D4689 !important;
}

.nejramy-category-btn.active {
    background: var(--nejramy-produkty-primary) !important;
    color: #ffffff !important;
}

.nejramy-category-btn.active .product-count {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Category Menu Heading */
.nejramy-category-menu-heading {
    display: block !important;
    padding: 0.75rem 1rem !important;
    margin: 0 !important;
    font-size: 1.08rem !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
    background: #f1f5f9 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

a.nejramy-category-menu-heading:hover {
    color: #0D4689 !important;
    text-decoration: none !important;
}

/* Mobile Category Dropdown */
.nejramy-category-dropdown {
    display: none;
    margin-bottom: 1rem;
}

.nejramy-category-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--nejramy-produkty-text);
    background: var(--nejramy-produkty-white);
    border: 1px solid var(--nejramy-produkty-border);
    border-radius: var(--nejramy-produkty-radius);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.nejramy-category-select:focus {
    outline: none;
    border-color: var(--nejramy-produkty-primary);
    box-shadow: 0 0 0 2px rgba(13, 70, 137, 0.1);
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.nejramy-produkty-grid.loading {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
}

.nejramy-produkty-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--nejramy-produkty-white);
    padding: 1rem 2rem;
    border-radius: var(--nejramy-produkty-radius);
    box-shadow: var(--nejramy-produkty-shadow);
    z-index: 10;
}

.nejramy-produkty-loader span {
    color: var(--nejramy-produkty-primary);
    font-weight: 500;
}

/* ==========================================================================
   Messages
   ========================================================================== */

.nejramy-produkty-empty,
.nejramy-produkty-error {
    text-align: center;
    padding: 2rem;
    color: var(--nejramy-produkty-text-light);
    font-size: 0.95rem;
}

.nejramy-produkty-error {
    color: #c53030;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: var(--nejramy-produkty-radius);
}

/* ==========================================================================
   Responsive - Tablet (991px)
   ========================================================================== */

@media (max-width: 991px) {
    .nejramy-produkty-grid--cols-4,
    .nejramy-produkty-grid--cols-5,
    .nejramy-produkty-grid--cols-6 {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Hide sidebar, show dropdown on tablet */
    .nejramy-produkty-sidebar {
        display: none;
    }

    .nejramy-category-dropdown,
    .nejramy-brand-category-dropdown {
        display: block;
    }

    .nejramy-produkty-layout {
        display: block;
    }
}

/* ==========================================================================
   Responsive - Mobile (767px)
   ========================================================================== */

@media (max-width: 767px) {
    .nejramy-produkty-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }

    .nejramy-produkty-card__content {
        padding: 0.75rem;
    }

    .nejramy-produkty-card__title {
        font-size: 0.85rem;
    }

    .nejramy-produkty-card__brand {
        font-size: 0.75rem;
    }

    /* Responsive breadcrumbs */
    .nejramy-breadcrumbs {
        font-family: 'Archivo Narrow', sans-serif !important;
        font-size: 0.75rem;
    }

    /* Title handled by clamp() in base styles */

    /* Responsive filter */
    .nejramy-brand-filter,
    .nejramy-model-filter {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 0;
        margin-top: 0;
        margin-bottom: 0.5rem;
    }

    .nejramy-filter-btn {
        font-family: 'Archivo Narrow', sans-serif !important;
        font-size: 0.8rem !important;
        padding: 0.35rem 0.5rem !important; /* Min 44px touch target */
        min-height: 36px !important;
    }
}

/* ==========================================================================
   Responsive - Small Mobile (480px)
   ========================================================================== */

@media (max-width: 480px) {
    /* Default 2 columns on small mobile - can be overridden by Elementor */
    .nejramy-produkty-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem;
    }

    .nejramy-produkty-card__content {
        padding: 0.5rem;
    }

    .nejramy-produkty-card__title {
        font-size: 0.8125rem;
    }
}

/* ==========================================================================
   Category Sections (Brand Page Grouped Layout v3.6.0)
   ========================================================================== */

/* Main Category Section */
.nejramy-category-section {
    margin-bottom: 3rem !important;
    scroll-margin-top: 100px !important; /* offset for fixed header */
}

.nejramy-category-section__title {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #0D4689 !important;
    margin: 0 0 1.5rem 0 !important;
    padding-bottom: 0.75rem !important;
    border-bottom: 2px solid #0D4689 !important;
}

.nejramy-category-section__title a {
    color: inherit !important;
    text-decoration: none !important;
}

.nejramy-category-section__title a:hover {
    text-decoration: underline !important;
}

/* Subsection (Child Category) */
.nejramy-category-subsection {
    margin-bottom: 2rem !important;
    scroll-margin-top: 100px !important;
}

.nejramy-category-subsection__title {
    font-size: 1.125rem !important;
    font-weight: 500 !important;
    color: #333 !important;
    margin: 0 0 1rem 0 !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.nejramy-category-subsection__title a {
    color: inherit !important;
    text-decoration: none !important;
}

.nejramy-category-subsection__title a:hover {
    color: #0D4689 !important;
    text-decoration: underline !important;
}

/* Sub-subsection (Grandchild Category) */
.nejramy-category-subsubsection {
    margin-bottom: 1.5rem !important;
    margin-left: 1rem !important;
    scroll-margin-top: 100px !important;
}

.nejramy-category-subsubsection__title {
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #4a5568 !important;
    margin: 0 0 0.75rem 0 !important;
}

.nejramy-category-subsubsection__title a {
    color: inherit !important;
    text-decoration: none !important;
}

.nejramy-category-subsubsection__title a:hover {
    color: #0D4689 !important;
    text-decoration: underline !important;
}

/* Sidebar Anchor Menu */
.nejramy-category-anchor-menu ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nejramy-category-anchor-menu li {
    margin: 0 !important;
}

.nejramy-category-anchor-btn {
    display: block !important;
    width: 100% !important;
    padding: 0.6rem 1rem !important;
    text-align: left !important;
    font-size: 0.875rem !important;
    color: #2d3748 !important;
    background: #ffffff !important;
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.nejramy-category-anchor-btn:hover {
    background: #f7fafc !important;
    color: #0D4689 !important;
}

/* Child items indentation */
.nejramy-category-menu--child {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.nejramy-category-menu--child > li > .nejramy-category-anchor-btn {
    padding-left: 1.5rem !important;
    font-size: 0.8125rem !important;
}

.nejramy-category-menu--child .nejramy-category-menu--child > li > .nejramy-category-anchor-btn {
    padding-left: 2rem !important;
    font-size: 0.75rem !important;
}

/* Responsive - Mobile */
@media (max-width: 767px) {
    .nejramy-category-section {
        margin-bottom: 2rem !important;
    }

    .nejramy-category-section__title {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }

    .nejramy-category-subsection {
        margin-bottom: 1.5rem !important;
    }

    .nejramy-category-subsection__title {
        font-size: 1rem !important;
    }

    .nejramy-category-subsubsection {
        margin-left: 0 !important;
    }

    .nejramy-category-subsubsection__title {
        font-size: 0.875rem !important;
    }
}

/* ==========================================================================
   Brand Page Category Filter
   ========================================================================== */

/* Category sidebar on brand pages */
.nejramy-brand-category-menu {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

.nejramy-brand-category-menu h3 {
    margin: 0 !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: var(--nejramy-produkty-primary) !important;
    background: #f7fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.nejramy-brand-category-menu ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
}

.nejramy-brand-category-menu li {
    margin-bottom: 0 !important;
    background: #ffffff !important;
}

.nejramy-brand-category-btn {
    display: block !important;
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    text-align: left !important;
    font-size: 0.9rem !important;
    color: #2d3748 !important;
    background: #ffffff !important;
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    text-decoration: none !important;
}

.nejramy-brand-category-menu li:last-child .nejramy-brand-category-btn {
    border-bottom: none !important;
}

.nejramy-brand-category-btn:hover,
.nejramy-brand-category-btn.active {
    background: #f7fafc !important;
    color: #0D4689 !important;
}

/* Brand page category dropdown (mobile) */
.nejramy-brand-category-dropdown {
    display: none;
    margin-bottom: 1rem;
}

.nejramy-brand-category-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--nejramy-produkty-text);
    background: var(--nejramy-produkty-white);
    border: 1px solid var(--nejramy-produkty-border);
    border-radius: var(--nejramy-produkty-radius);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.nejramy-brand-category-select:focus {
    outline: none;
    border-color: var(--nejramy-produkty-primary);
    box-shadow: 0 0 0 2px rgba(13, 70, 137, 0.1);
}

/* Category filter buttons (inline style) */
.nejramy-category-filter {
    margin-bottom: 1.5rem;
}

.nejramy-category-filter h3 {
    margin: 0 0 0.75rem 0 !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: var(--nejramy-produkty-primary) !important;
}

.nejramy-category-filter .nejramy-filter-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
}

/* ==========================================================================
   Load More Button
   ========================================================================== */

.nejramy-load-more-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1rem;
}

.nejramy-load-more {
    display: inline-block !important;
    padding: 0.75rem 2rem !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #fff !important;
    background: var(--nejramy-produkty-primary) !important;
    border: 2px solid var(--nejramy-produkty-primary) !important;
    border-radius: var(--nejramy-produkty-radius) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
}

.nejramy-load-more:hover:not(:disabled) {
    background: transparent !important;
    color: var(--nejramy-produkty-primary) !important;
}

.nejramy-load-more:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

/* ==========================================================================
   YouTube Videos Section
   ========================================================================== */

.nejramy-videos-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.nejramy-videos-title {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    margin: 0 0 1.5rem 0 !important;
    color: #333 !important;
}

/* Videos Grid - MUST match product grid columns */
.nejramy-videos-grid {
    display: grid !important;
    gap: 1.5rem !important;
    width: 100% !important;
}

/* Force 3 columns on desktop - highest specificity */
.nejramy-produkty-content .nejramy-videos-grid,
.nejramy-videos-section .nejramy-videos-grid,
.nejramy-videos-grid.nejramy-videos-grid--cols-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

/* Column variations */
.nejramy-videos-grid.nejramy-videos-grid--cols-1 {
    grid-template-columns: 1fr !important;
}

.nejramy-videos-grid.nejramy-videos-grid--cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.nejramy-videos-grid.nejramy-videos-grid--cols-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

.nejramy-videos-grid.nejramy-videos-grid--cols-5 {
    grid-template-columns: repeat(5, 1fr) !important;
}

.nejramy-videos-grid.nejramy-videos-grid--cols-6 {
    grid-template-columns: repeat(6, 1fr) !important;
}

/* Video Card */
.nejramy-video-card {
    background: #fff !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

@media (hover: hover) {
    .nejramy-video-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    }
}

/* Video Embed - 16:9 Aspect Ratio */
.nejramy-video-card__embed {
    position: relative !important;
    width: 100% !important;
    padding-bottom: 56.25% !important; /* 16:9 */
    height: 0 !important;
    overflow: hidden !important;
    background: #000 !important;
    cursor: pointer !important;
}

.nejramy-video-card__embed iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

/* Video Thumbnail (lazy loading) */
.nejramy-video-card__thumbnail {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Custom Play Button */
.nejramy-video-card__play {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 68px !important;
    height: 48px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s ease, transform 0.2s ease !important;
    z-index: 2 !important;
}

.nejramy-video-card__play::after {
    content: '' !important;
    display: block !important;
    width: 0 !important;
    height: 0 !important;
    border-style: solid !important;
    border-width: 10px 0 10px 18px !important;
    border-color: transparent transparent transparent #fff !important;
    margin-left: 4px !important;
}

.nejramy-video-card__embed:hover .nejramy-video-card__play {
    background: rgba(255, 0, 0, 0.9) !important;
    transform: translate(-50%, -50%) scale(1.1) !important;
}

/* Video Title */
.nejramy-video-card__title {
    padding: 0.75rem 1rem 0.25rem 1rem !important;
    margin: 0 !important;
    font-weight: 500 !important;
    color: #333 !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Video Brand */
.nejramy-video-card__brand {
    padding: 0 1rem 0.75rem 1rem !important;
    margin: 0 !important;
    font-size: 0.875rem !important;
    color: #0D4689 !important;
    font-weight: 400 !important;
}

/* More Videos Link */
.nejramy-videos-more {
    margin-top: 1.5rem !important;
    text-align: center !important;
}

.nejramy-videos-more a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    color: #0D4689 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.2s ease !important;
}

.nejramy-videos-more a:hover {
    color: #0a3666 !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   Videos - Responsive Tablet (991px)
   ========================================================================== */

@media screen and (max-width: 991px) {
    .nejramy-videos-grid.nejramy-videos-grid--cols-4,
    .nejramy-videos-grid.nejramy-videos-grid--cols-5,
    .nejramy-videos-grid.nejramy-videos-grid--cols-6,
    .nejramy-produkty-content .nejramy-videos-grid,
    .nejramy-videos-section .nejramy-videos-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ==========================================================================
   Videos - Responsive Mobile (767px)
   ========================================================================== */

@media screen and (max-width: 767px) {
    .nejramy-videos-section {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .nejramy-videos-title {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }

    /* Force 2 columns on mobile - ALL variations */
    .nejramy-videos-grid,
    .nejramy-videos-grid.nejramy-videos-grid--cols-2,
    .nejramy-videos-grid.nejramy-videos-grid--cols-3,
    .nejramy-videos-grid.nejramy-videos-grid--cols-4,
    .nejramy-videos-grid.nejramy-videos-grid--cols-5,
    .nejramy-videos-grid.nejramy-videos-grid--cols-6,
    .nejramy-produkty-content .nejramy-videos-grid,
    .nejramy-videos-section .nejramy-videos-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .nejramy-video-card__title {
        font-size: 0.8125rem !important;
        padding: 0.5rem 0.75rem 0.25rem 0.75rem !important;
    }

    .nejramy-video-card__brand {
        font-size: 0.75rem !important;
        padding: 0 0.75rem 0.5rem 0.75rem !important;
    }

    /* Smaller play button on mobile - 30% smaller */
    .nejramy-video-card__play {
        width: 48px !important;
        height: 34px !important;
        border-radius: 8px !important;
    }

    .nejramy-video-card__play::after {
        border-width: 7px 0 7px 12px !important;
        margin-left: 3px !important;
    }
}

/* ==========================================================================
   Videos - Responsive Small Mobile (480px)
   ========================================================================== */

@media screen and (max-width: 480px) {
    /* Keep 2 columns on small mobile */
    .nejramy-videos-grid,
    .nejramy-videos-grid.nejramy-videos-grid--cols-2,
    .nejramy-videos-grid.nejramy-videos-grid--cols-3,
    .nejramy-videos-grid.nejramy-videos-grid--cols-4,
    .nejramy-videos-grid.nejramy-videos-grid--cols-5,
    .nejramy-videos-grid.nejramy-videos-grid--cols-6,
    .nejramy-produkty-content .nejramy-videos-grid,
    .nejramy-videos-section .nejramy-videos-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .nejramy-video-card__title {
        font-size: 0.75rem !important;
        padding: 0.375rem 0.5rem 0.125rem 0.5rem !important;
        -webkit-line-clamp: 2 !important;
    }

    .nejramy-video-card__brand {
        font-size: 0.6875rem !important;
        padding: 0 0.5rem 0.375rem 0.5rem !important;
    }
}

/* ==========================================================================
   Brands Modal (Mobile)
   ========================================================================== */

/* Modal container */
.nejramy-brands-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 99999 !important;
}

/* Modal overlay (dark background) */
.nejramy-brands-modal__overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
}

/* Modal content box */
.nejramy-brands-modal__content {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: #fff !important;
    border-radius: 8px !important;
    max-width: 90vw !important;
    max-height: 80vh !important;
    width: 500px !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}

/* Modal header */
.nejramy-brands-modal__header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 15px 20px !important;
    border-bottom: 1px solid #eee !important;
    flex-shrink: 0 !important;
}

.nejramy-brands-modal__header h3 {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

/* Modal close button */
.nejramy-brands-modal__close {
    background: none !important;
    border: none !important;
    font-size: 28px !important;
    cursor: pointer !important;
    padding: 0 !important;
    line-height: 1 !important;
    color: #666 !important;
    transition: color 0.2s ease !important;
}

.nejramy-brands-modal__close:hover {
    color: #000 !important;
}

/* Modal body */
.nejramy-brands-modal__body {
    padding: 20px !important;
    overflow-y: auto !important;
    flex: 1 !important;
}

/* Modal grid - flex layout like page buttons */
.nejramy-brands-modal__grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

/* Modal brand buttons - compact inline style */
.nejramy-brands-modal__grid .nejramy-filter-btn {
    text-align: center !important;
    padding: 6px 12px !important;
    font-family: 'Archivo Narrow', sans-serif !important;
    font-size: 0.85rem !important;
    flex: 0 0 auto !important;
}

/* Body scroll lock when modal is open */
body.nejramy-modal-open {
    overflow: hidden !important;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 480px) {
    .nejramy-brands-modal__content {
        width: 95vw !important;
        max-height: 85vh !important;
    }

    .nejramy-brands-modal__header {
        padding: 12px 15px !important;
    }

    .nejramy-brands-modal__header h3 {
        font-size: 16px !important;
    }

    .nejramy-brands-modal__body {
        padding: 15px !important;
    }

    .nejramy-brands-modal__grid {
        gap: 6px !important;
    }

    .nejramy-brands-modal__grid .nejramy-filter-btn {
        padding: 5px 10px !important;
        font-size: 0.8rem !important;
    }
}

/* ==========================================================================
   Product Card Wrapper (for edit/delete button positioning)
   ========================================================================== */

.nejramy-produkty-card-wrapper {
    position: relative !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Actions wrapper for edit and delete buttons */
.nejramy-produkty-card__actions {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 10 !important;
    display: flex !important;
    gap: 4px !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease !important;
}

.nejramy-produkty-card-wrapper:hover .nejramy-produkty-card__actions {
    opacity: 1 !important;
}

/* Edit button on product card (admin only) */
.nejramy-produkty-card__edit,
.nejramy-produkty-card__delete {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid var(--nejramy-produkty-border) !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.nejramy-produkty-card__edit svg,
.nejramy-produkty-card__delete svg {
    width: 16px !important;
    height: 16px !important;
    color: var(--nejramy-produkty-primary) !important;
}

.nejramy-produkty-card__edit:hover {
    background: var(--nejramy-produkty-primary) !important;
    border-color: var(--nejramy-produkty-primary) !important;
    transform: scale(1.05) !important;
}

.nejramy-produkty-card__edit:hover svg {
    color: #fff !important;
}

/* Delete button - red hover */
.nejramy-produkty-card__delete svg {
    color: #718096 !important;
}

.nejramy-produkty-card__delete:hover {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    transform: scale(1.05) !important;
}

.nejramy-produkty-card__delete:hover svg {
    color: #fff !important;
}

/* Visual feedback after save */
.nejramy-produkty-card--updated {
    animation: nejramy-card-updated 2s ease !important;
}

@keyframes nejramy-card-updated {
    0% { outline: 3px solid transparent; }
    10% { outline: 3px solid #48bb78; }
    90% { outline: 3px solid #48bb78; }
    100% { outline: 3px solid transparent; }
}

/* ==========================================================================
   Product Edit Modal
   ========================================================================== */

.nejramy-edit-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999999 !important;
}

.nejramy-edit-modal__overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.6) !important;
}

.nejramy-edit-modal__content {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: #fff !important;
    border-radius: 12px !important;
    max-width: 600px !important;
    max-height: 90vh !important;
    width: 90vw !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    overflow: hidden !important;
}

.nejramy-edit-modal__header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background: #f7fafc !important;
    flex-shrink: 0 !important;
}

.nejramy-edit-modal__header h3 {
    margin: 0 !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
}

.nejramy-edit-modal__close {
    background: none !important;
    border: none !important;
    font-size: 24px !important;
    cursor: pointer !important;
    padding: 0 !important;
    line-height: 1 !important;
    color: #718096 !important;
    transition: color 0.2s ease !important;
}

.nejramy-edit-modal__close:hover {
    color: #e53e3e !important;
}

.nejramy-edit-modal__form {
    padding: 20px !important;
    overflow-y: auto !important;
    flex: 1 !important;
}

.nejramy-edit-modal__field {
    margin-bottom: 16px !important;
}

.nejramy-edit-modal__field > label {
    display: block !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #4a5568 !important;
    margin-bottom: 6px !important;
}

/* Publish date field - compact layout */
.nejramy-edit-modal__field--date {
    margin-bottom: 12px !important;
}

.nejramy-edit-modal__field--date label {
    margin-bottom: 4px !important;
}

.nejramy-edit-modal__date-display {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.nejramy-edit-modal__status {
    font-size: 0.875rem !important;
    color: #4a5568 !important;
    font-weight: 500 !important;
}

.nejramy-edit-modal__input--date {
    font-size: 0.84375rem !important; /* 10% smaller than 0.9375rem */
    color: #718096 !important; /* gray color */
    padding: 6px 10px !important;
}

.nejramy-edit-modal__input,
.nejramy-edit-modal__select {
    width: 100% !important;
    padding: 10px 12px !important;
    font-size: 0.9375rem !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #2d3748 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.nejramy-edit-modal__input:focus,
.nejramy-edit-modal__select:focus {
    outline: none !important;
    border-color: var(--nejramy-produkty-primary) !important;
    box-shadow: 0 0 0 3px rgba(13, 70, 137, 0.15) !important;
}

/* Categories checkboxes */
.nejramy-edit-modal__categories {
    max-height: 200px !important;
    overflow-y: auto !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 10px !important;
    background: #f7fafc !important;
}

.nejramy-edit-modal__checkbox {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 4px 0 !important;
    font-size: 0.875rem !important;
    color: #4a5568 !important;
    cursor: pointer !important;
}

.nejramy-edit-modal__checkbox input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    cursor: pointer !important;
}

/* Actions */
.nejramy-edit-modal__actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    margin-top: 20px !important;
    padding-top: 16px !important;
    border-top: 1px solid #e2e8f0 !important;
}

.nejramy-edit-modal__btn {
    padding: 10px 20px !important;
    font-size: 0.9375rem !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.nejramy-edit-modal__btn--cancel {
    background: #fff !important;
    color: #718096 !important;
    border: 1px solid #e2e8f0 !important;
}

.nejramy-edit-modal__btn--cancel:hover {
    background: #f7fafc !important;
    color: #4a5568 !important;
}

.nejramy-edit-modal__btn--save {
    background: var(--nejramy-produkty-primary) !important;
    color: #fff !important;
    border: 1px solid var(--nejramy-produkty-primary) !important;
}

.nejramy-edit-modal__btn--save:hover {
    background: var(--nejramy-produkty-primary-hover) !important;
    border-color: var(--nejramy-produkty-primary-hover) !important;
}

.nejramy-edit-modal__btn--save:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Loading state */
.nejramy-edit-modal__loading {
    text-align: center !important;
    padding: 10px !important;
    color: var(--nejramy-produkty-primary) !important;
    font-size: 0.875rem !important;
}

/* Message */
.nejramy-edit-modal__message {
    margin-top: 10px !important;
    padding: 10px !important;
    border-radius: 6px !important;
    font-size: 0.875rem !important;
    text-align: center !important;
}

.nejramy-edit-modal__message.success {
    background: #c6f6d5 !important;
    color: #22543d !important;
}

.nejramy-edit-modal__message.error {
    background: #fed7d7 !important;
    color: #742a2a !important;
}

/* Category search */
.nejramy-edit-modal__category-search {
    position: relative !important;
    margin-bottom: 10px !important;
}

.nejramy-edit-modal__category-results {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-top: none !important;
    border-radius: 0 0 6px 6px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.nejramy-edit-modal__category-result {
    padding: 10px 12px !important;
    cursor: pointer !important;
    border-bottom: 1px solid #f0f0f0 !important;
    transition: background 0.15s ease !important;
}

.nejramy-edit-modal__category-result:last-child {
    border-bottom: none !important;
}

.nejramy-edit-modal__category-result:hover {
    background: #f7fafc !important;
}

.nejramy-edit-modal__category-result .category-path {
    font-size: 0.875rem !important;
    color: #4a5568 !important;
}

.nejramy-edit-modal__category-no-results {
    padding: 12px !important;
    text-align: center !important;
    color: #718096 !important;
    font-size: 0.875rem !important;
}

/* Selected categories */
.nejramy-edit-modal__categories-empty {
    padding: 15px !important;
    text-align: center !important;
    color: #a0aec0 !important;
    font-size: 0.875rem !important;
    font-style: italic !important;
}

.nejramy-edit-modal__category-item {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 8px 10px !important;
    background: #edf2f7 !important;
    border-radius: 4px !important;
    margin-bottom: 6px !important;
}

.nejramy-edit-modal__category-item:last-child {
    margin-bottom: 0 !important;
}

.nejramy-edit-modal__category-path {
    flex: 1 !important;
    font-size: 0.8125rem !important;
    color: #4a5568 !important;
    line-height: 1.4 !important;
    word-break: break-word !important;
}

.nejramy-edit-modal__category-remove {
    flex-shrink: 0 !important;
    width: 20px !important;
    height: 20px !important;
    border: none !important;
    background: #e53e3e !important;
    color: #fff !important;
    border-radius: 50% !important;
    font-size: 14px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.15s ease !important;
    padding: 0 !important;
}

.nejramy-edit-modal__category-remove:hover {
    background: #c53030 !important;
}

/* Brand chips (multi-brand support) */
.nejramy-edit-modal__brands {
    margin-bottom: 12px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

.nejramy-edit-modal__brands-empty {
    color: #a0aec0 !important;
    font-size: 0.875rem !important;
    font-style: italic !important;
    padding: 8px 0 !important;
}

.nejramy-edit-modal__brand-item {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 8px 10px !important;
    background: #e6f3ff !important;
    border-radius: 4px !important;
    margin-bottom: 6px !important;
    border-left: 3px solid #3182ce !important;
}

.nejramy-edit-modal__brand-item:last-child {
    margin-bottom: 0 !important;
}

.nejramy-edit-modal__brand-path {
    flex: 1 !important;
    font-size: 0.8125rem !important;
    color: #2b6cb0 !important;
    line-height: 1.4 !important;
    word-break: break-word !important;
    font-weight: 500 !important;
}

.nejramy-edit-modal__brand-remove {
    flex-shrink: 0 !important;
    width: 20px !important;
    height: 20px !important;
    border: none !important;
    background: #e53e3e !important;
    color: #fff !important;
    border-radius: 50% !important;
    font-size: 14px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.15s ease !important;
    padding: 0 !important;
}

.nejramy-edit-modal__brand-remove:hover {
    background: #c53030 !important;
}

/* Add brand button */
.nejramy-edit-modal__btn--add-brand {
    background: #ebf8ff !important;
    color: #3182ce !important;
    border: 1px dashed #3182ce !important;
    padding: 8px 16px !important;
    font-size: 0.875rem !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    transition: all 0.15s ease !important;
}

.nejramy-edit-modal__btn--add-brand:hover {
    background: #bee3f8 !important;
}

/* Brand selection panel */
.nejramy-edit-modal__brand-selection {
    background: #f7fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 16px !important;
    margin-top: 12px !important;
}

.nejramy-edit-modal__brand-selection .nejramy-edit-modal__field {
    margin-bottom: 12px !important;
}

.nejramy-edit-modal__brand-selection .nejramy-edit-modal__field:last-of-type {
    margin-bottom: 16px !important;
}

.nejramy-edit-modal__brand-selection-actions {
    display: flex !important;
    gap: 8px !important;
    justify-content: flex-end !important;
}

.nejramy-edit-modal__btn--cancel-brand,
.nejramy-edit-modal__btn--confirm-brand {
    padding: 6px 14px !important;
    font-size: 0.875rem !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.nejramy-edit-modal__btn--cancel-brand {
    background: #fff !important;
    color: #718096 !important;
    border: 1px solid #cbd5e0 !important;
}

.nejramy-edit-modal__btn--cancel-brand:hover {
    background: #f7fafc !important;
}

.nejramy-edit-modal__btn--confirm-brand {
    background: #3182ce !important;
    color: #fff !important;
    border: 1px solid #3182ce !important;
}

.nejramy-edit-modal__btn--confirm-brand:hover {
    background: #2b6cb0 !important;
}

/* Responsive - Mobile */
@media (max-width: 767px) {
    .nejramy-edit-modal__content {
        width: 95vw !important;
        max-height: 85vh !important;
    }

    .nejramy-edit-modal__header {
        padding: 12px 16px !important;
    }

    .nejramy-edit-modal__form {
        padding: 16px !important;
    }

    .nejramy-edit-modal__categories {
        max-height: 150px !important;
    }

    .nejramy-edit-modal__brands {
        max-height: 150px !important;
    }

    .nejramy-edit-modal__brand-selection {
        padding: 12px !important;
    }

    .nejramy-edit-modal__brand-selection-actions {
        flex-direction: column !important;
    }

    .nejramy-edit-modal__btn--cancel-brand,
    .nejramy-edit-modal__btn--confirm-brand {
        width: 100% !important;
    }

    .nejramy-edit-modal__actions {
        flex-direction: column !important;
    }

    .nejramy-edit-modal__btn {
        width: 100% !important;
    }

    /* Always show action buttons on mobile (no hover) */
    .nejramy-produkty-card__actions {
        opacity: 1 !important;
        top: 6px !important;
        right: 6px !important;
    }

    .nejramy-produkty-card__edit,
    .nejramy-produkty-card__delete {
        width: 28px !important;
        height: 28px !important;
    }

    .nejramy-produkty-card__edit svg,
    .nejramy-produkty-card__delete svg {
        width: 14px !important;
        height: 14px !important;
    }
}

/* ==========================================================================
   Full Editor Modal (v4.4.0)
   ========================================================================== */

/* Full editor modal - larger container */
.nejramy-edit-modal--full .nejramy-edit-modal__content--full {
    max-width: 1000px !important;
    width: 95vw !important;
    max-height: 95vh !important;
}

.nejramy-edit-modal__body {
    padding: 0 !important;
    overflow-y: auto !important;
    flex: 1 !important;
    min-height: 400px !important;
}

/* Loading state inside modal body */
.nejramy-edit-modal__body .nejramy-edit-modal__loading {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 300px !important;
    color: #718096 !important;
    font-size: 16px !important;
}

/* Error state */
.nejramy-edit-modal__error {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 200px !important;
    color: #e53e3e !important;
    padding: 20px !important;
    text-align: center !important;
}

/* Full editor inside modal - inherit ADMINISTRACE styles */
.nejramy-edit-modal__body .nejramy-simple-editor {
    padding: 20px !important;
}

.nejramy-edit-modal__body .nejramy-editor-grid {
    margin-top: 0 !important;
}

/* Product card action buttons - additional buttons */
.nejramy-produkty-card__preview,
.nejramy-produkty-card__download {
    background: rgba(255, 255, 255, 0.95) !important;
    border: none !important;
    border-radius: 6px !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.nejramy-produkty-card__preview:hover {
    background: #3182ce !important;
}

.nejramy-produkty-card__preview:hover svg {
    color: #fff !important;
}

.nejramy-produkty-card__download:hover {
    background: #38a169 !important;
}

.nejramy-produkty-card__download:hover svg {
    color: #fff !important;
}

.nejramy-produkty-card__preview svg,
.nejramy-produkty-card__download svg {
    width: 16px !important;
    height: 16px !important;
    color: #4a5568 !important;
}

/* Mobile adjustments for full editor modal */
@media (max-width: 991px) {
    .nejramy-edit-modal--full .nejramy-edit-modal__content--full {
        width: 98vw !important;
        max-height: 98vh !important;
        border-radius: 8px !important;
    }

    .nejramy-edit-modal__body .nejramy-simple-editor {
        padding: 15px !important;
    }

    .nejramy-edit-modal__body .nejramy-editor-grid {
        grid-template-columns: 1fr !important;
    }

    .nejramy-edit-modal__body .nejramy-editor-sidebar {
        order: -1 !important;
    }

    /* Smaller action buttons on mobile */
    .nejramy-produkty-card__preview,
    .nejramy-produkty-card__download {
        width: 28px !important;
        height: 28px !important;
    }

    .nejramy-produkty-card__preview svg,
    .nejramy-produkty-card__download svg {
        width: 14px !important;
        height: 14px !important;
    }
}

/* ==========================================================================
   Preview Modal (v4.4.0)
   ========================================================================== */

.nejramy-preview-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.nejramy-preview-modal__overlay {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.7) !important;
}

.nejramy-preview-modal__content {
    position: relative !important;
    background: #fff !important;
    border-radius: 12px !important;
    max-width: 1200px !important;
    max-height: 90vh !important;
    width: 95vw !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden !important;
}

.nejramy-preview-modal__close {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    width: 36px !important;
    height: 36px !important;
    background: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 24px !important;
    cursor: pointer !important;
    z-index: 10 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s ease !important;
}

.nejramy-preview-modal__close:hover {
    background: #e53e3e !important;
    color: #fff !important;
}

.nejramy-preview-modal__body {
    padding: 30px !important;
    overflow-y: auto !important;
    flex: 1 !important;
}

.nejramy-preview-modal__loading,
.nejramy-preview-modal__error {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 300px !important;
    font-size: 16px !important;
    color: #718096 !important;
}

.nejramy-preview-modal__error {
    color: #e53e3e !important;
}

.nejramy-preview-modal__grid {
    display: grid !important;
    grid-template-columns: 1fr minmax(0, 400px) !important;
    gap: 30px !important;
}

.nejramy-preview-modal__images {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

.nejramy-preview-modal__main-image {
    background: #f7fafc !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 300px !important;
}

.nejramy-preview-modal__main-image img {
    max-width: 100% !important;
    max-height: 500px !important;
    object-fit: contain !important;
}

.nejramy-preview-modal__no-image {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 200px !important;
    color: #a0aec0 !important;
    font-size: 14px !important;
}

.nejramy-preview-modal__gallery {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.nejramy-preview-modal__gallery-thumb {
    width: 70px !important;
    height: 70px !important;
    padding: 0 !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    background: #f7fafc !important;
    transition: border-color 0.2s ease !important;
}

.nejramy-preview-modal__gallery-thumb:hover,
.nejramy-preview-modal__gallery-thumb.active {
    border-color: #3182ce !important;
}

.nejramy-preview-modal__gallery-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.nejramy-preview-modal__info {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

.nejramy-preview-modal__title {
    margin: 0 !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
    line-height: 1.3 !important;
}

.nejramy-preview-modal__brand {
    margin: 0 !important;
    font-size: 1rem !important;
    color: #4a5568 !important;
}

.nejramy-preview-modal__compatibility {
    background: #f0fff4 !important;
    border: 1px solid #9ae6b4 !important;
    border-radius: 6px !important;
    padding: 12px 15px !important;
    font-size: 14px !important;
    color: #276749 !important;
}

.nejramy-preview-modal__compatibility strong {
    color: #22543d !important;
}

.nejramy-preview-modal__description {
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #4a5568 !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

.nejramy-preview-modal__description p {
    margin: 0 0 10px !important;
}

.nejramy-preview-modal__video {
    position: relative !important;
    padding-bottom: 56.25% !important;
    height: 0 !important;
    overflow: hidden !important;
    border-radius: 8px !important;
}

.nejramy-preview-modal__video iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.nejramy-preview-modal__actions {
    margin-top: auto !important;
    padding-top: 15px !important;
}

.nejramy-preview-modal__actions .button {
    display: inline-block !important;
    padding: 10px 20px !important;
    background: #3182ce !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
}

.nejramy-preview-modal__actions .button:hover {
    background: #2b6cb0 !important;
    color: #fff !important;
}

/* Preview Modal - Responsive */
@media (max-width: 991px) {
    .nejramy-preview-modal__grid {
        grid-template-columns: 1fr !important;
    }

    .nejramy-preview-modal__content {
        max-height: 95vh !important;
    }

    .nejramy-preview-modal__body {
        padding: 20px !important;
    }

    .nejramy-preview-modal__close {
        top: 10px !important;
        right: 10px !important;
    }
}

@media (max-width: 767px) {
    .nejramy-preview-modal__body {
        padding: 15px !important;
    }

    .nejramy-preview-modal__title {
        font-size: 1.25rem !important;
    }

    .nejramy-preview-modal__gallery-thumb {
        width: 60px !important;
        height: 60px !important;
    }

    .nejramy-preview-modal__close {
        top: 8px !important;
        right: 8px !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 20px !important;
    }

    .nejramy-preview-modal__main-image {
        min-height: 200px !important;
    }

    .nejramy-preview-modal__main-image img {
        max-height: 300px !important;
    }
}

/* ==========================================================================
   Search Component (v3.9.0)
   ========================================================================== */

.nejramy-search {
    width: 100%;
    margin: 2rem 0;
    position: relative;
}

/* Category Filters */
.nejramy-search__filters {
    display: flex;
    gap: 0;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nejramy-search__filters::-webkit-scrollbar {
    display: none;
}

.nejramy-search__filter {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nejramy-search__filter:hover {
    color: var(--nejramy-produkty-primary);
    background: #f5f5f5;
}

.nejramy-search__filter.active {
    color: var(--nejramy-produkty-primary);
    border-bottom-color: var(--nejramy-produkty-primary);
    font-weight: 600;
}

/* Input Wrapper */
.nejramy-search__input-wrapper {
    display: flex;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.3s ease;
}

.nejramy-search__input-wrapper:focus-within {
    border-color: var(--nejramy-produkty-primary);
}

.nejramy-search__input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    border: none;
    outline: none;
    background: transparent;
}

.nejramy-search__submit {
    padding: 0.875rem 2rem;
    background: #d32f2f;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nejramy-search__submit:hover {
    background: #b71c1c;
}

.nejramy-search__submit svg {
    width: 20px;
    height: 20px;
}

/* Results Dropdown */
.nejramy-search__results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin-top: 0.5rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-height: 500px;
    overflow-y: auto;
}

.nejramy-search__status {
    padding: 2rem;
    text-align: center;
    color: #666;
}

/* Section Title */
.nejramy-search__section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    background: #f9f9f9;
}

/* Brands Section */
.nejramy-search__brands {
    border-bottom: 1px solid #e0e0e0;
}

.nejramy-search__brands-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
}

/* Search Item */
.nejramy-search__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.nejramy-search__item:hover {
    background: #f5f5f5;
}

.nejramy-search__item--product {
    border-bottom: 1px solid #f0f0f0;
}

.nejramy-search__item--product:last-child {
    border-bottom: none;
}

/* Brand Item - compact style */
.nejramy-search__item--brand {
    background: #e6f2ff;
    border: 1px solid #d0e7ff;
    border-radius: 5px;
    padding: 0.5rem 0.75rem;
    flex: 0 0 auto;
}

.nejramy-search__item--brand:hover {
    background: #d4e9ff;
    border-color: #b3d9ff;
}

/* Brand Logo */
.nejramy-search__brand-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
    background: #fff;
}

.nejramy-search__brand-logo--placeholder {
    display: block;
    background: #e0e0e0;
}

/* Product Image */
.nejramy-search__product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}

.nejramy-search__product-image--placeholder {
    display: block;
    background: #f0f0f0;
}

/* Item Info */
.nejramy-search__item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.nejramy-search__item-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--nejramy-produkty-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nejramy-search__item--brand .nejramy-search__item-title {
    font-size: 0.8125rem;
}

.nejramy-search__item-meta {
    font-size: 0.8125rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer / Load More */
.nejramy-search__footer {
    padding: 0.75rem 1rem;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.nejramy-search__load-more {
    padding: 0.625rem 1.5rem;
    background: var(--nejramy-produkty-primary);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.nejramy-search__load-more:hover {
    background: var(--nejramy-produkty-primary-hover);
}

.nejramy-search__load-more:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 767px) {
    .nejramy-search__filters {
        gap: 0.25rem;
    }

    .nejramy-search__filter {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }

    .nejramy-search__input {
        padding: 0.75rem 1rem;
        font-size: 16px; /* Prevent iOS Safari auto-zoom on focus */
    }

    .nejramy-search__submit {
        padding: 0.75rem 1.25rem;
    }

    .nejramy-search__results {
        max-height: 400px;
    }

    .nejramy-search__product-image {
        width: 50px;
        height: 50px;
    }

    .nejramy-search__item-title {
        font-size: 0.875rem;
    }

    .nejramy-search__item-meta {
        font-size: 0.75rem;
    }

    .nejramy-search__brands-list {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nejramy-search__item--brand {
        width: 100%;
    }
}
