/**
 * List Product - Aperçu Rapide styles
 * For composant and peripherique single pages.
 */

/* New container styles */
.product-list-container {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    padding: 0 30px;
}

#list-product {
    flex: 0 0 70%;
}

.trust-sidebar {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* PCPricer promo block */
.pcpricer-promo .pcpricer-promo-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.pcpricer-promo .pcpricer-promo-link:hover {
    opacity: 0.9;
}

.pcpricer-promo .pcpricer-logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 12px;
    display: block;
}

.pcpricer-promo .pcpricer-text {
    font-size: 0.9em;
    color: #ccc;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.pcpricer-promo .pcpricer-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    color: var(--color-accent);
    font-weight: 500;
}

.pcpricer-promo .pcpricer-cta i {
    font-size: 0.85em;
}

/* Trust box styles */
.trust-box {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.trust-box h3 {
    color: #f5f5f5;
    margin-top: 0;
    font-size: 1.2em;
    border-bottom: 1px solid #373737;
    padding-bottom: 10px;
}

.trust-box h3::after {
    display: none;
}

.trust-box ul {
    padding-left: 20px;
    margin: 15px 0;
}

.trust-box li {
    margin-bottom: 8px;
    font-size: 0.9em;
}

.trust-stats {
    background: #2a2a2a;
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
}

.trust-stats p {
    margin: 5px 0;
    font-size: 0.9em;
}

.trust-note {
    font-size: 0.85em;
    font-style: italic;
    color: #aaa;
    margin-top: 15px;
}

/* Styles pour les icônes de partage social */
.social-share {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #373737;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.social-share span {
    font-size: 0.9em;
    color: #ccc;
    margin-right: 8px;
}

.share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    transition: all 0.2s ease;
}

.share-icon.facebook {
    background-color: #666666;
}

.share-icon.twitter {
    background-color: #666666;
}

.share-icon.whatsapp {
    background-color: #666666;
}

.share-icon.reddit {
    background-color: #666666;
}

.share-icon.email {
    background-color: #666666;
}

.share-icon.copy-url {
    background-color: #666666;
}

.share-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.share-icon i {
    font-size: 14px;
}

@media (max-width: 768px) {
    .social-share {
        flex-wrap: wrap;
        gap: 8px;
    }

    .share-icon {
        width: 28px;
        height: 28px;
    }

    .share-icon i {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .product-list-container {
        flex-direction: column;
        padding: 0 10px;
    }

    #list-product,
    .trust-sidebar {
        flex: 0 0 100%;
    }
}

#list-product .list-product-title {
    position: relative;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 24px;
    font-weight: 600;
    text-transform: uppercase;
    color: #f5f5f5;
    margin: 0;
    padding: 10px 10px 10px 18px;
    text-align: left;
}

#list-product .list-product-count {
    font-size: 0.5em;
    font-weight: 400;
    text-transform: none;
    color: #aaa;
}

/* Séparateurs de section (H2) - accent gauche, pas de border-bottom */
#list-product .product-section-separator {
    margin-top: 16px;
    margin-bottom: 8px;
    padding-left: 10px;
    position: relative;
}

#list-product .product-section-separator:first-child {
    margin-top: 0;
}

#list-product .product-section-separator::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 3px;
    background: var(--color-accent, #3772fe);
    border-radius: 2px;
}

#list-product .product-section-title {
    display: block;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-accent, #3772fe);
}

#list-product .list-product-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 4px;
    background: #3772fe;
}

#list-product .product-item-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #373737;
}

#list-product .product-item-left {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

#list-product .product-item-left img {
    margin-right: 15px;
    width: 50px;
    height: auto;
}

#list-product .product-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.5;
}

#list-product .product-name-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

#list-product .product-name {
    font-weight: bold;
    font-size: 16px;
}

#list-product .product-subtitle {
    font-size: 12px;
}

#list-product .product-label {
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 9px;
}

#list-product .product-label-qualiteprix {
    background-color: #4CAF50;
    color: white;
}

#list-product .product-label-pascher {
    background-color: #FF9800;
    color: white;
}

#list-product .product-label-top {
    background-color: #27b0aaff;
    color: white;
}

