/*
Theme Name: EkerTech
Author: Jan Pavlovec
Version: 2.0
License: © Pavlovec.net
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: Šablona na míru od pavlovec.net + úprava
*/


/* temporary CSS */
img.alignright {margin: 0 0 0 auto}
img.alignleft {margin: 0 auto 0 0}
img.aligncenter {display: block; margin: 0 auto}
a img.alignright {margin: 0 0 0 auto}
a img.alignleft {margin: 0 auto 0 0}
a img.aligncenter {display: block; margin: 0 auto}

/* Override Tailwind CSS padding for main ul li only */
.popup__title {
    padding-bottom: 2rem !important;
}

/* Border radius for cart button in shop header */
.header--shop .btn--img-cart {
    border-radius: 6px !important;
}

/* Override Tailwind CSS padding for h3 */
.h3, h3 {
    padding-bottom: 0 !important;
}

/* Override Tailwind CSS padding for h2 */
.h2, h2 {
    padding-bottom: 0 !important;
}

/* Fix WooCommerce product image width */
.woocommerce .product-image,
.woocommerce .attachment-woocommerce_thumbnail,
.woocommerce .size-woocommerce_thumbnail {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    max-width: none !important;
    max-height: none !important;
}

/* Ensure product images fill their containers */
.product-item .product-image-container img,
.product-item .product-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    max-width: none !important;
    max-height: none !important;
}

/* WooCommerce Product Page Enhancements */
.woocommerce .woocommerce-product-gallery {
    opacity: 1 !important;
}

.woocommerce .woocommerce-product-gallery__image {
    margin: 0 !important;
}

.woocommerce .woocommerce-product-gallery__image img {
    border-radius: 12px !important;
    transition: transform 0.3s ease !important;
}

.woocommerce .woocommerce-product-gallery__image:hover img {
    transform: scale(1.05) !important;
}

.woocommerce .woocommerce-product-gallery__trigger {
    display: none !important;
}

.woocommerce .woocommerce-product-gallery__wrapper {
    margin: 0 !important;
}

/* Hide default WooCommerce elements on custom product pages */
.single-product .woocommerce-product-gallery__image--placeholder {
    display: none !important;
}

.single-product .woocommerce-variation-add-to-cart {
    display: none !important;
}

.single-product .woocommerce-variation-price {
    display: none !important;
}

.single-product .woocommerce-variation-description {
    display: none !important;
}

.single-product .woocommerce-variation-availability {
    display: none !important;
}

.single-product .woocommerce-variation {
    display: none !important;
}

.single-product .woocommerce-variations {
    display: none !important;
}

.single-product .woocommerce-variations-table {
    display: none !important;
}

.single-product .woocommerce-variations-add-to-cart {
    display: none !important;
}

.single-product .summary.entry-summary {
    display: none !important;
}

.single-product .woocommerce-tabs {
    display: none !important;
}

.single-product .woocommerce-Tabs-panel {
    display: none !important;
}

/* Ensure proper font loading for product pages */
@font-face {
    font-family: 'Nippo';
    src: url('assets/fonts/Nippo/Nippo-VariableFont.ttf') format('truetype');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('assets/fonts/Space_Grotesk/SpaceGrotesk-VariableFont_wght.ttf') format('truetype');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

/* 3D Model Viewer Styles */
.model-viewer-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-viewer-active {
    width: 100%;
    height: 100%;
    position: relative;
}

model-viewer {
    width: 100% !important;
    height: 100% !important;
    border-radius: 16px;
    --poster-color: transparent;
    --progress-bar-color: #fbbf24;
    --progress-mask: #e5e7eb;
}

.model-viewer-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: #64748b;
    height: 100%;
}

.model-viewer-placeholder svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.6;
}

/* STL Viewer Specific Styles */
.stl-viewer-container {
    width: 100% !important;
    height: 500px !important;
    min-height: 500px !important;
    display: block !important;
    position: relative !important;
    background: red !important;
    border: 3px solid blue !important;
}

#stl-canvas {
    width: 100% !important;
    height: 500px !important;
    min-height: 500px !important;
    display: block !important;
    position: relative !important;
    border: 2px solid green !important;
}

