/* Grain Suggest — بطاقات الاقتراح داخل درج السلة */

.gs-block {
	--gs-grape: #8B1A6B;
	--gs-cream: #F5EDD8;
	--gs-dark: #1A0F0A;
	margin: 0 0 14px;
	padding: 0 0 12px;
	border-bottom: 1px solid rgba(26, 15, 10, .08);
	direction: rtl;
	text-align: right;
}

.gs-block:empty {
	display: none;
	margin: 0;
	padding: 0;
	border: 0;
}

.gs-title {
	font-size: .78rem;
	font-weight: 700;
	color: var(--gs-grape);
	margin: 0 0 8px;
	letter-spacing: .2px;
}

.gs-items {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.gs-card {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	background: rgba(245, 237, 216, .5);
	border: 1px solid rgba(139, 26, 107, .12);
	border-radius: 10px;
	padding: 8px;
}

.gs-thumb {
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--gs-grape);
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

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

.gs-noimg {
	color: var(--gs-cream);
	font-size: .5rem;
	font-weight: 900;
	font-style: italic;
}

.gs-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.gs-name {
	font-size: .8rem;
	font-weight: 600;
	color: var(--gs-dark);
	text-decoration: none;
	line-height: 1.4;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.gs-name:hover {
	color: var(--gs-grape);
}

.gs-price {
	font-size: .75rem;
	color: var(--gs-grape);
	font-weight: 700;
}

.gs-add,
.gs-size {
	align-self: flex-start;
	background: var(--gs-grape);
	color: var(--gs-cream);
	border: 0;
	border-radius: 7px;
	padding: 5px 14px;
	font-size: .72rem;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
	transition: opacity .15s ease, transform .15s ease;
}

.gs-add:hover:not(:disabled),
.gs-size:hover:not(:disabled) {
	opacity: .88;
}

.gs-add:active:not(:disabled),
.gs-size:active:not(:disabled) {
	transform: scale(.97);
}

.gs-sizes {
	display: flex;
	gap: 5px;
	flex-wrap: wrap;
}

.gs-size {
	background: transparent;
	color: var(--gs-grape);
	border: 1px solid var(--gs-grape);
	padding: 4px 10px;
}

.gs-size:hover:not(:disabled) {
	background: var(--gs-grape);
	color: var(--gs-cream);
}

.gs-busy {
	opacity: .6;
	cursor: wait;
}

.gs-done {
	background: #2E7D45 !important;
	border-color: #2E7D45 !important;
	color: #fff !important;
	cursor: default;
}

.gs-msg {
	font-size: .72rem;
	color: #b32d2e;
	margin-top: 6px;
	min-height: 1em;
}

/* صفحة /cart/ الكلاسيكية — أوسع، فنعرضها شبكة */
.gs-block-page {
	margin: 24px 0;
	padding: 16px;
	border: 1px solid rgba(139, 26, 107, .15);
	border-radius: 12px;
}

.gs-block-page .gs-title {
	font-size: 1rem;
	margin-bottom: 12px;
}

.gs-block-page .gs-items {
	flex-direction: row;
	flex-wrap: wrap;
}

.gs-block-page .gs-card {
	flex: 1 1 260px;
	max-width: 340px;
}

@media (max-width: 480px) {
	.gs-block-page .gs-card {
		flex: 1 1 100%;
		max-width: none;
	}
}

.gs-choose {
	text-decoration: none;
	display: inline-block;
	text-align: center;
}

/* v1.3 performance feedback: instant response without blocking cart repaint */
.gs-card{transition:opacity .14s ease,transform .14s ease}
.gs-card.gs-removing{opacity:.25;transform:scale(.985);pointer-events:none}
.gs-busy{min-width:58px;opacity:.72;cursor:wait!important}
.gs-done{white-space:nowrap}

/* v1.4 — drawer-safe layout: suggestions scroll with cart items, never grow the fixed footer */
.gs-block-drawer {
	margin: 10px 0 2px;
	padding: 12px 0 2px;
	border-top: 1px dashed rgba(139, 26, 107, .22);
	border-bottom: 0;
}

.gs-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
}

.gs-head .gs-title {
	margin: 0;
	font-size: .82rem;
}

.gs-refresh {
	border: 1px solid rgba(139, 26, 107, .22);
	background: rgba(139, 26, 107, .06);
	color: var(--gs-grape);
	border-radius: 999px;
	padding: 4px 9px;
	font: inherit;
	font-size: .68rem;
	font-weight: 800;
	line-height: 1.2;
	cursor: pointer;
	white-space: nowrap;
}

.gs-refresh:hover:not(:disabled) { background: rgba(139, 26, 107, .11); }
.gs-refresh:disabled { opacity: .55; cursor: wait; }

.gs-block-drawer .gs-items {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 7px;
}

.gs-block-drawer .gs-card {
	min-width: 0;
	gap: 7px;
	padding: 7px;
	border-radius: 10px;
	align-items: flex-start;
}

.gs-block-drawer .gs-thumb {
	flex-basis: 42px;
	width: 42px;
	height: 42px;
	border-radius: 8px;
}

.gs-block-drawer .gs-info { gap: 3px; }
.gs-block-drawer .gs-name {
	font-size: .69rem;
	line-height: 1.3;
	-webkit-line-clamp: 2;
}
.gs-block-drawer .gs-price { font-size: .67rem; }
.gs-block-drawer .gs-add,
.gs-block-drawer .gs-size {
	font-size: .66rem;
	padding: 4px 9px;
	border-radius: 7px;
}
.gs-block-drawer .gs-sizes { gap: 3px; }

.gs-rotate-note {
	min-height: 0;
	font-size: .65rem;
	font-weight: 700;
	color: #8b6b7d;
	margin-top: 5px;
}
.gs-rotate-note:empty { display: none; }

@media (max-width: 350px) {
	.gs-block-drawer .gs-items { grid-template-columns: 1fr; }
}
