/* Thooya Store: side cart drawer + quick add-to-cart bars. Uses the palette variables from thooya-store.css. */

/* ---------- Quick-add bar over product images ---------- */
.tsc-media { position: relative; display: block; overflow: hidden; }
.tsc-quick {
	position: absolute;
	left: 50%;
	bottom: 12px;
	z-index: 3;
	display: flex;
	align-items: stretch;
	gap: 0;
	height: 40px;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 6px 18px rgba(19, 48, 110, .22);
	overflow: hidden;
	opacity: 0;
	transform: translate(-50%, 10px);
	transition: opacity .2s ease, transform .2s ease;
	white-space: nowrap;
	line-height: 1;
	cursor: default;
}
.tsc-media:hover .tsc-quick,
.tsc-media:focus-within .tsc-quick { opacity: 1; transform: translate(-50%, 0); }

.tsc-quick .quantity.thooya-qty {
	height: 40px;
	padding: 0 2px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	margin: 0;
}
.tsc-quick .quantity.thooya-qty:focus-within { box-shadow: none; }
.tsc-quick .thooya-qty-btn { width: 30px; height: 30px; margin-top: 5px; font-size: 17px; background: transparent; }
.tsc-quick .quantity.thooya-qty .qty { width: 30px; height: 40px; font-size: 15px; }
.tsc-quick__add {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 0 16px;
	border: 0;
	border-radius: 0;
	background: var(--thooya-navy);
	color: #fff;
	font-family: var(--thooya-sans);
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s ease;
}
.tsc-quick__add:hover { background: var(--thooya-green); }

/* Size picker (products with sizes). */
body .tsc-quick .tsc-quick__size {
	width: auto;
	max-width: 132px;
	height: 100%;
	margin: 0;
	padding: 0 22px 0 14px;
	border: 0;
	border-right: 1px solid var(--thooya-line);
	border-radius: 0;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2313306e' d='M0 0h10L5 6z'/%3E%3C/svg%3E") no-repeat right 8px center;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
	color: var(--thooya-navy);
	font-family: var(--thooya-sans);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-overflow: ellipsis;
	cursor: pointer;
}
body .tsc-quick .tsc-quick__size:focus { outline: none; background-color: var(--thooya-sand); }
/* Size + stepper + label is wider than a card: the add button shows just the cart icon. */
.tsc-quick--sizes .tsc-quick__add { padding: 0 14px; }
.tsc-quick--sizes .tsc-quick__add span { display: none; }
.tsc-quick--sizes .tsc-quick__add svg { display: block !important; width: 17px; height: 17px; }
.tsc-quick__add.is-loading { opacity: .75; cursor: progress; }

/* Touch screens can't hover: keep the bar visible, slightly smaller. */
@media (hover: none) {
	.tsc-quick { opacity: 1; transform: translate(-50%, 0); bottom: 8px; height: 36px; }
	.tsc-quick .quantity.thooya-qty { height: 36px; }
	.tsc-quick .thooya-qty-btn { width: 26px; height: 26px; margin-top: 5px; font-size: 15px; }
	.tsc-quick .quantity.thooya-qty .qty { width: 24px; height: 36px; font-size: 14px; }
	.tsc-quick__add { padding: 0 12px; font-size: 12px; gap: 5px; }
	.tsc-quick__add svg { display: none; }
}

/* Narrow cards (two-column phone grids): compact bar with a cart icon instead of the label. */
@media (max-width: 600px) {
	.tsc-quick { bottom: 6px; height: 34px; }
	.tsc-quick .quantity.thooya-qty { height: 34px; padding: 0 1px; }
	.tsc-quick .thooya-qty-btn { width: 24px; height: 24px; margin-top: 5px; font-size: 15px; }
	.tsc-quick .quantity.thooya-qty .qty { width: 22px; height: 34px; font-size: 13px; }
	.tsc-quick__add { padding: 0 12px; }
	.tsc-quick__add span { display: none; }
	.tsc-quick__add svg { display: block !important; width: 17px; height: 17px; }
	/* With a size picker there's no room for the stepper: add one, change quantity in the cart. */
	.tsc-quick--sizes .tsc-quick__qty { display: none !important; }
	body .tsc-quick .tsc-quick__size { max-width: 124px; padding: 0 20px 0 10px; font-size: 12px; }
}

