/**
 * Feel Good Side Cart — style proche Side Cart (Xootix)
 */

.fgsc-root {
	--fgsc-z-overlay: 99998;
	--fgsc-z-drawer: 99999;
	--fgsc-z-trigger: 99997;
	font-family: inherit;
}

/* Bouton flottant */
.fgsc-trigger {
	position: fixed;
	bottom: var(--fgsc-trigger-bottom, 24px);
	right: var(--fgsc-trigger-side, 24px);
	z-index: var(--fgsc-z-trigger);
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--fgsc-trigger-size, 56px);
	height: var(--fgsc-trigger-size, 56px);
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--fgsc-trigger-bg, #1e5c4f);
	color: var(--fgsc-trigger-icon, #fff);
	box-shadow: var(--fgsc-shadow-trigger, 0 4px 14px rgba(0, 0, 0, 0.2));
	cursor: pointer;
	transition: transform 0.2s ease, filter 0.2s ease;
}

.fgsc-root--left .fgsc-trigger {
	right: auto;
	left: var(--fgsc-trigger-side, 24px);
}

.fgsc-trigger:hover,
.fgsc-trigger:focus-visible {
	filter: brightness(1.08);
	transform: scale(1.04);
	outline: none;
}

.fgsc-trigger__icon {
	display: flex;
	line-height: 0;
}

