/* ==========================================================================
   Styles du catalogue — La Réserve du CBD
   Inclus via {% block extra_css %} dans les templates catalogue.
   ========================================================================== */


/* ==========================================================================
   Fil d'ariane (breadcrumb)
   ========================================================================== */

.breadcrumb {
    padding: var(--space-md) 0;
    font-size: var(--text-sm);
    color: var(--color-sage);
}

.breadcrumb a {
    color: var(--color-sage);
}

.breadcrumb a:hover {
    color: var(--color-gold);
}

.breadcrumb__separator {
    margin: 0 var(--space-sm);
    color: var(--color-cream-warm);
}


/* ==========================================================================
   En-tête page boutique
   ========================================================================== */

.shop-header {
    text-align: center;
    padding: var(--space-2xl) 0 var(--space-xl);
}

.shop-header__subtitle {
    color: var(--color-sage);
    font-size: var(--text-base);
    max-width: 500px;
    margin: var(--space-md) auto 0;
}


/* ==========================================================================
   Barre de filtres
   ========================================================================== */

.filter-bar {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-lg) 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: wrap;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-bar__group {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.filter-bar__divider {
    width: 1px;
    height: 24px;
    background-color: var(--color-cream-warm);
    margin: 0 var(--space-sm);
    flex-shrink: 0;
}

.filter-btn {
    display: inline-block;
    padding: var(--space-xs) var(--space-lg);
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-cream-warm);
    font-size: var(--text-xs);
    font-weight: var(--font-weight-medium);
    color: var(--color-forest-deep);
    background-color: var(--color-white);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
}

.filter-btn:hover {
    border-color: var(--color-sage);
    color: var(--color-forest);
}

.filter-btn--active {
    background-color: var(--color-forest);
    border-color: var(--color-forest);
    color: var(--color-cream);
}

.filter-btn--active:hover {
    background-color: var(--color-forest-deep);
    color: var(--color-cream);
}

.filter-btn--natural {
    border-color: var(--color-success);
    color: var(--color-success);
}

.filter-btn--natural.filter-btn--active {
    background-color: var(--color-success);
    color: var(--color-white);
}

.filter-btn--enriched {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.filter-btn--enriched.filter-btn--active {
    background-color: var(--color-gold);
    color: var(--color-white);
}


/* ==========================================================================
   Grille de produits
   ========================================================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    padding-bottom: var(--space-3xl);
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-lg);
    }
}


/* ==========================================================================
   Carte produit
   ========================================================================== */

.product-card {
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.product-card__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card__image-container {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: var(--color-cream-warm);
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-card__image {
    transform: scale(1.05);
}

.product-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    color: var(--color-sage);
    font-style: italic;
}

.product-card__badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    color: var(--color-white);
    letter-spacing: 0.03em;
}

.badge--natural {
    background-color: var(--color-success);
}

.badge--enriched {
    background-color: var(--color-gold);
}

.product-card__info {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    flex: 1;
}

@media (min-width: 768px) {
    .product-card__info {
        padding: var(--space-lg);
    }
}

.product-card__category {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11px;
    color: var(--color-sage);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-xs);
}

.product-card__name {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-forest-deep);
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.product-card__strain {
    font-size: var(--text-sm);
    color: var(--color-sage);
    font-style: italic;
    margin-bottom: var(--space-sm);
}

.product-card__cbd {
    font-size: var(--text-sm);
    color: var(--color-forest);
    margin-bottom: var(--space-sm);
}

.product-card__divider {
    width: 40px;
    height: 1px;
    background-color: var(--color-gold);
    margin: var(--space-sm) 0;
}

.product-card__price {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    color: var(--color-forest-deep);
    font-weight: var(--font-weight-bold);
    margin-top: auto;
    padding-top: var(--space-sm);
}

.product-card__price-prefix {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: var(--font-weight-regular);
    color: var(--color-sage);
}

.product-card__cta {
    margin-top: var(--space-md);
}


/* ==========================================================================
   État vide (aucun produit)
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.empty-state__title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
}

.empty-state__text {
    color: var(--color-sage);
    margin-bottom: var(--space-xl);
}


/* ==========================================================================
   Fiche produit — layout
   ========================================================================== */

.product-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    padding: var(--space-lg) 0 var(--space-2xl);
}

@media (min-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr 1fr;
        padding: var(--space-xl) 0 var(--space-3xl);
    }
}

.product-detail__image {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--color-cream-warm);
}

.product-detail__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    color: var(--color-sage);
    font-style: italic;
}

.product-detail__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.product-detail__category {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: var(--text-xs);
    color: var(--color-sage);
    font-weight: var(--font-weight-medium);
}

.product-detail__name {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    line-height: 1.2;
}

.product-detail__strain {
    font-size: var(--text-base);
    color: var(--color-sage);
    font-style: italic;
}

.product-detail__type-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: var(--font-weight-medium);
    color: var(--color-white);
    width: fit-content;
}

