/**
 * PyziTheme - product-list.css (pyzitheme/assets/css/product-list.css)
 * 
 * Styl dla listy produktów ciast i wyrobów drobnych
 *
 * @package     PyziTheme
 * @subpackage  Assets/CSS
 * @author      Patryk Kowalski <p.kowalski@kamikstudio.pl>
 * @copyright   2025 KamikStudio & PyziPyzi
 * @license     Proprietary
 * @version     1.1.0
 * @since       1.0.0
 * 
 * Client: PyziPyzi - Domowe wyroby cukiernicze
 * Website: https://pyzipyzi.pl
 */

/* =============================================
   LISTA PRODUKTÓW (CIASTA, TORTY, ETC.)
   ============================================= */

.product-list-page {
    min-height: 80vh;
    background: linear-gradient(135deg, #f5f0e8 0%, #faf7f0 100%);
    padding: 60px 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.product-list-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* === PRZYCISK POWRÓT (górny) === */
.back-button-top {
    margin-bottom: 30px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    color: #5e341c;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.back-btn:hover {
    background: #5e341c;
    color: white;
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(94,52,28,0.3);
}

.back-btn svg {
    fill: currentColor;
}

/* === NAGŁÓWEK === */
.product-header {
    text-align: center;
    margin-bottom: 40px;
}

.product-title {
    font-size: 48px;
    font-weight: 700;
    color: #5e341c;
    line-height: 1.2;
}

/* === GŁÓWNA INFORMACJA (UWAGA) === */
.main-info-section {
    margin-bottom: 60px;
}

.main-info-card {
    background: #fff8f0;
    border: 3px solid #ef6341;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(239,99,65,0.15);
    overflow: hidden;
}

.info-header {
    background: #ef6341;
    color: white;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-header .info-icon {
    font-size: 32px;
}

.info-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.info-content {
    padding: 30px;
    font-size: 15px;
    color: #666;
    line-height: 1.7;
}

.info-content p {
    margin-bottom: 15px;
}

.info-content strong {
    color: #5e341c;
}

.size-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 25px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
}

.size-item {
    text-align: center;
    padding: 15px;
    background: #f5f0e8;
    border-radius: 10px;
}

.size-item strong {
    display: block;
    font-size: 16px;
    color: #ef6341;
    margin-bottom: 8px;
}

.size-item span {
    display: block;
    font-size: 14px;
    color: #666;
}

/* === LISTA PRODUKTÓW === */
.products-section {
    display: grid;
    gap: 30px;
    margin-bottom: 60px;
}

.product-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    position: relative;
    transition: all 0.3s;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

/* Zdjęcie produktu */
.product-image {
    width: 300px;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: #f5f0e8;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* BEZ animacji zoom */
}

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: #ccc;
}

.product-placeholder svg {
    width: 80px;
    height: 80px;
    fill: #ccc;
}

/* Treść produktu */
.product-content {
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-name {
    font-size: 26px;
    font-weight: 700;
    color: #5e341c;
    margin-bottom: 15px;
    line-height: 1.3;
}

.product-description {
    font-size: 15px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Ceny */
.product-price {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 15px 0;
    padding: 12px;
    background: #f5f0e8;
    border-radius: 8px;
}

.price-full {
    font-size: 18px;
    font-weight: 700;
    color: #ef6341;
}

.price-per-kg {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Akcje produktu - przyciski */
.product-actions {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: #ef6341;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 140px;
    cursor: pointer;
}

.btn-order:hover {
    background: #d94e2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 99, 65, 0.3);
}

.btn-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: transparent;
    color: #5e341c;
    text-decoration: none;
    border: 2px solid #5e341c;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 140px;
}

.btn-details:hover {
    background: #5e341c;
    color: white;
    transform: translateY(-2px);
}

/* Empty state */
.no-products {
    text-align: center;
    padding: 60px 20px;
    background: #f5f0e8;
    border-radius: 12px;
}

.no-products small {
    color: #999;
    display: block;
    margin-top: 10px;
}

/* === RESPONSYWNOŚĆ === */
@media (max-width: 1024px) {
    .product-item {
        grid-template-columns: 250px 1fr;
    }

    .product-image {
        width: 250px;
    }

    .product-content {
        padding: 25px;
    }

    .product-name {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .product-list-page {
        padding: 40px 15px;
    }

    .product-title {
        font-size: 32px;
    }

    .size-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .product-item {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .product-image {
        width: 100%;
        height: 280px;
    }
    
    .product-image img {
        object-fit: contain; /* Na mobilu całe zdjęcie widoczne */
        background: white;
    }

    .product-content {
        padding: 25px 20px;
    }

    .product-name {
        font-size: 20px;
    }

    .product-description {
        font-size: 14px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .btn-order,
    .btn-details {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .product-title {
        font-size: 26px;
    }

    .product-image {
        height: 240px;
    }
}

/* ================================
   MODAL - POPUP ZAMÓWIENIA
   ================================ */

.order-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.order-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 550px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.order-modal.active .modal-content {
    transform: scale(1);
}

/* Zamknij (X) */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #5e341c;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0.6;
}

.modal-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Header modala */
.modal-header {
    padding: 35px 30px 25px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    color: #5e341c;
}

.modal-product-name {
    font-size: 18px;
    font-weight: 600;
    color: #ef6341;
    margin: 0;
}

/* Body modala */
.modal-body {
    padding: 30px;
}

/* Info box */
.info-box {
    padding: 16px 18px;
    border-radius: 8px;
    margin-bottom: 25px;
    background: #fff9f0;
    border-left: 3px solid #ef6341;
    font-size: 15px;
    line-height: 1.6;
    color: #4a2814;
}

.info-box strong {
    color: #5e341c;
    font-weight: 600;
}

.modal-body > p {
    font-size: 15px;
    color: #4a2814;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

/* Checklist */
.order-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.order-checklist li {
    padding: 10px 0;
    font-size: 15px;
    color: #4a2814;
    border-bottom: 1px solid #f0f0f0;
}

.order-checklist li:last-child {
    border-bottom: none;
}

/* Przyciski akcji */
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
    border: 2px solid transparent;
}

.modal-btn.btn-phone {
    background: #5e341c;
    color: white;
}

.modal-btn.btn-phone:hover {
    background: #4a2814;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(94, 52, 28, 0.2);
}

.modal-btn.btn-contact {
    background: transparent;
    color: #ef6341;
    border: 2px solid #ef6341;
}

.modal-btn.btn-contact:hover {
    background: #ef6341;
    color: white;
    transform: translateY(-1px);
}

/* Responsywność modala */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        border-radius: 10px;
    }
    
    .modal-header {
        padding: 30px 20px 20px;
    }
    
    .modal-header h3 {
        font-size: 22px;
    }
    
    .modal-product-name {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 25px 20px;
    }
    
    .modal-btn {
        font-size: 15px;
        padding: 13px 20px;
    }
}