.model-viewer-placeholder h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.model-viewer-placeholder p {
    font-size: 0.875rem;
    line-height: 1.5;
    max-width: 300px;
}

.model-viewer-controls {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.model-control-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.model-control-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.model-control-btn:active {
    transform: translateY(0);
}

.model-control-btn svg {
    width: 20px;
    height: 20px;
}

.model-viewer-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: #ef4444;
    height: 100%;
}

.model-viewer-error h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #dc2626;
}

.model-viewer-error p {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #991b1b;
}

/* Loading indicator */
.model-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.model-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #fbbf24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.model-loading-text {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* Progress bar */
.model-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #33d5f3 0%, #2bc4e0 100%);
    transition: width 0.3s ease;
    z-index: 5;
}

/* Additional responsive fixes */
@media (max-width: 768px) {
    .single-product-grid {
        gap: 1.5rem !important;
    }
    
    .single-product-images,
    .single-product-details {
        padding: 1.5rem !important;
    }

    .model-viewer-controls {
        bottom: 0.75rem;
        right: 0.75rem;
        gap: 0.375rem;
    }
    
    .model-control-btn {
        width: 36px;
        height: 36px;
    }
    
    .model-control-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .model-viewer-placeholder {
        padding: 1.5rem;
    }
    
    .model-viewer-placeholder svg {
        width: 48px;
        height: 48px;
    }
    
    .model-viewer-placeholder h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .single-product-images,
    .single-product-details {
        padding: 1rem !important;
    }
    
    .product-title {
        font-size: 1.5rem !important;
    }
    
    .main-image {
        height: 300px !important;
    }

    .model-viewer-controls {
        bottom: 0.5rem;
        right: 0.5rem;
        gap: 0.25rem;
    }
    
    .model-control-btn {
        width: 32px;
        height: 32px;
    }
    
    .model-control-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Mini Cart Styles */
.mini-cart-wrapper {
    position: relative;
}

.mini-cart-trigger {
    display: flex !important;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
}

.mini-cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 380px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 8px;
}

.mini-cart-wrapper:hover .mini-cart-dropdown,
.mini-cart-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mini-cart-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
    z-index: 1001;
}

.mini-cart-dropdown::after {
    content: '';
    position: absolute;
    top: -10px;
    right: 18px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #e2e8f0;
    z-index: 999;
}

.mini-cart-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 10px 10px 0 0;
}

.mini-cart-header h4 {
    font-family: 'Nippo', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
}

