/* Side Cart Drawer */
.scd {
	--scd-gold: #B3833C;
	--scd-gold-dark: #8c6226;
	--scd-green: #133838;
	--scd-text: #3a4745;
	--scd-muted: #7a8582;
	--scd-line: #eadfca;
	--scd-soft: #faf6ee;
	--scd-w: 440px;
	--scd-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	position: fixed;
	inset: 0;
	z-index: 999999;
	visibility: hidden;
	pointer-events: none;
	font-family: var(--scd-font);
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--scd-text);
	transition: visibility 0s linear .3s;
}
.scd *, .scd *::before, .scd *::after { box-sizing: border-box; }
.scd.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }

.scd-overlay {
	position: absolute;
	inset: 0;
	background: rgba(19, 56, 56, .45);
	opacity: 0;
	transition: opacity .3s ease;
}
.scd.is-open .scd-overlay { opacity: 1; }

.scd-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(var(--scd-w), 100vw);
	background: #fff;
	transform: translateX(100%);
	transition: transform .35s cubic-bezier(.2, .8, .2, 1);
	outline: none;
}
.scd.is-open .scd-panel { transform: none; }

/* ---------- Header ---------- */
.scd-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 22px;
	border-bottom: 1px solid var(--scd-line);
}
.scd .scd-title {
	margin: 0;
	font-family: var(--scd-font);
	font-size: 13.5px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--scd-green);
}
.scd-head-count { font-weight: 500; color: var(--scd-muted); }
.scd .scd-close {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: var(--scd-green) !important;
	cursor: pointer;
	box-shadow: none !important;
}
.scd .scd-close:hover { background: var(--scd-soft) !important; }

/* ---------- Body ---------- */
.scd-body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 18px 22px 22px;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.scd-panel.is-loading .scd-body,
.scd-panel.is-loading .scd-foot { opacity: .55; pointer-events: none; transition: opacity .15s; }

.scd-items { margin: 0 0 18px; padding: 0; list-style: none; }
.scd .scd-item {
	display: flex;
	gap: 14px;
	margin: 0 0 12px;
	padding: 12px;
	border-radius: 16px;
	background: var(--scd-soft);
}
.scd-thumb {
	flex: 0 0 84px;
	width: 84px;
	height: 84px;
	overflow: hidden;
	border-radius: 12px;
	background: #fff;
}
.scd-thumb img { display: block; width: 100% !important; height: 100% !important; margin: 0 !important; object-fit: cover; }
.scd-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.scd-line { display: flex; justify-content: space-between; gap: 12px; }
.scd-name { font-weight: 600; font-size: 14.5px; color: var(--scd-green); line-height: 1.4; }
.scd-name a { color: inherit; text-decoration: none; }
.scd-name a:hover { color: var(--scd-gold-dark); }
.scd-meta { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--scd-muted); }
.scd-price { flex: 0 0 auto; font-weight: 600; color: var(--scd-green); white-space: nowrap; }
.scd-price del, .scd-up-price del { opacity: .55; }
.scd-price ins, .scd-up-price ins { text-decoration: none; }

