/* ============================================================
   PRODUCT SHOW — Page détail produit
   Fichier : public/assets/css/pages/product-show.css
   ============================================================ */

.km-product-page {
    background: #F9FAFB;
    min-height: 100vh;
    padding: 24px 0 64px;
}

.km-product-page__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}


/* ── Breadcrumb ── */
.km-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.km-breadcrumb__link {
    color: #364153;
    font-family: var(--km-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
    text-decoration: none;
    transition: color .2s ease;
}
.km-breadcrumb__link:hover { color: #704B38; }

.km-breadcrumb__current {
    color: #704B38;
    font-family: var(--km-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
}


/* ── Grille 2 colonnes ── */
.km-product-grid {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}


/* ============================================================
   COLONNE 1 — GALERIE
   ============================================================ */
.km-gallery {
    width: 645.794px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.km-gallery__main {
    position: relative;
    width: 645.794px;
    height: 645.794px;
    border-radius: 8px;
    overflow: hidden;
    background: #F3F4F6;
    flex-shrink: 0;
}

.km-gallery__main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Badge avantage */
.km-gallery__badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: #F6A936;
    color: #FFF;
    font-family: var(--km-font);
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
    z-index: 2;
}

/* Boutons navigation rond */
.km-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #FFF;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,.15);
    transition: background .2s ease, transform .2s ease;
    z-index: 2;
}
.km-gallery__nav:hover {
    background: #F9FAFB;
    transform: translateY(-50%) scale(1.08);
}
.km-gallery__nav--prev { left: 16px; }
.km-gallery__nav--next { right: 16px; }

/* Miniatures */
.km-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    height: 153.251px;
    align-self: stretch;
}

.km-gallery__thumb {
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: #F3F4F6;
    transition: border-color .2s ease;
    height: 100%;
}
.km-gallery__thumb:hover { border-color: rgba(246,169,54,.5); }
.km-gallery__thumb--active { border-color: #F6A936; }

.km-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ============================================================
   COLONNE 2 — INFOS PRODUIT
   ============================================================ */
.km-product-info {
    flex: 1;
    min-width: 0;
    background: #FFF;
    border-radius: 8px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.km-product-info__title {
    color: #704B38;
    font-family: 'Nexa', 'Inter', system-ui, sans-serif;
    font-size: 42px;
    font-weight: 900;
    line-height: 110%;
    letter-spacing: -0.42px;
}

/* Prix */
.km-product-info__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.km-product-info__price-value {
    color: #F6A936;
    font-family: var(--km-font);
    font-size: 32px;
    font-weight: 500;
    line-height: 48px;
}
.km-product-info__price-unit {
    color: #364153;
    font-family: var(--km-font);
    font-size: 18px;
    font-weight: 500;
    line-height: 27px;
}

/* Disponibilité */
.km-product-info__availability {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #00A63E;
    font-family: var(--km-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

/* Champs (quantité, livraison) */
.km-product-info__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.km-product-info__label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #704B38;
    font-family: var(--km-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
}

.km-product-info__moq {
    color: #9CA3AF;
    font-family: var(--km-font);
    font-size: 13px;
    font-weight: 400;
}

/* Sélecteur quantité */
.km-qty-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

.km-qty-selector__btn {
    display: flex;
    width: 39.993px;
    height: 39.993px;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    border: 1.098px solid #D1D5DC;
    background: #FFF;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
    flex-shrink: 0;
}
.km-qty-selector__btn:hover:not(:disabled) {
    background: #F9FAFB;
    border-color: #F6A936;
}
.km-qty-selector__btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.km-qty-selector__value {
    color: #1F2937;
    font-family: var(--km-font);
    font-size: 18px;
    font-weight: 600;
    min-width: 32px;
    text-align: center;
}

.km-qty-selector__unit {
    color: #364153;
    font-family: var(--km-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
}

/* Select zone de livraison */
.km-select {
    height: 42.634px;
    flex-shrink: 0;
    align-self: stretch;
    border: 1.098px solid #D1D5DC;
    border-radius: 4px;
    background: #FFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23704B38' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
    color: #704B38;
    font-family: var(--km-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
    padding: 0 40px 0 14px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color .2s ease;
    width: 100%;
}
.km-select:focus { border-color: #F6A936; }

/* Total */
.km-product-info__total {
    display: flex;
    flex-direction: column;
    padding: 15.984px 15.984px 0 15.984px;
    height: auto;
    border-radius: 4px;
    background: #F9FAFB;
    gap: 4px;
}
.km-product-info__total-label {
    color: #704B38;
    font-family: var(--km-font);
    font-size: 18px;
    font-weight: 500;
    line-height: 27px;
}
.km-product-info__total-value {
    color: #F6A936;
    font-family: var(--km-font);
    font-size: 18px;
    font-weight: 500;
    line-height: 27px;
}

/* Boutons actions */
.km-btn-cart,
.km-btn-buy {
    display: flex;
    width: 100%;
    padding: 14px 0;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 6px;
    color: #FFF;
    font-family: var(--km-font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: filter .2s ease, transform .15s ease;
}
.km-btn-cart:hover:not(:disabled),
.km-btn-buy:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
}
.km-btn-cart:disabled,
.km-btn-buy:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.km-btn-cart { background: #F6A936; }
.km-btn-buy  { background: #00A63E; }


/* ============================================================
   INFOS VENDEUR
   ============================================================ */
.km-seller-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding-top: 25px;
    margin-top: 8px;
    border-top: 1.098px solid #E5E7EB;
}

.km-seller-info__left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.km-seller-info__title {
    color: #704B38;
    font-family: var(--km-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    margin-bottom: 4px;
}

.km-seller-info__name {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #704B38;
    font-family: var(--km-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.km-seller-info__rating {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #364153;
    font-family: var(--km-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
}

.km-seller-info__zone {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #364153;
    font-family: var(--km-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
}

/* Bouton voir boutique */
.km-btn-shop {
    display: flex;
    padding: 9.285px 16.483px 8.886px 17.081px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 1.098px solid #704B38;
    border-radius: 6px;
    color: #704B38;
    text-align: center;
    font-family: var(--km-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}
.km-btn-shop:hover {
    background: #704B38;
    color: #fff;
}
.km-btn-shop:hover svg path,
.km-btn-shop:hover svg g path {
    stroke: #fff;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1300px) {
    .km-gallery,
    .km-gallery__main {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
    .km-product-page__inner { padding: 0 24px; }
}

@media (max-width: 900px) {
    .km-product-grid { flex-direction: column; }
    .km-gallery { width: 100%; }
    .km-product-info { padding: 24px; }
    .km-product-info__title { font-size: 28px; }
    .km-gallery__thumbs { grid-template-columns: repeat(4, 1fr); height: auto; }
    .km-gallery__thumb { aspect-ratio: 1 / 1; }
    .km-seller-info { flex-direction: column; gap: 16px; }
}

@media (max-width: 480px) {
    .km-product-page { padding: 16px 0 40px; }
    .km-product-page__inner { padding: 0 16px; }
    .km-product-info__title { font-size: 24px; }
    .km-product-info__price-value { font-size: 26px; }
}


/* ── Boîte Description & Caractéristiques ── */
.km-description-box {
    width: 100%;
    max-width: 1323.589px;
    margin: 24px auto 0;
    padding: 24px 24px 24px 24px;
    border-radius: 10px;
    background: #FFF;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.km-description-box__title {
    color: #704B38;
    font-family: 'Nexa', 'Inter', system-ui, sans-serif;
    font-size: 28px;
    font-weight: 900;
    line-height: 120%;
    letter-spacing: -0.42px;
}

.km-description-box__text {
    color: #364153;
    font-family: var(--km-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

.km-description-box__specs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.km-description-box__specs-title {
    color: #704B38;
    font-family: var(--km-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.km-description-box__specs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 16px;
}

.km-description-box__specs-list li {
    color: #364153;
    font-family: var(--km-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    list-style: disc;
}

/* Responsive */
@media (max-width: 640px) {
    .km-description-box {
        padding: 16px;
        margin-top: 16px;
    }
    .km-description-box__title { font-size: 22px; }
}

/* ── Tableau "Disponible aussi chez" ── */
.km-availability-table {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.km-availability-table__row {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr 1fr;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #F3F4F6;
}

/* En-tête */
.km-availability-table__row--header {
    border-bottom: 2px solid #E5E7EB;
    padding-top: 0;
}
.km-availability-table__row--header .km-availability-table__cell {
    color: #704B38;
    font-family: var(--km-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
}

/* Dernière ligne sans bordure */
.km-availability-table__row:last-child {
    border-bottom: none;
}

/* Cellules par défaut */
.km-availability-table__cell {
    color: #364153;
    font-family: var(--km-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
}

/* Vendeur */
.km-availability-table__cell--seller {
    color: #704B38;
    font-weight: 400;
}

/* Prix */
.km-availability-table__cell--price {
    color: #F6A936;
    font-weight: 500;
}

/* Note */
.km-availability-table__cell--rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Action */
.km-availability-table__cell--action {
    display: flex;
    justify-content: flex-start;
}

.km-availability-table__btn {
    display: inline-flex;
    height: 36.975px;
    padding: 8.187px 15.977px 7.788px 15.984px;
    justify-content: center;
    align-items: center;
    background: #F6A936;
    color: #FFF;
    text-align: center;
    font-family: var(--km-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
    text-decoration: none;
    border-radius: 4px;
    transition: filter .2s ease;
    white-space: nowrap;
}
.km-availability-table__btn:hover { filter: brightness(1.08); }

/* Responsive */
@media (max-width: 900px) {
    .km-availability-table__row {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
    }
    .km-availability-table__cell:nth-child(4) { display: none; } /* Distance masquée */
}

@media (max-width: 640px) {
    .km-availability-table__row {
        grid-template-columns: 1.4fr 1fr 1fr;
    }
    .km-availability-table__cell:nth-child(5) { display: none; } /* Note masquée */
    .km-availability-table__cell--seller { font-size: 13px; }
}

/* ── Options de livraison ── */
.km-description-box__title--with-icon {
    display: flex;
    align-items: center;
    gap: 12px;
}

.km-delivery-options {
    display: flex;
    gap: 16px;
    width: 100%;
    flex-wrap: wrap;
    padding-bottom: 24px;
}

.km-delivery-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    min-width: 240px;
    padding: 17px 17px 17px 17px;
    border-radius: 10px;
    border: 1.098px solid #E5E7EB;
}

.km-delivery-option__icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.km-delivery-option__title {
    color: #704B38;
    font-family: var(--km-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.km-delivery-option__desc {
    color: #364153;
    font-family: var(--km-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
}

.km-delivery-option__price {
    color: #F6A936;
    font-family: var(--km-font);
    font-size: 18px;
    font-weight: 500;
    line-height: 27px;
}

.km-delivery-option__price--free {
    color: #00A63E;
}

/* ── Achat groupé ── */
.km-group-buy {
    background: #704B38;
    width: 100%;
    padding: 40px 0;
    margin-top: 24px;
    border-radius: 10px;
}

.km-group-buy__inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.km-group-buy__title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #FFF;
    text-align: center;
    font-family: 'Bebas Neue', 'Nexa', 'Inter', system-ui, sans-serif;
    font-size: 28px;
    font-weight: 400;
    letter-spacing: -0.28px;
    text-transform: uppercase;
}

.km-group-buy__count {
    color: rgba(255,255,255,.85);
    font-family: var(--km-font);
    font-size: 16px;
    font-weight: 400;
}

.km-group-buy__price {
    color: #FFF;
    font-family: var(--km-font);
    font-size: 18px;
    font-weight: 400;
}

.km-group-buy__price-value {
    color: #00C853;
    font-family: 'Nexa', 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 900;
}

.km-group-buy__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    background: #00A63E;
    color: #FFF;
    font-family: var(--km-font);
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: filter .2s ease, transform .15s ease;
}
.km-group-buy__btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 900px) {
    .km-delivery-options { flex-direction: column; }
    .km-delivery-option { min-width: 100%; }
}

@media (max-width: 640px) {
    .km-group-buy { padding: 32px 0; }
    .km-group-buy__title { font-size: 22px; flex-direction: column; gap: 8px; }
}

/* ── Avis clients ── */
.km-reviews-list {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.km-review {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 0;
    border-bottom: 1px solid #F3F4F6;
}
.km-review:first-child { padding-top: 0; }
.km-review:last-child { border-bottom: none; }

.km-review__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.km-review__name {
    color: #704B38;
    font-family: var(--km-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.km-review__date {
    color: #364153;
    font-family: var(--km-font);
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
}

.km-review__stars {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.km-review__text {
    color: #364153;
    font-family: var(--km-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
}

.km-reviews-empty {
    color: #9CA3AF;
    font-family: var(--km-font);
    font-size: 14px;
    padding: 8px 0 16px;
}

/* Bouton laisser un avis */
.km-review-btn {
    display: flex;
    width: 100%;
    padding: 11.183px 0 14.98px 0;
    justify-content: center;
    align-items: center;
    background: #F6A936;
    color: #F9FDFF;
    text-align: center;
    font-family: var(--km-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 16px;
    transition: filter .2s ease;
}
.km-review-btn:hover { filter: brightness(1.08); }

/* ── Produits similaires ── */
.km-similar-products {
    width: calc(100% + 80px);
    margin: 32px -40px 0;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.km-similar-products__title {
    color: #704B38;
    font-family: 'Bebas Neue', 'Nexa', 'Inter', system-ui, sans-serif;
    font-size: 32px;
    font-weight: 400;
    line-height: 150%;
}

/* ── Garanties ── */
.km-guarantees {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    width: 100%;
    padding-bottom: 24px;
}

.km-guarantee {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 220px;
}

.km-guarantee__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.km-guarantee__title {
    color: #704B38;
    font-family: var(--km-font);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.km-guarantee__desc {
    color: #6B7280;
    font-family: var(--km-font);
    font-size: 13px;
    font-weight: 400;
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 900px) {
    .km-guarantees { gap: 20px; }
    .km-guarantee { min-width: 45%; }
}

@media (max-width: 480px) {
    .km-guarantee { min-width: 100%; }
}