.product-detail__short-desc {
    font-size: var(--text-base);
    color: var(--color-forest);
    line-height: 1.7;
}

.product-detail__specs {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    font-size: var(--text-sm);
}

.product-detail__spec {
    display: flex;
    gap: var(--space-sm);
}

.product-detail__spec-label {
    color: var(--color-sage);
    min-width: 100px;
}

.product-detail__spec-value {
    color: var(--color-forest-deep);
    font-weight: var(--font-weight-medium);
}


/* ==========================================================================
   Sélecteur de conditionnements (poids)
   ========================================================================== */

.weight-selector {
    padding: var(--space-md) 0;
}

.weight-selector__title {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-forest-deep);
    margin-bottom: var(--space-sm);
}

.weight-selector__options {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.weight-selector__option {
    position: relative;
}

.weight-selector__option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.weight-selector__label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-sm) var(--space-lg);
    border: 2px solid var(--color-cream-warm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 80px;
    text-align: center;
}

.weight-selector__label:hover {
    border-color: var(--color-sage);
}

.weight-selector__option input:checked + .weight-selector__label {
    border-color: var(--color-forest);
    background-color: var(--color-forest);
    color: var(--color-cream);
}

.weight-selector__weight {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
}

.weight-selector__price {
    font-size: var(--text-xs);
    margin-top: 2px;
}

.weight-selector__option input:checked + .weight-selector__label .weight-selector__price {
    color: var(--color-cream-warm);
}

.weight-selector__per-gram {
    font-size: var(--text-xs);
    color: var(--color-sage);
    margin-top: var(--space-sm);
}

.product-detail__current-price {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    color: var(--color-forest-deep);
    font-weight: var(--font-weight-bold);
}

.product-detail__add-btn {
    width: 100%;
}

.product-detail__add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--color-cream-warm);
    color: var(--color-sage);
    border-color: var(--color-cream-warm);
}


/* ==========================================================================
   Terpènes (réutilisable dans l'apothicaire)
   ========================================================================== */

.terpene-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.terpene-card {
    background-color: var(--color-cream);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    text-align: center;
    min-width: 100px;
    flex: 1 1 100px;
    transition: box-shadow var(--transition-fast);
}

.terpene-card:hover {
    box-shadow: var(--shadow-sm);
}

.terpene-card__icon {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-xs);
}

.terpene-card__name {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-forest-deep);
}

.terpene-card__aroma {
    font-size: var(--text-xs);
    color: var(--color-sage);
    margin-top: 2px;
}


/* ==========================================================================
   Fiches Apothicaire — Profil / Science / Usage
   ========================================================================== */

.apothecary {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--color-cream-warm);
}

@media (min-width: 768px) {
    .apothecary {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-xl);
    }
}

.apothecary__section {
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-xl);
    transition: box-shadow var(--transition-base);
}

.apothecary__section:hover {
    box-shadow: var(--shadow-md);
}

.apothecary__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-cream-warm);
}

.apothecary__icon {
    color: var(--color-gold);
    flex-shrink: 0;
}

.apothecary__title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    margin: 0;
}

.apothecary__subtitle {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-forest-deep);
    margin-bottom: var(--space-md);
    margin-top: var(--space-lg);
}

.apothecary__content {
    font-size: var(--text-sm);
    line-height: 1.7;
}

.apothecary__text {
    color: var(--color-forest);
    line-height: 1.7;
    font-size: var(--text-sm);
}

.apothecary__text--muted {
    color: var(--color-sage);
    font-style: italic;
}

.apothecary__text p {
    margin-bottom: var(--space-sm);
}

.apothecary__specs {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.apothecary__spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-cream);
}

.apothecary__spec-item:last-child {
    border-bottom: none;
}

.apothecary__spec-label {
    font-size: var(--text-sm);
    color: var(--color-sage);
}

.apothecary__spec-value {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-forest-deep);
}

.apothecary__spec-value--highlight {
    color: var(--color-forest);
    font-size: var(--text-lg);
    font-weight: var(--font-weight-bold);
}

.apothecary__lab-btn {
    margin-top: var(--space-md);
    width: 100%;
    font-size: var(--text-xs);
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.apothecary__terpenes .terpene-list {
    gap: var(--space-sm);
}

.apothecary__terpenes .terpene-card {
    min-width: 80px;
    padding: var(--space-sm) var(--space-md);
}


/* ==========================================================================
   Produits similaires
   ========================================================================== */

.related-products {
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--color-cream-warm);
}

.related-products__title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    margin-bottom: var(--space-lg);
}

.related-products__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .related-products__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-lg);
    }
}


/* ==========================================================================
   Mention légale en bas de fiche
   ========================================================================== */

.legal-notice {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--color-cream-warm);
    font-size: var(--text-xs);
    color: var(--color-sage);
    font-style: italic;
    text-align: center;
}