#list-product .product-label-coeur {
    background-color: #F44336;
    color: white;
}

#list-product .product-item-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

#list-product .product-offer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 6px;
    min-width: 250px;
    background-color: #333333;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
}

#list-product .product-offer-item:hover {
    background-color: #3d3d3d;
    transform: translateY(-1px);
}

#list-product .offer-left {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

#list-product .offer-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

#list-product .offer-store-logo {
    width: 15px;
    height: auto;
    margin-right: 5px;
}

#list-product .offer-details {
    font-size: 14px;
    color: var(--color-accent);
}

#list-product .store-name {
    font-size: 12px;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#list-product .fallback-offer .offer-icon {
    width: 20px;
    height: 20px;
    color: #666;
}

#list-product .offer-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: var(--color-accent);
    color: white;
    border-radius: 4px;
    font-size: 0.75em;
    transition: all 0.2s ease;
    transform: translateX(0);
}

#list-product .product-offer-item:hover .offer-link {
    background-color: var(--color-accent-light);
    transform: translateX(2px);
}

/* Styles pour le bouton "Voir plus" */
#list-product .show-more-container {
    text-align: center;
    margin-bottom: 10px;
    position: relative;
}

#list-product .show-more-container.with-preview {
    margin-top: 15px;
    margin-bottom: 0;
    padding: 20px 0;
    position: relative;
    width: 100%;
    z-index: 10;
}

#list-product .show-more-container.with-preview.has-expanded {
    margin-top: 15px;
}

#list-product .show-more-container.without-preview {
    margin-top: 20px;
}

#list-product .show-more-btn {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
    color: white;
    border: none;
    padding: 6px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px var(--color-accent-30);
    position: relative;
    z-index: 2;
}

#list-product .show-more-btn:hover {
    background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--color-accent-40);
}

#list-product .show-more-btn.expanded .show-more-text {
    display: none;
}

#list-product .show-more-btn.expanded::before {
    content: "Voir moins";
}

#list-product .show-more-btn.expanded i {
    transform: rotate(180deg);
}

/* Zone repliée avec fondu (sous-catégories + produits visibles) */
#list-product .product-list-fade {
    max-height: 150px;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
    mask-size: 100% 100%;
    -webkit-mask-size: 100% 100%;
    transition: max-height 0.4s ease;
}

#list-product .product-list-fade.expanded {
    max-height: 5000px;
    -webkit-mask-image: none;
    mask-image: none;
}

@media (max-width: 768px) {
    #list-product .product-item-summary {
        gap: 10px;
    }

    #list-product .product-item-left {
        width: 68%;
    }

    #list-product .product-item-right {
        width: 32%;
    }

    #list-product .product-offer-item {
        width: 100%;
        min-width: auto;
    }

    #list-product .offer-link,
    #list-product .store-name,
    #list-product .product-label {
        display: none;
    }

    #list-product .product-subtitle {
        font-size: 12px;
    }
}

/* Styles pour l'icône info et le popup */
.info-icon {
    margin-left: 8px;
    color: var(--color-accent);
    cursor: pointer;
    font-size: 14px;
    transition: color 0.2s ease;
}

.info-icon:hover {
    color: var(--color-accent-light);
}

.update-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.update-popup.active {
    display: flex;
}

.popup-content {
    background: #1e1e1e;
    border-radius: 12px;
    padding: 0;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #373737;
}

.popup-header h3 {
    margin: 0;
    color: #f5f5f5;
    font-size: 1.3em;
}

.popup-header h3::after {
    display: none;
}

.close-popup {
    color: #aaa;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-popup:hover {
    color: #fff;
}

.popup-body {
    padding: 20px;
}

.update-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.update-list > li {
    padding: 12px 0;
    border-bottom: 1px solid #2a2a2a;
    color: #ccc;
    font-size: 0.95em;
}

.update-list > li:last-child {
    border-bottom: none;
}

.update-list > li strong {
    color: var(--color-accent);
    margin-right: 8px;
}

@media (max-width: 768px) {
    .popup-content {
        width: 95%;
        margin: 20px;
    }
}
