/**
 * Aratice Products Grid - Header Styles
 * Styles pour products-grid-header.php
 */

/* === Fil d'ariane === */
.apg-breadcrumb {
    margin-bottom: 12px;
    margin-left: 6px;
    width: fit-content;
    color: black;
}

.apg-breadcrumb .woocommerce-breadcrumb {
    font-size: 14px;
    color: black;
    font-weight: 700;
}

.apg-breadcrumb .woocommerce-breadcrumb a {
    color: black;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 400;
}

.apg-breadcrumb .woocommerce-breadcrumb a:hover {
    color: #003d82;
}

/* === En-tête de page === */
.apg-page-header {
    margin-bottom: 30px;
}

.apg-page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

.apg-page-header-left {
    flex: 1;
}

.apg-page-header-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.apg-page-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.apg-page-description-wrapper {
    position: relative;
}

.apg-page-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
}

.apg-page-description strong {
    font-weight: 600;
    color: #333;
}

/* Bouton "Lire la suite" - caché par défaut sur desktop */
.apg-description-toggle {
    display: none;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #003d82;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0 0 0;
    transition: color 0.2s ease;
}

.apg-description-toggle:hover {
    color: #002855;
}

.apg-description-toggle .apg-toggle-less {
    display: none;
}

.apg-description-toggle .apg-toggle-caret {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.apg-page-description-wrapper.expanded .apg-toggle-more {
    display: none;
}

.apg-page-description-wrapper.expanded .apg-toggle-less {
    display: inline;
}

.apg-page-description-wrapper.expanded .apg-toggle-caret {
    transform: rotate(180deg);
}

/* === Informations livraison dans le header === */
.apg-page-header .apg-shipping-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.apg-page-header .apg-shipping-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.apg-page-header .apg-shipping-item .apg-icon {
    color: #003d82;
}

.apg-page-header .apg-discount-badge {
    padding: 4px 12px;
    background: #e4f4dc;
    font-size: 13px;
    font-weight: 600;
    border-radius: 12px;
}

/* === Responsive === */
@media (max-width: 768px) {
    .apg-page-header-content {
        flex-direction: column;
        gap: 20px;
    }

    .apg-page-header-right {
        align-items: flex-start;
        width: 100%;
    }

    .apg-page-title {
        font-size: 24px;
    }

    .apg-page-description {
        font-size: 14px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        transition: all 0.3s ease;
    }

    /* Description étendue sur mobile */
    .apg-page-description-wrapper.expanded .apg-page-description {
        display: block;
        -webkit-line-clamp: unset;
        overflow: visible;
    }

    /* Afficher le bouton toggle sur mobile */
    .apg-description-toggle {
        display: inline-flex;
    }

    /* Cacher le bouton si la description est courte (géré par JS) */
    .apg-description-toggle.hidden {
        display: none;
    }

    .apg-page-header .apg-shipping-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .apg-page-title {
        font-size: 20px;
    }
}