:root {
    --wl-bg: #fafafa;
    --wl-surface: #ffffff;
    --wl-border: #ececec;
    --wl-text: #1a1a1a;
    --wl-muted: #6b7280;
    --wl-accent: #16a34a;
    --wl-accent-hover: #15803d;
    --wl-radius: 14px;
    --wl-radius-sm: 10px;
    --wl-shadow-sm: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.04);
    --wl-shadow-lg: 0 12px 32px rgba(16,24,40,0.08), 0 4px 8px rgba(16,24,40,0.04);
}

/* ── Dark theme remap ──────────────────────────────────────
   Page-local --wl-* tokens are light-only; remap for dark mode.
   --wl-accent (green) stays identical across themes. */
[data-theme="dark"] {
    --wl-bg:      #121212;
    --wl-surface: #1e1e1e;
    --wl-border:  #2c2c2c;
    --wl-text:    #e0e0e0;
    --wl-muted:   #a0a0a0;
}
[data-theme="dark"] .wl-thumb,
[data-theme="dark"] .wl-empty .ic { background: var(--color-surface-2, #242424); }
[data-theme="dark"] .wl-remove { background: rgba(30, 30, 30, 0.9); }
/* --wl-text doubles as a dark button fill; restore a visible fill */
[data-theme="dark"] .wl-empty .browse-btn { background: #2c2c2c; color: var(--wl-text); }
[data-theme="dark"] .wl-empty .browse-btn:hover { background: #3a3a3a; color: var(--wl-text); }

.wl-shell {
    background: var(--wl-bg);
    min-height: 100vh;
    padding: 48px 0 80px;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--wl-text);
    -webkit-font-smoothing: antialiased;
}
.wl-head {
    display: flex; justify-content: space-between; align-items: end;
    flex-wrap: wrap; gap: 12px; margin-bottom: 32px;
}
.wl-head h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.wl-head .crumb { font-size: 13px; color: var(--wl-muted); }
.wl-head .crumb a { color: var(--wl-muted); text-decoration: none; }
.wl-head .crumb a:hover { color: var(--wl-accent); }

.wl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
}

.wl-card {
    background: var(--wl-surface);
    border: 1px solid var(--wl-border);
    border-radius: var(--wl-radius);
    box-shadow: var(--wl-shadow-sm);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.wl-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--wl-shadow-lg);
    border-color: transparent;
}

.wl-thumb {
    position: relative;
    height: 220px;
    background: #f4f4f5;
    overflow: hidden;
}
.wl-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}
.wl-card:hover .wl-thumb img { transform: scale(1.05); }

.wl-remove {
    position: absolute; top: 10px; right: 10px;
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--wl-border);
    color: var(--wl-muted);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
}
.wl-remove:hover {
    background: var(--wl-accent); color: #fff; border-color: var(--wl-accent);
}

.wl-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.wl-name {
    font-size: 15px; font-weight: 600; line-height: 1.4;
    margin: 0 0 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wl-price { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.wl-actions { margin-top: auto; display: flex; gap: 8px; }
.wl-add-cart {
    flex: 1;
    background: var(--wl-accent); color: #fff; border: none;
    padding: 11px 14px; border-radius: 10px;
    font-size: 13.5px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(22,163,74,0.22);
    transition: all 0.18s ease;
}
.wl-add-cart:hover {
    background: var(--wl-accent-hover);
    box-shadow: 0 8px 18px rgba(22,163,74,0.3);
}
.wl-add-cart:disabled { opacity: 0.7; cursor: not-allowed; }

.wl-empty {
    text-align: center; padding: 80px 24px;
    background: var(--wl-surface);
    border: 1px dashed var(--wl-border);
    border-radius: var(--wl-radius);
}
.wl-empty .ic {
    width: 88px; height: 88px; border-radius: 50%;
    background: #f4f4f5; display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 38px; color: var(--wl-muted); margin-bottom: 20px;
}
.wl-empty h4 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.wl-empty p { color: var(--wl-muted); margin-bottom: 22px; }
.wl-empty .browse-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--wl-text); color: #fff; text-decoration: none;
    padding: 11px 22px; border-radius: 999px;
    font-size: 13.5px; font-weight: 600;
}
.wl-empty .browse-btn:hover { background: #000; color: #fff; }

@media (max-width: 575px) {
    .wl-shell { padding: 24px 0 60px; }
    .wl-head h1 { font-size: 24px; }
    .wl-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .wl-thumb { height: 160px; }
    .wl-body { padding: 12px 14px 14px; }
}