.fgsc-trigger__count {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: var(--fgsc-badge-bg, #8ec9ad);
	color: var(--fgsc-badge-text, #fff);
	font-size: 11px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
}

.fgsc-root--left .fgsc-trigger__count {
	right: auto;
	left: -4px;
}

.fgsc-trigger__count[data-count="0"] {
	display: none;
}

/* Overlay */
.fgsc-overlay {
	position: fixed;
	inset: 0;
	z-index: var(--fgsc-z-overlay);
	background: var(--fgsc-overlay-bg, rgba(0, 0, 0, 0.45));
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
}

.fgsc-root.fgsc-root--open .fgsc-overlay {
	opacity: 1;
	pointer-events: auto;
}

.fgsc-overlay[hidden] {
	display: block !important;
	visibility: hidden;
}

.fgsc-root.fgsc-root--open .fgsc-overlay[hidden] {
	visibility: visible;
}

/* Drawer */
.fgsc-drawer {
	position: fixed;
	top: 0;
	right: 0;
	z-index: var(--fgsc-z-drawer);
	display: flex;
	flex-direction: column;
	width: min(100vw, var(--fgsc-panel-width, 420px));
	max-width: 100%;
	height: 100%;
	background: var(--fgsc-panel-bg, #fff);
	box-shadow: var(--fgsc-shadow-drawer, -4px 0 24px rgba(0, 0, 0, 0.12));
	transform: translateX(100%);
	transition: transform 0.3s ease;
}

.fgsc-root--left .fgsc-drawer {
	right: auto;
	left: 0;
	box-shadow: var(--fgsc-shadow-drawer, 4px 0 24px rgba(0, 0, 0, 0.12));
	transform: translateX(-100%);
}

.fgsc-root.fgsc-root--open .fgsc-drawer {
	transform: translateX(0);
}

.fgsc-drawer[hidden] {
	display: flex !important;
	visibility: hidden;
}

.fgsc-root.fgsc-root--open .fgsc-drawer[hidden] {
	visibility: visible;
}

.fgsc-drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
	padding: 14px 18px;
	border-bottom: 1px solid var(--fgsc-header-border, #e8e8e8);
	background: var(--fgsc-header-bg, #fff);
	color: var(--fgsc-header-text, #222);
}

.fgsc-drawer__header-main {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.fgsc-drawer__header-icon {
	display: flex;
	color: inherit;
	line-height: 0;
}

.fgsc-header__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 11px;
	background: var(--fgsc-badge-bg, #8ec9ad);
	color: var(--fgsc-badge-text, #fff);
	font-size: 12px;
	font-weight: 700;
}

.fgsc-header__count:empty {
	display: none;
}

.fgsc-drawer__title {
	margin: 0;
	font-size: var(--fgsc-header-font-size, 1.05rem);
	font-weight: 600;
	line-height: 1.3;
}

.fgsc-drawer__header {
	padding: var(--fgsc-header-padding, 14px 18px);
}

.fgsc-drawer__close {
	font-size: var(--fgsc-close-size, 28px);
}

.fgsc-drawer__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 4px;
	background: transparent;
	color: inherit;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.75;
}

.fgsc-drawer__close:hover {
	opacity: 1;
}

.fgsc-drawer__body {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	background: var(--fgsc-panel-bg, #fff);
}

body.fgsc-body-lock {
	overflow: hidden;
}

/* Panneau */
.fgsc-panel {
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

.fgsc-panel--empty {
	padding: 28px 20px 32px;
	text-align: center;
}

.fgsc-empty {
	margin: 0 0 16px;
	color: #555;
	font-size: 0.95rem;
}

.fgsc-items {
	margin: 0;
	padding: 0;
	list-style: none;
}

.fgsc-item {
	display: flex;
	gap: 12px;
	padding: var(--fgsc-item-padding, 14px 18px);
	margin: var(--fgsc-item-margin, 0);
	border: var(--fgsc-item-border-css, none);
	border-radius: var(--fgsc-item-radius, 0);
	box-shadow: var(--fgsc-item-shadow, none);
	border-bottom: 1px solid var(--fgsc-item-border, #eee);
}

.fgsc-root--layout-cards .fgsc-item {
	flex-direction: column;
}

.fgsc-root--layout-cards .fgsc-item__thumb {
	width: 100%;
}

.fgsc-root--layout-cards .fgsc-item__thumb img {
	width: 100%;
	max-width: 100%;
}

.fgsc-item__thumb {
	flex-shrink: 0;
	width: var(--fgsc-thumb-width, 28%);
	max-width: 90px;
}

.fgsc-item__thumb img {
	display: block;
	width: 100%;
	max-width: 90px;
	height: auto;
	border-radius: 2px;
}

.fgsc-item__body {
	flex: 1;
	min-width: 0;
}

.fgsc-item__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.fgsc-item__name {
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--fgsc-item-name, #222);
	text-decoration: none;
}

a.fgsc-item__name:hover {
	color: var(--fgsc-primary-hover, #7ab89c);
}

.fgsc-item__remove {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--fgsc-remove-icon, #888);
	cursor: pointer;
}

.fgsc-item__remove:hover {
	color: var(--fgsc-remove-hover, #c0392b);
}

.fgsc-item__meta {
	margin-top: 4px;
	font-size: 0.78rem;
	color: var(--fgsc-item-meta, #666);
	line-height: 1.45;
}

.fgsc-item__meta dl {
	margin: 0;
}

.fgsc-item__meta dt {
	display: inline;
	font-weight: 600;
}

.fgsc-item__meta dd {
	display: inline;
	margin: 0 0 0 4px;
}

.fgsc-item__qty-line {
	margin: 8px 0 0;
	font-size: 0.82rem;
	color: var(--fgsc-item-qty, #444);
}

.fgsc-panel.fgsc-panel--loading {
	opacity: 0.55;
	pointer-events: none;
}

/* Pied de panneau */
.fgsc-root--footer-stick .fgsc-panel {
	min-height: 100%;
}

.fgsc-footer {
	margin-top: auto;
	padding: var(--fgsc-footer-padding, 14px 18px);
	font-size: var(--fgsc-footer-font-size, 16px);
	color: var(--fgsc-footer-text, #222);
	border-top: 1px solid var(--fgsc-item-border, #eee);
	background: var(--fgsc-footer-bg, #fff);
	box-shadow: var(--fgsc-footer-shadow, none);
}

.fgsc-actions--inline {
	flex-direction: row;
	flex-wrap: wrap;
}

.fgsc-actions--inline .fgsc-btn {
	width: auto;
	flex: 1 1 auto;
}

.fgsc-subtotal {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 14px;
	font-size: 0.95rem;
}

.fgsc-subtotal__label {
	font-weight: 700;
	color: var(--fgsc-subtotal-text, #222);
}

.fgsc-subtotal__amount {
	font-weight: 700;
	color: var(--fgsc-subtotal-text, #222);
}

.fgsc-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.fgsc-btn {
	display: block;
	width: 100%;
	padding: var(--fgsc-btn-padding, 11px 14px);
	border-radius: var(--fgsc-btn-radius, 2px);
	font-size: 0.9rem;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	box-sizing: border-box;
}

.fgsc-btn--cart {
	background: var(--fgsc-cart-btn-bg, #fff);
	color: var(--fgsc-cart-btn-text, #222);
	border: var(--fgsc-btn-border, 1px solid var(--fgsc-cart-btn-border, #222));
}

.fgsc-btn--cart:hover {
	background: var(--fgsc-btn-hover-bg, #f8f8f8);
	color: var(--fgsc-btn-hover-text, var(--fgsc-cart-btn-text, #222));
	border-color: var(--fgsc-btn-hover-border, var(--fgsc-cart-btn-border, #222));
}

.fgsc-btn--continue {
	background: var(--fgsc-continue-bg, #8ec9ad);
	color: var(--fgsc-continue-text, #fff);
	border: var(--fgsc-btn-border, 1px solid var(--fgsc-continue-border, #8ec9ad));
}

.fgsc-btn--continue:hover {
	background: var(--fgsc-btn-hover-bg, #7ab89c);
	color: var(--fgsc-btn-hover-text, #fff);
	border-color: var(--fgsc-btn-hover-border, #7ab89c);
}

.fgsc-btn--checkout {
	background: var(--fgsc-checkout-bg, #8ec9ad);
	color: var(--fgsc-checkout-text, #fff);
	border: var(--fgsc-btn-border, 1px solid var(--fgsc-checkout-border, #8ec9ad));
}

.fgsc-btn--checkout:hover {
	background: var(--fgsc-btn-hover-bg, #7ab89c);
	color: var(--fgsc-btn-hover-text, #fff);
	border-color: var(--fgsc-btn-hover-border, #7ab89c);
}

.fgsc-item__remove svg {
	width: var(--fgsc-remove-size, 16px);
	height: var(--fgsc-remove-size, 16px);
}
