/* =============================================================================
   1. Outer Wrapper
   ============================================================================= */
.sw-wishlist {
	padding: 40px 0 60px;
}

/* =============================================================================
   2. Header Bar
   ============================================================================= */
.sw-wishlist__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 30px;
	padding-bottom: 18px;
	border-bottom: 2px solid var(--border);
}

.sw-wishlist__heading {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--text);
}

.sw-wishlist__heading svg {
	stroke: var(--primary);
}

.sw-wishlist__total {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--muted);
	background: var(--light);
	border-radius: 20px;
	padding: 2px 10px;
}

.sw-wishlist__clear-btn {
	font-size: 0.875rem;
	color: var(--muted);
	background: none;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 6px 16px;
	cursor: pointer;
	transition: var(--transition);
}

.sw-wishlist__clear-btn:hover {
	border-color: #e53e3e;
	color: #e53e3e;
}

/* =============================================================================
   3. Loading Skeleton
   ============================================================================= */
.sw-wishlist__loader {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sw-wl-skeleton {
	height: 68px;
	border-radius: var(--radius);
	background: linear-gradient(90deg, var(--light) 25%, #ececf4 50%, var(--light) 75%);
	background-size: 200% 100%;
	animation: sw-skeleton-shimmer 1.4s infinite;
}

@keyframes sw-skeleton-shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* =============================================================================
   4. Table Wrapper
   ============================================================================= */
.sw-wishlist__table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: var(--card-radius);
	box-shadow: var(--shadow);
	background: #fff;
}

/* =============================================================================
   5. Table
   ============================================================================= */
.sw-wishlist__table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

/* =============================================================================
   6. Table Head
   ============================================================================= */
.sw-wl-th {
	padding: 14px 16px;
	text-align: left;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--muted);
	background: var(--light);
	border-bottom: 2px solid var(--border);
	white-space: nowrap;
}

.sw-wl-th--img     { width: 90px; }
.sw-wl-th--name    { width: auto; }
.sw-wl-th--price   { width: 120px; }
.sw-wl-th--stock   { width: 110px; }
.sw-wl-th--actions { width: 160px; }
.sw-wl-th--remove  { width: 48px; }

/* =============================================================================
   7. Table Rows
   ============================================================================= */
.sw-wl-row {
	border-bottom: 1px solid var(--border);
	transition: var(--transition);
}

.sw-wl-row:last-child {
	border-bottom: none;
}

.sw-wl-row:hover {
	background: var(--light);
}

/* =============================================================================
   8. Table Cells
   ============================================================================= */
.sw-wl-col {
	padding: 14px 16px;
	vertical-align: middle;
}

/* -----------------------------------------------------------------------
   8.1 Thumbnail
   ----------------------------------------------------------------------- */
.sw-wl-col--img {
	padding: 10px 12px;
}

.sw-wl-col__thumb-link {
	display: block;
	width: 64px;
	height: 64px;
	border-radius: var(--radius);
	overflow: hidden;
	flex-shrink: 0;
	border: 1px solid var(--border);
}

.sw-wl-col__thumb-link img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: var(--transition);
}

.sw-wl-row:hover .sw-wl-col__thumb-link img {
	transform: scale(1.07);
}

/* -----------------------------------------------------------------------
   8.2 Name
   ----------------------------------------------------------------------- */
.sw-wl-col__name-link {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--text);
	text-decoration: none;
	line-height: 1.4;
	transition: var(--transition);
}

.sw-wl-col__name-link:hover {
	color: var(--primary);
}

/* -----------------------------------------------------------------------
   8.3 Price
   ----------------------------------------------------------------------- */
.sw-wl-col--price {
	font-size: 1rem;
	font-weight: 700;
	color: var(--primary);
}

.sw-wl-col--price del {
	display: block;
	color: var(--muted);
	font-weight: 400;
	font-size: 0.8rem;
}

/* -----------------------------------------------------------------------
   8.4 Stock Badge
   ----------------------------------------------------------------------- */
.sw-wl-badge {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 20px;
	white-space: nowrap;
}

.sw-wl-badge--in {
	background: #f0fff4;
	color: #276749;
	border: 1px solid #c6f6d5;
}

.sw-wl-badge--out {
	background: #fff5f5;
	color: #9b2c2c;
	border: 1px solid #fed7d7;
}

/* -----------------------------------------------------------------------
   8.5 Actions
   ----------------------------------------------------------------------- */
.sw-wl-col--actions {
	white-space: nowrap;
}

.sw-wl-col__add-btn,
.sw-wl-col__view-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 16px;
	border-radius: var(--radius);
	font-size: 0.83rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: var(--transition);
	white-space: nowrap;
}

.sw-wl-col__add-btn {
	background: var(--main-bg);
	color: #fff !important;
}

.sw-wl-col__add-btn:hover {
	background: var(--secondary, #5529e0);
	border-color: var(--secondary, #5529e0);
	color: #fff;
	box-shadow: 0 4px 16px color-mix(in srgb, var(--secondary, #5529e0) 35%, transparent);
}

.sw-wl-col__view-btn {
	border: 1.5px solid var(--border);
	background: transparent;
	color: var(--text) !important;
}

.sw-wl-col__view-btn:hover {
	border-color: var(--primary);
	color: var(--primary) !important;
}

/* -----------------------------------------------------------------------
   8.6 Remove Button
   ----------------------------------------------------------------------- */
.sw-wl-col--remove {
	text-align: center;
	padding: 0 8px;
}

.sw-wl-col__remove {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: transparent;
	border: 1px solid var(--border);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: var(--transition);
	color: var(--muted);
}

.sw-wl-col__remove:hover {
	background: #e53e3e;
	border-color: #e53e3e;
	color: #fff;
}

.sw-wl-col__remove svg {
	pointer-events: none;
}

/* =============================================================================
   9. Empty State
   ============================================================================= */
.sw-wishlist__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	padding: 70px 20px;
	text-align: center;
}

.sw-wishlist__empty p {
	font-size: 1.05rem;
	font-weight: 500;
	color: var(--muted);
}

/* =============================================================================
   10. Removing Animation
   ============================================================================= */
.sw-wl-row.is-removing {
	opacity: 0;
	transform: scaleY(0.8);
	transition: var(--transition);
	pointer-events: none;
}

/* =============================================================================
   11. Responsive
   ============================================================================= */
@media (max-width: 768px) {
	.sw-wl-th--stock,
	.sw-wl-col--stock {
		display: none;
	}

	.sw-wl-th--price   { width: 90px; }
	.sw-wl-th--actions { width: 120px; }
}

@media (max-width: 560px) {
	.sw-wl-col__add-btn,
	.sw-wl-col__view-btn {
		padding: 7px 10px;
		font-size: 0.78rem;
	}

	.sw-wl-col__thumb-link {
		width: 48px;
		height: 48px;
	}

	.sw-wl-th--price,
	.sw-wl-col--price {
		display: none;
	}
}