/* ============ Cart Page Styles (floward-inspired) ============ */
:root{
  --c-bg:#f8f9fb;
  --c-card:#fff;
  --c-text:#1f2937;
  --c-muted:#6b7280;
  --c-primary:#6b46c1;
  --c-border:#e5e7eb;
  --radius:20px;
}

/* Base */
html,body{background:var(--c-bg); color:var(--c-text);}
*{box-sizing:border-box}

/* Container & layout */
.cart-container{padding-block:2rem;}
.page-title{
  font-weight:800;
  font-size:clamp(1.4rem,2vw,1.9rem);
  margin-bottom:1rem;
}


/* Cards */
.card{
  background:var(--c-card);
  border:1px solid var(--c-border);
  border-radius:var(--radius);
  box-shadow:0 6px 16px rgba(0,0,0,.04);
}
.cart-card{overflow:hidden;}
.cart-card__head{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 20px;
}
.cart-card__foot{padding:14px 20px;}

/* Shop meta */
.shop-meta{display:flex; gap:12px; align-items:center;}
.shop-avatar{
  width:36px;height:36px;border-radius:50%;
  background:#ede9fe;color:#5b21b6;
  display:grid;place-items:center;font-weight:700;
}
.shop-name{font-weight:700;}
.shop-tax{font-size:.9rem; color:var(--c-muted);}

/* ===== Table ===== */
.cart-table-wrap{overflow:auto; -webkit-overflow-scrolling:touch;}
.cart-table{min-width:720px; width:100%;}
.cart-table th,.cart-table td{vertical-align:middle; padding:14px 16px;}
.cart-row + .cart-row{border-top:1px solid var(--c-border);}
.nowrap{white-space:nowrap;}
.text-muted{color:var(--c-muted)!important;}

/* Product cell */
.cart-prod .prod-wrap{display:flex; gap:14px; align-items:flex-start;}
.cart-prod .prod-img{
  width:84px;height:84px;border-radius:14px;overflow:hidden;
  background:#f3f4f6; display:grid;place-items:center; flex:0 0 84px;
}
.cart-prod .prod-img img{width:100%; height:100%; object-fit:cover;}
.cart-prod .img-ph{font-size:28px;}
.cart-prod .prod-info{display:flex; flex-direction:column; gap:6px; min-width:0;}
.cart-prod .prod-name{font-weight:700; color:var(--c-text); display:inline-block; max-width:100%;}
.cart-prod .prod-name:hover{text-decoration:underline;}
.cart-prod .prod-sub{font-size:.92rem; color:var(--c-muted);}

/* Shipping info (sous l’image/nom) */
.shipping-info{
  margin-top:.35rem;
  font-size:.88rem;
  color:var(--c-muted);
  background:#f9fafb;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid var(--c-border);
  line-height:1.45;
}
.shipping-info p{margin:0 0 4px 0;}
.shipping-info p:last-child{margin:0;}

/* Qty control */
.qty-control{display:flex; align-items:center; justify-content:center; flex-wrap:wrap;}
.qty-btn{
  width:34px;height:34px;border-radius:10px;
  border:1px solid var(--c-border); background:#fff;
}
.qty-input{
  width:72px; text-align:center; border-radius:10px;
  border:1px solid var(--c-border); height:34px; margin:0 .25rem;
}

/* Totals */
.totals .line,
.summary-lines .line{
  display:flex; justify-content:space-between; margin:.2rem 0;
}
.totals .grand,
.summary-lines .grand{
  font-size:1.05rem; font-weight:800;
}

/* Aside (sticky summary) */
.sticky{position:sticky; top:18px;}
.btn-ghost{
  background:transparent; border:1px dashed var(--c-border);
}

/* Trust (optionnel) */
.trust{
  display:flex; gap:8px; flex-wrap:wrap;
  font-size:.92rem; color:var(--c-muted);
}
.trust .trust-item{
  background:#f9fafb; padding:8px 10px; border-radius:10px; border:1px solid var(--c-border);
}

/* Empty state */
.empty-state{display:grid; place-items:center; padding:60px 0; text-align:center;}
.empty-state .emoji{font-size:42px; margin-bottom:10px;}

/* ===== Gift Card section ===== */
.gift-card__head{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px; border-bottom:1px solid var(--c-border);
}
.gc-toggle{
  background:transparent; border:0; color:var(--c-primary);
  font-weight:600; text-decoration:underline; cursor:pointer;
}
.gc-attached{
  display:flex; align-items:center; gap:12px;
  padding:10px; border:1px solid var(--c-border); border-radius:12px; background:#fafafa;
}
.gc-thumb{ width:56px; height:56px; border-radius:10px; object-fit:cover; }
.gc-info .gc-title{ font-weight:700; }
.gc-info .gc-price{ font-size:.9rem; color:var(--c-muted); }

/* Panneau d’ajout */
.gc-panel{ margin-top:10px; }

/* Grille des templates */
.gc-grid{
  display:grid; gap:1px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
col-full{ display:flex; flex-direction:column; gap:6px; }
.cart-aside .sticky {
  position: sticky;
  top: 20px; /* distance du top */
}
/*  */


.gc-card{
  text-align: center;
  margin-bottom: 3px;
  padding: 10px;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
}
input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}


/* Quand on sélectionne le radio */
.gc-radio:checked ~ .gc-selected,
.gc-radio:checked ~ .gc-image,
.gc-radio:checked ~ .gc-meta {
  /* Ce style s’applique à tout le bloc */
}

.gc-radio:checked ~ .gc-selected {
  position: absolute;
  inset: 0;
  border: 3px solid #6b46c1;
  border-radius: 10px;
  pointer-events: none;
}
