/*=============================================
  PANIER V2 — Organic Premium Local
  Palette : #072f17 vert profond / #ffab10 jaune
  Font    : Rubik
===============================================*/

/* ===========================
   HERO / BREADCRUMB
   =========================== */
.cart-hero {
    background: var(--b-green, #072f17);
    padding: 20px 0 24px;
    position: relative;
    overflow: hidden;
}
.cart-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 55% 80% at 90% 50%, rgba(40,126,44,.28) 0%, transparent 70%);
    pointer-events: none;
}
.cart-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.cart-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,.55);
}
.cart-breadcrumb a {
    color: rgba(255,255,255,.75);
    text-decoration: none;
    transition: color .2s;
}
.cart-breadcrumb a:hover { color: #ffab10; }
.cart-breadcrumb .sep { opacity: .4; }
.cart-breadcrumb .current { color: #ffab10; font-weight: 600; }
.cart-hero-count {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,171,16,.18);
    color: #ffab10;
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,171,16,.3);
}

/* ===========================
   SECTION PRINCIPALE
   =========================== */
.cart-section {
    background: #f6faf6;
    padding: 36px 0 60px;
    min-height: 60vh;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    align-items: start;
}

/* ===========================
   FLASH MESSAGES
   =========================== */
.cart-flash {
    padding: 12px 18px;
    border-radius: 10px;
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 9px;
}
.cart-flash-success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}
.cart-flash-error {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

/* ===========================
   LISTE DES ARTICLES
   =========================== */
.cart-items-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}
.cart-items-title {
    font-family: 'Rubik', sans-serif;
    font-weight: 800;
    font-size: 17px;
    color: #072f17;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-items-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: #ffab10;
    border-radius: 2px;
}

.cart-btn-vider {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1.5px solid #e0ede0;
    border-radius: 8px;
    padding: 7px 14px;
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #6b7c6b;
    cursor: pointer;
    transition: all .2s;
}
.cart-btn-vider:hover {
    border-color: #d44;
    color: #d44;
    background: #fff8f8;
}

/* Ligne article */
.cart-item {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e0ede0;
    padding: 18px 20px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: 88px 1fr auto;
    gap: 16px;
    align-items: center;
    transition: box-shadow .25s, border-color .25s;
    opacity: 0;
    animation: cartItemIn .45s ease forwards;
}
.cart-item:nth-child(1) { animation-delay: .04s }
.cart-item:nth-child(2) { animation-delay: .10s }
.cart-item:nth-child(3) { animation-delay: .16s }
.cart-item:nth-child(4) { animation-delay: .22s }
.cart-item:nth-child(5) { animation-delay: .28s }
.cart-item:nth-child(n+6) { animation-delay: .34s }

@keyframes cartItemIn {
    from { opacity: 0; transform: translateX(-14px); }
    to   { opacity: 1; transform: translateX(0); }
}
.cart-item:hover {
    box-shadow: 0 8px 24px rgba(7,47,23,.08);
    border-color: rgba(255,171,16,.3);
}
.cart-item.removing {
    opacity: 0;
    transform: translateX(20px) scale(0.97);
    transition: opacity .3s ease, transform .3s ease;
    pointer-events: none;
}

/* Image article */
.cart-item-img {
    width: 88px;
    height: 88px;
    border-radius: 12px;
    overflow: hidden;
    background: #f5fbf5;
    border: 1px solid #e0ede0;
    flex-shrink: 0;
}
.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    display: block;
}
.cart-item-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0c4b0;
    font-size: 2rem;
}

/* Infos article */
.cart-item-info {}
.cart-item-name {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #1a2e1a;
    margin: 0 0 4px;
    line-height: 1.3;
}
.cart-item-variant {
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    color: #6b7c6b;
    margin-bottom: 6px;
}
.cart-item-promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #fff8e7;
    border: 1px solid rgba(255,171,16,.35);
    color: #7a4a00;
    font-family: 'Rubik', sans-serif;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.cart-item-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.cart-item-price-original {
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    color: #b0b0b0;
    text-decoration: line-through;
}
.cart-item-price {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #072f17;
}
.cart-item-price-total {
    font-family: 'Rubik', sans-serif;
    font-weight: 800;
    font-size: 14px;
    color: #287e2c;
    margin-left: auto;
}

/* Contrôles quantité */
.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.cart-qty-group {
    display: flex;
    align-items: center;
    border: 1.5px solid #e0ede0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.cart-qty-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: #072f17;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s, color .18s;
    font-family: 'Rubik', sans-serif;
    line-height: 1;
}
.cart-qty-btn:hover {
    background: #e8f5e9;
    color: #072f17;
}
.cart-qty-val {
    min-width: 34px;
    text-align: center;
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #1a2e1a;
    padding: 0 4px;
    border-left: 1.5px solid #e0ede0;
    border-right: 1.5px solid #e0ede0;
}

