/* ============================================================
   cart.css — Armurerie Schubnel
   Thème : Gunmetal (#1E2327) + Laiton (#C9A84C)
   Chemin : /themes/astra-child/assets/css/cart.css
   ============================================================ */


/* ── Layout global ──────────────────────────────────────── */

.schubnel-cart {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1.5rem 4rem;
}

.schubnel-cart__layout {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 2.5rem;
	align-items: start;
}


/* ── Panier vide ────────────────────────────────────────── */

.schubnel-cart__empty {
	text-align: center;
	padding: 4rem 2rem;
}
.schubnel-cart__empty p {
	font-size: 1.1rem;
	color: #666;
	margin-bottom: 1.5rem;
}


/* ── En-tête du tableau ─────────────────────────────────── */

.cart-table__header {
	display: grid;
	grid-template-columns: 80px 1fr 110px 100px 110px 40px;
	gap: .5rem;
	padding: .75rem 1rem;
	background: #1E2327;
	color: #C9A84C;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	border-radius: 4px 4px 0 0;
}


/* ── Ligne article ──────────────────────────────────────── */

.cart-table__row {
	display: grid;
	grid-template-columns: 80px 1fr 110px 100px 110px 40px;
	gap: .5rem;
	padding: 1rem;
	border-bottom: 1px solid #eee;
	align-items: center;
	transition: background .15s, opacity .25s;
}
.cart-table__row:hover {
	background: #fafaf8;
}

/* États AJAX */
.cart-table__row.is-removing {
	opacity: .35;
	pointer-events: none;
}
.cart-table__row.is-updating {
	opacity: .65;
}


/* ── Image produit ──────────────────────────────────────── */

.cart-row__image img {
	width: 70px;
	height: 70px;
	object-fit: contain;
	border: 1px solid #e0ddd5;
	padding: 4px;
	border-radius: 2px;
}


/* ── Nom produit ────────────────────────────────────────── */

.cart-row__name a {
	color: #1E2327;
	font-weight: 600;
	text-decoration: none;
	font-size: .9rem;
	line-height: 1.35;
}
.cart-row__name a:hover {
	color: #C9A84C;
}
.cart-row__name .wc-item-meta,
.cart-row__name dl.variation {
	font-size: .78rem;
	color: #888;
	margin-top: .25rem;
}


/* ── Prix / Sous-total ──────────────────────────────────── */

.cart-row__price {
	font-size: .9rem;
	color: #555;
}
.cart-row__subtotal {
	font-weight: 700;
	color: #C9A84C;
	font-size: .95rem;
}


/* ── Quantité ───────────────────────────────────────────── */

.cart-row__qty .qty {
	width: 60px;
	padding: .4rem .5rem;
	border: 1px solid #ccc;
	border-radius: 3px;
	text-align: center;
	font-size: .9rem;
	color: #1E2327;
	transition: border-color .15s;
}
.cart-row__qty .qty:focus {
	border-color: #C9A84C;
	outline: none;
	box-shadow: 0 0 0 2px rgba(201,168,76,.15);
}
.cart-row__qty-single {
	font-size: .9rem;
	color: #555;
}


/* ── Bouton supprimer article ───────────────────────────── */

.cart-row__remove .remove-item {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	font-size: 1.1rem;
	line-height: 1;
	color: #bbb;
	text-decoration: none;
	border-radius: 50%;
	transition: background .15s, color .15s;
}
.cart-row__remove .remove-item:hover {
	background: #fde8e8;
	color: #c0392b;
}


/* ── Zone actions (coupon + update) ─────────────────────── */

.cart-table__actions {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.25rem 1rem;
	border-top: 2px solid #1E2327;
	flex-wrap: wrap;
}

.cart-coupon {
	display: flex;
	gap: .5rem;
	flex: 1;
	min-width: 260px;
}
.cart-coupon .input-text {
	flex: 1;
	padding: .55rem .75rem;
	border: 1px solid #ccc;
	border-radius: 3px;
	font-size: .88rem;
	color: #333;
	transition: border-color .15s;
}
.cart-coupon .input-text:focus {
	border-color: #C9A84C;
	outline: none;
}


/* ── Boutons ─────────────────────────────────────────────── */

.btn-schubnel {
	display: inline-block;
	padding: .6rem 1.4rem;
	font-size: .82rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 3px;
	cursor: pointer;
	border: 2px solid transparent;
	transition: all .18s;
	line-height: 1;
	white-space: nowrap;
}

/* Primaire : fond gunmetal */
.btn-schubnel,
.btn-schubnel:not([class*="--"]) {
	background: #1E2327;
	color: #fff;
	border-color: #1E2327;
}
.btn-schubnel:hover {
	background: #2c343a;
	border-color: #2c343a;
	color: #fff;
}

