/* TYC Cart & Checkout – basket drawer + basket page tidy-up */
.tycd {
	--tyc-yellow: #FFB600;
	--tyc-yellow-dark: #B8871C;
	--tyc-black: #000;
	--tyc-text: #1a1a1a;
	--tyc-muted: #6b6b6b;
	--tyc-grey: #F4F4F4;
	--tyc-border: #E5E5E5;
	--tyc-red: #E80000;
	--tyc-green: #1f9d55;
	position: fixed;
	inset: 0;
	z-index: 1000000;
	visibility: hidden;
	pointer-events: none;
	font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--tyc-text);
	font-size: 15px;
	line-height: 1.45;
}
.tycd.is-open { visibility: visible; pointer-events: auto; }
.tycd *, .tycd *::before, .tycd *::after { box-sizing: border-box; }

.tycd__overlay {
	position: absolute; inset: 0;
	background: rgba(0, 0, 0, .45);
	opacity: 0; transition: opacity .25s ease;
}
.tycd.is-open .tycd__overlay { opacity: 1; }

.tycd__panel {
	position: absolute; top: 0; right: 0; bottom: 0;
	width: min(440px, 100vw);
	background: #fff;
	display: flex; flex-direction: column;
	transform: translateX(100%);
	transition: transform .3s cubic-bezier(.2, .8, .2, 1);
	box-shadow: -8px 0 30px rgba(0, 0, 0, .12);
	outline: none;
}
.tycd.is-open .tycd__panel { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
	.tycd__panel, .tycd__overlay { transition: none; }
}
html.tycd-lock, html.tycd-lock body { overflow: hidden; }

/* Head */
.tycd__head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid var(--tyc-border);
}
.tycd .tycd__title {
	margin: 0; padding: 0;
	font-family: Montserrat, Arial, sans-serif;
	font-size: 20px; font-weight: 800; letter-spacing: 0;
	text-transform: none !important; color: var(--tyc-black);
	line-height: 1.2;
}
.tycd__close {
	appearance: none; border: 0; background: transparent; cursor: pointer;
	width: 40px; height: 40px; margin: -8px -10px -8px 0;
	display: grid; place-items: center; border-radius: 50%;
	color: var(--tyc-black);
}
.tycd__close:hover { background: var(--tyc-grey); }

