/* ===== ZMIENNE ===== */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #e74c3c;
    --secondary-dark: #c0392b;
    --accent-color: #9b59b6;
    --accent-dark: #8e44ad;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --gray-color: #95a5a6;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-dark);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== HEADER ===== */
.main-header {
    background-color: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: var(--dark-color);
    transition: color 0.3s;
}

.logo a:hover {
    color: var(--primary-color);
}

.main-nav {
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 5px 0;
    transition: all 0.3s;
}

.menu {
    display: flex;
    list-style: none;
}

.menu li {
    margin-left: 20px;
}

.menu a {
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s;
    padding: 5px 0;
    position: relative;
}

.menu a:hover {
    color: var(--primary-color);
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.menu a:hover::after {
    width: 100%;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 40px 0;
    min-height: 70vh;
}

/* ===== FOOTER ===== */
.main-footer {
    background-color: var(--dark-color);
    color: #fff;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #fff;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-categories h4,
.footer-contact h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #fff;
}

.footer-categories ul {
    list-style: none;
}

.footer-categories li {
    margin-bottom: 10px;
}

.footer-categories a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s;
}

.footer-categories a:hover {
    color: #fff;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--gray-color);
}

.breadcrumbs a {
    color: var(--gray-color);
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

/* ===== MESSAGES ===== */
.message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.message.warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.2s;
    text-align: center;
}

.btn:hover {
    background-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
}

/* ===== TITLES ===== */
.main-title {
    font-size: 32px;
    color: var(--dark-color);
    margin-bottom: 30px;
    text-align: center;
    padding-bottom: 15px;
    position: relative;
}

.main-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: var(--primary-color);
}

.category-title {
    font-size: 28px;
    color: var(--dark-color);
    margin-bottom: 30px;
}

.search-title {
    font-size: 28px;
    color: var(--dark-color);
    margin-bottom: 20px;
}

/* ===== SEARCH FORM ===== */
.search-section {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 40px;
}

.search-section h2 {
    font-size: 22px;
    color: var(--dark-color);
    margin-bottom: 20px;
    text-align: center;
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.price-range label {
    margin-bottom: 10px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-inputs input {
    flex: 1;
}

/* ===== PRODUCT GRID ===== */
.recent-products h2,
.search-results h2 {
    font-size: 24px;
    color: var(--dark-color);
    margin-bottom: 20px;
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-image {
    position: relative;
    padding-top: 75%; /* Aspect ratio 4:3 */
    overflow: hidden;
    background-color: #f5f5f5;
}

.product-image img.thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-image:hover img.thumbnail {
    transform: scale(1.05);
}

.product-image .image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-image:hover .image-overlay {
    display: flex;
    opacity: 1;
}

.product-image .image-overlay .enlarged {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border: 5px solid #fff;
    border-radius: 5px;
}

.product-image .no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--gray-color);
    font-size: 14px;
    text-align: center;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.product-info h3 a {
    color: var(--dark-color);
}

.product-info h3 a:hover {
    color: var(--primary-color);
}

.product-info .category {
    font-size: 14px;
    color: var(--gray-color);
    margin-bottom: 10px;
}

.product-info .price {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-actions .btn {
    width: 100%;
    text-align: center;
}

.no-products {
    text-align: center;
    padding: 30px;
    color: var(--gray-color);
    background-color: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* ===== PRODUCT DETAIL ===== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.product-images {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.main-image {
    width: 100%;
    position: relative;
    padding-top: 75%; /* Aspect ratio 4:3 */
    margin-bottom: 20px;
    overflow: hidden;
    background-color: #f5f5f5;
    border-radius: 5px;
}

.main-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.main-image.no-image {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--gray-color);
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail {
    width: calc(20% - 8px);
    cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
    padding-top: calc(20% - 8px); /* Maintain aspect ratio */
    position: relative;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.thumbnail.active {
    border-color: var(--primary-color);
}

.thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info .product-title {
    font-size: 28px;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.product-meta {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.product-meta .category {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--gray-color);
}

.product-meta .price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.product-description {
    margin-bottom: 30px;
    line-height: 1.8;
}

.product-action {
    margin-top: 30px;
}

.product-action .btn {
    padding: 12px 25px;
    font-size: 18px;
}

/* ===== SEARCH RESULTS ===== */
.search-params {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 30px;
}

.search-params h2 {
    font-size: 18px;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.search-criteria {
    margin-bottom: 20px;
}

.search-criteria p {
    margin-bottom: 5px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .menu {
        display: none;
        position: fixed;
        top: 80px; /* dostosuj tę wartość do wysokości twojego nagłówka */
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
        max-width: 300px;
        background-color: #fff;
        box-shadow: var(--shadow);
        flex-direction: column;
        padding: 10px 0;
        z-index: 1000;
        border-radius: 5px;
    }
    
    .menu.active {
        display: flex !important;
        position: fixed !important;
        top: 80px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 80% !important;
        max-width: 300px !important;
        background-color: #fff !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
        flex-direction: column !important;
        padding: 10px 0 !important;
        z-index: 1000 !important;
        border-radius: 5px !important;
        text-align: center !important;
    }
    
    .menu li {
        margin: 0;
    }
    
    .menu a {
        display: block;
        padding: 10px 20px;
        text-align: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .search-form {
        grid-template-columns: 1fr;
    }
	  .product-actions {
        flex-direction: row;
        justify-content: center;
    }
    
    .product-actions .btn {
        width: auto;
        flex: 1;
    }
	
}

@media (max-width: 576px) {
    .header-content {
        padding: 15px 0;
    }
    
    .main-title {
        font-size: 26px;
    }
    
    .category-title, 
    .search-title {
        font-size: 24px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}