/* The bar replaces the separate add buttons under cards. */
.tsc-has-quick .tsc-original-add,
li.product.tsc-has-quick > a.add_to_cart_button,
li.product.tsc-has-quick .astra-shop-summary-wrap a.add_to_cart_button,
li.product.tsc-has-quick a.added_to_cart { display: none !important; }

/* ---------- Drawer ---------- */
.tsc-backdrop {
	position: fixed;
	inset: 0;
	z-index: 99998;
	background: rgba(22, 33, 63, .45);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
}
.tsc-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	width: min(420px, 100vw);
	background: #fff;
	box-shadow: -10px 0 30px rgba(19, 48, 110, .18);
	transform: translateX(100%);
	visibility: hidden;
	transition: transform .3s ease, visibility .3s ease;
	font-family: var(--thooya-sans);
	color: var(--thooya-ink);
}
html.tsc-open { overflow: hidden; }
html.tsc-open .tsc-backdrop { opacity: 1; visibility: visible; }
html.tsc-open .tsc-drawer { transform: none; visibility: visible; }

.tsc-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid var(--thooya-line);
	background: var(--thooya-cream);
}
.tsc-title {
	margin: 0;
	font-family: var(--thooya-serif);
	font-weight: 400;
	font-size: 22px;
	color: var(--thooya-navy);
}
.tsc-count { font-family: var(--thooya-sans); font-size: 15px; color: var(--thooya-muted); }
.tsc-close {
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--thooya-line);
	border-radius: 50%;
	background: #fff;
	color: var(--thooya-navy);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.tsc-close:hover { background: var(--thooya-navy); color: #fff; }

/* Astra colours focused/hovered buttons with its global blue; keep drawer and quick-add buttons on-brand. */
.tsc-drawer .tsc-close:focus { background: #fff; color: var(--thooya-navy); border-color: var(--thooya-navy); outline: none; box-shadow: 0 0 0 3px rgba(227, 165, 43, .45); }
.tsc-drawer .tsc-close:hover { background: var(--thooya-navy); color: #fff; }
.tsc-drawer .tsc-item__remove:focus { background: #f7e1dc; color: #9b2c1c; outline: none; }
.tsc-drawer .tsc-suggest__add:focus { background: #fff; color: var(--thooya-navy); outline: none; box-shadow: 0 0 0 3px rgba(227, 165, 43, .45); }
.tsc-drawer .tsc-suggest__add:hover { background: var(--thooya-navy); color: #fff; }
.tsc-quick .tsc-quick__add:focus { background: var(--thooya-navy); color: #fff; outline: none; }
.tsc-quick .tsc-quick__add:hover { background: var(--thooya-green); color: #fff; }
.thooya-qty-btn:focus:not(:focus-visible) { background: var(--thooya-sand); color: var(--thooya-navy); }
.tsc-quick .thooya-qty-btn:focus:not(:focus-visible) { background: transparent; }

.tsc-errors:empty { display: none; }
.tsc-errors { padding: 10px 20px; background: #f7e1dc; color: #9b2c1c; font-size: 14px; }
.tsc-errors p { margin: 0; }

.tsc-body { flex: 1 1 auto; overflow-y: auto; padding: 0 20px 20px; }
.tsc-drawer.is-busy .tsc-body,
.tsc-drawer.is-busy .tsc-foot { opacity: .55; pointer-events: none; transition: opacity .15s ease; }
.tsc-loading { height: 120px; }

.tsc-ship { margin: 16px 0 6px; padding: 12px 14px; background: var(--thooya-sand); border: 1px solid var(--thooya-line); border-radius: 12px; }
.tsc-ship__msg { margin: 0 0 8px; font-size: 13px; color: var(--thooya-brown); }
.tsc-ship__msg strong { color: var(--thooya-ink); }
.tsc-ship__bar { height: 6px; border-radius: 999px; background: #e9dcc2; overflow: hidden; }
.tsc-ship__bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--thooya-gold), var(--thooya-green)); transition: width .3s ease; }

.tsc-items { list-style: none; margin: 0; padding: 0; }
.tsc-item {
	display: grid;
	grid-template-columns: 72px 1fr auto;
	gap: 12px;
	align-items: start;
	padding: 16px 0;
	border-bottom: 1px solid #efe4d0;
	transition: opacity .2s ease;
}
.tsc-item.is-removing { opacity: .4; }
.tsc-item__img img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; display: block; }
.tsc-item__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tsc-item__name { color: var(--thooya-ink); font-weight: 600; font-size: 15px; line-height: 1.3; text-decoration: none; }
.tsc-item__name:hover { color: var(--thooya-navy); }
.tsc-item__price { font-size: 13px; color: var(--thooya-muted); }
.tsc-item__price del { opacity: 1; margin-right: 4px; }
.tsc-item__price ins { text-decoration: none; background: none; color: var(--thooya-ink); font-weight: 600; }
.tsc-item__row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.tsc-item__total { font-weight: 700; font-size: 15px; color: var(--thooya-navy); white-space: nowrap; }
.tsc-item__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--thooya-muted);
	cursor: pointer;
}
.tsc-item__remove:hover { background: #f7e1dc; color: #9b2c1c; }
.tsc-qty.quantity.thooya-qty { height: 38px; padding: 2px; }
.tsc-qty .thooya-qty-btn { width: 32px; height: 32px; font-size: 18px; }
.tsc-qty.quantity.thooya-qty .qty { width: 36px; height: 32px; font-size: 15px; }

.tsc-suggest { margin-top: 20px; padding: 14px; border: 1px solid var(--thooya-line); border-radius: 14px; background: #fffdf8; }
.tsc-suggest__title { margin: 0 0 10px; font-family: var(--thooya-serif); font-size: 17px; color: var(--thooya-navy); text-align: center; }
.tsc-suggest__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tsc-suggest__item { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; }
.tsc-suggest__img img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; display: block; }
.tsc-suggest__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tsc-suggest__name { color: var(--thooya-ink); font-size: 14px; font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsc-suggest__price { font-size: 13px; color: var(--thooya-navy); font-weight: 600; }
.tsc-suggest__price del { color: var(--thooya-muted); font-weight: 400; opacity: 1; }
.tsc-suggest__price ins { text-decoration: none; background: none; }
.tsc-suggest__add {
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1.5px solid var(--thooya-navy);
	border-radius: 50%;
	background: #fff;
	color: var(--thooya-navy);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.tsc-suggest__add:hover { background: var(--thooya-navy); color: #fff; }

.tsc-empty { padding: 40px 10px 10px; text-align: center; color: var(--thooya-brown); }
.tsc-empty p { margin: 0 0 16px; font-size: 16px; }

.tsc-foot { padding: 16px 20px 20px; border-top: 1px solid var(--thooya-line); background: #fff; display: grid; gap: 10px; }
.tsc-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; }
.tsc-total strong { font-size: 20px; color: var(--thooya-navy); }
.tsc-note { margin: 0; font-size: 12px; color: var(--thooya-muted); }
.tsc-btn {
	display: block;
	padding: 13px 18px;
	border-radius: 999px;
	text-align: center;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.tsc-btn--outline { border: 1.5px solid var(--thooya-navy); color: var(--thooya-navy); background: #fff; }
.tsc-btn--outline:hover { background: var(--thooya-sand); color: var(--thooya-navy); }
.tsc-btn--navy { background: var(--thooya-navy); color: #fff; }
.tsc-btn--navy:hover { background: var(--thooya-green); color: #fff; }
.tsc-continue {
	display: block;
	padding: 4px 0 0;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: var(--thooya-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.tsc-continue:hover, .tsc-continue:focus { color: var(--thooya-green); }
.tsc-btn--gold { display: inline-block; background: var(--thooya-gold); color: var(--thooya-ink); }
.tsc-btn--gold:hover { background: var(--thooya-gold-hover); color: var(--thooya-ink); }