.mini-cart-count {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.mini-cart-items {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.75rem 0;
}

.mini-cart-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.mini-cart-item:hover {
    background-color: #f8fafc;
}

.mini-cart-item:last-child {
    border-bottom: none;
}

.mini-cart-item-image {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
}

.mini-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-cart-item-details {
    flex: 1;
    min-width: 0;
}

.mini-cart-item-title {
    margin-bottom: 0.25rem;
}

.mini-cart-item-title a {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mini-cart-item-title a:hover {
    color: #06a8d4;
}

.mini-cart-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.mini-cart-item-quantity {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.mini-cart-item-price {
    font-family: 'Nippo', sans-serif;
    font-weight: 700;
    color: #0f172a;
    font-size: 0.9rem;
}

.mini-cart-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 10px 10px;
}

.mini-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.mini-cart-total span {
    font-size: 0.9rem;
    color: #475569;
    font-weight: 600;
}

.mini-cart-total strong {
    font-family: 'Nippo', sans-serif;
    font-weight: 700;
    color: #0f172a;
    font-size: 1rem;
}

.mini-cart-actions {
    display: flex;
    gap: 0.5rem;
}

.mini-cart-actions .btn {
    flex: 1;
    text-align: center;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mini-cart-empty {
    padding: 2rem 1.25rem;
    text-align: center;
}

.mini-cart-empty p {
    color: #64748b;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Mobile mini-cart */
.mini-cart-dropdown.mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    transform: translateY(0);
    display: none;
    z-index: 9999;
}

.mini-cart-wrapper:hover .mini-cart-dropdown.mobile,
.mini-cart-dropdown.mobile.active {
    display: block;
}

/* Mobile mini-cart overlay */
.mini-cart-dropdown.mobile::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* Mobile mini-cart content */
.mini-cart-dropdown.mobile .mini-cart-header {
    background: #000000;
    color: white;
    border-bottom: 1px solid #333;
}

.mini-cart-dropdown.mobile .mini-cart-header h4 {
    color: white;
}

.mini-cart-dropdown.mobile .mini-cart-count {
    color: #ccc;
}

.mini-cart-dropdown.mobile .mini-cart-footer {
    background: #000000;
    color: white;
    border-top: 1px solid #333;
}

/* E-shop header styles */
.btn--img-cart {
    display: flex !important;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
}

.btn--img-cart img {
    width: 20px;
    height: 20px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
}

/* Responsive cart button */
@media (max-width: 768px) {
    .btn--img-cart {
        gap: 6px;
    }
    
    .btn--img-cart img {
        width: 18px;
        height: 18px;
    }
    
    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 11px;
        min-width: 18px;
    }

    /* Make cart button smaller on mobile */
    .header--shop .btn--img-cart {
        width: auto !important;
        display: inline-flex !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    /* Deaktivace mini-cart hover na mobilních zařízeních */
    .mini-cart-wrapper:hover .mini-cart-dropdown {
        display: none !important;
    }
    
    /* Mobile mini-cart adjustments */
    .mini-cart-dropdown {
        width: 320px;
        right: -20px;
    }
    
    .mini-cart-dropdown::before,
    .mini-cart-dropdown::after {
        right: 28px;
    }
}

@media (max-width: 480px) {
    /* Deaktivace mini-cart hover na malých mobilních zařízeních */
    .mini-cart-wrapper:hover .mini-cart-dropdown {
        display: none !important;
    }
    
    .mini-cart-dropdown {
        width: 280px;
        right: -40px;
    }
    
    .mini-cart-dropdown::before,
    .mini-cart-dropdown::after {
        right: 48px;
    }
    
    .mini-cart-item {
        padding: 0.5rem 1rem;
    }
    
    .mini-cart-header,
    .mini-cart-footer {
        padding: 0.75rem 1rem;
    }
}

/* E-shop header styles */
.header--shop {
    background: #000000;
    color: white;
}

/* Logo pro e-shop - bílé logo na černém pozadí, stejná velikost jako klasické logo */
.header--shop .header__logo img {
    filter: none;
    width: 120px;
    height: auto;
}

/* Modré tlačítko s pozadím pro mini-cart */
.btn--blue {
    color: white !important;
    border: 1px solid #06a8d4 !important;
    background-color: #06a8d4 !important;
    transition: all 0.3s ease;
}

.btn--blue:hover,
.btn--blue.active {
    color: white !important;
    border: 1px solid #2bc4e0 !important;
    background-color: #2bc4e0 !important;
}

/* Modré tlačítko pouze s ohraničením pro mini-cart */
.btn--blue-outline {
    color: #06a8d4 !important;
    border: 1px solid #06a8d4 !important;
    background-color: transparent !important;
    transition: all 0.3s ease;
}

.btn--blue-outline:hover,
.btn--blue-outline.active {
    color: white !important;
    border: 1px solid #06a8d4 !important;
    background-color: #06a8d4 !important;
}

/* Malé tlačítko pro mini-cart */
.btn--s {
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* Logo pro klasický web - normální logo */
.header:not(.header--shop) .header__logo img {
    filter: none;
}

/* Breadcrumb Navigation - jednotný styl pro všechny e-shop stránky */
.breadcrumb-navigation {
    padding: 1.5rem 32px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 2rem 0;
    margin-top: 0 !important;
    position: relative;
    top: 0;
}

/* Zajištění, že breadcrumb je přímo pod header bez mezery */
.header-wrap + .breadcrumb-navigation,
.header + .breadcrumb-navigation,
header + .breadcrumb-navigation {
    margin-top: 0 !important;
    padding-top: 1.5rem !important;
}

/* Odstranění jakýchkoliv mezer před breadcrumb */
body .breadcrumb-navigation:first-of-type {
    padding-top: 1.5rem !important;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    color: #cbd5e1;
    font-weight: 300;
}

.breadcrumb-link {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.breadcrumb-link:hover {
    color: #33d5f3;
}

.breadcrumb-current {
    color: #0f172a;
    font-weight: 600;
}

/* Skrytí všech nežádoucích ::before prvků v breadcrumb */
.breadcrumb-navigation *::before,
.breadcrumb-navigation *::after {
    content: none !important;
}

/* Obnovení správného ::after pro oddělovač */
.breadcrumb-item:not(:last-child)::after {
    content: '/' !important;
    color: #cbd5e1 !important;
    font-weight: 300 !important;
}

/* Skrytí WooCommerce breadcrumb */
.woocommerce-breadcrumb {
    display: none !important;
}

/* Univerzální oprava pro odstranění mezer před breadcrumb na hosting */
* + .breadcrumb-navigation {
    margin-top: 0 !important;
}

/* Zajištění, že mezi header a breadcrumb není žádná mezera */
.header-wrap,
.header,
header {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Oprava pro případné mezery způsobené WordPress elementy */
body > * + .breadcrumb-navigation,
main > * + .breadcrumb-navigation,
.container > * + .breadcrumb-navigation {
    margin-top: 0 !important;
}

.header--shop .header__menu ul li a {
    color: white !important;
    font-weight: 500;
}

.header--shop .header__menu ul li a:hover {
    color: #06a8d4 !important;
}

.header--shop .header__burger-inner span {
    background-color: white;
}

/* E-shop menu specific styles */
.header--shop .shop-fallback-menu a {
    color: white !important;
    font-weight: 500;
}

.header--shop .shop-fallback-menu a:hover {
    color: #06a8d4 !important;
}

/* Ensure e-shop menu items are white */
.header--shop nav ul li a,
.header--shop .header__menu ul li a {
    color: white !important;
}

.header--shop nav ul li a:hover,
.header--shop .header__menu ul li a:hover {
    color: #06a8d4 !important;
}

/* E-shop cart button styles */
.header--shop .btn--img-cart {
    background: #06a8d4 !important;
    border-color: #06a8d4 !important;
    color: white !important;
}

.header--shop .btn--img-cart:hover {
    background: #2bc4e0 !important;
    border-color: #2bc4e0 !important;
    color: white !important;
}

/* Oprava ikony košíku pro e-shop */
.header--shop .btn--img-cart img {
    filter: brightness(0) invert(1) !important;
}

/* Oprava spodního ohraničení menu položek */
.header--shop .header__menu ul li a::after {
    background-color: #06a8d4 !important;
}

.header--shop .header__menu ul li a:hover::after {
    background-color: #06a8d4 !important;
}

/* Oprava všech možných spodních ohraničení */
.header--shop .header__menu ul li a,
.header--shop nav ul li a {
    border-bottom-color: transparent !important;
}

.header--shop .header__menu ul li a:hover,
.header--shop nav ul li a:hover {
    border-bottom-color: #06a8d4 !important;
}

/* Odebrání podtržení na mobilních zařízeních */
@media (max-width: 768px) {
    .header--shop .header__menu ul li a::after,
    .header--shop nav ul li a::after {
        display: none !important;
    }
    
    .header--shop .header__menu ul li a:hover::after,
    .header--shop nav ul li a:hover::after {
        display: none !important;
    }
    
    .header--shop .header__menu ul li a,
    .header--shop nav ul li a {
        border-bottom: none !important;
    }
    
    .header--shop .header__menu ul li a:hover,
    .header--shop nav ul li a:hover {
        border-bottom: none !important;
    }
    
    /* Logo pro mobilní zařízení - menší velikost */
    .header--shop .header__logo img {
        width: 100px !important;
        height: auto !important;
        max-width: 100% !important;
    }
}

/* Logo pro velmi malé obrazovky */
@media (max-width: 480px) {
    .header--shop .header__logo img {
        width: 80px !important;
        height: auto !important;
        max-width: 100% !important;
    }
}

/* Skrytí duplicitních menu */
.header__menu nav:not(:first-child) {
    display: none !important;
}

/* Fallback e-shop menu styles */
.shop-fallback-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.shop-fallback-menu li {
    margin: 0;
}

.shop-fallback-menu a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.shop-fallback-menu a:hover {
    color: #E1BE41;
}

@media (max-width: 768px) {
    .shop-fallback-menu ul {
        flex-direction: column;
        gap: 1rem;
    }
}