.scd-controls { display: flex; align-items: center; gap: 10px; }
.scd .scd-icon-btn {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0 !important;
	border-radius: 10px !important;
	background: #ece5d6 !important;
	color: var(--scd-muted) !important;
	cursor: pointer;
	box-shadow: none !important;
}
.scd .scd-icon-btn svg { width: 17px; height: 17px; }
.scd .scd-icon-btn:hover { color: #9a3b3b !important; }
.scd .scd-icon-btn--plain { background: transparent !important; width: 28px; height: 28px; }

.scd-qty {
	display: inline-flex;
	align-items: center;
	height: 34px;
	border: 1px solid var(--scd-line);
	border-radius: 10px;
	background: #fff;
}
.scd .scd-qty button {
	display: grid;
	place-items: center;
	width: 32px;
	height: 100%;
	padding: 0;
	border: 0 !important;
	background: transparent !important;
	color: var(--scd-gold-dark) !important;
	cursor: pointer;
	box-shadow: none !important;
}
.scd .scd-qty button svg { width: 16px; height: 16px; }
.scd .scd-qty button:disabled { color: #c9c3b4 !important; cursor: default; }
.scd-qty-n { min-width: 22px; text-align: center; font-weight: 600; color: var(--scd-green); }

/* ---------- Boxes (suggestions, coupon, note) ---------- */
.scd .scd-box {
	margin: 0 0 14px;
	border: 1px solid var(--scd-line);
	border-radius: 16px;
	background: #fff;
}
.scd-ups { padding: 14px 14px 16px; }
.scd .scd-ups-title {
	margin: 0 0 14px;
	border-bottom: 1px solid var(--scd-line);
	font-family: var(--scd-font);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.2;
}
.scd-ups-title span {
	display: inline-block;
	padding-bottom: 9px;
	border-bottom: 2px solid var(--scd-gold);
	color: var(--scd-gold-dark);
}
.scd-ups-wrap { position: relative; }
.scd-ups-track {
	align-items: flex-start;
	display: flex;
	gap: 12px;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	list-style: none;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.scd-ups-track::-webkit-scrollbar { display: none; }
.scd .scd-up {
	flex: 0 0 82%;
	display: grid;
	grid-template-columns: 68px minmax(0, 1fr);
	grid-template-rows: auto auto auto;
	column-gap: 12px;
	margin: 0;
	scroll-snap-align: start;
}
.scd-up-img {
	grid-row: 1 / span 2;
	display: block;
	width: 68px;
	height: 68px;
	overflow: hidden;
	border-radius: 12px;
	background: var(--scd-soft);
}
.scd-up-img img { display: block; width: 100% !important; height: 100% !important; margin: 0 !important; object-fit: cover; }
.scd-up-name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	margin: 0;
	overflow: hidden;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.35;
}
.scd-up-name a { color: var(--scd-green); text-decoration: none; }
.scd-up-price { align-self: start; margin-top: 2px; font-size: 13.5px; font-weight: 500; color: var(--scd-gold-dark); }
.scd .scd-add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	grid-column: 1 / -1;
	width: 100%;
	margin-top: 10px;
	padding: 8px 10px;
	border: 1px solid var(--scd-gold) !important;
	border-radius: 999px !important;
	background: transparent !important;
	color: var(--scd-gold-dark) !important;
	font-family: var(--scd-font) !important;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .04em;
	text-decoration: none !important;
	cursor: pointer;
	box-shadow: none !important;
	transition: background .2s, color .2s;
}
.scd .scd-add svg { width: 15px; height: 15px; }
.scd .scd-add:hover { background: var(--scd-gold) !important; color: #fff !important; }
.scd .scd-ups-next {
	position: absolute;
	top: 28%;
	right: -8px;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid var(--scd-line) !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: var(--scd-gold-dark) !important;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12) !important;
}
.scd .scd-ups-next svg { width: 16px; height: 16px; }

.scd-row-btn {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 16px;
	border: 0 !important;
	background: transparent !important;
	color: var(--scd-green) !important;
	font-family: var(--scd-font) !important;
	font-size: 15px;
	font-weight: 500;
	text-align: left;
	cursor: pointer;
	box-shadow: none !important;
}
.scd-row-btn span { flex: 1 1 auto; }
.scd-row-btn svg { color: var(--scd-gold-dark); }
.scd-plus { position: relative; width: 16px; height: 16px; }
.scd-plus::before, .scd-plus::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 2px;
	margin: -1px 0 0 -8px;
	border-radius: 2px;
	background: var(--scd-green);
	transition: transform .2s;
}
.scd-plus::after { transform: rotate(90deg); }
.scd-row.is-open .scd-plus::after { transform: rotate(0); }
.scd-row-panel { padding: 0 16px 16px; }
.scd-row-panel[hidden] { display: none; }