/* Free delivery */
.tycd__ship {
	padding: 14px 20px 16px;
	background: var(--tyc-grey);
	border-bottom: 1px solid var(--tyc-border);
}
.tycd__ship p {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	margin: 0 0 10px; padding: 0; font-size: 14px; text-align: center;
}
.tycd__ship svg { flex: none; }
.tycd__bar { height: 8px; background: #e2e2e2; border-radius: 99px; overflow: hidden; }
.tycd__bar span {
	display: block; height: 100%;
	background: var(--tyc-yellow); border-radius: inherit;
	transition: width .4s ease;
}
.tycd__bar.is-done span { background: var(--tyc-green); }

/* Messages */
.tycd__msg {
	display: flex; align-items: center; gap: 8px;
	margin: 12px 20px 0; padding: 10px 12px;
	border-radius: 8px; font-size: 14px;
}
.tycd__msg[hidden] { display: none; }
.tycd__msg--success { background: #e9f7ef; color: #146c3a; }
.tycd__msg--error { background: #fdecec; color: var(--tyc-red); }

/* Body */
.tycd__body { flex: 1 1 auto; overflow-y: auto; padding: 4px 20px; -webkit-overflow-scrolling: touch; transition: opacity .2s; }
.tycd__body.is-busy { opacity: .5; pointer-events: none; }
.tycd__items { list-style: none; margin: 0; padding: 0; }
.tycd__item {
	display: grid; grid-template-columns: 80px 1fr; gap: 14px;
	padding: 16px 0; border-bottom: 1px solid var(--tyc-border);
	transition: opacity .2s;
}
.tycd__item:last-child { border-bottom: 0; }
.tycd__item.is-busy { opacity: .45; pointer-events: none; }
.tycd__thumb {
	display: block; width: 80px; height: 100px;
	border-radius: 8px; overflow: hidden;
	background: var(--tyc-grey); border: 1px solid var(--tyc-border);
}
.tycd__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tycd__info { min-width: 0; display: flex; flex-direction: column; }
.tycd__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tycd__row--actions { align-items: center; margin-top: auto; padding-top: 10px; }
.tycd a.tycd__name {
	color: var(--tyc-black); font-weight: 700; font-size: 15px;
	text-decoration: none; line-height: 1.3;
}
.tycd a.tycd__name:hover { text-decoration: underline; }
.tycd__price { text-align: right; font-weight: 600; white-space: nowrap; font-size: 15px; }
.tycd__price s { display: block; color: var(--tyc-muted); font-weight: 400; font-size: 13px; }
.tycd .tycd__meta { margin: 4px 0 0; padding: 0; color: var(--tyc-muted); font-size: 13px; line-height: 1.45; }

.tycd__qty {
	display: inline-flex; align-items: center;
	border: 1px solid var(--tyc-border); border-radius: 8px; height: 36px;
}
.tycd__qty button {
	appearance: none; border: 0; background: transparent; cursor: pointer;
	width: 36px; height: 100%; font-size: 18px; line-height: 1; color: var(--tyc-black);
	border-radius: 8px;
}
.tycd__qty button:hover:not([disabled]) { background: var(--tyc-grey); }
.tycd__qty button[disabled] { color: #c4c4c4; cursor: default; }
.tycd__qty span { min-width: 28px; text-align: center; font-weight: 600; font-size: 14px; }
.tycd__qty-fixed { font-size: 14px; color: var(--tyc-muted); }
.tycd__remove {
	appearance: none; border: 0; background: transparent; cursor: pointer;
	width: 36px; height: 36px; display: grid; place-items: center;
	border-radius: 50%; color: var(--tyc-muted);
}
.tycd__remove:hover { color: var(--tyc-red); background: #fdecec; }

/* Empty */
.tycd__empty { text-align: center; padding: 56px 10px; color: var(--tyc-muted); }
.tycd__empty p { margin: 10px 0 20px; font-size: 16px; color: var(--tyc-text); }

/* Skeleton */
.tycd__skel { display: grid; grid-template-columns: 80px 1fr; gap: 14px; padding: 16px 0; }
.tycd__skel span { display: block; height: 100px; border-radius: 8px; background: linear-gradient(90deg, #f0f0f0, #f8f8f8, #f0f0f0); background-size: 200% 100%; animation: tycd-sh 1.2s infinite linear; }
.tycd__skel span + span { height: 44px; }
@keyframes tycd-sh { to { background-position: -200% 0; } }

/* Footer */
.tycd__foot {
	padding: 16px 20px 20px;
	border-top: 1px solid var(--tyc-border);
	background: #fff;
	box-shadow: 0 -6px 16px rgba(0, 0, 0, .04);
}
.tycd__foot[hidden] { display: none; }
.tycd__totals > div { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 15px; }
.tycd__totals strong { font-size: 17px; }
.tycd__muted { color: var(--tyc-muted); font-size: 14px !important; }

.tycd a.tycd__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 12px 24px;
	border-radius: 8px; text-decoration: none;
	font-family: Montserrat, Arial, sans-serif; font-weight: 700; font-size: 15px;
	letter-spacing: .04em; text-transform: uppercase;
	transition: background-color .15s, transform .05s;
}
.tycd a.tycd__btn--primary { background: var(--tyc-yellow); color: var(--tyc-black); }
.tycd a.tycd__btn--primary:hover { background: var(--tyc-yellow-dark); color: var(--tyc-black); }
.tycd a.tycd__btn:active { transform: translateY(1px); }
.tycd a.tycd__btn--big { width: 100%; min-height: 54px; margin-top: 12px; font-size: 16px; }
.tycd a.tycd__link {
	display: block; text-align: center; margin-top: 12px;
	color: var(--tyc-black); font-size: 14px; text-decoration: underline;
}
.tycd .tycd__note { margin: 12px 0 0; padding: 0; text-align: center; font-size: 12.5px; color: var(--tyc-muted); }

.tycd__foot { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
@media (max-width: 480px) {
	.tycd__head { padding: 14px 16px; }
	.tycd__ship { padding: 10px 16px 12px; }
	.tycd__ship p { margin-bottom: 8px; font-size: 13.5px; }
	.tycd__foot { padding: 12px 16px max(14px, env(safe-area-inset-bottom)); }
	.tycd__body { padding: 0 16px; }
	.tycd__msg { margin: 10px 16px 0; }
	.tycd__item { grid-template-columns: 72px 1fr; gap: 12px; padding: 14px 0; }
	.tycd__thumb { width: 72px; height: 90px; }
	.tycd__qty { height: 40px; }            /* bigger tap targets */
	.tycd__qty button { width: 40px; }
	.tycd__remove { width: 40px; height: 40px; }
	.tycd a.tycd__btn--big { margin-top: 8px; }
	.tycd a.tycd__link { margin-top: 8px; }
	.tycd .tycd__note { margin-top: 8px; font-size: 12px; }
}
@media (max-width: 480px) and (max-height: 760px) {
	.tycd .tycd__note, .tycd__muted { display: none !important; }
}

/* ------------------------------------------------------------------
 * Basket page (/basket/) – remove the yellow-grey, cleaner table
 * ---------------------------------------------------------------- */
.woocommerce-cart table.shop_table,
.woocommerce-cart .cart_totals table.shop_table {
	background: #fff !important;
	border: 1px solid #E5E5E5 !important;
	border-radius: 12px !important;
	border-collapse: separate !important;
	overflow: hidden;
}
.woocommerce-cart table.shop_table th {
	background: #F4F4F4 !important;
	font-family: Montserrat, Arial, sans-serif;
	font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #000;
}
.woocommerce-cart table.shop_table td { border-top: 1px solid #E5E5E5 !important; vertical-align: middle; }
.woocommerce-cart table.cart img { width: 72px !important; height: auto; border-radius: 8px; }
.woocommerce-cart table.cart td.product-remove a.remove {
	color: #6b6b6b !important; font-size: 20px; width: 32px; height: 32px; line-height: 30px; border-radius: 50%;
}
.woocommerce-cart table.cart td.product-remove a.remove:hover { background: #fdecec !important; color: #E80000 !important; }
.woocommerce-cart table.cart td.product-name a { color: #000; font-weight: 700; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
	background: #FFB600 !important; color: #000 !important;
	border-radius: 8px !important; padding: 16px 24px !important;
	font-family: Montserrat, Arial, sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover { background: #B8871C !important; }

/* Basket page on phones: product cards instead of the stacked label table */
@media (max-width: 768px) {
	.woocommerce-cart table.shop_table_responsive.cart { border-radius: 12px !important; }
	.woocommerce-cart table.shop_table_responsive.cart thead { display: none; }
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item {
		display: grid !important;
		grid-template-columns: 76px 1fr auto;
		grid-template-areas: "thumb name remove" "thumb qty total";
		column-gap: 12px; row-gap: 8px;
		padding: 14px !important; margin: 0 !important;
		border-bottom: 1px solid #E5E5E5 !important; background: #fff !important;
	}
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item:last-of-type { border-bottom: 0 !important; }
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td {
		display: block !important; padding: 0 !important; border: 0 !important;
		background: transparent !important; text-align: left !important;
	}
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td::before { display: none !important; content: none !important; }
	.woocommerce-cart table.cart td.product-thumbnail { grid-area: thumb; }
	.woocommerce-cart table.cart td.product-thumbnail img { width: 76px !important; height: 95px; object-fit: cover; border: 1px solid #E5E5E5; }
	.woocommerce-cart table.cart td.product-name { grid-area: name; font-size: 15px; line-height: 1.35; }
	.woocommerce-cart table.cart td.product-name a { text-decoration: none; }
	.woocommerce-cart table.cart td.product-name dl.variation { margin: 4px 0 0 !important; font-size: 13px; color: #6b6b6b; font-weight: 400; }
	.woocommerce-cart table.cart td.product-name dl.variation dt { float: left; clear: left; margin: 0 4px 0 0 !important; font-weight: 400 !important; }
	.woocommerce-cart table.cart td.product-name dl.variation dd { margin: 0 !important; text-align: left !important; }
	.woocommerce-cart table.cart td.product-name dl.variation dd p { margin: 0 !important; }
	.woocommerce-cart table.cart td.product-remove { grid-area: remove; }
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-price { display: none !important; }
	.woocommerce-cart table.cart td.product-quantity { grid-area: qty; align-self: end; color: #6b6b6b; font-size: 14px; }
	.woocommerce-cart table.cart td.product-quantity .quantity input.qty { width: 64px; height: 40px; border: 1px solid #E5E5E5; border-radius: 8px; text-align: center; }
	.woocommerce-cart table.cart td.product-subtotal { grid-area: total; align-self: end; text-align: right !important; font-weight: 700; }
	.woocommerce-cart table.shop_table_responsive.cart tr:not(.cart_item) td { background: #fff !important; }
}

/* Logged-in admins: keep the drawer below the WordPress admin bar */
body.admin-bar .tycd__panel { top: 32px; }
@media (max-width: 782px) { body.admin-bar .tycd__panel { top: 46px; } }