/* Secondaire : fond laiton */
.btn-schubnel--secondary {
	background: #C9A84C;
	color: #1E2327;
	border-color: #C9A84C;
}
.btn-schubnel--secondary:hover {
	background: #b8943c;
	border-color: #b8943c;
	color: #1E2327;
}

/* Outline */
.btn-schubnel--outline {
	background: transparent;
	color: #1E2327;
	border-color: #1E2327;
}
.btn-schubnel--outline:hover {
	background: #1E2327;
	color: #fff;
}
.btn-schubnel--outline:disabled {
	opacity: .35;
	cursor: not-allowed;
	pointer-events: none;
}

/* CTA commander (full-width) */
.btn-schubnel--checkout {
	display: block;
	width: 100%;
	text-align: center;
	padding: .95rem;
	background: #C9A84C;
	color: #1E2327;
	border-color: #C9A84C;
	font-size: .9rem;
	margin-top: 1.25rem;
}
.btn-schubnel--checkout:hover {
	background: #b8943c;
	border-color: #b8943c;
	color: #1E2327;
}


/* ── Résumé panier (aside) ──────────────────────────────── */

.schubnel-cart__aside {
	position: sticky;
	top: 100px;
}

.cart-summary {
	background: #f7f6f3;
	border: 1px solid #e0ddd5;
	border-top: 3px solid #1E2327;
	padding: 1.5rem;
	border-radius: 0 0 4px 4px;
}

.cart-summary__title {
	font-size: .85rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: #1E2327;
	margin: 0 0 1.25rem;
	padding-bottom: .75rem;
	border-bottom: 1px solid #ddd;
}

.cart-summary__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: .5rem;
	padding: .6rem 0;
	font-size: .88rem;
	border-bottom: 1px solid #eee;
	color: #444;
}

/* Coupon actif */
.cart-summary__row--coupon {
	color: #2e7d4a;
	font-size: .84rem;
}
.remove-coupon {
	color: #c0392b;
	text-decoration: none;
	margin-left: .35rem;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1;
	vertical-align: middle;
}
.remove-coupon:hover {
	color: #922b21;
}

/* Livraison */
.cart-summary__row--shipping {
	flex-direction: column;
	align-items: flex-start;
}

/* Total final */
.cart-summary__row--total {
	border-bottom: none;
	padding-top: .85rem;
	margin-top: .25rem;
}
.cart-summary__row--total > span:first-child {
	font-size: .9rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #1E2327;
}
.cart-total-value {
	color: #C9A84C;
	font-size: 1.25rem;
	font-weight: 800;
}
.cart-total-value .woocommerce-Price-amount {
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}


/* ── Notice réglementaire armurerie ─────────────────────── */

.cart-legal-notice {
	margin-top: 1.25rem;
	padding: .75rem 1rem .75rem .85rem;
	background: #fffcf0;
	border-left: 3px solid #C9A84C;
	border-radius: 0 3px 3px 0;
}
.cart-legal-notice p {
	font-size: .76rem;
	color: #777;
	line-height: 1.55;
	margin: 0;
}


/* ── Responsive ─────────────────────────────────────────── */

@media ( max-width: 960px ) {
	.schubnel-cart__layout {
		grid-template-columns: 1fr;
	}
	.schubnel-cart__aside {
		position: static;
	}
	.cart-summary {
		max-width: 480px;
	}
}

@media ( max-width: 640px ) {
	.schubnel-cart {
		padding: 1rem 1rem 3rem;
	}

	/* Masquer l'en-tête */
	.cart-table__header {
		display: none;
	}

	/* Réorganiser les colonnes en grille mobile */
	.cart-table__row {
		grid-template-columns: 70px 1fr 32px;
		grid-template-rows: auto auto auto;
		gap: .4rem .6rem;
		padding: .9rem .5rem;
		position: relative;
	}

	.cart-row__image {
		grid-row: 1 / 4;
	}
	.cart-row__name {
		grid-column: 2;
		grid-row: 1;
	}
	.cart-row__price {
		grid-column: 2;
		grid-row: 2;
		font-size: .82rem;
	}
	.cart-row__qty {
		grid-column: 2;
		grid-row: 3;
	}
	.cart-row__subtotal {
		display: none; /* visible uniquement desktop */
	}
	.cart-row__remove {
		grid-column: 3;
		grid-row: 1;
	}

	/* Data-label pour mobile */
	.cart-row__price::before  { content: attr(data-label) ' : '; color: #aaa; font-size: .75rem; }
	.cart-row__qty::before    { content: attr(data-label) ' : '; color: #aaa; font-size: .75rem; }

	.cart-table__actions {
		flex-direction: column;
		align-items: stretch;
	}
	.cart-coupon {
		min-width: unset;
	}
}
