/* Product Leads Manager - Frontend Styles */

/* Základní wrapper */
.plm-products-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filtry */
.plm-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.plm-filter-btn {
    padding: 12px 24px;
    border: 2px solid;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.plm-filter-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.plm-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.plm-filter-btn.active {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Grid produktů - 2 sloupce vedle sebe */
.plm-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Karta produktu - horizontální layout uvnitř */
.plm-product-card {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    min-height: 200px;
}

.plm-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.plm-product-card.hidden {
    display: none;
}

.plm-product-image {
    width: 40%;
    min-width: 150px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.plm-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.plm-product-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.plm-product-name {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #0073aa !important;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.plm-product-model {
    font-size: 13px;
    margin: 0 0 10px 0;
    color: #666;
}

.plm-product-model a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.plm-product-model a:hover {
    color: #005a87;
    text-decoration: underline;
}

.plm-product-description {
    font-size: 13px;
    color: #001f38;
    line-height: 1;
    margin-bottom: 15px;
    font-weight: 500;
}

.plm-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #001f38;
    margin-bottom: 15px;
}
.footrow { 
    display: flex;
    justify-content: space-between;
    align-items: center; 
}

.plm-product-price small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #999;
    margin-top: 4px;
}

.plm-btn-interest {
    align-self: flex-start;
    padding: 5px 20px;
    background: #25a3de;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.plm-btn-interest:hover {
    background: #a4c400;
}

/* Popup overlay */
.plm-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

.plm-popup-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.plm-popup-container {
    background: white;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    position: relative;
    animation: plmSlideIn 0.3s ease;
}

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

.plm-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border: none;
    background: #155894;
    color: #fff;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 1;
}

.plm-popup-close:hover {
    background: #e0e0e0;
}

.plm-popup-header {
    background: #03A9F4;
    color: white;
    padding: 20px 30px;
    border-radius: 10px 10px 0 0;
}
h2#plmPopupProduct {
    font-size: 16px;
    color: #fff;
    margin-bottom: 0;
}

.plm-popup-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.plm-popup-body {
    padding: 25px 30px;
    background-color: #f0f0f0;
}

/* Formulář - dvousloupcový layout */
.plm-lead-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.plm-form-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 15px;
    align-items: start;
}

.plm-form-row label {
    color: #0073aa;
    font-size: 14px;
    padding-top: 10px;
    text-align: left;
    font-weight: 400;
}

.plm-form-row label::after {
    content: '*';
    color: #03A9F4;
    margin-left: 3px;
    font-weight: 700;
}

.plm-form-row label[for="plmPhone"]::after,
.plm-form-row label[for="plmLogo"]::after,
.plm-form-row label[for="plmNote"]::after {
    content: '';
}

.plm-form-row input,
.plm-form-row textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
}

.plm-form-row input:focus,
.plm-form-row textarea:focus {
    outline: none;
    border-color: #03A9F4;
}

.plm-form-row textarea {
    resize: vertical;
    min-height: 70px;
}

.plm-file-upload-wrapper {
    display: flex;
    gap: 10px;
    width: 100%;
    align-items: flex-start;
}

.plm-file-list {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    min-height: 42px;
    background: white;
}

.plm-file-placeholder {
    color: #999;
    font-size: 14px;
}

.plm-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 13px;
    color: #333;
}

.plm-file-item:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 5px;
    margin-bottom: 5px;
}

.plm-file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plm-file-size {
    color: #999;
    font-size: 11px;
}

.plm-file-remove {
    color: #d63638;
    cursor: pointer;
    font-weight: bold;
    padding: 0 5px;
    transition: color 0.3s ease;
}

.plm-file-remove:hover {
    color: #a00;
}

.plm-upload-btn {
    padding: 10px 20px;
    background: #03A9F4;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.plm-upload-btn:hover {
    background: #0288D1;
}

.plm-form-note {
    grid-column: 2;
    font-size: 11px;
    color: #999;
    margin: -10px 0 0 0;
    font-style: italic;
}

.plm-form-gdpr {
    font-size: 11px;
    color: #999;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 5px;
    line-height: 1.5;
    margin-top: 5px;
    font-style: italic;
}

.plm-form-gdpr a {
    color: #03A9F4;
    text-decoration: underline;
}

.plm-form-actions {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.plm-btn-submit {
    transition: all 0.3s ease;
    text-transform: uppercase;
    padding: 5px 20px;
    background: #a4c400;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
}

.plm-btn-submit:hover {
    background: #25a3de;
}

.plm-btn-submit:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
}

.plm-form-message {
    padding: 15px;
    border-radius: 5px;
    font-size: 15px;
    text-align: center;
}

.plm-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.plm-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Žádné produkty */
.plm-no-products {
    text-align: center;
    font-size: 18px;
    color: #666;
    padding: 40px 20px;
}

/* Responsivní design */
@media (max-width: 1024px) {
    .plm-products-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .plm-product-image {
        width: 35%;
    }
    
    .plm-product-content {
        padding: 25px;
    }
    
    .plm-product-name {
        font-size: 20px;
    }
    
    .plm-product-description {
        font-size: 14px;
    }
    
    .plm-product-price {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .plm-product-card {
        flex-direction: column;
    }
    
    .plm-product-image {
        width: 100%;
        min-width: auto;
        height: 200px;
    }
    
    .plm-product-content {
        padding: 20px;
    }
    
    .plm-btn-interest {
        width: 100%;
    }
    
    .plm-filter-btn {
        font-size: 14px;
        padding: 10px 18px;
    }
    
    .plm-popup-overlay {
        padding: 10px;
    }
    
    .plm-popup-header,
    .plm-popup-body {
        padding: 20px;
    }
    
    .plm-popup-header h2 {
        font-size: 18px;
    }
    
    /* Formulář na mobilu - vertikální layout */
    .plm-form-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .plm-form-row label {
        padding-top: 0;
    }
    
    .plm-form-note {
        grid-column: 1;
        margin-top: 3px;
    }
}
