/**
 * Frontend styles for Producenci
 */

/* Producers archive */
.mp-producers-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.mp-producers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    margin: 30px 0;
}

.mp-producer-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mp-producer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.mp-producer-logo {
    margin-bottom: 15px;
    text-align: center;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.mp-producer-logo img {
    max-width: 100%;
    height: auto;
    max-height: 100px;
    object-fit: contain;
}

.mp-producer-name {
    font-size: 1.25rem;
    margin: 0 0 10px;
    text-align: center;
    width: 100%;
}

.mp-producer-name a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.mp-producer-name .mp-product-count {
    font-size: 0.9em;
    color: #6b7280;
    font-weight: 400;
    margin-left: 4px;
}

.mp-producer-desc {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 15px;
    text-align: center;
    width: 100%;
}

.mp-producer-meta {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 15px;
    text-align: center;
}

.mp-producer-link {
    display: inline-block;
    padding: 10px 20px;
    background: #3b82f6;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s;
    margin-top: auto;
}

.mp-producer-link:hover {
    background: #2563eb;
    color: #fff;
}

/* Single producer */
.mp-producer-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.mp-back-to-archive {
    margin-bottom: 20px;
}

.mp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.mp-back-link:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.mp-producer-banner {
    margin: -40px -20px 30px;
    overflow: hidden;
}

.mp-producer-banner img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
}

.mp-producer-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.mp-producer-logo {
    flex-shrink: 0;
}

.mp-producer-logo img {
    max-width: 150px;
    height: auto;
}

.mp-producer-title {
    font-size: 2rem;
    margin: 0 0 10px;
}

.mp-producer-tagline {
    font-size: 1.1rem;
    color: #6b7280;
}

.mp-producer-content-wrap {
    width: 100%;
}

.mp-producer-main-full {
    width: 100%;
    max-width: 100%;
}

/* Delivery badge on products */
.mp-delivery-badge-wrapper {
    margin: 10px 0;
}

.mp-delivery-badge {
    display: inline-block;
    background: #f0f6fc;
    color: #0969da;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #d0d7de;
}

/* Product delivery info on single product page */
.mp-product-delivery-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.mp-delivery-icon {
    flex-shrink: 0;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.mp-delivery-icon svg {
    width: 18px;
    height: 18px;
}

.mp-delivery-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    flex-wrap: wrap;
}

.mp-delivery-label {
    font-size: 14px;
    font-weight: 400;
    color: #374151;
    display: inline;
}

.mp-delivery-time {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    display: inline;
}

.mp-delivery-note {
    font-size: 13px;
    color: #6b7280;
    display: block;
    width: 100%;
    margin-top: 4px;
}

/* Producer page products pagination */
.mp-producer-single .mp-producer-products .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.mp-producer-single .mp-producer-products a.page-numbers,
.mp-producer-single .mp-producer-products span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 8px 14px;
    border: 1px solid;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    margin: 0 2px;
    /* Colors are injected dynamically from settings */
}

.mp-producer-single .mp-producer-products a.prev.page-numbers,
.mp-producer-single .mp-producer-products a.next.page-numbers {
    padding: 8px 18px;
}

.mp-producer-single .mp-producer-products span.dots {
    border: none;
    background: transparent;
    color: #9ca3af;
}

/* Responsive */
@media screen and (max-width: 1400px) {
    .mp-producers-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 1024px) {
    .mp-producers-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 782px) {
    .mp-producer-header {
        flex-direction: column;
        text-align: center;
    }

    .mp-producers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .mp-producers-grid {
        grid-template-columns: 1fr;
    }
}
