/* static/css/styles.css */

/* === 1. ZMIENNE GLOBALNE I PODSTAWOWE STYLE === */
:root {
    --primary-color: #0056b3;
    --secondary-color: #007bff;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --border-color: #dee2e6;
    --body-font: 'Inter', sans-serif;
}

body {
    font-family: var(--body-font);
    background-color: #ffffff;
    color: var(--dark-color);
}


/* === 2. NAGŁÓWEK (NAVBAR) I STOPKA (FOOTER) === */
.navbar {
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

footer {
    background: var(--dark-color);
    color: var(--light-color);
    padding: 3rem 0 1rem;
}
footer a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}
footer a:hover {
    color: var(--secondary-color);
}


/* === 3. SEKCJA HERO === */
.hero-section {
    background: linear-gradient(135deg, var(--dark-color), var(--primary-color));
    color: white;
    padding: 5rem 0;
    text-align: center;
}
.hero-section h1 {
    font-weight: 700;
}
.hero-section .btn-light {
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
}


/* === 4. KARTY PRODUKTÓW === */
.product-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #f8f9fa; 
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-weight: 600;
    min-height: 48px;
}

.price-tag {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.category-badge {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}


/* === 5. PRZYCISKI I FORMULARZE === */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.filter-card {
    background: var(--light-color);
    border: none;
    border-radius: 15px;
}


/* === 6. STRONA SZCZEGÓŁÓW PRODUKTU === */
.product-description {
    line-height: 1.7;
}
.thumbnail {
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.thumbnail:hover, .thumbnail.active {
    border-color: var(--primary-color);
}


/* === 7. STRONA KONTAKTOWA === */
.contact-method {
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.contact-method:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.opening-hours-list {
    font-size: 0.95rem;
}

.opening-hours-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.opening-hours-list li:last-child {
    border-bottom: none;
}

.opening-hours-list span {
    color: #6c757d;
}

.opening-hours-list strong {
    color: var(--dark-color);
    font-weight: 600;
}


/* === 9. NOWE STYLE DLA GALERII PRODUKTU === */
.main-image-container {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* === 10. ULEPSZENIA GALERII I GLIGHTBOX === */
.main-image-container {
    position: relative;
    cursor: pointer;
}

.zoom-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-image-container:hover .zoom-icon {
    opacity: 1;
}

.gnext, .gprev {
    background: var(--primary-color) !important;
}


/* === 11. Blok "Brak Wyników" === */
.no-results-card {
    border: 2px dashed #e9ecef;
    padding: 3rem 2rem;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 0.75rem;
    margin-top: 2rem;
}

.no-results-card .icon {
    font-size: 3.5rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    display: block;
}


/* === 12. WYSZUKIWANIE NA ŻYWO (LIVE SEARCH) === */
.search-container {
    min-width: 250px;
}

.search-results-container {
    background: white;
    border: 1px solid var(--border-color);
    z-index: 1050; 
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    text-decoration: none;
    color: var(--dark-color);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease-in-out;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--light-color);
}

.search-result-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 1rem;
}

.search-result-item .info {
    display: flex;
    flex-direction: column;
}

.search-result-item .title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.search-result-item .price {
    font-size: 0.9rem;
    color: var(--primary-color);
}

.search-results-empty {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
}


/* === 13. WIZUALNY FILTR CENY (noUiSlider) === */
.price-slider-container {
    padding: 10px 5px;
}

.noUi-target {
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 8px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.05);
    height: 10px;
}

.noUi-connect {
    background: var(--primary-color);
}

.noUi-handle {
    border: 2px solid #FFF;
    border-radius: 50%;
    background: var(--secondary-color);
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
    cursor: grab;
    width: 24px;
    height: 24px;
    top: -7px;
    right: -12px;
}
.noUi-handle:focus {
    outline: none;
}
.noUi-handle:active {
    cursor: grabbing;
}
.noUi-handle::before,
.noUi-handle::after {
    display: none;
}

.price-range-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #495057;
    margin-top: 12px;
    font-weight: 500;
}


/* === 14. BANER COOKIE === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background-color: rgba(33, 37, 41, 0.95);
    color: #f8f9fa;
    z-index: 1060;
    transition: transform 0.5s ease-in-out;
    transform: translateY(100%); /* Domyślnie schowany pod ekranem */
}

.cookie-banner.show {
    transform: translateY(0); /* Pokazuje baner z animacją */
}

.cookie-banner p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.cookie-banner a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
}