.scd-coupon-form { display: flex; gap: 8px; }
.scd .scd-input {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid #dccfb6;
	border-radius: 12px;
	background: #fff;
	color: var(--scd-text);
	font-family: var(--scd-font);
	font-size: 15px;
	box-shadow: none;
}
.scd .scd-input:focus { border-color: var(--scd-gold); box-shadow: 0 0 0 3px rgba(179, 131, 60, .16); outline: none; }
.scd .scd-note { resize: vertical; min-height: 84px; }
.scd-msg { margin: 8px 2px 0; font-size: 13px; color: #a23b3b; }
.scd-msg[hidden] { display: none; }

.scd-alert { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: #fbeeee; color: #a23b3b; font-size: 13.5px; }
.scd-applied { margin: -2px 0 14px; padding: 0; list-style: none; }
.scd .scd-applied li {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 6px;
	padding: 8px 8px 8px 12px;
	border: 1px dashed var(--scd-gold);
	border-radius: 12px;
	background: var(--scd-soft);
	font-size: 13.5px;
}
.scd-applied svg { width: 16px; height: 16px; color: var(--scd-gold-dark); }
.scd-code { font-weight: 600; letter-spacing: .04em; color: var(--scd-green); }
.scd-save { margin-left: auto; font-weight: 600; color: #2f7a52; }

/* ---------- Buttons ---------- */
.scd .scd-btn {
	display: inline-block;
	padding: 11px 24px;
	border: 1px solid var(--scd-gold) !important;
	border-radius: 999px !important;
	background: var(--scd-gold) !important;
	color: #fff !important;
	font-family: var(--scd-font) !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none !important;
	cursor: pointer;
	box-shadow: none !important;
	transition: background .2s, border-color .2s, color .2s;
}
.scd .scd-btn:hover { background: var(--scd-gold-dark) !important; border-color: var(--scd-gold-dark) !important; }
.scd .scd-btn--sm { padding: 10px 20px; flex: 0 0 auto; }
.scd .scd-btn--ghost { background: transparent !important; color: var(--scd-gold-dark) !important; }
.scd .scd-btn--ghost:hover { background: var(--scd-gold) !important; color: #fff !important; }
.scd .scd-btn--block { display: block; width: 100%; padding: 14px 24px; font-size: 16px; }
.scd-viewcart { display: block; margin-top: 10px; text-align: center; font-size: 13.5px; color: var(--scd-muted); text-decoration: underline; text-underline-offset: 3px; }
.scd-viewcart:hover { color: var(--scd-gold-dark); }

/* ---------- Footer ---------- */
.scd-foot { flex: 0 0 auto; padding: 0 22px 20px; border-top: 1px solid var(--scd-line); background: #fff; }
.scd-foot:empty { display: none; }
.scd .scd-total {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 16px 0;
	border: 0 !important;
	background: transparent !important;
	color: var(--scd-green) !important;
	font-family: var(--scd-font) !important;
	text-align: left;
	cursor: pointer;
	box-shadow: none !important;
}
.scd-total svg { color: var(--scd-muted); }
.scd-total-label { flex: 1 1 auto; font-size: 15px; font-weight: 500; }
.scd-total-amt { font-size: 20px; font-weight: 600; }
.scd-total-chev { display: grid; transition: transform .2s; }
.scd-total.is-open .scd-total-chev { transform: rotate(180deg); }
.scd-breakdown { padding: 14px 0 0; }
.scd-breakdown[hidden] { display: none; }
.scd-bd-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14px; }
.scd-bd-row--save { color: #2f7a52; }
.scd-bd-note { margin: 6px 0 0; font-size: 12.5px; color: var(--scd-muted); }

.scd-empty { display: grid; justify-items: center; gap: 6px; padding: 56px 12px; text-align: center; color: var(--scd-muted); }
.scd-empty svg { width: 40px; height: 40px; color: var(--scd-gold); }
.scd-empty p { margin: 6px 0 14px; }

/* ---------- Trigger buttons ---------- */
.scd-trigger, .scd-float {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #133838;
	cursor: pointer;
}
.scd-count {
	position: absolute;
	top: -2px;
	right: -2px;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border-radius: 999px;
	background: #B3833C;
	color: #fff;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 11px;
	font-weight: 600;
	line-height: 19px;
	text-align: center;
}
.scd-count.is-zero { display: none; }
.scd-float {
	position: fixed;
	bottom: 22px;
	z-index: 99998;
	width: 54px;
	height: 54px;
	background: var(--scd-gold, #B3833C);
	color: #fff;
	box-shadow: 0 6px 18px rgba(19, 56, 56, .22);
}
.scd-float--right { right: 22px; }
.scd-float--left { left: 22px; }
.scd-float .scd-count { background: #133838; }

body.scd-lock { overflow: hidden; }

@media (max-width: 480px) {
	.scd-head { padding: 14px 16px; }
	.scd-body { padding: 14px 16px 18px; }
	.scd-foot { padding: 0 16px 16px; }
	.scd-thumb { flex-basis: 72px; width: 72px; height: 72px; }
	.scd .scd-up { flex-basis: 88%; }
}
@media (prefers-reduced-motion: reduce) {
	.scd, .scd-overlay, .scd-panel, .scd-plus::before, .scd-plus::after { transition: none; }
}
