/**
 * Urządzenia - Custom Styles
 * Dodatkowe style dla stron urządzeń
 */

/* ==================================
   Karta produktu
   ================================== */

.urzadzenie-card {
    transition: all 0.3s ease;
}

.urzadzenie-card:hover {
    transform: translateY(-4px);
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================================
   Galeria produktu
   ================================== */

.product-gallery .gallery-thumb {
    cursor: pointer;
}

.product-gallery .gallery-thumb:hover {
    opacity: 0.8;
}

/* ==================================
   Tabs System
   ================================== */

.tab-btn {
    transition: all 0.3s ease;
}

.tab-btn:not(.active):hover {
    border-color: #cbd5e1; /* slate-300 */
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================================
   Sticky Product Bar
   ================================== */

/* #sticky-product-bar {
    will-change: transform;
} */

/* ==================================
   Filters
   ================================== */

.filters-wrapper {
    position: relative;
}

#sub-filters {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================================
   Pagination
   ================================== */

.pagination {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    margin: 0;
}

.pagination a,
.pagination .current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination a {
    color: #475569; /* slate-600 */
    background-color: #ffffff;
    border: 1px solid #e2e8f0; /* slate-200 */
}

.pagination a:hover {
    color: #dc2626; /* red-600 */
    border-color: #dc2626;
    background-color: #fef2f2; /* red-50 */
}

.pagination .current {
    color: #ffffff;
    background-color: #dc2626; /* red-600 */
    border: 1px solid #dc2626;
}

/* ==================================
   Responsive Adjustments
   ================================== */

@media (max-width: 768px) {
    .urzadzenie-card {
        margin-bottom: 1rem;
    }

    .tab-btn {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }

    /* #sticky-product-bar {
        padding: 0.75rem 1rem;
    }

    #sticky-product-bar .flex {
        flex-direction: column;
        gap: 0.75rem;
    }

    #sticky-product-bar .flex > div:first-child {
        text-align: center;
    } */
}

/* ==================================
   Print Styles
   ================================== */

@media print {
    #sticky-product-bar,
    .filters-wrapper,
    .pagination {
        display: none;
    }
}

/* ==================================
   Accessibility
   ================================== */

.filter-btn:focus,
.filter-btn-sub:focus,
.tab-btn:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Ensure proper contrast for text */
.text-slate-600 {
    color: #475569;
}

.text-slate-900 {
    color: #0f172a;
}

/* ==================================
   Loading States (dla AJAX)
   ================================== */

.urzadzenia-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.urzadzenia-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f4f6;
    border-top-color: #dc2626;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