.cart-delete-btn {
    background: transparent;
    border: none;
    color: #b0c4b0;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color .18s, background .18s;
    font-size: 15px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-delete-btn:hover {
    color: #d44;
    background: #fff0f0;
}

/* Lien continuer les achats */
.cart-continue-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #287e2c;
    text-decoration: none;
    margin-top: 12px;
    transition: color .2s;
}
.cart-continue-link:hover { color: #072f17; }
.cart-continue-link i { font-size: 12px; }

/* ===========================
   RÉCAPITULATIF (sidebar)
   =========================== */
.cart-summary {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e0ede0;
    overflow: hidden;
    position: sticky;
    top: 90px;
    box-shadow: 0 8px 32px rgba(7,47,23,.07);
    opacity: 0;
    animation: cartSummaryIn .55s .12s ease forwards;
}
@keyframes cartSummaryIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cart-summary-header {
    background: #072f17;
    padding: 18px 24px;
    position: relative;
    overflow: hidden;
}
.cart-summary-header::before {
    content: '';
    position: absolute;
    right: -20px; top: -20px;
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(255,171,16,.12);
    pointer-events: none;
}
.cart-summary-title {
    font-family: 'Rubik', sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-summary-title i { color: #ffab10; font-size: 18px; }

.cart-summary-body {
    padding: 22px 24px;
}

.cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f4f0;
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    color: #6b7c6b;
}
.cart-summary-row:last-of-type { border-bottom: none; }
.cart-summary-row span:last-child { font-weight: 600; color: #1a2e1a; }

.cart-summary-divider {
    height: 1px;
    background: #e0ede0;
    margin: 6px 0 14px;
}

.cart-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.cart-summary-total-label {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #072f17;
}
.cart-summary-total-amount {
    font-family: 'Rubik', sans-serif;
    font-weight: 800;
    font-size: 26px;
    color: #072f17;
    line-height: 1;
}
.cart-summary-total-amount small {
    font-size: 14px;
    font-weight: 600;
    color: #6b7c6b;
}

/* Boutons CTA */
.cart-btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #ffab10;
    color: #072f17;
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-family: 'Rubik', sans-serif;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .06em;
    text-decoration: none;
    cursor: pointer;
    transition: background .25s, transform .2s, box-shadow .25s;
    margin-bottom: 10px;
}
.cart-btn-checkout:hover {
    background: #072f17;
    color: #ffab10;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(7,47,23,.2);
}
.cart-btn-checkout i { font-size: 16px; }

.cart-btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 13px;
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.cart-btn-whatsapp:hover {
    background: #128c4e;
    color: #fff;
    transform: translateY(-1px);
}
.cart-btn-whatsapp i { font-size: 18px; }

/* Trust items */
.cart-trust-list {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f0f4f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cart-trust-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    color: #6b7c6b;
    font-weight: 500;
}
.cart-trust-item i {
    color: #287e2c;
    font-size: 14px;
    flex-shrink: 0;
}

/* ===========================
   PANIER VIDE
   =========================== */
.cart-empty {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e0ede0;
    padding: 80px 40px;
    text-align: center;
    grid-column: 1 / -1;
    animation: cartSummaryIn .5s ease forwards;
}
.cart-empty-icon {
    width: 100px;
    height: 100px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.8rem;
    color: #287e2c;
    position: relative;
}
.cart-empty-icon::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px dashed rgba(40,126,44,.25);
}
.cart-empty h3 {
    font-family: 'Rubik', sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: #1a2e1a;
    margin: 0 0 10px;
}
.cart-empty p {
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    color: #6b7c6b;
    margin: 0 0 28px;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}
.cart-btn-shop {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: #072f17;
    color: #fff;
    text-decoration: none;
    padding: 14px 34px;
    border-radius: 12px;
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .06em;
    transition: background .2s, transform .2s;
}
.cart-btn-shop:hover {
    background: #287e2c;
    color: #fff;
    transform: translateY(-2px);
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1100px) {
    .cart-layout { grid-template-columns: 1fr 320px; }
}
@media (max-width: 991px) {
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
}
@media (max-width: 767px) {
    .cart-item { grid-template-columns: 70px 1fr; grid-template-rows: auto auto; }
    .cart-item-controls { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; border-top: 1px solid #f0f4f0; padding-top: 12px; margin-top: 4px; }
    .cart-item-img { width: 70px; height: 70px; }
}
@media (max-width: 480px) {
    .cart-summary-body { padding: 18px; }
    .cart-summary-total-amount { font-size: 22px; }
}

/* ===========================
   REDUCED MOTION
   =========================== */
@media (prefers-reduced-motion: reduce) {
    .cart-item, .cart-summary { animation: none; opacity: 1; }
}
