/* ════════════════════════════════
   CATALOG PRODUCT DETAIL - Aperitiu
   Le hero (.cc-hero) est strictement identique aux pages catégorie - ce fichier
   ne fait QUE la section sous le hero (gallery + info produit). Tout le style
   du hero, de la nav overlay et du peigne vient de catalog-category.css.

   Override : hero plus compact que sur les pages catégorie (pas de paragraphe
   descriptif, juste le titre, donc on réduit la hauteur et les paddings).
════════════════════════════════ */

/* ── Hero produit compact ─────────────────────────────────────────────── */
.cp-page .cc-hero {
    min-height: 480px;
}

.cp-page .cc-hero-inner {
    padding-top: 200px;
    padding-bottom: 80px;
}

/* ── Section détail : grille gallery + info ───────────────────────────── */
.cp-detail {
    padding: 80px var(--cc-pad, 100px) 140px;
    background: var(--cc-cream, #f3e9d7);
}

.cp-detail-inner {
    max-width: var(--cc-max, 1440px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
}

@media (max-width: 1000px) {
    .cp-detail { padding: 60px 32px 80px; }
    .cp-detail-inner { grid-template-columns: 1fr; gap: 40px; }
}

/* ── Gallery : "polaroid" crème avec ombre douce ──────────────────────── */
.cp-gallery-col .product-image-wrap {
    position: relative;
    padding: 24px;
    background: var(--cc-cream-2, #fbf4e9);
    border-radius: 24px;
    box-shadow: 0 12px 36px rgba(36, 35, 35, .08);
}

.cp-gallery-col .product-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cp-gallery-col .product-gallery-main {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 16px;
    background: var(--cc-cream-3, #f1ead8);
}

.cp-gallery-col .product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cp-gallery-col .product-gallery-thumbs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Safety : si une seule miniature (= 1 image), on masque le conteneur. */
.cp-gallery-col .product-gallery-thumbs:has(> .product-gallery-thumb:only-child) {
    display: none;
}

.cp-gallery-col .product-gallery-thumb {
    width: 84px;
    height: 84px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--cc-cream-3, #f1ead8);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .15s, transform .15s;
}
.cp-gallery-col .product-gallery-thumb:hover { transform: translateY(-2px); }
.cp-gallery-col .product-gallery-thumb.is-active {
    border-color: var(--cc-red, #e85a28);
}
.cp-gallery-col .product-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-gallery-col .product-image {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffa200;
    border-radius: 16px;
}
.cp-gallery-col .product-image-placeholder {
    width: 96px;
    height: 96px;
    stroke: #e85a28;
    stroke-width: 1.5;
    fill: none;
}

/* ── Info panneau : prix, axes, stock, CTA ────────────────────────────── */
.cp-info-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cp-info-col #variant-panel {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Prix */
.cp-info-col .product-price-box {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 2px dashed rgba(36, 35, 35, .12);
}

.cp-info-col .product-price {
    font-family: var(--cc-font-display, 'Erica One', sans-serif);
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 400;
    color: var(--cc-red, #e85a28);
    line-height: 1;
    letter-spacing: -0.5px;
}

.cp-info-col .product-price-hint {
    font-family: var(--cc-font-body, 'DM Sans', sans-serif);
    font-size: 14px;
    font-weight: 500;
    color: var(--cc-dark, #242323);
    opacity: .55;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ─── Prix barré (promo) ─── */
.cp-info-col .product-price-compare {
    font-family: var(--cc-font-body, 'DM Sans', sans-serif);
    font-size: clamp(18px, 1.6vw, 22px);
    font-weight: 500;
    color: var(--cc-dark, #242323);
    opacity: .55;
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    letter-spacing: 0;
}

.cp-info-col .product-price-promo-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background: var(--cc-red, #e85a28);
    color: #fff;
    border-radius: 999px;
    font-family: var(--cc-font-body, 'DM Sans', sans-serif);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(232, 90, 40, 0.30);
    align-self: center;
}

/* Axes / variantes : pills crème avec sélection orange */
.cp-info-col .product-axes {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin: 0;
}

.cp-info-col .product-axis-label {
    margin: 0 0 10px;
    font-family: var(--cc-font-body, 'DM Sans', sans-serif);
    font-size: 13px;
    font-weight: 600;
    color: var(--cc-dark, #242323);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.cp-info-col .product-axis-values {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cp-info-col .product-axis-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 10px 18px;
    background: var(--cc-cream-2, #fbf4e9);
    border: 1.5px solid rgba(36, 35, 35, .1);
    border-radius: 100px;
    font-family: var(--cc-font-body, 'DM Sans', sans-serif);
    font-size: 14px;
    font-weight: 500;
    color: var(--cc-dark, #242323);
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.cp-info-col .product-axis-value:hover {
    border-color: var(--cc-red, #e85a28);
    color: var(--cc-red, #e85a28);
    transform: translateY(-1px);
}
.cp-info-col .product-axis-value--selected {
    background: var(--cc-red, #e85a28);
    border-color: var(--cc-red, #e85a28);
    color: #fff;
}
.cp-info-col .product-axis-value--selected:hover {
    background: var(--cc-red, #e85a28);
    color: #fff;
    transform: none;
}
.cp-info-col .product-axis-value--disabled {
    opacity: .35;
    cursor: not-allowed;
    text-decoration: line-through;
}

.cp-info-col .product-axis-help,
.cp-info-col .product-variant-error {
    font-family: var(--cc-font-body, 'DM Sans', sans-serif);
    font-size: 13px;
    color: rgba(36, 35, 35, .7);
    font-style: italic;
}
.cp-info-col .product-variant-error {
    color: var(--cc-red-2, #b22222);
    font-style: normal;
    font-weight: 500;
}

/* Description + ingrédients de la variante */
.cp-info-col .product-variant-content {
    margin: 0 !important;
    padding: 20px 24px !important;
    background: var(--cc-cream-2, #fbf4e9) !important;
    border: none !important;
    border-radius: 18px !important;
}
.cp-info-col .product-variant-desc {
    font-family: var(--cc-font-body, 'DM Sans', sans-serif);
    line-height: 1.6;
    color: var(--cc-dark, #242323) !important;
}

/* Meta : stock + référence */
.cp-info-col .product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 24px;
}
.cp-info-col .product-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--cc-font-body, 'DM Sans', sans-serif);
    font-size: 13px;
    color: rgba(36, 35, 35, .75);
}
.cp-info-col .product-meta-item svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.cp-info-col .product-stock--in {
    color: #2f7a3e;
    font-weight: 600;
}
.cp-info-col .product-stock--out {
    color: var(--cc-red-2, #b22222);
    font-weight: 600;
}

/* "Déjà dans votre panier" */
.cp-info-col .product-in-cart {
    padding: 16px 20px;
    background: rgba(255, 162, 0, .12);
    border: 1.5px solid rgba(255, 162, 0, .3);
    border-radius: 16px;
}
.cp-info-col .product-in-cart-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--cc-font-body, 'DM Sans', sans-serif);
    font-size: 14px;
    color: var(--cc-dark, #242323);
}
.cp-info-col .product-in-cart-head svg {
    width: 18px;
    height: 18px;
    stroke: var(--cc-red, #e85a28);
    fill: none;
    stroke-width: 2;
}
.cp-info-col .product-in-cart-head a {
    margin-left: auto;
    color: var(--cc-red, #e85a28);
    font-weight: 600;
    text-decoration: none;
}
.cp-info-col .product-in-cart-head a:hover { text-decoration: underline; }

.cp-info-col .product-in-cart-list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cp-info-col .product-in-cart-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(36, 35, 35, .75);
}
.cp-info-col .product-in-cart-item--current {
    font-weight: 600;
    color: var(--cc-dark, #242323);
}
.cp-info-col .product-in-cart-warn {
    margin-left: auto;
    font-size: 12px;
    color: var(--cc-red-2, #b22222);
    font-weight: 600;
}

/* Bouton ajout panier : pill orange large façon hp-btn-primary */
.cp-info-col .product-cart-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cp-info-col .catalog-add-to-cart,
.cp-info-col .catalog-card-btn {
    width: 100% !important;
    padding: 18px 32px !important;
    background: var(--cc-orange-2, #f3a63c) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 100px !important;
    font-family: var(--cc-font-body, 'DM Sans', sans-serif) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(232, 90, 40, .25);
    transition: transform .15s, box-shadow .15s, background .15s;
}
.cp-info-col .catalog-add-to-cart:hover {
    background: var(--cc-red, #e85a28) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(232, 90, 40, .35);
}
.cp-info-col .catalog-add-to-cart svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
}

/* ── Lien retour ──────────────────────────────────────────────────────── */
.cp-back-link {
    margin-top: 28px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cc-dark, #242323);
    font-family: var(--cc-font-body, 'DM Sans', sans-serif);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    opacity: .65;
    transition: opacity .15s;
    align-self: flex-start;
}
.cp-back-link:hover {
    opacity: 1;
    color: var(--cc-red, #e85a28);
}
.cp-back-link svg {
    width: 16px;
    height: 16px;
}

/* ════════════════════════════════
   ACCORDÉONS "Description" + "Ingrédients"
   Reprend le pattern de la home (.hp-service-item) : pas de carte ni de fond,
   juste un filet de séparation entre les items + grand titre en script font.
   <details name="cp-extras"> = mutuellement exclusifs, natif HTML.
════════════════════════════════ */
.cp-extras {
    margin: 0;
}

.cp-extras-list {
    display: flex;
    flex-direction: column;
}

/* Item = <details> : sans fond, séparé par un filet sous chaque entrée
   (comme .hp-service-item) */
.cp-extras-item {
    border-bottom: 1px solid rgba(36, 35, 35, .15);
    padding: 0;
    background: transparent;
}
.cp-extras-item:first-child {
    border-top: 1px solid rgba(36, 35, 35, .15);
}

/* Header cliquable = <summary>. Retire le triangle natif. */
.cp-extras-item-header {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    user-select: none;
}
.cp-extras-item-header::-webkit-details-marker { display: none; }
.cp-extras-item-header::marker { content: ''; }
.cp-extras-item-header:hover .cp-extras-item-title {
    opacity: .7;
}

.cp-extras-item-title {
    font-family: var(--cc-font-script, 'Darumadrop One', cursive);
    font-size: 28px;
    color: var(--cc-dark, #242323);
    line-height: 1.2;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: opacity .15s ease;
}

.cp-extras-item-tag {
    font-family: var(--cc-font-body, 'DM Sans', sans-serif);
    font-size: 10px;
    font-weight: 700;
    color: var(--cc-red-2, #b22222);
    background: rgba(232, 90, 40, .12);
    border: 1px solid rgba(232, 90, 40, .25);
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Flèche : strictement identique à .hp-service-item-arrow de la home -
   triangle rouge arrondi `polygon1.svg`, 22×22, pivote à 180° à l'ouverture. */
.cp-extras-item-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    transform: rotate(0deg);
    transition: transform .25s ease;
}
.cp-extras-item[open] .cp-extras-item-arrow {
    transform: rotate(180deg);
}
.cp-extras-item-arrow img { width: 100%; height: 100%; }

.cp-extras-item-content {
    padding: 0 0 22px;
    animation: cp-extras-expand .3s ease;
}

@keyframes cp-extras-expand {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Prose : description longue mise en forme */
.cp-extras-prose {
    font-family: var(--cc-font-body, 'DM Sans', sans-serif);
    font-size: 14px;
    line-height: 1.6;
    color: rgba(36, 35, 35, .85);
}
.cp-extras-prose + .cp-extras-prose { margin-top: 16px; }
.cp-extras-prose p { margin: 0 0 12px; }
.cp-extras-prose p:last-child { margin-bottom: 0; }
.cp-extras-prose strong { color: var(--cc-dark, #242323); }
.cp-extras-prose ul, .cp-extras-prose ol {
    margin: 12px 0;
    padding-left: 24px;
}
.cp-extras-prose a {
    color: var(--cc-red, #e85a28);
    text-decoration: underline;
}

/* Liste des ingrédients : pills */
.cp-extras-ingredients {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cp-extras-ingredient {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--cc-cream-2, #fbf4e9);
    border: 1px solid rgba(36, 35, 35, .1);
    font-family: var(--cc-font-body, 'DM Sans', sans-serif);
    font-size: 12.5px;
    color: var(--cc-dark, #242323);
}

.cp-extras-ingredient--allergen {
    background: rgba(232, 90, 40, .1);
    border-color: rgba(232, 90, 40, .35);
    color: var(--cc-red-2, #b22222);
    font-weight: 500;
}

.cp-extras-ingredient-name { font-weight: 500; }

.cp-extras-ingredient-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 1px 5px;
    border-radius: 3px;
    background: var(--cc-red-2, #b22222);
    color: #fff;
}

.cp-extras-allergen-warning {
    margin: 14px 0 0;
    padding: 10px 12px;
    background: rgba(232, 90, 40, .08);
    border: 1px solid rgba(232, 90, 40, .25);
    border-radius: 10px;
    font-family: var(--cc-font-body, 'DM Sans', sans-serif);
    font-size: 12.5px;
    color: var(--cc-red-2, #b22222);
    display: flex;
    align-items: center;
    gap: 8px;
}
.cp-extras-allergen-warning svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 760px) {
    .cp-gallery-col .product-image-wrap { padding: 16px; border-radius: 18px; }
    .cp-gallery-col .product-gallery-thumb { width: 64px; height: 64px; }
    .cp-info-col .product-price { font-size: 36px; }

    .cp-extras-item-header { padding: 16px 0; gap: 16px; }
    .cp-extras-item-title { font-size: 24px; }
}
